Hi,<br><br>I am using vector (polygon) layer with draw feature and modify feature. Let me explain first what I am trying to achieve. I want to draw rectangles(strict horizontally aligned) and after drawing it might require a little bit of modification but again it shouldn&#39;t lose its shape. <br>
<br>Here is what I tried doing:<br><br>polygonLayer = new OpenLayers.Layer.Vector(&quot;Capture Region&quot;, {displayInLayerSwitcher: true, reproject: true});<br>        polyOptions = {sides: 4, snapAngle: 180, irregular: true}; //To draw only rectangles<br>
        var pan = new OpenLayers.Control.Navigation({title: &quot;Navigate&quot;})<br>        polygonControl = new OpenLayers.Control.DrawFeature(polygonLayer, OpenLayers.Handler.RegularPolygon, <br>            {handlerOptions: polyOptions});<br>
        modify = new OpenLayers.Control.ModifyFeature(<br>                polygonLayer, {displayClass: &quot;olControlModifyFeature&quot;, title: &quot;Modify Features&quot;}, <br>                {mode: ~OpenLayers.Control.ModifyFeature.RESHAPE | OpenLayers.Control.ModifyFeature.RESIZE <br>
                | OpenLayers.Control.ModifyFeature.DRAG }<br>            );<br>        var panel = new OpenLayers.Control.Panel({<br>             displayClass: &quot;olControlEditingToolbar&quot;<br>        });<br>        panel.addControls([pan, polygonControl, modify]);<br>
        map.addControl(panel);<br><br>The problem is it doesn&#39;t follow the modify feature modes I have defined. It allows reshaping and doesn&#39;t allow dragging and resizing. Another problem I have is when I define the displayClass for draw feature, it wouldn&#39;t let me draw rectangles that are horizontally aligned. To point your attention towards where I might be making a mistake, I am using OpenLayers.Handler.RegularPolygon to draw feature. Is that a problem?<br>
<br>Thanks a lot for taking time to read my problem and I&#39;d really appreciate if you could help me with any suggestions and ideas.<br><br>Thanks!<br>Moiz<br>