MapView - onPoiClick

#1

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') }
      />
#2

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: https://expo.canny.io/feature-requests/p/update-react-native-maps-1

1 Like
closed #3

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