Platforms to show: All Mac Windows Linux Cross-Platform

Back to MKMapItemMBS class.

MKMapItemMBS.mapItemForCurrentLocation as MKMapItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates and returns a singleton map item object representing the device’s current location.

For privacy reasons, and because the user’s location can change, the map item returned by this method does not contain any coordinate data. When you need the actual location of the user, you must use the Core Location framework to retrieve it.

MKMapItemMBS.MKLaunchOptionsCameraKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The virtual camera to use for viewing the map.

The value of this key is an MKMapCameraMBS object that describes a virtual camera that can specify a 3D perspective for the map. If you do not specify this key, Maps uses its current settings to define the appearance of the map.

MKMapItemMBS.MKLaunchOptionsDirectionsModeDefault as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Directions that match the user’s preferred transportation type.

MKMapItemMBS.MKLaunchOptionsDirectionsModeDriving as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Driving directions between the specified start and end points.

MKMapItemMBS.MKLaunchOptionsDirectionsModeKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The mode of transportation.

The value of this key is an NSString corresponding to one of the values described in Directions Mode Values. You specify this key to tell the Maps app which mode of transport to use when generating directions.

MKMapItemMBS.MKLaunchOptionsDirectionsModeTransit as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Public transit directions between the specified start and end points.

MKMapItemMBS.MKLaunchOptionsDirectionsModeWalking as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Walking directions between the specified start and end points.

MKMapItemMBS.MKLaunchOptionsMapCenterKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The coordinate value on which to center the map.

The value of this key is an NSValue object that contains an encoded CLLocationCoordinate2D structure.

MKMapItemMBS.MKLaunchOptionsMapSpanKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The amount of the map to display.

The value of this key is an NSValue object that contains an encoded MKCoordinateSpan structure.

MKMapItemMBS.MKLaunchOptionsMapTypeKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The type of map (standard, satellite, or hybrid) to display.

The value of this key is an NSNumber object whose value is an integer corresponding to an MKMapType value.

MKMapItemMBS.MKLaunchOptionsShowsTrafficKey as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value indicating whether to display traffic information.

The value of this key is a Boolean value. If you do not specify this key, Maps uses its current settings to determine whether or not to display traffic.

MKMapItemMBS.openMapsWithItems(items() as MKMapItemMBS, launchOptions as Dictionary) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Open the Maps app and display the specified map items.

mapItems: An array containing one or more MKMapItemMBS objects representing the items you want to display on the map.
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, a 3D perspective, and the map type. For a list of keys you can put into this dictionary, see Launch Options Dictionary Keys.

You may specify nil for this parameter.

Returns true if the map items were successfully opened by the Maps app, or false if there was an error.

You use this method to pass one or more map items to the Maps app. For example, you might use this method to ask the Maps app to display location-based search results generated by your app. Maps displays pins at each location you specify and uses the contents of each map item object to display additional information.
If you specify the MKLaunchOptionsDirectionsModeKey option in the launchOptions dictionary, the mapItems array must have no more than two items in it. If the array contains one item, the Maps app generates directions from the user’s current location to the location specified by the map item. If the array contains two items, the Maps app generates directions from the location of the first item to the location of the second item in the array.
If you do not include the MKLaunchOptionsMapCenterKey and MKLaunchOptionsMapSpanKey keys in your launchOptions dictionary, Maps constructs a region that encompasses the provided items. It uses this region to set the visible portion of the map.

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...