1

MapBox with react-native.

How to know if a point is on "water"(ocean) or land.

can't find function visibleFeatures in react-native?

var LocationSelect = function(props) {
    const mapContainer = useRef(null);

    function onMapPointSelect(data) {
          /// Get if point is water or land
        mapContainer.visibleFeatures(data.geometry.coordinates, styleLayerIdentifiers: ["water"]);
    }

    return (
        <View style={styles.mapContainer}>

            <MapboxGL.MapView style={styles.map}
            onLayout={onLayout}
            onPress={onMapPointSelect}
            ref={el => (mapContainer.current = el)} >

            </MapboxGL.MapView>

        </View>
    );

}

Thank you very much

shay te
  • 1,028
  • 3
  • 12
  • 23

0 Answers0