This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Drawing placemarks in a custom layer

Tags: None
(comma "," separated)
adabrowski
Registered Member
Posts
14
Karma
0

Drawing placemarks in a custom layer

Tue Apr 22, 2014 11:59 am
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?
adabrowski
Registered Member
Posts
14
Karma
0
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.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]