<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
<font size="-1"><font face="Verdana">Hi,<br>
<br>
Now I have drawn the rectangle. <br>
<br>
One more query, Before drawing a rectangle, I want to clear/remove the
rectangles, if any.<br>
<br>
How to do it?<br>
<br>
Thanks.<br>
</font></font><br>
Sveen Atle Frenvik (Geomatikk IKT) [via OSGeo.org] wrote:
<blockquote
cite="mid:02656758FFFCDF4D9CC79BC33EBC55F880E5BB@TD-VIRT-EX-01.geomatikk.ad"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator"
content="MS Exchange Server version 6.5.7654.12">
<title>Re: [OpenLayers-Users] draw rectangle over the map</title>
<!-- Converted from text/plain format -->
<p><font size="2">On 07/02/2010 10:58 AM, Iswaria wrote:<br>
> Hi all,<br>
><br>
> In this link <a moz-do-not-send="true"
href="http://openlayers.org/dev/examples/custom-control.html"
target="_top" rel="nofollow" link="external">http://openlayers.org/dev/examples/custom-control.html</a>,
the<br>
> rectangle we draw by pressing the shift key disappears, as soon as
we<br>
> complete drawing the rectangle.<br>
><br>
> I want to display the rectangle, what user has drawn.<br>
><br>
> What should be done to display the rectangle.<br>
><br>
> Thanks,<br>
> Iswaria<br>
> <br>
It seems to me like the box handler returns a set of pixels describing<br>
the box, and that the code added gets the coordinates for this.<br>
<br>
I guess a simlpe approach is the use the coordinates and construct a<br>
polygon geometry and then add this as a feature to a vector layer on the<br>
map, and then apply a style to make it look like the box.<br>
<br>
-atle<br>
<br>
--<br>
Atle Frenvik Sveen<br>
Utvikler<br>
Geomatikk IKT AS<br>
tlf: 45 27 86 89<br>
<a moz-do-not-send="true" href="/user/SendEmail.jtp?type=node&node=5246953&i=0&by-user=t" target="_top" rel="nofollow" link="external">[hidden email]</a><br>
<br>
</font>
</p>
<br>
_______________________________________________
<br>
Users mailing list
<br>
<a moz-do-not-send="true" href="/user/SendEmail.jtp?type=node&node=5246953&i=1&by-user=t" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br>
<a moz-do-not-send="true"
href="http://openlayers.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://openlayers.org/mailman/listinfo/users</a><br>
<br>
<br>
<hr color="#cccccc" noshade="noshade" size="1">
<div style="color: rgb(102, 102, 102); font-family: tahoma,geneva,helvetica,arial,sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal;">View
message @ <a moz-do-not-send="true" href="http://osgeo-org.1803224.n2.nabble.com/draw-rectangle-over-the-map-tp5246929p5246953.html?by-user=t" target="_top" rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/draw-rectangle-over-the-map-tp5246929p5246953.html</a>
<br>
To unsubscribe from draw rectangle over the map, <a
moz-do-not-send="true" target="_top" rel="nofollow" link="external">click
here</a>.
</div>
<br>
</blockquote>
<br><hr align="left" width="300">
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/draw-rectangle-over-the-map-tp5246929p5247067.html">Re: draw rectangle over the map</a><br>
Sent from the <a href="http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br>