[OpenLayers-Users] Rectangle (box-like) drawing tool?

Schuyler Erle sderle at metacarta.com
Thu Apr 5 02:58:35 EDT 2007


With all due respect, Frédéric, I would still consider using the Box
handler. If you look at how the Box handler works, it makes use of the
Drag handler, which itself deals with some of the more fiddly
cross-browser aspects of doing dragging across the map. I think it makes
for a somewhat more maintainable solution, in the long run.

SDE

On Thu, 2007-04-05 at 07:41 +0200, Frédéric Junod wrote:
> This is my vector version.
> 
> The patch is working with the last svn version.
> 
> Hope that's help,
> Regards,
> 
> fredj
> 
> Le Wed, 4 Apr 2007 12:46:36 -0700 (PDT),
> Mike Quentel <mikequentel at yahoo.com> a écrit :
> 
> > Has anyone implemented a rectangle drawing tool?  As in something
> > that draws polygons like the sandbox examples, but restricts mouse
> > movements so that only rectangles are drawn?  I see there is an
> > OpenLayers.Handler.Box class and an OpenLayers.Handler.Polygon
> > class.  I want to have a rectangle drawing tool, so I'm thinking I'd
> > want to inherit from Polygon and/or Box.  Has anyone already
> > implemented such a class?  Would be nice to not "re-invent the
> > wheel".  I searched the API and the Nabble archives (thank you so
> > much for this very useful resource).  Any advice on how to make a
> > rectangle drawing tool appreciated.  Thank you.
> > 
> > Mike Quentel
> >
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list