sdk-maps / com.tomtom.online.sdk.map / UIMapSettings / setStyleUrl

setStyleUrl

abstract fun setStyleUrl(styleUrl: String!): Unit

Sets the URL to the style used to display the map and reloads the style asynchronously. NOTE: This is an asynchronous operation. The user of this API needs to ensure that no methods of the StyleSettings interface are called before the style is reloaded. TomtomMapCallback.OnMapChangedListener.onDidFinishLoadingStyle is called when reloading the style is finished. An OnMapChangedListener can be registered using TomTomMap.addOnMapChangedListener.

Parameters

styleUrl - String!: The URL to the style.

@Beta(2020, 12) abstract fun setStyleUrl(styleUrl: String!, layerSetConfiguration: LayerSetConfiguration!): Unit

Sets the URL to the style used to display the map and reloads the style asynchronously with a custom LayerSetConfiguration. Custom LayerSetConfiguration can only be used for Vector Tiles, Vector Traffic Flow, and Vector Traffic Incident Tiles. NOTE: This is an asynchronous operation. The user of this API needs to ensure that no methods of the StyleSettings interface are called before the style is reloaded. TomtomMapCallback.OnMapChangedListener.onDidFinishLoadingStyle is called when reloading the style is finished. An OnMapChangedListener can be registered using TomTomMap.addOnMapChangedListener.

Parameters

styleUrl - String!: The URL to the style.

layerSetConfiguration - LayerSetConfiguration!: The custom layer set configuration.