Rayiez
Rayiez

Reputation: 1599

Openlayers3 mousewheelzoom and keyboardzoom doesnt seem to work

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

Answers (1)

bartvde
bartvde

Reputation: 2126

Keys are case sensitive, so mouseWheelZoom and keyboard see http://openlayers.org/en/latest/apidoc/ol.interaction.html#.defaults

Upvotes: 3

Related Questions