---
title: "MTCustomAnnotationView | Mobile sdk | Mobile sdk android | Android"
description: "MTCustomAnnotationView"
---

# MTCustomAnnotationView

@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)

fun [MTCustomAnnotationView](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.annotations/-m-t-custom-annotation-view/)(controller: [MTMapViewController](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.map/-m-t-map-view-controller/), coordinates: [LngLat](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.map/-lng-lat/), offset: [MTPoint](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.map.types/-m-t-point/) = MTPoint(0.0, 0.0), anchor: [Alignment](https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.html) = Alignment.Center, modifier: [Modifier](https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.html) = Modifier, content: @[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) () -> [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html))

Compose-based custom annotation view that can be overlaid on top of MTMapView.

Usage: Place this composable in the same `Box` (overlay) as your `MTMapView` so it can position itself using absolute pixel offsets.

Example:

Box(Modifier.fillMaxSize()) { MTMapView(referenceStyle, options, controller, Modifier.fillMaxSize()) MTCustomAnnotationView(controller, LngLat(16.6, 49.2)) { YourComposable() } }

Requirements: This view relies on `ON_MOVE` and `ON_ZOOM` events. Set `MTMapOptions.eventLevel` to `CAMERA_ONLY` (recommended) or `ALL` so these events are forwarded.

#### Parameters

controller

The map controller used to project coordinates and observe events.

coordinates

Geographic location of this annotation.

offset

Pixel offset from the projected point (x to the right, y down).

anchor

Which point of the content should align with the projected point.

modifier

Additional modifiers applied to the positioned Box that wraps [content](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.annotations/-m-t-custom-annotation-view/).

content

The composable content to render as the custom annotation.
