MapView - onPoiClick

Hi! How can I do to implement onPoiClick on MapView? For example:

<MapView
        initialRegion={{
          latitude: LATITUDE,
          longitude: LONGITUDE,
          latitudeDelta: LATITUDE_DELTA,
          longitudeDelta: LONGITUDE_DELTA,
        }}
        style={StyleSheet.absoluteFillObject}
        ref={c => this.mapView = c}
        onPoiClick={ () => console.log('cliclicli') }
      />

I believe that this feature was just recently added (about a month ago) and the version of react-native-maps that Expo supports is older than that. Because this react-native-maps update contains native changes you will need to detach and add the code manually.
You can also vote on this feature request to get it updated: Update react-native-maps | Voters | Expo

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.