[Marble-devel] Re: MarbleWidget "loading completed" signal and Placemarks

Dennis Nienhüser earthwings at gentoo.org
Sun Jun 26 22:26:42 CEST 2011


Hi Radosław,

On 26.06.2011 22:00, Radosław Wicik wrote:
> Hi,
> I'm Radoslaw Wicik and I'm involved in GSoC and I'm embedding Marble in
> to kexi, more on this project you can read at [1]
>
> And I need your help.
>
> Maps are loaded what takes some time, is there any signal that is
> emitted when loading is completed?

yes, when loading a map theme via MarbleWidget::setMapThemeId(QString),
MarbleModel::themeChanged(QString) will be emitted after loading it. You
can access the model instance that will emit the signal via the model()
method of MarbleWidget. The themeChanged signal will be emitted a bit
earlier than the final repaint of MarbleWidget though.

> Is there a way to display some place marks, maybe with label?
>
> Or rather, do you have some examples of how to use
> "MarbleModel::addGeoDataString()"?

You need to pass it the contents of a kml file, including the xml stuff.
Are you sure the method is enough for your needs? One of the limitations
will be that you cannot remove the placemarks later on.
Better use addGeoDataFile if you have .kml files on disk. If you prefer
a solution working in memory, I'd suggest using either the simple (in
#loc) customPaint() or, more flexible, creating your own layer as
described in [2]. The formatting of the techbase wiki pages seems broken
at the moment, please have a look at the source of the pages (edit
button) to see the code.

Regards,
Dennis

[1] http://techbase.kde.org/Projects/Marble/MarbleGeoPainter
[2] http://techbase.kde.org/Projects/Marble/LayerInterface


>
> [1]
> http://community.kde.org/index.php?title=Kexi/Junior_Jobs/Map_Browser_Form_Widget#Discussions
>
> --
> Regards
> Radek
>
>
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel



More information about the Marble-devel mailing list