Open the Maps app and display this map item.
SDKs
- iOS 6.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- watchOS 2.0+
Framework
- Map
Kit
Declaration
- (BOOL)openInMapsWithLaunchOptions:(NSDictionary<NSString *,id> *)launchOptions;
Parameters
launchOptions
Additional information that the Maps app can use to configure the map display. For example, you can use the launch options to specify the visible map region and the map type. For a list of keys you can put into this dictionary, see Launch Options Dictionary Keys.
This parameter may be
nil
.
Return Value
YES
if this map item was successfully opened by the Maps app, or NO
if there was an error.
Discussion
You use this method to pass the current map item to the Maps app. If your map item contains descriptive information about the location (such as a name or URL), the Maps app displays that information at the specified coordinate.
If you specify the MKLaunch
option in the launch
dictionary, the Maps app interprets that as an attempt to map from the user’s current location to the location specified by this map item.
If you do not include the MKLaunch
and MKLaunch
keys in your launch
dictionary, Maps constructs a region around the current item. It uses that region to set the visible portion of the map.