MapView(@NonNull context: Context)
Default constructor that uses context to inflate a view and create the map database. Constructor also creates TomtomMap
with the default configuration.
context
- Context: View context.
MapView(@NonNull context: Context, @NonNull styleUrl: String)
Custom constructor to provide a custom style URL. A custom style URL can be passed from a HTTP server or application assets.
context
- Context: View context.
styleUrl
- String: protocol://style.url.json
MapView(@NonNull context: Context, @Nullable attrs: AttributeSet?)
Custom constructor to provide a custom set of attributes.
context
- Context: view context.
attrs
- AttributeSet?: set of custom attributes.
MapView(@NonNull context: Context, keys: MutableMap<String!, String!>!)
Custom constructor to dynamically provide online API Keys. Keys provided within the map will override any keys set in the AndroidManifest.xml. Constructor also creates TomtomMap
with default configuration.
context
- Context: View context.
keys
- MutableMap<String!, String!>!: Map containing API Key values for "OnlineMaps.Key" & "OnlineTraffic.Key".
MapView(@NonNull context: Context, keys: MutableMap<String!, String!>!, @NonNull styleUrl: String)
Custom constructor to dynamically provide online API Keys together with a custom style URL. Custom style URL can be passed from a HTTP server or application assets.
context
- Context: View context.
keys
- MutableMap<String!, String!>!: Map containing API Key values for "OnlineMaps.Key" & "OnlineTraffic.Key".
styleUrl
- String: protocol://style.url.json
MapView(@NonNull context: Context, mapProperties: MapProperties!)
Custom constructor to provide online API keys dynamically together with a custom style url. Custom style url can be pass from http server or application assets.
context
- Context: view context
mapProperties
- MapProperties!: map configuration
MapView(@NonNull context: Context, @Nullable attrs: AttributeSet?, defStyleAttr: Int)
Custom constructor to provide custom set of attributes and a reference to default style resource.
context
- Context: view context.
attrs
- AttributeSet?: set of custom attributes.
defStyleAttr
- Int: attribute that contains a reference to a style resource, that supplies default values for styled attributes. Should be different than 0 in this constructor, otherwise use MapView#MapView(Context, AttributeSet)
.