[Android] Marker reuses its bitmap, so a child swapped for same-sized artwork renders clipped

Author: mohmdkh95Created Sep 24, 2026Updated Sep 24, 2026
Labelsbug

Summary

A Marker with custom children is drawn into a bitmap that is only discarded when the marker's size changes. If you replace a child's artwork with different artwork of the same size, nothing re-measures, the old buffer is reused, and the new artwork is drawn clipped — in our case the pin loses its tail and part of its ring. The marker keeps rendering clipped from then on, in every state, until it is unmounted and rebuilt.

marker.redraw() does not fix it, but growing the wrapper by 1dp does, which points at the drawable cache rather than at layout.

Reproducible sample code

typescript
https://github.com/mohmdkh95/cropped-map-pin

Steps to reproduce

Full instructions in the repo README. In short: run the live screen, wait for the five pins, then tap the button that swaps the artwork without moving the map. Pins 1 and 4 lose their tails on the first swap; pins 2, 3 and 5 stay correct.

Expected result

All five markers render the full artwork, every time the artwork changes.

Actual result

Two of them render clipped, losing about 15dp off the bottom. Measured ink height 94px against 131px for an identical marker built fresh, at identical width, so only the vertical is wrong.

Image

React Native Maps Version

1.26.18

What platforms are you seeing the problem on?

Android

React Native Version

0.81.4

What version of Expo are you using?

Not using Expo

Device(s)

Pixel 6a emulator (Android 16, API 36), new architecture enabled, Redmi 15 physical device

Additional information

No response

Source: react-native-maps/react-native-maps