Skip to content

Instantly share code, notes, and snippets.

@rayjanwilson
Created March 15, 2012 10:09
Show Gist options
  • Select an option

  • Save rayjanwilson/2043427 to your computer and use it in GitHub Desktop.

Select an option

Save rayjanwilson/2043427 to your computer and use it in GitHub Desktop.
possible solution to openlayers shift-click-drag issue
var map;
function init() {
map = new OpenLayers.Map('map',
{
'controls':[]
});
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{
layers: 'basic'
});
map.addLayer(wms);
var navigation = new OpenLayers.Control.Navigation({'zoomBoxEnabled':false});
map.addControl( navigation );
map.zoomToMaxExtent();
navigation.activate();
navigation.dragPan.handler.keyMask = OpenLayers.Handler.MOD_SHIFT;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment