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

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.

主站蜘蛛池模板: 永春县| 洛隆县| 西安市| 昆明市| 罗平县| 莱芜市| 响水县| 翁牛特旗| 新巴尔虎右旗| 库尔勒市| 西昌市| 保德县| 施秉县| 长子县| 和林格尔县| 绥德县| 遂昌县| 南康市| 新丰县| 馆陶县| 宝清县| 武夷山市| 新津县| 泸定县| 玛纳斯县| 西乌| 黄陵县| 吉隆县| 马尔康县| 吕梁市| 北辰区| 呼图壁县| SHOW| 宁南县| 宝丰县| 莲花县| 呼和浩特市| 辽中县| 罗城| 察雅县| 嘉祥县|