diff --git a/.npmignore b/.npmignore
index 33a9488b1..4ce7bc58b 100644
--- a/.npmignore
+++ b/.npmignore
@@ -1 +1,2 @@
example
+.babelrc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a6e3ab5c3..0af766a02 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,53 @@
# Change Log
+## 0.15.0 (May 8, 2017)
+
+* iOS: [#1195]((https://github.com/airbnb/react-native-maps/pull/1195) Rename project file to fix iOS build error
+* Android: Update Google Play Services to version `10.2.4`
+
+## 0.14.0 (April 4, 2017)
+
+## Enhancements
+
+* Restructure project #1164
+
+* Add showsIndoorLevelPicker -> setIndoorLevelPickerEnabled to MapView #1019
+[#1188](https://github.com/airbnb/react-native-maps/pull/1188)
+
+* iOS - Added onPress support for Polygons on Google Maps
+[#1024](https://github.com/airbnb/react-native-maps/pull/1024)
+
+* Add customized user location annotation text
+[#1049](https://github.com/airbnb/react-native-maps/pull/1049)
+
+* iOS - Google Maps - Add `showsMyLocationButton` support
+[#1157](https://github.com/airbnb/react-native-maps/pull/1157)
+
+
+## Patches
+
+* Fix getResources() null crash in mapview
+[#1188](https://github.com/airbnb/react-native-maps/pull/1188)
+
+* Rename MapKit category to avoid conflicts with the one in RN
+[#1172](https://github.com/airbnb/react-native-maps/pull/1172)
+
+* Upgrade GMS dependencies to 10.2.0
+[#1169](https://github.com/airbnb/react-native-maps/pull/1169)
+
+* fix multiple-instance memory leak
+[#1130](https://github.com/airbnb/react-native-maps/pull/1130)
+
+* fix onSelected event for markers with custom view
+[#1079](https://github.com/airbnb/react-native-maps/pull/1079)
+
+* Crash in our App fix
+[#1096](https://github.com/airbnb/react-native-maps/pull/1096)
+
+* Use local RCTConvert+MapKit instead of the one in React Native
+[#1138](https://github.com/airbnb/react-native-maps/pull/1138)
+
+
## 0.13.1 (March 21, 2017)
diff --git a/build.gradle b/build.gradle
index f89d2c594..8a3e2453e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.3.0'
+ classpath 'com.android.tools.build:gradle:2.3.1'
}
}
diff --git a/docs/installation.md b/docs/installation.md
index e6d6b80d3..4c551e536 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -25,9 +25,9 @@ react-native link react-native-maps
(If you do not need `GoogleMaps` support for iOS, then you can probably completely skip this step.)
1. Open your project in Xcode workspace
1. If you need `GoogleMaps` support also
- - Drag this folder `node_modules/react-native-maps/ios/AirGoogleMaps/` into your project, and choose `Create groups` in the popup window.
+ - Drag this folder `node_modules/react-native-maps/lib/ios/AirGoogleMaps/` into your project, and choose `Create groups` in the popup window.
- In `AppDelegate.m`, add `@import GoogleMaps;` before `@implementation AppDelegate`. In `- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions`, add `[GMSServices provideAPIKey:@"YOUR_GOOGLE_MAP_API_KEY"];`
- - In your project's `Build Settings` > `Header Search Paths`, double click the value field. In the popup, add `$(SRCROOT)/../node_modules/react-native-maps/ios/AirMaps` and change `non-recursive` to `recursive`. (Dragging the folder `node_modules/react-native-maps/ios/AirMaps/` into your project introduces duplicate symbols. We should not do it.)
+ - In your project's `Build Settings` > `Header Search Paths`, double click the value field. In the popup, add `$(SRCROOT)/../node_modules/react-native-maps/lib/ios/AirMaps` and change `non-recursive` to `recursive`. (Dragging the folder `node_modules/react-native-maps/lib/ios/AirMaps/` into your project introduces duplicate symbols. We should not do it.)
Note: We recommend using a version of React Native >= .40. Newer versions (>= .40) require `package.json` to be set to `"react-native-maps": "^0.13.0"`, while older versions require `"react-native-maps": "^0.12.4"`.
@@ -52,7 +52,7 @@ After your `Podfile` is setup properly, run `pod install`.
>This was already done for you if you ran "react-native link"
1. Open your project in Xcode, right click on `Libraries` and click `Add
- Files to "Your Project Name"` Look under `node_modules/react-native-maps/ios` and add `AIRMaps.xcodeproj`.
+ Files to "Your Project Name"` Look under `node_modules/react-native-maps/lib/ios` and add `AIRMaps.xcodeproj`.
1. Add `libAIRMaps.a` to `Build Phases -> Link Binary With Libraries.
1. Click on `AIRMaps.xcodeproj` in `Libraries` and go the `Build
Settings` tab. Double click the text to the right of `Header Search
@@ -98,7 +98,7 @@ After your `Podfile` is setup properly, run `pod install`.
```groovy
...
include ':react-native-maps'
- project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/android')
+ project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/lib/android')
```
1. Specify your Google Maps API Key:
@@ -203,7 +203,7 @@ Enter the name of the API key and create it.
1. Clean the cache :
```
watchman watch-del-all
- npm cache clean
+ npm clean cache
```
1. When starting emulator, make sure you have enabled `Wipe user data`.
@@ -213,7 +213,7 @@ Enter the name of the API key and create it.
1. If you encounter `com.android.dex.DexException: Multiple dex files define Landroid/support/v7/appcompat/R$anim`, then clear build folder.
```
cd android
- gradlew clean
+ ./gradlew clean
cd ..
```
diff --git a/docs/mapview.md b/docs/mapview.md
index 8e73a0773..3df5640c3 100644
--- a/docs/mapview.md
+++ b/docs/mapview.md
@@ -9,7 +9,7 @@
| `initialRegion` | `Region` | | The initial region to be displayed by the map. Use this prop instead of `region` only if you don't want to control the viewport of the map besides the initial region.
Changing this prop after the component has mounted will not result in a region change.
This is similar to the `initialValue` prop of a text input.
| `liteMode` | `Boolean` | `false` | Enable lite mode. **Note**: Android only.
| `mapType` | `String` | `"standard"` | The map type to be displayed.
- standard: standard road map (default)
- satellite: satellite view
- hybrid: satellite view with roads and points of interest overlayed
- terrain: (Android only) topographic view
-| `customMapStyle` | `Array` | | Adds custom styling to the map component. See [README](https://github.com/airbnb/react-native-maps#customizing-the-map-style) for more information.
+| `customMapStyle` | `Array` | | Adds custom styling to the map component. See [README](https://github.com/airbnb/react-native-maps#customizing-the-map-style) for more information.
| `showsUserLocation` | `Boolean` | `false` | If `true` the app will ask for the user's location. **NOTE**: You need to add `NSLocationWhenInUseUsageDescription` key in Info.plist to enable geolocation, otherwise it is going to *fail silently*!
| `userLocationAnnotationTitle` | `String` | | The title of the annotation for current user location. This only works if `showsUserLocation` is true. There is a default value `My Location` set by MapView. **Note**: iOS only.
| `followsUserLocation` | `Boolean` | `false` | If `true` the map will focus on the user's location. This only works if `showsUserLocation` is true and the user has shared their location. **Note**: iOS only.
@@ -36,6 +36,8 @@
## Events
+To access event data, you will need to use `e.nativeEvent`. For example, `onPress={e => console.log(e.nativeEvent)}` will log the entire event object to your console.
+
| Event Name | Returns | Notes
|---|---|---|
| `onRegionChange` | `Region` | Callback that is called continuously when the region changes, such as when a user is dragging the map.
@@ -59,9 +61,9 @@
|---|---|---|
| `animateToRegion` | `region: Region`, `duration: Number` |
| `animateToCoordinate` | `coordinate: LatLng`, `duration: Number` |
-| `fitToElements` | `animated: Boolean` |
+| `fitToElements` | `animated: Boolean` |
| `fitToSuppliedMarkers` | `markerIDs: String[]`, `animated: Boolean` | If you need to use this in `ComponentDidMount`, make sure you put it in a timeout or it will cause performance problems.
-| `fitToCoordinates` | `coordinates: Array, options: { edgePadding: EdgePadding, animated: Boolean }` | If called in `ComponentDidMount` in android, it will cause an exception. It is recommended to call it from the MapView `onLayout` event.
+| `fitToCoordinates` | `coordinates: Array, options: { edgePadding: EdgePadding, animated: Boolean }` | If called in `ComponentDidMount` in android, it will cause an exception. It is recommended to call it from the MapView `onLayout` event.
diff --git a/docs/marker.md b/docs/marker.md
index 4246befc3..16ad49f40 100644
--- a/docs/marker.md
+++ b/docs/marker.md
@@ -20,6 +20,8 @@
## Events
+To access event data, you will need to use `e.nativeEvent`. For example, `onPress={e => console.log(e.nativeEvent)}` will log the entire event object to your console.
+
| Event Name | Returns | Notes
|---|---|---|
| `onPress` | `{ coordinate: LatLng, position: Point }` | Callback that is called when the user presses on the marker
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 3b6c26cf7..c21e471fc 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Mar 02 17:03:11 PST 2017
+#Mon May 08 11:03:28 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
diff --git a/lib/android/googlemap/build.gradle b/lib/android/googlemap/build.gradle
index b63187be8..1531de2aa 100644
--- a/lib/android/googlemap/build.gradle
+++ b/lib/android/googlemap/build.gradle
@@ -23,8 +23,8 @@ android {
dependencies {
provided "com.facebook.react:react-native:+"
- compile "com.google.android.gms:play-services-base:10.2.0"
- compile "com.google.android.gms:play-services-maps:10.2.0"
+ compile "com.google.android.gms:play-services-base:10.2.4"
+ compile "com.google.android.gms:play-services-maps:10.2.4"
compile project(':react-native-maps:common')
testCompile 'junit:junit:4.12'
}
diff --git a/lib/ios/AirMaps.xcodeproj/project.pbxproj b/lib/ios/AirMaps.xcodeproj/project.pbxproj
index 39b1256e2..ac641aff7 100644
--- a/lib/ios/AirMaps.xcodeproj/project.pbxproj
+++ b/lib/ios/AirMaps.xcodeproj/project.pbxproj
@@ -21,7 +21,7 @@
1125B2E51C4AD3DA007D0023 /* AIRMapPolyline.m in Sources */ = {isa = PBXBuildFile; fileRef = 1125B2D41C4AD3DA007D0023 /* AIRMapPolyline.m */; };
1125B2E61C4AD3DA007D0023 /* AIRMapPolylineManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1125B2D61C4AD3DA007D0023 /* AIRMapPolylineManager.m */; };
1125B2F21C4AD445007D0023 /* SMCalloutView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1125B2F11C4AD445007D0023 /* SMCalloutView.m */; };
- 19DABC7F1E7C9D3C00F41150 /* RCTConvert+MapKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 19DABC7E1E7C9D3C00F41150 /* RCTConvert+MapKit.m */; };
+ 19DABC7F1E7C9D3C00F41150 /* RCTConvert+AirMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 19DABC7E1E7C9D3C00F41150 /* RCTConvert+AirMap.m */; };
DA6C26381C9E2AFE0035349F /* AIRMapUrlTile.m in Sources */ = {isa = PBXBuildFile; fileRef = DA6C26371C9E2AFE0035349F /* AIRMapUrlTile.m */; };
DA6C263E1C9E324A0035349F /* AIRMapUrlTileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DA6C263D1C9E324A0035349F /* AIRMapUrlTileManager.m */; };
/* End PBXBuildFile section */
@@ -68,8 +68,8 @@
1125B2F01C4AD445007D0023 /* SMCalloutView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SMCalloutView.h; path = AirMaps/Callout/SMCalloutView.h; sourceTree = SOURCE_ROOT; };
1125B2F11C4AD445007D0023 /* SMCalloutView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SMCalloutView.m; path = AirMaps/Callout/SMCalloutView.m; sourceTree = SOURCE_ROOT; };
11FA5C511C4A1296003AC2EE /* libAirMaps.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAirMaps.a; sourceTree = BUILT_PRODUCTS_DIR; };
- 19DABC7D1E7C9D3C00F41150 /* RCTConvert+MapKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+MapKit.h"; sourceTree = ""; };
- 19DABC7E1E7C9D3C00F41150 /* RCTConvert+MapKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+MapKit.m"; sourceTree = ""; };
+ 19DABC7D1E7C9D3C00F41150 /* RCTConvert+AirMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+AirMap.h"; sourceTree = ""; };
+ 19DABC7E1E7C9D3C00F41150 /* RCTConvert+AirMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+AirMap.m"; sourceTree = ""; };
DA6C26361C9E2AFE0035349F /* AIRMapUrlTile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AIRMapUrlTile.h; sourceTree = ""; };
DA6C26371C9E2AFE0035349F /* AIRMapUrlTile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AIRMapUrlTile.m; sourceTree = ""; };
DA6C263C1C9E324A0035349F /* AIRMapUrlTileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AIRMapUrlTileManager.h; sourceTree = ""; };
@@ -134,8 +134,8 @@
1125B2D61C4AD3DA007D0023 /* AIRMapPolylineManager.m */,
1125B2F01C4AD445007D0023 /* SMCalloutView.h */,
1125B2F11C4AD445007D0023 /* SMCalloutView.m */,
- 19DABC7D1E7C9D3C00F41150 /* RCTConvert+MapKit.h */,
- 19DABC7E1E7C9D3C00F41150 /* RCTConvert+MapKit.m */,
+ 19DABC7D1E7C9D3C00F41150 /* RCTConvert+AirMap.h */,
+ 19DABC7E1E7C9D3C00F41150 /* RCTConvert+AirMap.m */,
DA6C26361C9E2AFE0035349F /* AIRMapUrlTile.h */,
DA6C26371C9E2AFE0035349F /* AIRMapUrlTile.m */,
DA6C263C1C9E324A0035349F /* AIRMapUrlTileManager.h */,
@@ -206,7 +206,7 @@
1125B2E01C4AD3DA007D0023 /* AIRMapManager.m in Sources */,
1125B2E61C4AD3DA007D0023 /* AIRMapPolylineManager.m in Sources */,
1125B2DD1C4AD3DA007D0023 /* AIRMapCircle.m in Sources */,
- 19DABC7F1E7C9D3C00F41150 /* RCTConvert+MapKit.m in Sources */,
+ 19DABC7F1E7C9D3C00F41150 /* RCTConvert+AirMap.m in Sources */,
1125B2E51C4AD3DA007D0023 /* AIRMapPolyline.m in Sources */,
DA6C263E1C9E324A0035349F /* AIRMapUrlTileManager.m in Sources */,
1125B2DA1C4AD3DA007D0023 /* AIRMap.m in Sources */,
diff --git a/package.json b/package.json
index 205e95053..c0233a603 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"description": "React Native Mapview component for iOS + Android",
"main": "index.js",
"author": "Leland Richardson ",
- "version": "0.13.1",
+ "version": "0.15.0",
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"run:packager": "./node_modules/react-native/packager/packager.sh",