react-native-maps 1.18.2 → 1.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -36
- package/ios/AirMaps/AIRMapMarker.m +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -302,43 +302,10 @@ render() {
|
|
|
302
302
|
}
|
|
303
303
|
```
|
|
304
304
|
|
|
305
|
-
### Customizing the map style
|
|
305
|
+
### Customizing the map style (Google Maps Only)
|
|
306
306
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
```jsx
|
|
310
|
-
// The generated json object
|
|
311
|
-
mapStyle = [ ... ]
|
|
312
|
-
|
|
313
|
-
render() {
|
|
314
|
-
return (
|
|
315
|
-
<MapView
|
|
316
|
-
region={this.state.region}
|
|
317
|
-
onRegionChange={this.onRegionChange}
|
|
318
|
-
customMapStyle={mapStyle}
|
|
319
|
-
/>
|
|
320
|
-
);
|
|
321
|
-
}
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
For iOS, in addition to providing the `mapStyle` you will need to do the following
|
|
325
|
-
|
|
326
|
-
```jsx
|
|
327
|
-
import MapView, { PROVIDER_GOOGLE } from 'react-native-maps'
|
|
328
|
-
|
|
329
|
-
// ...
|
|
330
|
-
|
|
331
|
-
<MapView
|
|
332
|
-
provider={PROVIDER_GOOGLE}
|
|
333
|
-
customMapStyle={MapStyle}
|
|
334
|
-
>
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
Then add the AirGoogleMaps directory:
|
|
338
|
-
|
|
339
|
-
https://github.com/react-native-maps/react-native-maps/blob/1e71a21f39e7b88554852951f773c731c94680c9/docs/installation.md#ios
|
|
340
|
-
|
|
341
|
-
An unofficial step-by-step guide is also available at https://gist.github.com/heron2014/e60fa003e9b117ce80d56bb1d5bfe9e0
|
|
307
|
+
The `<MapView provider="google" googleMapId="yourStyledMapId" />` Google Maps on iOS and Android supports styling via google cloud platform, the styled maps are published under a googleMapId, by simply setting the property googleMapId to the MapView you can use that styled map
|
|
308
|
+
more info here: [google map id](https://developers.google.com/maps/documentation/get-map-id)
|
|
342
309
|
|
|
343
310
|
### MapView Events
|
|
344
311
|
|
|
@@ -272,7 +272,7 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
|
|
|
272
272
|
@"latitude": @(marker.coordinate.latitude),
|
|
273
273
|
@"longitude": @(marker.coordinate.longitude)
|
|
274
274
|
},
|
|
275
|
-
@"
|
|
275
|
+
@"position": @{
|
|
276
276
|
@"x": @(touchPointReal.x),
|
|
277
277
|
@"y": @(touchPointReal.y),
|
|
278
278
|
}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Leland Richardson <leland.m.richardson@gmail.com>",
|
|
7
7
|
"homepage": "https://github.com/react-native-maps/react-native-maps#readme",
|
|
8
|
-
"version": "1.18.
|
|
8
|
+
"version": "1.18.3",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|