# MapWithContentTemplate

# MapWithContentTemplate

Artifact:[androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app)  
[View Source](https://cs.android.com/search?q=file:androidx/car/app/navigation/model/MapWithContentTemplate.java+class:androidx.car.app.navigation.model.MapWithContentTemplate)  
Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.4.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/car/app/navigation/model/MapWithContentTemplate "View this page in Java")

<br />

```
@CarProtocol
@RequiresCarApi(value = 7)
class MapWithContentTemplate : Template
```

<br />

*** ** * ** ***

A template that allows an app to render map tiles with some sort of content (for example, a list). The content is usually rendered as an overlay on top of the map tiles, with the map visible and stable areas adjusting to the content.

See[setContentTemplate](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate.Builder#setContentTemplate(androidx.car.app.model.Template))for the list of supported content templates.

In order to use this template your car app**MUST** declare that it uses**EITHER** the`androidx.car.app.NAVIGATION_TEMPLATES`permission**OR** the`
androidx.car.app.MAP_TEMPLATES`in the manifest.

## Summary

|                                                                                                                                             ### Nested types                                                                                                                                             |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[MapWithContentTemplate.Builder](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate.Builder) A builder of[MapWithContentTemplate](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate). |

|                                                ### Public functions                                                |
|--------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                | [equals](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate#equals(java.lang.Object))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                                                              |
| [ActionStrip](https://developer.android.com/reference/kotlin/androidx/car/app/model/ActionStrip)`?`                | [getActionStrip](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate#getActionStrip())`()` Returns the[ActionStrip](https://developer.android.com/reference/kotlin/androidx/car/app/model/ActionStrip)for this template or`null`if not set.  |
| [Template](https://developer.android.com/reference/kotlin/androidx/car/app/model/Template)                         | [getContentTemplate](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate#getContentTemplate())`()` Returns the[Template](https://developer.android.com/reference/kotlin/androidx/car/app/model/Template)content to display in this template. |
| [MapController](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapController)`?` | [getMapController](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate#getMapController())`()` Returns the controls associated with an app-provided map.                                                                                     |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                        | [hashCode](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate#hashCode())`()`                                                                                                                                                               |

## Public functions

### equals

```
fun equals(other: Any?): Boolean
```  

### getActionStrip

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.4.0)  

```
fun getActionStrip(): ActionStrip?
```

Returns the[ActionStrip](https://developer.android.com/reference/kotlin/androidx/car/app/model/ActionStrip)for this template or`null`if not set.  

|                                                                                       See also                                                                                       |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setActionStrip](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate.Builder#setActionStrip(androidx.car.app.model.ActionStrip)) |   |

### getContentTemplate

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.4.0)  

```
fun getContentTemplate(): Template
```

Returns the[Template](https://developer.android.com/reference/kotlin/androidx/car/app/model/Template)content to display in this template.  

|                                                                                         See also                                                                                          |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setContentTemplate](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate.Builder#setContentTemplate(androidx.car.app.model.Template)) |   |

### getMapController

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.4.0)  

```
fun getMapController(): MapController?
```

Returns the controls associated with an app-provided map.  

|                                                                                               See also                                                                                                |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setMapController](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate.Builder#setMapController(androidx.car.app.navigation.model.MapController)) |   |

### hashCode

```
fun hashCode(): Int
```