nitaliano / react-native-mapbox-gl

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

How to implement Clustering and PointAnnotation #1500

Closed goodryanboy closed 5 years ago

goodryanboy commented 5 years ago

How is it possible to put PointAnnotation inside the clustering? What I want to use is the PointAnnotation but the problem is if I have more than 200 markers its hangup in android but in IOS its fine. So Im trying different approach I use the ShapeSource and its very fast but the problem is I want to implement the CallOut which is Available only in the PointAnnotation.

rsimbu89 commented 5 years ago

I'm also want to use show the Call out while click on Shape Source, but could not find anything related with this in document, Is there any way to achieve this?

goodryanboy commented 5 years ago

What Im trying to do now is to create my own callout but it will not show above the marker but instead it just like Card at the bottom of the map. but I think you can achieve the callout using the gesture you need to get where is the touch from.

rsimbu89 commented 5 years ago

You mean like create custom View and show/hide it based on the click events? And yes i can get the geometry map coordinates while click on Shape source, Is there any possibility to show the Custom view at that clicked coordinates?

goodryanboy commented 5 years ago

Yes based on clicked events, Yeah its possible but I think you need the gesture API to get the position in the screen. you can also get the position in the screen if you used the mapView onpress event

rsimbu89 commented 5 years ago

Thank You, I added the view on the center of the view on the onPress event

goodryanboy commented 5 years ago

Your welcome

onitzschke commented 5 years ago

@goodryanboy can this issue be closed?