3

I am using this example

http://dev.openlayers.org/examples/draw-feature.html

to draw a box on a map using 'draw box' checkbox option. Now I want , After drawing box I can be able to pan on map using roller of mouse(scroll wheel ) ? like for drawing I use left button of mouse so for panning I will click roller of mouse and pan on map

To drawing Code is

box: new OpenLayers.Control.DrawFeature(boxLayer,
                    OpenLayers.Handler.RegularPolygon, {
                        handlerOptions: {
                            sides: 4,
                            irregular: true
                        }
                    }

which is taken by

https://github.com/openlayers/ol2/blob/master/examples/draw-feature.html

And working of this file I already attached.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.