官术网_书友最值得收藏!

Map Navigation with the mouse and keyboard

Users can also control map navigation with the mouse and/or keyboard devices. By default, users can do the following:

  • Drag the mouse to pan
  • Mouse scroll forward to zoom in
  • Mouse scroll backward to zoom out
  • SHIFT + Drag the mouse to zoom in + drag the mouse to zoom in
  • Shift + Ctrl + drag the mouse to zoom out
  • Shift + click to recenter
  • Double Click to zenter and zoom in
  • Shift + double-click to center and zoom out
  • Use arrow keys to pan
  • Use + key to zoom in a level
  • Use - key to zoom out a level

These options can be disabled using one of several Map methods. For example, to disable scroll wheel zooming you would use the Map.disableScrollWheelZoom() method. These navigation features can also be removed after the map has been loaded. This can be very useful. For example, let's say that you have a custom tool that requires the user to double click on the map to select a feature. You'll want to call Map.disableDoubleClickZoom() while your tool is being used, and Map.enableDoubleClickZoom() when your user has finished with it.

主站蜘蛛池模板: 连平县| 松原市| 清苑县| 和田县| 班玛县| 探索| 齐齐哈尔市| 抚宁县| 喀喇沁旗| 元氏县| 渭南市| 台中市| 蓝田县| 镇赉县| 汉源县| 磐石市| 嘉定区| 大足县| 山阴县| 夏邑县| 保亭| 崇阳县| 通渭县| 望都县| 大安市| 星子县| 威信县| 读书| 上栗县| 绥化市| 长岛县| 扎鲁特旗| 乐至县| 巴里| 桂阳县| 玉门市| 凉山| 金平| 新野县| 苏尼特左旗| 常山县|