# PlaceListMapTemplate

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/model/PlaceListMapTemplate.java+class:androidx.car.app.model.PlaceListMapTemplate) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

*** ** * ** ***

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


```
@CarProtocol
class PlaceListMapTemplate : Template
```

<br />

*** ** * ** ***

A template that displays a map along with a list of places.

The map can display markers corresponding to the places in the list. See `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setItemList(androidx.car.app.model.ItemList)` for details.

#### Template Restrictions

In regards to template refreshes, as described in `https://developer.android.com/reference/kotlin/androidx/car/app/Screen#onGetTemplate()`, this template is considered a refresh of a previous one if:

- The previous template is in a loading state (see `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setLoading(boolean)`, or
- The template title has not changed, and the number of rows and the title (not counting spans) of each row between the previous and new `https://developer.android.com/reference/kotlin/androidx/car/app/model/ItemList`s have not changed.
- The template is sent in response to a user-initiated content refresh request. (see `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setOnContentRefreshListener(androidx.car.app.model.OnContentRefreshListener)`.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder` A builder of `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/ActionStrip?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate#getActionStrip()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/ActionStrip` for this template or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Place?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate#getAnchor()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Place` instance to display as an anchor in the map. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate#getHeaderAction()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action` that is set to be displayed in the header of the template, or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/ItemList?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate#getItemList()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/ItemList` instance with the list of items to display in the template, or `null` if not set. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnContentRefreshDelegate?` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 5) https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate#getOnContentRefreshDelegate()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnContentRefreshDelegate` to be called when the user requests for content refresh for this template. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText?` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate#getTitle()()` Returns the title of the template or `null` if not set. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate#isCurrentLocationEnabled()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate#isLoading()()` Returns whether the template is loading. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate#toString()()` |

## Public functions

### equals

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

### getActionStrip

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

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

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

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setActionStrip(androidx.car.app.model.ActionStrip)` |   |

### getAnchor

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

```
fun getAnchor(): Place?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Place` instance to display as an anchor in the map.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setAnchor(androidx.car.app.model.Place)` |   |

### getHeaderAction

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

```
fun getHeaderAction(): Action?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action` that is set to be displayed in the header of the template, or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setHeaderAction(androidx.car.app.model.Action)` |   |

### getItemList

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

```
fun getItemList(): ItemList?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/ItemList` instance with the list of items to display in the template, or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setItemList(androidx.car.app.model.ItemList)` |   |

### getOnContentRefreshDelegate

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

```
@RequiresCarApi(value = 5)
fun getOnContentRefreshDelegate(): OnContentRefreshDelegate?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnContentRefreshDelegate` to be called when the user requests for content refresh for this template.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setOnContentRefreshListener(androidx.car.app.model.OnContentRefreshListener)` |   |

### getTitle

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

```
fun getTitle(): CarText?
```

Returns the title of the template or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setTitle(java.lang.CharSequence)` |   |

### hashCode

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

### isCurrentLocationEnabled

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

```
fun isCurrentLocationEnabled(): Boolean
```

### isLoading

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

```
fun isLoading(): Boolean
```

Returns whether the template is loading.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setLoading(boolean)` |   |

### toString

```
fun toString(): String
```