[Marble-devel] Review Request 123739: Added LabelStyle kml tag writer which was missing. Problems with kml saving.

Constantin Mihalache mihalache.c94 at gmail.com
Tue May 19 00:07:16 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123739/
-----------------------------------------------------------

(Updated May 19, 2015, 12:07 a.m.)


Status
------

This change has been discarded.


Review request for Marble, Calin Cruceru and Torsten Rahn.


Repository: marble


Description
-------

KML saving bugs
=================

1. Marble always writes a default style for polygons at the beginning of the kml, which might never be used.
2. It doesn't output the styles for any written annotation element (tested for polygon and polyline). Solved this problem for placemarks with this patch(explained below).

Bug solving idea
=================
The aproach that Marble has when writing kml is to output all the styles at the beginning of the document and then link each element to that style via <styleUrl>. Unfortunately this does not currently work because Marble is unable to write all the styles to the kml document (and it isn't an easily solvable issue, from my perspective, because it's tricky to provide unique style names and **you cannot edit the styles directly from the application**).
                                             
My idea of solving these issues is to give up the current aproach and write a style tag inside each outputed annotation element. This makes sense for now, because Marble isn't yet used for map editing and you don't need one style for multiple elements (for example roads, cities).
Further on, to aid the "one style to many elements" there could be implemented an "EditStyleDialog" (to add/edit styles) and the posibility to select an already created style while adding/editing annotation objects.

Note
====
I've only stated my ideas beceause I'm not fully certain that my perspective is right :).
The bothering question is wether, I should continue with the implementation.


Diffs
-----

  src/plugins/render/annotate/AnnotatePlugin.cpp 41a6dd9 
  src/lib/marble/geodata/writers/kml/KmlLabelStyleTagWriter.cpp PRE-CREATION 
  src/lib/marble/geodata/CMakeLists.txt fe22e24 
  src/lib/marble/geodata/writers/kml/KmlLabelStyleTagWriter.h PRE-CREATION 

Diff: https://git.reviewboard.kde.org/r/123739/diff/


Testing
-------

Can now add **placemarks**, save to KML and load the KML back into Marble. 
Also loaded the outputed KML into Google Earth and worked as expected.


Thanks,

Constantin Mihalache

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20150519/89734e8e/attachment.html>


More information about the Marble-devel mailing list