Skip to content

Commit

Permalink
Merge commit '0dcdebdfe20c292bcf6d66401afda1d559ee6f09'
Browse files Browse the repository at this point in the history
* commit '0dcdebdfe20c292bcf6d66401afda1d559ee6f09':
  v0.15.0 (react-native-maps#1305)
  fixing code snippet (react-native-maps#1196)
  small typo fixed (react-native-maps#1211)
  Update installation.md (react-native-maps#1226)
  Fixed path in `android/settings.gradle` (react-native-maps#1230)
  Add babelrc to npmignore (react-native-maps#1246)
  Update installation.md (react-native-maps#1179)
  Update docs to specify how to access event data (react-native-maps#1178)
  Update path in android installation (react-native-maps#1249)
  Add the `lib` folder in the docs (react-native-maps#1293)
  pbxproj: RCTConvert+MapKit -> RCTConvert+AirMap (react-native-maps#1195)
  v0.14.0

Conflicts:
	lib/android/build.gradle
	lib/android/gradle.properties
  • Loading branch information
jiaminglu committed May 24, 2017
2 parents c66f664 + 0dcdebd commit c478f3f
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 21 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
example
.babelrc
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}

Expand Down
12 changes: 6 additions & 6 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"`.

Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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`.
Expand All @@ -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 ..
```

Expand Down
8 changes: 5 additions & 3 deletions docs/mapview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br/><br/> Changing this prop after the component has mounted will not result in a region change.<br/><br/> 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. <br/><br/> - standard: standard road map (default)<br/> - satellite: satellite view<br/> - hybrid: satellite view with roads and points of interest overlayed<br/> - 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.
Expand All @@ -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.
Expand All @@ -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<LatLng>, 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<LatLng>, 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.



Expand Down
2 changes: 2 additions & 0 deletions docs/marker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions lib/android/googlemap/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
12 changes: 6 additions & 6 deletions lib/ios/AirMaps.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 = "<group>"; };
19DABC7E1E7C9D3C00F41150 /* RCTConvert+MapKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+MapKit.m"; sourceTree = "<group>"; };
19DABC7D1E7C9D3C00F41150 /* RCTConvert+AirMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+AirMap.h"; sourceTree = "<group>"; };
19DABC7E1E7C9D3C00F41150 /* RCTConvert+AirMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+AirMap.m"; sourceTree = "<group>"; };
DA6C26361C9E2AFE0035349F /* AIRMapUrlTile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AIRMapUrlTile.h; sourceTree = "<group>"; };
DA6C26371C9E2AFE0035349F /* AIRMapUrlTile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AIRMapUrlTile.m; sourceTree = "<group>"; };
DA6C263C1C9E324A0035349F /* AIRMapUrlTileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AIRMapUrlTileManager.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "React Native Mapview component for iOS + Android",
"main": "index.js",
"author": "Leland Richardson <leland.m.richardson@gmail.com>",
"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",
Expand Down

0 comments on commit c478f3f

Please sign in to comment.