Reputation: 1599
I want to disable mousewheelzoom and keyboardzoom on openlayers3 map.
I am using it this way with map initialization.
interactions: ol.interaction.defaults({MouseWheelZoom:false, KeyboardZoom:false}),
However it doesnt seem to work, I can still zoom using mousewheel and with keyboard + and - keys.
Am I doing anything wrong ?
Upvotes: 0
Views: 173
Reputation: 2126
Keys are case sensitive, so mouseWheelZoom
and keyboard
see http://openlayers.org/en/latest/apidoc/ol.interaction.html#.defaults
Upvotes: 3