# 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)

*** ** * ** ***


```
@CarProtocol
@RequiresCarApi(value = 7)
public final class MapWithContentTemplate implements 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 `https://developer.android.com/reference/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 |
|---|
| `public final class https://developer.android.com/reference/androidx/car/app/navigation/model/MapWithContentTemplate.Builder` A builder of `https://developer.android.com/reference/androidx/car/app/navigation/model/MapWithContentTemplate`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/navigation/model/MapWithContentTemplate#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/ActionStrip` | `https://developer.android.com/reference/androidx/car/app/navigation/model/MapWithContentTemplate#getActionStrip()()` Returns the `https://developer.android.com/reference/androidx/car/app/model/ActionStrip` for this template or `null` if not set. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Template` | `https://developer.android.com/reference/androidx/car/app/navigation/model/MapWithContentTemplate#getContentTemplate()()` Returns the `https://developer.android.com/reference/androidx/car/app/model/Template` content to display in this template. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/navigation/model/MapController` | `https://developer.android.com/reference/androidx/car/app/navigation/model/MapWithContentTemplate#getMapController()()` Returns the controls associated with an app-provided map. |
| `int` | `https://developer.android.com/reference/androidx/car/app/navigation/model/MapWithContentTemplate#hashCode()()` |

## Public methods

### equals

```
public boolean equals(@Nullable Object other)
```

### getActionStrip

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

```
public @Nullable ActionStrip getActionStrip()
```

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

| See also |
|---|---|
| `https://developer.android.com/reference/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)

```
public @NonNull Template getContentTemplate()
```

Returns the `https://developer.android.com/reference/androidx/car/app/model/Template` content to display in this template.

| See also |
|---|---|
| `https://developer.android.com/reference/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)

```
public @Nullable MapController getMapController()
```

Returns the controls associated with an app-provided map.

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

### hashCode

```
public int hashCode()
```