Closed loloide closed 6 months ago
Implemented.
import Leaflet, { RNLeafletRef } from 'react-native-leaflet-ts'; const App = () => { const leafletRef = useRef<RNLeafletRef>(null); return ( <SafeAreaView style={{ backgroundColor: 'gray', flex: 1 }}> <Leaflet ref={leafletRef} mapLayers={[ { name: 'mapoverview', src, tileOptions: { attribution: 'hello! this is the attribution', }, }, ]} onMessage={d => console.log(d)} markers={[ { latLng: [0, 0, -20], disabled: false, title: 'test', icon: 'https://as2.ftcdn.net/v2/jpg/03/29/26/39/1000_F_329263903_Oax03LQARwf34pbJn4rdcmQ2dgJMzo1D.jpg', }, ]} /> <Button onPress={() => leafletRef.current?.flyTo({ latLng: [0, 0, -20], zoom: 5 }) } title="flyto"></Button> <Button onPress={() => leafletRef.current?.clearMarkers()} title="clear markers"></Button> </SafeAreaView> ); }
`
Implemented.
`