Skip to content

Commit 950bd43

Browse files
authored
MapView panning fix + onPress (47) (#745)
* Added onPress to mapview * Added api keys to mapview examples * Convert MapView to a functional component and memoize
1 parent 3b5f599 commit 950bd43

File tree

6 files changed

+322
-231
lines changed

6 files changed

+322
-231
lines changed

example/src/MapViewDataDrivenExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const MapViewDataDrivenExample = ({ theme }) => {
2828
latitude={33.8303}
2929
longitude={-116.524}
3030
zoom={12}
31-
apiKey={"AIzaSyC53v7BvSuA1yv7Hwf1rC_9kpHMmmYJJhU"}
31+
apiKey="AIzaSyBSM2NJ9iJkilKzWcZcCHklTSfZNewGIl4"
3232
markersData={data}
3333
keyExtractor={(item) => item.id}
3434
renderItem={({ item }) => (

example/src/MapViewExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const MapViewExample = ({ theme }) => {
1717
<View style={styles.container}>
1818
<MapView
1919
ref={mapRef}
20+
apiKey="AIzaSyBSM2NJ9iJkilKzWcZcCHklTSfZNewGIl4"
2021
showsCompass={true}
2122
style={styles.map}
2223
latitude={43.741895}

packages/maps/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"dependencies": {
4242
"@draftbit/ui": "47.7.2",
4343
"@teovilla/react-native-web-maps": "^0.9.1",
44+
"lodash.isequal": "^4.5.0",
4445
"react-native-maps": "1.3.2"
4546
},
4647
"eslintIgnore": [
@@ -60,5 +61,8 @@
6061
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
6162
],
6263
"testEnvironment": "node"
64+
},
65+
"devDependencies": {
66+
"@types/lodash.isequal": "^4.5.6"
6367
}
6468
}

0 commit comments

Comments
 (0)