Hi, 

Could anyone help me with the code for the previous author mentioned? 

I am new to openlayers and have been trying all morning to draw a box on a map. I first tried the boxing via a box handler but could not get any farther.

If it is any help, here is what I currently have & does not render correctly: http://idyllico.com/frank/cfm/drag-feature2.html . 

- FC

<blockquote class="quote light-black dark-border-color"><div class="quote light-border-color">
<div class="quote-author" style="font-weight: bold;">Schuyler Erle-2 wrote:</div>
<div class="quote-message">
> Handler.Box will allow you to draw a div (like the zoombox does):

> http://openlayers.org/dev/examples/custom-control.html

> Hold shift and drag.

> Right now, it doesn't stick. You could take the points from the
> Handler.Box (in a custom control) and cause it to create a vector
> feature, or a Marker.Box, depending on what you're looking for.

Just to amplify this, the "up" callback on Control.Box will call your
callback function with an OpenLayers.Bounds object containing the pixel
corners of the box on the map container element. You can use
map.getLonLatFromPixel() to convert the corners to OpenLayers.LonLat
pairs, and then create Marker.Box objects using them, and add the Box
object to a Layer.Box. If you wind up with questions, let us know.

SDE

_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

</div>
</div></blockquote>


<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/Rectangle-%28box-like%29-drawing-tool--tf3527919.html#a13331801">Re: Rectangle (box-like) drawing tool?</a><br>
Sent from the <a href="http://www.nabble.com/OpenLayers-Users-f15907.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br>