Skip to content

Commit 8b78e2a

Browse files
committed
feat: map on region change
1 parent 56a3b3f commit 8b78e2a

File tree

3 files changed

+398
-10
lines changed

3 files changed

+398
-10
lines changed

example/src/App.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,15 @@ export default function App() {
2020
};
2121
const toner =
2222
'https://api.maptiler.com/maps/toner-v2/{z}/{x}/{y}.png?key=j46yoHMlBMQRgTY3lCMk';
23+
2324
return (
24-
<MapView style={styles.container} initialRegion={initialRegion}>
25+
<MapView
26+
onRegionChange={(region) => {
27+
console.log('🚀 ~ file: App.tsx:88 ~ App ~ region', region);
28+
}}
29+
style={styles.container}
30+
initialRegion={initialRegion}
31+
>
2532
<Marker
2633
coordinate={{
2734
latitude: 55.75222,

0 commit comments

Comments
 (0)