<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Re: [OpenLayers-Users] draw rectangle over the map</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>On 07/02/2010 10:58 AM, Iswaria wrote:<BR>
&gt; Hi all,<BR>
&gt;<BR>
&gt; In this link <A HREF="http://openlayers.org/dev/examples/custom-control.html">http://openlayers.org/dev/examples/custom-control.html</A>, the<BR>
&gt; rectangle we draw by pressing the shift key disappears, as soon as we<BR>
&gt; complete drawing the rectangle.<BR>
&gt;<BR>
&gt; I want to display the rectangle, what user has drawn.<BR>
&gt;<BR>
&gt; What should be done to display the rectangle.<BR>
&gt;<BR>
&gt; Thanks,<BR>
&gt; Iswaria<BR>
&gt;&nbsp;&nbsp;&nbsp;<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&nbsp; 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>
atle.frenvik.sveen@geomatikk.no<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>