Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch up from airbnb/react-native-maps #10

Merged
merged 34 commits into from
Oct 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d556597
[google] refactor AIRGoogleMapMarker to use DummyView (#649)
gilbox Oct 5, 2016
ab5c2c1
v0.9.0
Oct 5, 2016
96524b4
Bump RN version to 0.33.0
gilbox Oct 5, 2016
464edf8
Merge pull request #650 from airbnb/gil/rn-0.33.0
Oct 5, 2016
69a32aa
v0.10.0 (#652)
gilbox Oct 6, 2016
0a143d8
[android] fix gradle build setup for explorer, bump to gradle 2.2.0
gilbox Oct 7, 2016
375da11
[android] fix getAirMapName to fix ref-based commands
gilbox Oct 10, 2016
87c5847
[android] fix gradle build setup for explorer, bump to gradle
gilbox Oct 10, 2016
df998ee
Merge pull request #665 from airbnb/gil/fix-android-commands
Oct 10, 2016
3c5d4f7
Merge pull request #666 from airbnb/gil/fix-android-build-config
Oct 10, 2016
2f4cc03
v0.10.1 (#673)
gilbox Oct 10, 2016
3433a7a
[android] Add parameter to disable the moving on marker press
mlanter Oct 11, 2016
99c3bda
upgraded to RN 0.35 and added fix to RCTImageLoader, missing `partial…
eugenehp Oct 11, 2016
e313be3
Add spaces around `=`
mlanter Oct 11, 2016
722f5e9
Merge pull request #676 from opendoor-labs/move_pr
Oct 12, 2016
914ec6d
included MapUrlTile usage in README.md
ochanje210 Oct 13, 2016
8dac2ef
travis build fix
ochanje210 Oct 13, 2016
69cbe07
travis build fix
ochanje210 Oct 13, 2016
a181ef3
included Android and IOS setup
ochanje210 Oct 13, 2016
734c5d7
kept double quote and removed curly braces
ochanje210 Oct 13, 2016
11acf6c
[zIndex] Add support for setting zIndex on markers
mlanter Oct 11, 2016
2828d2e
Add an example
mlanter Oct 12, 2016
45f85a0
Add support for Google Maps on iOS, fix lints
mlanter Oct 13, 2016
40c5dd3
Fix lint
mlanter Oct 13, 2016
cd2f6d9
Fix other lints
mlanter Oct 13, 2016
15c5875
Merge pull request #687 from ochanje210/master
Oct 13, 2016
f45e755
Merge pull request #675 from opendoor-labs/zindex_pr
Oct 13, 2016
1a0d3aa
Fixes crash during Activity onPause()
felipecsl Oct 14, 2016
4cb998f
Update example app for 0.35.0
Oct 14, 2016
7dfdb77
Fix bug in AIRGoogleMapMarker from RN 0.33->0.35
Oct 14, 2016
8994e30
Merge pull request #694 from felipecsl/v0.10-stable
Oct 14, 2016
1d5b044
Merge pull request #695 from airbnb/example-app-0.35
Oct 14, 2016
60afece
Update installation.md (#696)
securingsincity Oct 16, 2016
12853f0
0.11.0
Oct 16, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.11.0 (October 16, 2016)

### Breaking Changes

* Update example app for RN 0.35, fix Gmaps bug for 0.35
[#695](https://github.com/airbnb/react-native-maps/pull/695)
(@spikebrehm)
* Upgraded to RN 0.35
[#680](https://github.com/airbnb/react-native-maps/pull/680)
(@eugenehp)

### Patches

* Update installation.md
[#696](https://github.com/airbnb/react-native-maps/pull/696)
(@securingsincity)
* [android] Fixes crash during Activity onPause()
[#694](https://github.com/airbnb/react-native-maps/pull/694)
(@felipecsl)
* Included MapUrlTile usage in README.md
[#687](https://github.com/airbnb/react-native-maps/pull/687)
(@ochanje210)
* [android] Add parameter to disable the moving on marker press
[#676](https://github.com/airbnb/react-native-maps/pull/676)
(@mlanter)
* Add support for setting zIndex on markers
[#675](https://github.com/airbnb/react-native-maps/pull/675)
(@mlanter)


## 0.10.1 (October 10, 2016)

### Patches

* [android] fix gradle build setup for explorer, bump to gradle 2.2.0
[#666](https://github.com/airbnb/react-native-maps/pull/666)
(@gilbox)
* [android] fix getAirMapName to fix ref-based commands
[#665](https://github.com/airbnb/react-native-maps/pull/665)
(@gilbox)
* Hopefully this release will fix issue [#656](https://github.com/airbnb/react-native-maps/issues/656)

## 0.10.0 (October 5, 2016)

### Breaking Changes

* Upgrade to `[email protected]`

## 0.9.0 (September 28, 2016)

As of this release, this repository has moved from
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,30 @@ render() {
</MapView>
```

### Using a custom Tile Overlay

```jsx
<MapView
region={this.state.region}
onRegionChange={this.onRegionChange}
>
<MapView.UrlTile
/**
* The url template of the tile server. The patterns {x} {y} {z} will be replaced at runtime
* For example, http://c.tile.openstreetmap.org/{z}/{x}/{y}.png
*/
urlTemplate={this.state.urlTemplate}
/>
</MapView>
```

For Android: add the following line in your AndroidManifest.xml
```xml
<uses-permission android:name="android.permission.INTERNET" />
```
For IOS: configure [App Transport Security](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33) in your app



## Examples

Expand Down
22 changes: 8 additions & 14 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ buildscript {
jcenter()
maven {
// For developing the library outside the context of the example app, expect `react-native`
// to be installed at `./android/node_modules`.
// to be installed at `./node_modules`.
url "$projectDir/../node_modules/react-native/android"
}
maven {
// For developing the example app, expect this library to be installed as a node module
// inside of the example app. So traverse from `./android/example/node_modules/react-native-maps/android`
// to `./android/example/node_modules/react-native/android`.
// react-native should be installed since it's a peer dependency
// For developing the example app.
url "$projectDir/../../react-native/android"
}
}
Expand All @@ -29,16 +26,13 @@ allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// For developing the library outside the context of the example app, expect `react-native`
// to be installed at `./android/node_modules`.
url "$projectDir/../node_modules/react-native/android"
}
maven {
// For developing the example app, expect this library to be installed as a node module
// inside of the example app. So traverse from `./android/example/node_modules/react-native-maps/android`
// to `./android/example/node_modules/react-native/android`.
// react-native should be installed since it's a peer dependency
// For developing the library outside the context of the example app, expect `react-native`
// to be installed at `./node_modules`.
url "$projectDir/../node_modules/react-native/android"
}
maven {
// For developing the example app.
url "$projectDir/../../react-native/android"
}
}
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_CODE=2
VERSION_NAME=0.9.0-rc.0
VERSION_NAME=0.11.0
GROUP=com.airbnb.android

POM_DESCRIPTION=React Native Map view component for Android
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ protected AirMapView createViewInstance(ThemedReactContext context) {
return new AirMapView(context, this.appContext.getCurrentActivity(), this, this.googleMapOptions);
}

@Override
public void onDropViewInstance(AirMapView view) {
view.doDestroy();
super.onDropViewInstance(view);
}

private void emitMapError(String message, String type) {
WritableMap error = Arguments.createMap();
error.putString("message", message);
Expand Down Expand Up @@ -155,22 +149,27 @@ public void setRotateEnabled(AirMapView view, boolean rotateEnabled) {
view.map.getUiSettings().setRotateGesturesEnabled(rotateEnabled);
}

@ReactProp(name="cacheEnabled", defaultBoolean = false)
@ReactProp(name = "cacheEnabled", defaultBoolean = false)
public void setCacheEnabled(AirMapView view, boolean cacheEnabled) {
view.setCacheEnabled(cacheEnabled);
}

@ReactProp(name="loadingEnabled", defaultBoolean = false)
@ReactProp(name = "loadingEnabled", defaultBoolean = false)
public void setLoadingEnabled(AirMapView view, boolean loadingEnabled) {
view.enableMapLoading(loadingEnabled);
}

@ReactProp(name="loadingBackgroundColor", customType="Color")
@ReactProp(name = "moveOnMarkerPress", defaultBoolean = true)
public void setMoveOnMarkerPress(AirMapView view, boolean moveOnPress) {
view.setMoveOnMarkerPress(moveOnPress);
}

@ReactProp(name = "loadingBackgroundColor", customType = "Color")
public void setLoadingBackgroundColor(AirMapView view, @Nullable Integer loadingBackgroundColor) {
view.setLoadingBackgroundColor(loadingBackgroundColor);
}

@ReactProp(name="loadingIndicatorColor", customType="Color")
@ReactProp(name = "loadingIndicatorColor", customType = "Color")
public void setLoadingIndicatorColor(AirMapView view, @Nullable Integer loadingIndicatorColor) {
view.setLoadingIndicatorColor(loadingIndicatorColor);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class AirMapMarker extends AirMapFeature {
private float rotation = 0.0f;
private boolean flat = false;
private boolean draggable = false;
private int zIndex = 0;

private float calloutAnchorX;
private float calloutAnchorY;
Expand Down Expand Up @@ -173,6 +174,14 @@ public void setDraggable(boolean draggable) {
update();
}

public void setZIndex(int zIndex) {
this.zIndex = zIndex;
if (marker != null) {
marker.setZIndex(zIndex);
}
update();
}

public void setMarkerHue(float markerHue) {
this.markerHue = markerHue;
update();
Expand Down Expand Up @@ -288,6 +297,7 @@ private MarkerOptions createMarkerOptions() {
options.rotation(rotation);
options.flat(flat);
options.draggable(draggable);
options.zIndex(zIndex);
options.icon(getIcon());
return options;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ public void setDraggable(AirMapMarker view, boolean draggable) {
view.setDraggable(draggable);
}

@Override
@ReactProp(name = "zIndex", defaultFloat = 0.0f)
public void setZIndex(AirMapMarker view, float zIndex) {
super.setZIndex(view, zIndex);
int integerZIndex = Math.round(zIndex);
view.setZIndex(integerZIndex);
}

@Override
public void addView(AirMapMarker parent, View child, int index) {
// if an <Callout /> component is a child, then it is a callout view, NOT part of the
Expand Down
Loading