Disable as keyboard "+" and "-" keys for zoom slider widget

1377
4
Jump to solution
05-10-2017 09:15 AM
Labels (1)
GilbertoMatos
Occasional Contributor II

Hello

Is there any way to disable the "+" and "-" keys for the zoom slider widget? My user, wants to be zoomed, just through the mouse.

I made a debug and found that by zooming in on both the mouse and the keyboard, the function that is executed is "_zoomHandler" from the widget.js, but this function basically controls the maximum zoom levels, so that you can disable the buttons Widget.

Any help will be welcome.

Thank you!
Gilberto.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Gilberto,

   In the MapManager.js add map.disableKeyboardNavigation(); to the _show2DWebMap function right after map.enableSnapping(options);

View solution in original post

4 Replies
RobertScheitlin__GISP
MVP Emeritus

Gilberto,

   In the MapManager.js add map.disableKeyboardNavigation(); to the _show2DWebMap function right after map.enableSnapping(options);

GilbertoMatos
Occasional Contributor II

Perfect Robert!

Thanks again for your help.

Hug,
Gilberto.

0 Kudos
ErfanGoharian
New Contributor III

Is there also a way to disable mouse scroll, so the user cannot zoom in/out?

0 Kudos