Sachi Tekina
Sachi Tekina

Reputation: 1810

Is it possible to allow panning on the vector layer in Openlayers?

enter image description here As shown on the image above, "La Union" is selected so I was not able to pan. And even if it not selected as long as the cursor is above the vector layer, I can't pan on the map.

The obvious question is, is it possible without using the toolbar/controls? Maybe using Jquery or JavaScript? BTW, I'm using Openlayers 2.14.

Upvotes: 1

Views: 222

Answers (1)

Sachi Tekina
Sachi Tekina

Reputation: 1810

This solves my problem, for example you have this SelectFeature control named "selectControl" just add this below:

if (typeof(selectControl.handlers) != "undefined") { // OL 2.7
    selectControl.handlers.feature.stopDown = false;
} else if (typeof(selectControl.handler) != "undefined") { // OL < 2.7
    selectControl.handler.stopDown = false;
    selectControl.handler.stopUp = false;
}

Reference

Upvotes: 1

Related Questions