# MapStyleOptions

public final class **MapStyleOptions** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
implements [Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) Defines styling options for a `https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap`.

With style options you can customize the presentation of the standard Google map styles,
changing the visual display of features like roads, parks, and other points of interest. As
well as changing the style of these features, you can also hide features entirely. This means
that you can emphasize particular components of the map or make the map complement the
content of your app.

### Developer Guide

For more information, read the [developer guide](https://developers.google.com/maps/documentation/android-sdk/styling).

### Inherited Constant Summary

From interface android.os.Parcelable

|---|---|---|
| int | CONTENTS_FILE_DESCRIPTOR |   |
| int | PARCELABLE_WRITE_RETURN_VALUE |   |

### Public Constructor Summary

|---|---|
|   | [MapStyleOptions](https://developers.google.com/android/reference/com/google/android/gms/maps/model/MapStyleOptions#MapStyleOptions(java.lang.String))([String](https://developer.android.com/reference/java/lang/String.html) json) Creates a new set of map style options based on the given JSON styling string. |

### Public Method Summary

|---|---|
| static [MapStyleOptions](https://developers.google.com/android/reference/com/google/android/gms/maps/model/MapStyleOptions) | [loadRawResourceStyle](https://developers.google.com/android/reference/com/google/android/gms/maps/model/MapStyleOptions#loadRawResourceStyle(android.content.Context,%20int))([Context](https://developer.android.com/reference/android/content/Context.html) clientContext, int resourceId) Creates a new set of map style options based on the a JSON styling string loaded from a raw resource identifier. |
| void | [writeToParcel](https://developers.google.com/android/reference/com/google/android/gms/maps/model/MapStyleOptions#writeToParcel(android.os.Parcel,%20int))([Parcel](https://developer.android.com/reference/android/os/Parcel.html) out, int flags) |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface android.os.Parcelable

|---|---|
| abstract int | describeContents() |
| abstract void | writeToParcel([Parcel](https://developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |

## Public Constructors

#### public **MapStyleOptions** ([String](https://developer.android.com/reference/java/lang/String.html) json)

Creates a new set of map style options based on the given JSON styling string.

##### Parameters

| json | The JSON string containing map style options. Must not be `null`. |
|---|---|

## Public Methods

#### public static [MapStyleOptions](https://developers.google.com/android/reference/com/google/android/gms/maps/model/MapStyleOptions)
**loadRawResourceStyle** ([Context](https://developer.android.com/reference/android/content/Context.html) clientContext, int resourceId)

Creates a new set of map style options based on the a JSON styling string loaded
from a raw resource identifier.

##### Parameters

| clientContext | Client context for the supplied resourceId. |
| resourceId | Id of a raw resource containing the styling JSON. |
|---|---|

##### Returns

- A reference to this MapStyleOptions to allow call chaining.

##### Throws

|   | if resourceId is not a valid raw resource id or the resource could not be read. |
| [Resources.NotFoundException](https://developer.android.com/reference/android/content/res/Resources.NotFoundException.html) |   |
|---|---|

#### public void **writeToParcel** ([Parcel](https://developer.android.com/reference/android/os/Parcel.html) out, int flags)