A MapKit implementation compatible to AppKit
MKMapKit is a API to provide a MKMapView which shows a section of the world map.
Apple provides MKMapKit only on iOS and it is a subview of UIView which is part of UIKit.
Our implementation tries to follow the API as good as possible but makes it a subview of NSView which is defined by AppKit.
While Apple provides Google Maps (Satellite and Map images) we use the MapNik tiles of OpenStreetMap as the image source.
Key and mouse shortcuts
If scrolling and/or zoom is enabled the user can pan (scroll) through the map and zoom in and out.
The definitions are:
- left arrow: move west
- right arrow: move east
- up arrow: move north
- down: move south
- alt-left arrow: zoom out
- alt-right arrow: zoom in
- alt-up arrow: zoom out
- alt-down arrow: zoom in
- scroll left/right: move west/east
- scroll up/down: move north/south
- click and drag: make view follow mouse
- double click: choose as center and zoom in
- alt-double click: zoom out
choosing the visible area
You can use any of the following methods:
-[map setCenterLocation:] -[map setVisibleMapRect:] -[map setRegion:]
The map can easily be rotated by user code (e.g. in a location or heading update delegate) by calling