<br />

The Maps SDK for Android can serve a bitmap image of a map, offering
limited interactivity to the user. This is called a *lite mode* map.

## Code samples

The [ApiDemos repository](https://github.com/googlemaps-samples/android-samples/blob/main/ApiDemos) on GitHub includes
samples that demonstrate the use of lite mode:

- [LiteDemoActivity - Java](https://github.com/googlemaps-samples/android-samples/blob/main/ApiDemos/project/java-app/src/main/java/com/example/mapdemo/LiteDemoActivity.java): The basics of using a lite mode map in Java
- [LiteDemoActivity - Kotlin](https://github.com/googlemaps-samples/android-samples/blob/main/ApiDemos/project/kotlin-app/src/main/java/com/example/kotlindemos/LiteDemoActivity.kt): The basics of using a lite mode map in Kotlin
- [LiteListDemoActivity - Java](https://github.com/googlemaps-samples/android-samples/blob/main/ApiDemos/project/java-app/src/main/java/com/example/mapdemo/LiteListDemoActivity.java): Displaying maps efficiently in ListViews using lite mode in Java
- [LiteListDemoActivity - Kotlin](https://github.com/googlemaps-samples/android-samples/blob/main/ApiDemos/project/kotlin-app/src/main/java/com/example/kotlindemos/LiteListDemoActivity.kt): Displaying maps efficiently in ListViews using lite mode in Kotlin

## Overview of lite mode

[Video](https://www.youtube.com/watch?v=N0N1Xkc_1pU)

A lite mode map is a bitmap image of a map at a specified location and zoom
level. Lite mode supports all of the map types (normal, hybrid, satellite,
terrain) and a subset of the functionality supplied by the full API. Lite mode
is useful when you want to provide a number of maps in a stream, or a map that
is too small to support meaningful interaction.

Users viewing the map cannot zoom or pan the map. Icons on the map give
users access to viewing the map in the Google Maps mobile app and requesting
directions.

## Adding a lite mode map

Lite mode uses the same classes and interfaces as the full Google Maps Android
API. You can set a [`GoogleMap`](https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap.md.txt) to lite mode in the following
ways:

- Either as an XML attribute for a `MapView` or `MapFragment`
- Or in the `GoogleMapOptions` object

### As an XML attribute for a `MapView` or `MapFragment`

    <fragment xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:map="http://schemas.android.com/apk/res-auto"
        android:name="com.google.android.gms.maps.MapFragment"
        android:id="@+id/map"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        map:cameraZoom="13"
        map:mapType="normal"
        map:liteMode="true"/>

### In the `GoogleMapOptions` object


### Kotlin

```kotlin
val options = GoogleMapOptions()
    .liteMode(true)

      
```

### Java

```java
GoogleMapOptions options = new GoogleMapOptions().liteMode(true);

      
```

<br />

For details on setting the initial state of the map, see the guide to the
[map object](https://developers.google.com/maps/documentation/android-sdk/map.md.txt#configure_initial_state).

## Intents to launch a map view or directions request

By default, a toolbar at the bottom right of the map contains icons that
provide access to a map view or directions request in the Google Maps mobile
app. You can disable the toolbar by calling
[`UiSettings.setMapToolbarEnabled(false)`](https://developers.google.com/android/reference/com/google/android/gms/maps/UiSettings.md.txt#setMapToolbarEnabled(boolean)). For more
details, see the [toolbar documentation](https://developers.google.com/maps/documentation/android-sdk/controls.md.txt#toolbar).

Also by default when a user taps the map, the API starts the Google Maps mobile
app. You can override this by using `GoogleMap.setOnMapClickListener()` to
set your own listener. You can also disable click events on the map, by calling
`setClickable()` on the view that contains the `MapView` or `MapFragment`. For
details of these two techniques, see the [events documentation](https://developers.google.com/maps/documentation/android-sdk/events.md.txt).

## Life cycle events

When using the API in **fully interactive mode** , users of the `MapView` class
must forward all the activity life cycle methods to the corresponding methods
in the `MapView` class. Examples of the life cycle methods include
`onCreate()`, `onDestroy()`, `onResume()`, and `onPause()`.

When using the `MapView` class in **lite mode**, forwarding lifecycle events is
optional, except for the following situations:

- It is mandatory to call `onCreate()`, otherwise no map will appear.
- If you wish to show the My Location dot on your lite mode map and use the default location source, you will need to call `onResume()` and `onPause()`, because the location source will only update between these calls. If you use your own location source, it's not necessary to call these two methods.

## Supported API features

The following table describes the behavior of a lite mode map for each area of
API functionality. If an app calls a method that's not supported in lite mode,
the API will log a warning message.

| Functionality ||
|---|---|
| Map types | **Supported?** Yes The following [map types](https://developers.google.com/maps/documentation/android-sdk/map.md.txt#map_types) are available via `GoogleMapOptions.mapType()` and `GoogleMap.setMapType()`: `MAP_TYPE_NORMAL`, `MAP_TYPE_SATELLITE`, `MAP_TYPE_TERRAIN`, `MAP_TYPE_HYBRID`, `MAP_TYPE_NONE` |
| Polylines, polygons, circles | **Supported?** Yes The lite mode functionality for [shapes](https://developers.google.com/maps/documentation/android-sdk/shapes.md.txt) matches the full API. |
| Projection | **Supported?** Yes The lite mode functionality for [Projection](https://developers.google.com/android/reference/com/google/android/gms/maps/Projection.md.txt) matches the full API. |
| My Location | **Supported?** Yes The lite mode functionality for the [My Location layer](https://developers.google.com/maps/documentation/android-sdk/location.md.txt) matches the full API. |
| Map padding | **Supported?** Yes The lite mode support for [map padding](https://developers.google.com/maps/documentation/android-sdk/map.md.txt#map_padding) matches the full API. |
| Info windows | **Supported?** Yes If you set the `title()` of a marker, the default [info window](https://developers.google.com/maps/documentation/android-sdk/infowindows.md.txt) will appear when the user taps the marker. You can show the info window programmatically by calling `showInfoWindow()` on the marker. You can also create custom info windows via the `InfoWindowAdapter` interface. |
| Custom base map styles | **Supported?** Partly The Maps SDK for Android supports [custom styling](https://developers.google.com/maps/documentation/android-sdk/styling.md.txt) of the base map. Lite Mode only supports JSON-based custom styling, not cloud-based styling which requires a map ID to render a styled map. Lite mode also does not support setting the [map color scheme](https://developers.google.com/maps/documentation/android-sdk/configure-map.md.txt#map_color_scheme) to use dark mode. |
| Markers | **Supported?** Partly You can add a [marker](https://developers.google.com/maps/documentation/android-sdk/marker.md.txt) and respond to a click event. You can also add custom marker icons. It's not possible to make a marker draggable. Markers on a lite mode map are flat, and they cannot be rotated. |
| Camera position, zoom, and animation | **Supported?** Partly You can set the camera target and zoom, but not the tilt or bearing. Zoom level is rounded to the nearest integer in lite mode. Calling `GoogleMap.moveCamera()` will give you another lite mode map image. For more information on setting and manipulating the camera, see [Changing the View](https://developers.google.com/maps/documentation/android-sdk/views.md.txt). Calling `GoogleMap.animateCamera()` will not result in animation of the camera movement. The camera view will move instantly to the new position. |
| Map events | **Supported?** Partly Lite mode supports `GoogleMap.setOnMapClickListener()` and `GoogleMap.setOnMapLongClickListener()`. To disable click events on a map in lite mode, you can call `setClickable()` on the view that contains the `MapView` or `MapFragment`. This is useful, for example, when displaying a map or maps in a list view, where you want the click event to invoke an action unrelated to the map. For details, see the [events documentation](https://developers.google.com/maps/documentation/android-sdk/events.md.txt). |
| Indoor maps and buildings | **Supported?** No Lite mode will show the same tiles as the [Maps Static API](https://developers.google.com/maps/documentation/maps-static). This means that if the indoor floor plan is baked into the default tile, it will appear. Otherwise, it won't. Further, you cannot change the level shown or manipulate a level picker. |
| Traffic layer | **Supported?** No `GoogleMap.setTrafficEnabled()` is not supported in lite mode. |
| Ground overlays | **Supported?** No `GoogleMap.addGroundOverlay()` is not supported in lite mode. |
| Tile overlays | **Supported?** No `GoogleMap.addTileOverlay()` is not supported in lite mode. |
| Gestures | **Supported?** No Lite mode does not support gestures. Enabling and disabling gestures will have no effect. |
| Street View | **Supported?** No [Street View](https://developers.google.com/maps/documentation/android-sdk/streetview.md.txt) is not supported in lite mode. |