StyleDescriptor

data class StyleDescriptor(val uri: URI, val darkUri: URI? = null, val layerMappingUri: URI? = null, val darkLayerMappingUri: URI? = null) : Parcelable

Represents all the necessary information to identify and load a style.

Supported Uris:

  • asset://... - specifies file located in apk assets directory.

  • http://... or https://... - specifies file located on web server.

  • file://... - specifies file located on file system. See java.io.File.toURI.

For easier uri building use com.tomtom.sdk.common.android.Uris.

For style file format see map style specification Map Styles V2 are supported.

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

uri

RFC 2396-compliant URI to the main map style file.

darkUri

RFC 2396-compliant URI to the dark version of the map style file.

layerMappingUri

RFC 2396-compliant URI to the layer mapping file used for the main style. If not supplied, the default mapping file is used.

darkLayerMappingUri

RFC 2396-compliant URI to the layer mapping file used for the dark style variant. If not supplied, the default mapping file will be used.

Constructors

Link copied to clipboard
fun StyleDescriptor(uri: Uri, darkUri: Uri? = null, layerMappingUri: Uri? = null, darkLayerMappingUri: Uri? = null)

Allows creating StyleDescriptor using android Uri.

Link copied to clipboard
fun StyleDescriptor(uri: URI, darkUri: URI? = null, layerMappingUri: URI? = null, darkLayerMappingUri: URI? = null)

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard

Optional RFC 2396-compliant URI to the layer mapping file used for the dark style variant. If not supplied, the default mapping file will be used.

Link copied to clipboard
val darkUri: URI? = null

Optional RFC 2396-compliant URI to the dark version of the map style file.

Link copied to clipboard
val layerMappingUri: URI? = null

Optional RFC 2396-compliant URI to the layer mapping file used for the main style. If not supplied, the default mapping file is used.

Link copied to clipboard
val uri: URI

RFC 2396-compliant URI to the main map style file.