---
title: "openInMaps(launchOptions:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkmapitem/openinmaps(launchoptions:)"
---

# openInMaps(launchOptions:)

Opens the Maps app and displays the map item.

## Declaration

```swift
func openInMaps(launchOptions: [String : Any]? = nil) -> Bool
```

## 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 doc://com.apple.mapkit/documentation/MapKit/launch-options-dictionary-keys. This parameter may be nil.

## Return Value

Return Value true if the Maps app successfully opens the map item, or false if there’s an error.

## Discussion

Discussion You use this method to pass the 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 MKLaunchOptionsDirectionsModeKey option in the launchOptions dictionary, the Maps app interprets that as an attempt to map from the user’s current location to the location that the map item specifies. note: This is a blocking call and the system suspends interaction with your app until the Maps app finishes launching. If you don’t include the MKLaunchOptionsMapCenterKey and MKLaunchOptionsMapSpanKey keys in your launchOptions dictionary, the Maps app constructs a region around the map item. It uses that region to set the visible portion of the map.

## See Also

### Launching the Maps app

- [openMaps(with:launchOptions:)](mapkit/mkmapitem/openmaps(with:launchoptions:).md)
- [openMaps(with:launchOptions:completionHandler:)](mapkit/mkmapitem/openmaps(with:launchoptions:completionhandler:).md)
- [openMaps(with:launchOptions:from:completionHandler:)](mapkit/mkmapitem/openmaps(with:launchoptions:from:completionhandler:).md)
- [openInMaps(launchOptions:completionHandler:)](mapkit/mkmapitem/openinmaps(launchoptions:completionhandler:).md)
- [openInMaps(launchOptions:from:completionHandler:)](mapkit/mkmapitem/openinmaps(launchoptions:from:completionhandler:).md)
