Background
PointAnnotationManager (added in #4209) currently configures the single shared Mapbox PointAnnotationManager instance that all PointAnnotation components use. This means:
- Only one
slot value per map — last writer wins if two managers are mounted
- Children of
<PointAnnotationManager> are React siblings of the native manager, not routed through it natively, so they all go to the same underlying manager regardless of nesting
What multiple managers would enable
<MapView styleURL="mapbox://styles/mapbox/standard">
<PointAnnotationManager slot="bottom">
<PointAnnotation id="a" coordinate={...} /> {/* rendered below buildings */}
</PointAnnotationManager>
<PointAnnotationManager slot="top">
<PointAnnotation id="b" coordinate={...} /> {/* rendered above everything */}
</PointAnnotationManager>
</MapView>
What's needed
- Native: Create a new Mapbox
PointAnnotationManager instance per RNMBXPointAnnotationManagerView instead of reusing the shared one. The Mapbox SDK supports multiple annotation managers per map.
- Native: Route
PointAnnotation children through their parent PointAnnotationManagerView — make them actual native children so they use that specific manager instance.
- React: The current wrapper API shape is already correct for this — no user-facing API change needed.
Current API is forward-compatible
The <PointAnnotationManager> wrapping pattern is exactly right for multi-manager support. The implementation just needs to go deeper on the native side.
Background
PointAnnotationManager(added in #4209) currently configures the single shared MapboxPointAnnotationManagerinstance that allPointAnnotationcomponents use. This means:slotvalue per map — last writer wins if two managers are mounted<PointAnnotationManager>are React siblings of the native manager, not routed through it natively, so they all go to the same underlying manager regardless of nestingWhat multiple managers would enable
What's needed
PointAnnotationManagerinstance perRNMBXPointAnnotationManagerViewinstead of reusing the shared one. The Mapbox SDK supports multiple annotation managers per map.PointAnnotationchildren through their parentPointAnnotationManagerView— make them actual native children so they use that specific manager instance.Current API is forward-compatible
The
<PointAnnotationManager>wrapping pattern is exactly right for multi-manager support. The implementation just needs to go deeper on the native side.