Load .shp files into a Group/Node rather than a Map #2563
Replies: 8 comments 2 replies
-
Is this related to #2555? Are you hiding the MapNode or the TerrainEngineNode? If you just hide your TerrainEngineNode you should still see vector layers. |
Beta Was this translation helpful? Give feedback.
-
Yes it is related to #2555. I'm using the m_pVisibleCullingCallback->setVisible(false); as you suggested. It hides the entire map including all its layers. So I want to move the layers into their own group to overcome this. |
Beta Was this translation helpful? Give feedback.
-
So this is what I'm doing...
...and it hides everything. |
Beta Was this translation helpful? Give feedback.
-
There are a couple approaches where vector data will render as terrain: (a) draping (e.g., Anything you draw as either a |
Beta Was this translation helpful? Give feedback.
-
So this is my function I'm currently using to load the files into the map. I'm not quite sure how to change it?
|
Beta Was this translation helpful? Give feedback.
-
Hi Glenn, I'm not quite sure I understand how to use this? 🤔 So I have the function above that loads the .shp files, then elsewhere I have that cullingCallback installed as you suggested in #2555. I then show/hide terrain with m_pVisibleCullingCallback->setVisible(true/false). To toggle an arbitrary vector's visbility I do this...
How do I now hide the terrain only and not the vector data using the custom shader you've shown? My apologies for the ignorance, but this is all pretty new to me. (In fact, I had to AI the shader example above to get a basic understanding of what it does 🤣 ) |
Beta Was this translation helpful? Give feedback.
-
What you're trying to do is not "officially" a feature in osgEarth, so I'm just giving you options and ideas. Anything that's an "Image" layer (like Things that just create OSG geometry, like |
Beta Was this translation helpful? Give feedback.
-
Thanks I do appreciate the effort. 👍 |
Beta Was this translation helpful? Give feedback.
-
Is there a way to load .shp files into a group/node rather than the map?
Currently they are loaded into the map as layers, but I rather want them in a group. Reason being, when I hide the map, the vector maps are obviously hidden as well because they are layers in the map.
Beta Was this translation helpful? Give feedback.
All reactions