This React Native app is a minimal reproducible demo built to investigate ghost markers and clustering artifacts in react-native-map-clustering.
To stress-test how map clusters recalculate during extreme zoom in/out cycles combined with random panning.
It helps reproduce and analyze the issue where markers or clusters persist ("ghosts") after camera changes.
- Generates 1000 random markers centered around Razová, Czech Republic (
49.931305 N, 17.531996 E) - Runs an automated Excessive Zooming Test that:
- repeatedly zooms from
zoom = 15 → 5and back - adds small random pans at each step
- returns to the original center
- repeatedly zooms from
- Uses
clusterColor,clusterTextColor, andpinColorfor clear visual feedback - Marker and cluster colors change only when regenerating data, not during the test itself
| Button | Action |
|---|---|
| Run Excessive Zooming Test | performs automated zoom / pan cycles |
| Regenerate 1k markers | creates new random dataset + color scheme |
| Toggle Cluster | enables / disables clustering |
Google Maps API key (Android)
- Create a key in Google Cloud Console and enable “Maps SDK for Android”.
- Restrict it to Android apps with:
- Package name:
com.rnmapsghostrepro- SHA-1: from
./gradlew signingReport(variant debug)- Paste the key directly into the manifest:
<!-- android/app/src/main/AndroidManifest.xml -->
<!-- Google Maps API key -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_API_KEY_HERE" />npm install
npx react-native run-androidThen simply tap buttons in the UI.
- The test intentionally pushes clustering updates to their limits.
- On some Android 9 emulators, reloading the app (
⌘ RorRR) may crash due to Google Maps SDK’sNullPointerExceptionduring teardown — unrelated to app logic but reproducible here. - Best tested on Android ≥ API 30 or iOS ≥ 15.
This repository was created to reproduce and analyze:
Ghost markers / stale clusters after zoom or camera animation
Feel free to fork it, run your own scenarios, and report findings in the related issue thread.
MIT License © 2025 Jiří Bílek