novalabio/react-native-maps-super-cluster

Clusteredmapview when I pan or drag the map, I need to call web service based on viewport. I am not able to capture pan or drag gesture on this map. Can you please help me out?

Ramana46 opened this issue · 3 comments

Clusteredmapview when I pan or drag the map, I need to call web service based on viewport. I am not able to capture pan or drag gesture on this map. Can you please help me out?

Did you try wrapping the component with PanResponder? Once you detect a drag/pan, you could then get the current map region and do your calcs for resolving it to viewport.

Is the onRegionChange event from react-native-maps exposed to ClusteredMapView`? This would handle zoom as well as pan.

For pan start event, you can use onPanDrag.
using onRegionChange to make a call to web service is a huge performance issue. you can try onRegionChangeComplete instead.