// @flow import * as React from 'react'; import {View} from 'react-native'; import {withTheme} from 'react-native-paper'; import {StackNavigationProp} from "@react-navigation/stack"; import type {CustomTheme} from "../../managers/ThemeManager"; import MapboxGL from "@react-native-mapbox-gl/maps"; type Props = { navigation: StackNavigationProp, theme: CustomTheme, } type State = { featureCollection: Array, } MapboxGL.setAccessToken("pk.eyJ1IjoiYW1pY2FsZS1pbnNhdCIsImEiOiJja2JpM2d5OHYwYmdiMndxdnV4bmh6bGFwIn0.qiOwbs2_HRaQGUOpBDjbsQ"); // const styles = { // icon: { // iconImage: exampleIcon, // iconAllowOverlap: true, // }, // }; // const FEATURES = [{ // type: 'Feature', // geometry: { // type: 'Point', // coordinates: [1.4669608, 43.5698867], // } // }] /** * Class defining the app's map screen. */ class MapScreen extends React.Component { map: { current: null | MapboxGL.MapView }; constructor() { super(); this.map = React.createRef(); this.state = { featureCollection: [], }; } componentDidMount() { MapboxGL.setTelemetryEnabled(false); } // onSymbolPress = (feature) => { // console.log("coucou"); // } // // // onSourceLayerPress = ({features, coordinates, point}) => { // console.log( // 'You pressed a layer here are your features:', // features, // coordinates, // point, // ); // } render() { return ( { console.log(e) }} > {/**/} {/* */} {/**/} ); } } export default withTheme(MapScreen);