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

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.

主站蜘蛛池模板: 定陶县| 溧水县| 阿拉善左旗| 越西县| 绥化市| 平江县| 楚雄市| 秀山| 诸暨市| 青浦区| 泉州市| 滨州市| 佛冈县| 年辖:市辖区| 罗源县| 营山县| 营山县| 白沙| 南昌市| 梨树县| 西乌珠穆沁旗| 岑溪市| 西峡县| 建瓯市| 冀州市| 洛川县| 南召县| 高淳县| 康乐县| 福州市| 台北市| 旺苍县| 高安市| 浮梁县| 和静县| 青冈县| 班玛县| 社旗县| 哈巴河县| 泽州县| 新安县|