OfflineStyleURLProvider
public class OfflineStyleURLProvider
OfflineStyleURLProvider
is a class that provides URLs for offline styles and assets required for map display.
Example shows how to create offline style container:
let mainStyle = StyleDefinition.custom(
style: OfflineStyleURLProvider.browsingDarkStyleURL,
layerMapping: OfflineStyleURLProvider.layerMappingURL)
let darkStyle = StyleDefinition.custom(
style: OfflineStyleURLProvider.browsingLightStyleURL,
layerMapping: OfflineStyleURLProvider.layerMappingURL)
return StyleContainer(
mainStyle: mainStyle,
darkStyle: darkStyle,
bundle: resourceBundle)
Important
This is a Public Preview API. It may be changed or removed at any time.-
Provides the URL for the standard dark style when the map is used for browsing.
Declaration
Swift
public static var browsingDarkStyleURL: URL { get }
Return Value
A
URL
object pointing to the location of the dark style for browsing. -
Provides the URL for the standard light style when the map is used for browsing in offline mode.
Declaration
Swift
public static var browsingLightStyleURL: URL { get }
Return Value
A
URL
object pointing to the location of the light style for browsing. -
Provides the URL for the standard dark style when the map is used for driving in offline mode.
Declaration
Swift
public static var drivingDarkStyleURL: URL { get }
Return Value
A
URL
object pointing to the location of the dark style for driving. -
Provides the URL for the standard light style when the map is used for driving in offline mode.
Declaration
Swift
public static var drivingLightStyleURL: URL { get }
Return Value
A
URL
object pointing to the location of the light style for driving. -
Provides the URL for the standard light style with vehicle restrictions layers when the map is used for driving in offline mode.
Declaration
Swift
public static var vehicleRestrictionsLightStyleURL: URL { get }
Return Value
A
URL
object pointing to the location of the light style with vehicle restrictions layers. -
Provides the URL for the standard dark style with vehicle restrictions layers when the map is used for driving in offline mode.
Declaration
Swift
public static var vehicleRestrictionsDarkStyleURL: URL { get }
Return Value
A
URL
object pointing to the location of the dark style with vehicle restrictions layers. -
Provides the URL that defines the order of renderer-specific layers and style layers.
Declaration
Swift
public static var layerMappingURL: URL { get }
Return Value
A
URL
object pointing to the location of the layer mapping file. -
Provides the bundle containing the resources required for offline map styles.
Declaration
Swift
public static var resourcesBundle: Bundle? { get }
Return Value
A
Bundle
object containing the offline resources, ornil
if the bundle cannot be found.