MSMapLocationProviderBuilder Class (iOS only)

Note

Bing Maps SDK for Android and iOS retirement

Bing Maps SDK for Android and iOS is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps SDK for Android and iOS until June 30th, 2025. Enterprise account customers can continue to use Bing Maps SDK for Android and iOS until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps SDK for Android and iOS will need to be updated to use Azure Maps Web SDK by the retirement date that applies to your Bing Maps for Enterprise account type.

Azure Maps is Microsoft's next-generation maps and geospatial services for developers. Azure Maps has many of the same features as Bing Maps for Enterprise, and more. To get started with Azure Maps, create a free Azure subscription and an Azure Maps account. For more information about azure Maps, see Azure Maps Documentation. For migration guidance, see Bing Maps Migration Overview.

A builder object which contains properties that can be optionally set by the hosting app to create a MSMapLocationProvider.

See MSMapLocationProvider for more details on how to use the builder with the location provider's constructor.

@interface MSMapLocationProviderBuilder : NSObject

Properties

DesiredAccuracy

Represents desired accuracy level for location tracking. Desired accuracy must be one of CLLocationManager's accuracy constants. If the user only authorized an accuracyAuthorization of CLAccuracyAuthorization.reducedAccuracy, desiredAccuracy will always be kCLLocationAccuracyReduced regardless of what it is set as. Otherwise, the location service will do its best to achieve the requested accuracy, but it is not guaranteed.

Default value is kCLLocationAccuracyNearestTenMeters.

@property(nonatomic) CLLocationAccuracy desiredAccuracy

HeadingFilter

Represents the minimum angular change in degrees required to generate new heading events.

Default value is 5 degrees.

@property(nonatomic) CLLocationDegrees headingFilter

Methods

SetNavigationSettings

Sets properties to be suitable for navigation. Sets desired accuracy as kCLLocationAccuracyBestForNavigation, heading filter as kCLHeadingFilterNone, and useLastKnownLocationOnLaunch as NO.

- (void)setNavigationSettings

UseLastKnownLocationOnLaunch

Call this to use the last known location as the default location on launch if it exists. Default will not use the last known location on launch.

- (void)useLastKnownLocationOnLaunch