Registered Member
|
I would like to control the visibility of geometric placemarks (areas) that are loaded into Marble from KML files (like "budapest.kml" in tutorials).
All I can do right now is removing and adding GeoData in model over and over - which is bad. If possible, I would like to have my own layer for some of the placemarks (to separate them into custom groups to show/hide). I've already implemented LayerInterface for some other purpose and it works fine. I don't have access to the GeometryLayer from MarbleWidget class. The way MarbleWidget works: using addGeoData function it updates the tree model and then painting occurs in inner layers (i.e. not accessible). MarbleWidget has addLayer() and removeLayer(), but no getLayers(). What way do you recommend to solve this problem? What is the preferred way to access the GeoData once it's added from a file? |
Registered Member
|
It looks like the best approach is to connect to tree model's signal: added(GeoDataObject*).
This way I can acquire reference to every created GeoDataDocument and it's placemarks, then control their visibility. |
Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]