<div><font><font face="courier new,monospace">Thanks Dennis,<br clear="all"></font></font></div><div><font><font face="courier new,monospace">Is there a hard way that is more proper, or is reimplementing the input handler proper?  Also addGeoDataString doesn't have much for documentation.  Does it take a kml?  I am getting a seg fault with a string (generated from the selection):<br>

</font></font></div><div><font><font face="courier new,monospace"><br></font></font></div><div><font><font face="courier new,monospace"><Placemark><br>  <LinearRing><br>    <extrude>0</extrude><br>

    <tessellate>0</tessellate><br>    <altitudeMode>clampToGround</altitudeMode><br>    <coordinates><br>      -114.804200,47.627658,0.0<br>      -112.560859,47.627658,0.0<br>      -112.560859,46.053973,0.0<br>

      -114.804200,46.053973,0.0<br>      -114.804200,47.627658,0.0<br>    </coordinates><br>  </LinearRing><br></Placemark><br></font></font></div><div><font><font face="courier new,monospace"><br></font></font></div>

<div><font><font face="courier new,monospace">Which loads into google earth without error.  Is there anywhere else to look, or should I just go straight to the code?<br></font></font></div><div><font><font face="courier new,monospace"><br>

</font></font></div><div><font><font face="courier new,monospace">kss<br></font></font></div><br><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 Tue, Feb 14, 2012 at 14:22, Dennis Nienhüser <span dir="ltr"><<a href="mailto:earthwings@gentoo.org">earthwings@gentoo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Kyle,<br>
<br>
an easy way (hack) would be to use the selection rubber band Marble uses<br>
when you hold Ctrl and do the interaction you describe. You can access<br>
that rectangle via the MarbleWidget::regionSelected(QList<double>)<br>
signal. The list contains the border points (west, north, east, south,<br>
in degree). To make it persistent, add your own layer as described in<br>
the tutorials and have it paint the rectangle. Alternatively, create a<br>
suitable .kml file with the rectangle, style it and add it to the map<br>
via MarbleWidget::model()->addGeoDataString() or addGeoDataFile().<br>
You can also add another event filter on the widget and handle the user<br>
actions similarly to how MarbleWidgetDefaultInputHandler implements the<br>
rubber band selection.<br>
<br>
Regards,<br>
Dennis<br>
<div><div class="h5"><br>
On 14.02.2012 21:42, Kyle Shannon wrote:<br>
> Hello,<br>
> I was wondering if it is possible to have the user draw a box on the<br>
> map in marblewidget.<br>
><br>
> 1) User clicks a point.<br>
> 2) User drags the mouse to another point.<br>
><br>
> The two points define a rectangle.  I would like the drawing to be<br>
> updated as well as the user drags the mouse.  I checked the tutorials,<br>
> and the GeoPainter examples are all pretty static.  My question is<br>
> where do I start?  Do I need to look into Qt api stuff or somewhere in<br>
> the marble api.  I thought I found somenting in the digikam source,<br>
> but it didn't seem like what I was looking for.  I am using the QTONLY<br>
> build.<br>
><br>
> kss<br>
><br>
> /**<br>
>  *<br>
>  * Kyle Shannon<br>
</div></div>>  * <a href="mailto:ksshannon@gmail.com">ksshannon@gmail.com</a> <mailto:<a href="mailto:ksshannon@gmail.com">ksshannon@gmail.com</a>><br>
>  *<br>
>  */<br>
><br>
><br>
><br>
> _______________________________________________<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>
<br>
_______________________________________________<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>
</blockquote></div><br>