nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 697 forks source link

ShapeSource with custom view as children #1577

Closed aprados closed 5 years ago

aprados commented 5 years ago

I'm migrating from PointAnnotation to ShapeSource, but I have a custom component inside the PointAnnotation that changes based on the feature's properties, and if it's selected or not. Is there a way to do this with ShapeSource?

kristfal commented 5 years ago

I'm not sure if I understand your question fully. However, I'll try:

1) It is possible to assign custom icons to a shapeSource 2) If you update the shape source (ex: If a feature is selected) you can update the icon 3) Shapesources expect you to handle everything around selection yourself, and you'll need to build your own custom "callout" UI or something similar

Let me know if you have further questions