[OpenLayers-Users] Re: drawing rectangles

Steve thesteveborland at gmail.com
Fri Nov 18 06:11:30 EST 2011


Puneet Kishor <punk.kish at ...> writes:

> 
> I am trying to implement a control to draw non-rotatable rectangles on the
map. The following code draws
> squares only, and with "snapAngle" at 0, it can be rotated freely, while with
"snapAngle" at 360 the square
> is rotated by 45 deg, for some reason.
> 
> 	var feature_ctl = new OpenLayers.Control.DrawFeature(
> 		vectorLayer,
> 		OpenLayers.Handler.RegularPolygon, {handlerOptions: {sides: 4, snapAngle: 0}}
>         );
> 
> Would appreciate guidance on how I can make the control draw only
non-rotatable rectangles.
> 
> --
> Puneet Kishor


I am having the same problem.
Any help would be appreciated.

Many thanks,
Steve



More information about the Users mailing list