I am creating a map using the following code:
map = new OpenLayers.Map({
div: "map"
});
Then I load in a geojson polygon layer and add two controls
var highlightCtrl = new OpenLayers.Control.SelectFeature(geojson_layer, {
hover: true,
highlightOnly: true,
renderIntent: "temporary",
eventListeners: {
beforefeaturehighlighted: unreport,
featurehighlighted: report,
featureunhighlighted: unreport
}
});
selectCtrl = new OpenLayers.Control.SelectFeature(geojson_layer,
{clickout: true ,
renderIntent: "select",
onSelect: selected,
onUnselect: function(e){console.log('unselected)}
});
map.addControl(highlightCtrl);
map.addControl(selectCtrl);
highlightCtrl.activate();
selectCtrl.activate();
This layer covers the entire map div, and now I can no longer pan the map. Is there a way that I can enable panning when I have a layer with controls that cover the basemap?
