<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/123739/">https://git.reviewboard.kde.org/r/123739/</a>
     </td>
    </tr>
   </table>
   <br />



<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>
   <h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been discarded.</h1>
  </td>
 </tr>
</table>
<br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for Marble, Calin Cruceru and Torsten Rahn.</div>
<div>By Constantin Mihalache.</div>


<p style="color: grey;"><i>Updated May 19, 2015, 12:07 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
marble
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KML saving bugs</h1>
<ol style="padding: 0;text-rendering: inherit;margin: 0 0 0 2em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Marble always writes a default style for polygons at the beginning of the kml, which might never be used.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">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).</li>
</ol>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Bug solving idea</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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 <strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">you cannot edit the styles directly from the application</strong>).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p>
<h1 style="font-size: 100%;text-rendering: inherit;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Note</h1>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Can now add <strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">placemarks</strong>, save to KML and load the KML back into Marble. 
Also loaded the outputed KML into Google Earth and worked as expected.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/plugins/render/annotate/AnnotatePlugin.cpp <span style="color: grey">(41a6dd9)</span></li>

 <li>src/lib/marble/geodata/writers/kml/KmlLabelStyleTagWriter.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/marble/geodata/CMakeLists.txt <span style="color: grey">(fe22e24)</span></li>

 <li>src/lib/marble/geodata/writers/kml/KmlLabelStyleTagWriter.h <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/123739/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>



  </div>
 </body>
</html>