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.
推薦閱讀
- 在最好的年紀學Python:小學生趣味編程
- 數據庫系統教程(第2版)
- Monkey Game Development:Beginner's Guide
- 編寫高質量代碼:改善Python程序的91個建議
- DevOps Automation Cookbook
- Java設計模式及實踐
- Haxe Game Development Essentials
- 學習正則表達式
- Learning Concurrent Programming in Scala
- Python算法指南:程序員經典算法分析與實現
- C和C++游戲趣味編程
- Test-Driven JavaScript Development
- Python Interviews
- MySQL程序員面試筆試寶典
- Raspberry Pi Robotic Projects(Third Edition)