A point of interest on the map.
- iOS 6.0+
- macOS 10.9+
- tvOS 9.2+
- watchOS 2.0+
A map item includes a geographic location and any interesting data that might apply to that location, such as the address at that location and the name of a business at that address. You can also use create a special
MKMap object representing the user's current location.
Use this class to do the following:
Share map-related data with the Maps app.
Handle requests for directions that originate from the Maps app.
To display information in Maps, create an MKMapItem object with the information you want to display and call the
open method. Maps displays that location on the map and shows the information you provide.
If you implement a routing app, Maps provides you with two
MKMap objects representing the start and end points. Use the information in those two objects to plot the route and generate directions.