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 Schuyler Erle-2 wrote: > >> 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 > [email protected] > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://www.nabble.com/Rectangle-%28box-like%29-drawing-tool--tf3527919.html#a13331801 Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
