MapWithContentTemplate.Builder


class MapWithContentTemplate.Builder


A builder of MapWithContentTemplate.

Summary

Public constructors

Public functions

MapWithContentTemplate

Constructs the template defined by this builder.

MapWithContentTemplate.Builder

Sets the ActionStrip for this template.

MapWithContentTemplate.Builder

Sets the content to be displayed on top of the map tiles.

MapWithContentTemplate.Builder

Sets the MapController for this template.

Public constructors

Builder

Added in 1.4.0
Builder()

Public functions

build

Added in 1.4.0
fun build(): MapWithContentTemplate

Constructs the template defined by this builder.

Requirements
Throws
java.lang.IllegalArgumentException

if the template is not one of the allowed Content types See setContentTemplate for the list of supported content templates.

setActionStrip

Added in 1.4.0
fun setActionStrip(actionStrip: ActionStrip): MapWithContentTemplate.Builder

Sets the ActionStrip for this template.

Unless set with this method, the template will not have an action strip.

The Action buttons in Map Based Template are automatically adjusted based on the screen size. On narrow width screen, icon Actions show by default. If no icon specify, showing title Actions instead. On wider width screen, title Actions show by default. If no title specify, showing icon Actions instead.

Requirements This template allows up to 4 Actions in its ActionStrip. Of the 4 allowed Actions, it can either be a title Action as set via setTitle, or a icon Action as set via setIcon.
Throws
java.lang.IllegalArgumentException

if actionStrip does not meet the requirements

java.lang.NullPointerException

if actionStrip is null

setContentTemplate

Added in 1.4.0
fun setContentTemplate(template: Template): MapWithContentTemplate.Builder

Sets the content to be displayed on top of the map tiles.

From Car API 7 onward, the following template types are supported as content:

  • ListTemplate
  • PaneTemplate
  • GridTemplate
  • MessageTemplate
Throws
java.lang.NullPointerException

if template is null

java.lang.IllegalArgumentException

if template does not meet the requirements

setMapController

Added in 1.4.0
fun setMapController(mapController: MapController): MapWithContentTemplate.Builder

Sets the MapController for this template.