On 07/02/2010 10:58 AM, Iswaria wrote: > Hi all, > > In this link http://openlayers.org/dev/examples/custom-control.html, the > rectangle we draw by pressing the shift key disappears, as soon as we > complete drawing the rectangle. > > I want to display the rectangle, what user has drawn. > > What should be done to display the rectangle. > > Thanks, > Iswaria > It seems to me like the box handler returns a set of pixels describing the box, and that the code added gets the coordinates for this.
I guess a simlpe approach is the use the coordinates and construct a polygon geometry and then add this as a feature to a vector layer on the map, and then apply a style to make it look like the box. -atle -- Atle Frenvik Sveen Utvikler Geomatikk IKT AS tlf: 45 27 86 89 [email protected]
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
