> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/android/ja/maps/llms.txt)

# Create a snapshot

![Create a static, non-interactive image of a map style with specified camera position. The resulting snapshot is provided as a bitmap on Android.](https://docs.mapbox.com/android/ja/assets/ideal-img/maps-examples-create-a-snapshot.63916fd.480.png)

This example demonstrates how to take a snapshot of a map using the [`Snapshotter`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps/-snapshotter/) plugin from the **Mapbox Maps SDK for Android**.

The code below creates a `Snapshotter` instance, determining the size and pixel ratio of the snapshot and configures the style, camera position, and an overlay which draws an oval shape on the snapshot canvas before generating the snapshot image.

The snapshot image is displayed in an [`ImageView`](https://developer.android.com/reference/android/widget/ImageView) on the screen and the `Snapshotter` is destroyed once the image is created.

> **Note: Android Examples App Available**
> 
> This example code is part of the **Maps SDK for Android Examples App**, a working Android project [available on GitHub](https://github.com/mapbox/mapbox-maps-android/tree/v11.35.2/). Android developers are encouraged to run the examples app locally to interact with this example in an emulator and explore other features of the Maps SDK.
> 
> See our [Run the Maps SDK for Android Examples App](https://docs.mapbox.com/help/tutorials/maps-sdk-android-examples-app/) tutorial for step-by-step instructions.

**Kotlin**

Title: `MapSnapshotterActivity.kt`

[View on GitHub](https://github.com/mapbox/mapbox-maps-android/blob/v11.35.2/app/src/main/java/com/mapbox/maps/testapp/examples/snapshotter/MapSnapshotterActivity.kt)

```kt
package com.mapbox.maps.testapp.examples.snapshotter

import android.graphics.Paint
import android.graphics.RectF
import android.os.Bundle
import android.widget.ImageView
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.mapbox.geojson.Point
import com.mapbox.maps.*
import com.mapbox.maps.Snapshotter

/**
 * Example demonstrating taking simple snapshot using [Snapshotter].
 */
class MapSnapshotterActivity : AppCompatActivity(), SnapshotStyleListener {

  private lateinit var mapSnapshotter: Snapshotter

  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    val snapshotterOptions = MapSnapshotOptions.Builder()
      .size(Size(512.0f, 512.0f))
      .pixelRatio(1.0f)
      .build()

    mapSnapshotter = Snapshotter(this, snapshotterOptions,).apply {
      setStyleListener(this@MapSnapshotterActivity)
      setStyleUri(Style.STANDARD)
      setCamera(
        CameraOptions.Builder().zoom(14.0).center(
          Point.fromLngLat(
            4.895033, 52.374724
          )
        ).build()
      )
      start(
        overlayCallback = { overlay ->
          overlay.canvas.drawOval(
            RectF(0f, 0f, 100f, 100f),
            Paint().apply { alpha = 128 }
          )
        }
      ) { bitmap, errorMessage ->
        if (errorMessage != null) {
          Toast.makeText(
            this@MapSnapshotterActivity,
            errorMessage,
            Toast.LENGTH_SHORT
          ).show()
        }
        val imageView = ImageView(this@MapSnapshotterActivity)
        imageView.setImageBitmap(bitmap)
        setContentView(imageView)
      }
    }
  }

  override fun onDidFinishLoadingStyle(style: Style) {
    logI(TAG, "OnStyleLoaded: ${style.styleURI}")
  }

  override fun onDestroy() {
    super.onDestroy()
    mapSnapshotter.destroy()
  }

  companion object {
    const val TAG: String = "MapSnapshotterActivity"
  }
}
```