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

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.

主站蜘蛛池模板: 胶南市| 长垣县| 桐柏县| 商南县| 天峻县| 平塘县| 常德市| 安阳县| 白山市| 岐山县| 蒙山县| 马尔康县| 内江市| 开封县| 襄垣县| 榕江县| 金塔县| 中江县| 邹城市| 惠安县| 黄大仙区| 灵武市| 浠水县| 长垣县| 观塘区| 光山县| 徐水县| 巴塘县| 武川县| 黄石市| 黄平县| 怀远县| 射洪县| 霸州市| 靖宇县| 凌海市| 肥东县| 华安县| 舟山市| 伊金霍洛旗| 红安县|