The area of the map that is visible to a user is specified by the map's initial viewpoint (initial
). The user can explore different areas of the map by panning, zooming, or rotating, using a range of gestures that are built-in to the map view.
User gestures
Below are the map view's gestures that are provided for every iOS device. Each of these gestures will change the map view's viewpoint. You can use MapView.onViewpointChanged(kind:perform:)
closure to perform an action when the viewpoint has changed.
Navigation | User Action | Key Action (on iOS and Mac Catalyst) |
---|---|---|
Zoom in | Two finger pinch open Single finger double-tap | = / ⌥↑ |
Zoom out | Two finger pinch close Two finger single-tap | - / ⌥↓ |
Continuous zoom in / out | Single finger double-tap, ending in a vertical up/down drag | N/A |
Move/Pan | Single finger drag or flick | ↑, ↓, ←, → |
Rotate the scene | Two finger rotate | ⌥← for left ⌥→ for right |
Rotate to North | N/A | ⌘0 / ⌘↑ |