<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19170">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hi,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>i have build my own plugin for drawing 
each kind of</FONT></DIV>
<DIV><FONT size=2 face=Arial>polygone over the map, unfortunately, it is not 
opensource.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>but see the osmannotate plugin, this it a good 
starting point.</FONT></DIV>
<DIV><FONT size=2 face=Arial>The plugin handles how to draw a polygone over 
the map,</FONT></DIV>
<DIV><FONT size=2 face=Arial>check eventFilter:(...) methode and 
m_drawingPolygone member .</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>for storing the polygone permanently (and 
moving,modifying,...) i also suggest to create your own layer,</FONT></DIV>
<DIV><FONT size=2 face=Arial>it is not hard to do,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>regards, konrad</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>- </FONT></DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
  <A title=ksshannon@gmail.com href="mailto:ksshannon@gmail.com">Kyle 
  Shannon</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=earthwings@gentoo.org 
  href="mailto:earthwings@gentoo.org">Dennis Nienhüser</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=marble-devel@kde.org 
  href="mailto:marble-devel@kde.org">marble-devel@kde.org</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, February 14, 2012 11:51 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Marble-devel] Drawing a box 
  on the map</DIV>
  <DIV><BR></DIV>
  <DIV><FONT size=+0><FONT face="courier new,monospace">Thanks Dennis,<BR 
  clear=all></FONT></FONT></DIV>
  <DIV><FONT size=+0><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 size=+0><FONT face="courier new,monospace"><BR></FONT></FONT></DIV>
  <DIV><FONT size=+0><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 size=+0><FONT face="courier new,monospace"><BR></FONT></FONT></DIV>
  <DIV><FONT size=+0><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 size=+0><FONT face="courier new,monospace"><BR></FONT></FONT></DIV>
  <DIV><FONT size=+0><FONT 
  face="courier new,monospace">kss<BR></FONT></FONT></DIV><BR><FONT 
  face="courier new,monospace"><FONT size=+0>/**<BR> *<BR> * Kyle 
  Shannon<BR> * <A href="mailto:ksshannon@gmail.com" 
  target=_blank>ksshannon@gmail.com</A><BR> *<BR> */</FONT></FONT><FONT 
  size=+0><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 
  style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
  class=gmail_quote>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>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Marble-devel mailing 
  list<BR>Marble-devel@kde.org<BR>https://mail.kde.org/mailman/listinfo/marble-devel<BR></BLOCKQUOTE></BODY></HTML>