# Place.Builder

# Place.Builder

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/Place.java+class:androidx.car.app.model.Place.Builder)  
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/Place.Builder "View this page in Java")

<br />

```
class Place.Builder
```

<br />

*** ** * ** ***

A builder of[Place](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place).

## Summary

|                                                                                                                                                                                                                              ### Public constructors                                                                                                                                                                                                                               |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Builder](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place.Builder#Builder(androidx.car.app.model.CarLocation))`(location: `[CarLocation](https://developer.android.com/reference/kotlin/androidx/car/app/model/CarLocation)`)` Returns a builder instance for a[CarLocation](https://developer.android.com/reference/kotlin/androidx/car/app/model/CarLocation).                                                                                       |
| [Builder](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place.Builder#Builder(androidx.car.app.model.Place))`(place: `[Place](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place)`)` Returns a[Builder](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place.Builder)instance with the same data as the given[Place](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place)instance. |

|                                         ### Public functions                                         |
|------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Place](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place)                 | [build](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place.Builder#build())`()` Constructs the[Place](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place)defined by this builder.                                                                                                                                                                                             |
| [Place.Builder](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place.Builder) | [setMarker](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place.Builder#setMarker(androidx.car.app.model.PlaceMarker))`(marker: `[PlaceMarker](https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceMarker)`)` Sets the[PlaceMarker](https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceMarker)that specifies how this place is to be displayed on a map. |

## Public constructors

### Builder

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

```
Builder(location: CarLocation)
```

Returns a builder instance for a[CarLocation](https://developer.android.com/reference/kotlin/androidx/car/app/model/CarLocation).  

|                                                  Parameters                                                  |
|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
| `location: `[CarLocation](https://developer.android.com/reference/kotlin/androidx/car/app/model/CarLocation) | the geographical location associated with the place |

|                                                    Throws                                                     |
|---------------------------------------------------------------------------------------------------------------|----------------------|
| [java.lang.NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException.html) | if`location`is`null` |

### Builder

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

```
Builder(place: Place)
```

Returns a[Builder](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place.Builder)instance with the same data as the given[Place](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place)instance.  

## Public functions

### build

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

```
fun build(): Place
```

Constructs the[Place](https://developer.android.com/reference/kotlin/androidx/car/app/model/Place)defined by this builder.  

### setMarker

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

```
fun setMarker(marker: PlaceMarker): Place.Builder
```

Sets the[PlaceMarker](https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceMarker)that specifies how this place is to be displayed on a map.

Unless set with this method, the place will not have a marker.  

|                                                    Throws                                                     |
|---------------------------------------------------------------------------------------------------------------|--------------------|
| [java.lang.NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException.html) | if`marker`is`null` |