loadStyle

suspend fun loadStyle(style: StyleDescriptor)

Loads new map style.

This suspend function will suspend until the style loading operation completes successfully or fails. Loading a style could take 1-4 seconds depending on whether it's the first time loading.

Standard styles or custom ones can be used. See StandardStyles. Note: StandardStyles.TomTomMaps.VEHICLE_RESTRICTIONS should be used in conjunction with MapViewState.vehicleRestrictionState.

Throws

if a network error occurs while loading the style.

if an internal error occurs while loading the style.