gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.51k stars 779 forks source link

PointSymbol can not work for point shape file #440

Closed nickyxu closed 8 years ago

nickyxu commented 10 years ago

PointSymbol works based on point(the feature must contains more than one point). However IconSymbol works based on feature.

They are very different under multi-point.

capitals capitals_multipoint

I really don't how to attach file. The above two png actually are rar file. You can just save as ... and rename them to rar.

Sorry about that.

Best Regards, Nicky

gwaldron commented 10 years ago

Right below the comments field it says "Attach images by dragging & dropping, selecting them, or pasting from the clipboard."

Thomas-Lerman commented 10 years ago

I ran into similar issues in that a Shape file with ANY points does not display the points. Similarly, displaying points (such as waypoints, track points, etc.) does not display in GPX files. In the forum issue, http://forum.osgearth.org/Shape-GPX-files-with-points-does-not-display-td7584428.html, I have both of these enumerated using standard example .earth files. This is a show stopping issue for us and would be very helpful if a resolution were found. I did spend some time to verify that the style still were in place, which it was, but did not have enough time to find the issue.

Thomas-Lerman commented 10 years ago

For the fun of it, I added

osg::Image* image = osgDB::readImageFile("pushpin_yellow.png");
style.getOrCreateSymbol<osgEarth::Symbology::MarkerSymbol>()->setImage(image);

with no change in result.

Thomas-Lerman commented 10 years ago

Just tried the newest pull and it still does not work. I do not believe that even the bounding box exists, so it does not seem to be just a display issue.

jasonbeverage commented 8 years ago

If you don't specify a style at all, you will usually see "something" with osgearth. In the case of the feature_gpx example you can't just change the layer index to 0 (points) without changing the style (which only defines a stroke for lines). If you add a point-fill: #ffff00 to the style then it will work.