<div><font><font face="courier new,monospace">Thanks, I do have a namespace declaration. Here is my exact code and output from the slot I catch the RubberBand signal with (CPLSPrintf is just a sprintf function from another lib):</font></font><font><font face="courier new,monospace"><br>
</font></font></div><div><font><font face="courier new,monospace"><br></font></font></div><div><font><font face="courier new,monospace">code:<br></font></font></div><div><font><font face="courier new,monospace">QString kml;<br>
kml = CPLSPrintf(<br> "<kml xmlns=\"<a href="http://earth.google.com/kml/2.0\">http://earth.google.com/kml/2.0\</a>">\n"\<br> " <Placemark>\n"\<br> " <LinearRing>\n"\<br>
" <extrude>0</extrude>\n"\<br> " <tessellate>0</tessellate>\n"\<br> " <altitudeMode>clampToGround</altitudeMode>\n"\<br>
" <coordinates>\n"\<br> " %lf,%lf,0.0\n"\<br> " %lf,%lf,0.0\n"\<br> " %lf,%lf,0.0\n"\<br> " %lf,%lf,0.0\n"\<br>
" %lf,%lf,0.0\n"\<br> " </coordinates>\n"\<br> " </LinearRing>\n"\<br> " </Placemark>\n"\<br> "</kml>\n",<br>
coords[0], coords[1], <br> coords[2], coords[1], <br> coords[2], coords[3], <br> coords[0], coords[3], <br> coords[0], coords[1]);<br> qDebug() << kml;<br> marbleWidget->model()->addGeoDataString(kml);</font></font></div>
<div><font><font face="courier new,monospace"><br></font></font></div><div><font><font face="courier new,monospace">Output I just print out the string:</font></font></div><div><font><font face="courier new,monospace">Marble: Starting selection<br>
Marble: Leaving selection<br>"<kml xmlns="<a href="http://earth.google.com/kml/2.0">http://earth.google.com/kml/2.0</a>"><br> <Placemark><br> <LinearRing><br> <extrude>0</extrude><br>
<tessellate>0</tessellate><br> <altitudeMode>clampToGround</altitudeMode><br> <coordinates><br> -11.705869,14.224237,0.0<br> -4.725890,14.224237,0.0<br> -4.725890,8.913964,0.0<br>
-11.705869,8.913964,0.0<br> -11.705869,14.224237,0.0<br> </coordinates><br> </LinearRing><br> </Placemark><br></kml><br>" <br>Segmentation fault<br>kshannon@ubuntu:~/src/windninja/trunk$</font></font></div>
<div><font><font face="courier new,monospace"><br></font></font></div><div><font><font face="courier new,monospace">I will file a bug report later today. Thanks.</font></font></div><div><font><font face="courier new,monospace"><br>
</font></font></div><div><font><font face="courier new,monospace">kss</font></font></div><div><font><font face="courier new,monospace"><br></font></font></div><font face="courier new,monospace"><font>/**<br> *<br> * Kyle Shannon<br>
* <a href="mailto:ksshannon@gmail.com" target="_blank">ksshannon@gmail.com</a><br> *<br> */</font></font><font><br></font><br>
<br><br><div class="gmail_quote">On Wed, Feb 15, 2012 at 14:11, Thibaut Gridel <span dir="ltr"><<a href="mailto:tgridel@free.fr">tgridel@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<div class="im"><br>
On Tuesday 14 February 2012, Kyle Shannon wrote:<br>
> Also addGeoDataString doesn't have much for documentation.<br>
<br>
</div>We welcome patches there!<br>
<div class="im"><br>
> Does it take a kml? I am getting a seg fault with a string (generated<br>
> from the selection):<br>
<br>
</div>Yes it does, however we can improve this because we handle other formats from<br>
file parsing nowadays.<br>
<br>
You need to put the namespace, like:<br>
<br>
mapWidget->model()->addGeoDataString(<br>
"<kml xmlns=\"<a href="http://earth.google.com/kml/2.0\" target="_blank">http://earth.google.com/kml/2.0\</a>">"<br>
"<Placemark>"<br>
...<br>
"</Placemark>"<br>
"</kml>"<br>
);<br>
<br>
Best Regards,<br>
Thibaut<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Marble-devel mailing list<br>
<a href="mailto:Marble-devel@kde.org">Marble-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/marble-devel" target="_blank">https://mail.kde.org/mailman/listinfo/marble-devel</a><br>
</div></div></blockquote></div><br>