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

Add Marker rotation for Google Maps on iOS #1326

Conversation

Kerumen
Copy link
Contributor

@Kerumen Kerumen commented May 12, 2017

I added the rotation for the Google Maps provider on iOS. It was already working on Android.
I can't figure out how to do it with MKAnnotationView for the MapKit provider..

The rotation is in degrees, starting from 0 to 360.

@henrikra
Copy link

Wow very nice! Is it possible to animate rotation?

@Kerumen
Copy link
Contributor Author

Kerumen commented May 13, 2017

I didn't test it but it should work yes.

@Kerumen Kerumen force-pushed the feature/ios-gmaps-marker-rotation branch from c203b70 to b89e108 Compare May 15, 2017 09:33
@christopherdro christopherdro merged commit 4ee7277 into react-native-maps:master May 19, 2017
jiaminglu added a commit to jiaminglu/react-native-maps that referenced this pull request May 24, 2017
* commit '8893578ca6197d0c0a3cacf5aea9c78bfb0a4b99':
  v0.15.2 (react-native-maps#1352)
  Remove AIRGMSPolyline.h and AIRGMSPolyline.m references from AirMaps.xcodeproj (react-native-maps#1351)
  v0.15.1 (react-native-maps#1347)
  fix compile error in rn version >= 0.40 (react-native-maps#1341)
  Add Marker rotation for Google Maps on iOS (react-native-maps#1326)
  Fixing reference to AirMapsExplorer in installation docs (react-native-maps#1328)
  Update README: Use callback in `ref` attribute (react-native-maps#1345)
  [iOS] Added onPress support for Polyline on Google Maps (react-native-maps#1194)
  [rnpm] Fix sourceDir for Android (react-native-maps#1313)
  Update license date (react-native-maps#1316)
  Fix overlay issues in Android introduced in 0.13.1 (react-native-maps#1311)

Conflicts:
	lib/android/googlemap/src/main/java/com/airbnb/android/react/maps/googlemap/AirGoogleMapView.java
	lib/android/gradle.properties
	lib/android/src/main/java/com/airbnb/android/react/maps/AirMapManager.java
	lib/components/MapPolyline.js
sorodrigo pushed a commit to Vizzuality/react-native-maps that referenced this pull request May 26, 2017
* upstream/master: (24 commits)
  v0.15.2 (react-native-maps#1352)
  Remove AIRGMSPolyline.h and AIRGMSPolyline.m references from AirMaps.xcodeproj (react-native-maps#1351)
  v0.15.1 (react-native-maps#1347)
  fix compile error in rn version >= 0.40 (react-native-maps#1341)
  Add Marker rotation for Google Maps on iOS (react-native-maps#1326)
  Fixing reference to AirMapsExplorer in installation docs (react-native-maps#1328)
  Update README: Use callback in `ref` attribute (react-native-maps#1345)
  [iOS] Added onPress support for Polyline on Google Maps (react-native-maps#1194)
  [rnpm] Fix sourceDir for Android (react-native-maps#1313)
  Update license date (react-native-maps#1316)
  Fix overlay issues in Android introduced in 0.13.1 (react-native-maps#1311)
  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)
  ...
j8seangel added a commit to Vizzuality/react-native-maps that referenced this pull request May 29, 2017
…native-maps into feature/canvas-android

* 'feature/canvas-android' of github.com:Vizzuality/react-native-maps: (24 commits)
  v0.15.2 (react-native-maps#1352)
  Remove AIRGMSPolyline.h and AIRGMSPolyline.m references from AirMaps.xcodeproj (react-native-maps#1351)
  v0.15.1 (react-native-maps#1347)
  fix compile error in rn version >= 0.40 (react-native-maps#1341)
  Add Marker rotation for Google Maps on iOS (react-native-maps#1326)
  Fixing reference to AirMapsExplorer in installation docs (react-native-maps#1328)
  Update README: Use callback in `ref` attribute (react-native-maps#1345)
  [iOS] Added onPress support for Polyline on Google Maps (react-native-maps#1194)
  [rnpm] Fix sourceDir for Android (react-native-maps#1313)
  Update license date (react-native-maps#1316)
  Fix overlay issues in Android introduced in 0.13.1 (react-native-maps#1311)
  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)
  ...
pjaraherrera pushed a commit to pjaraherrera/react-native-maps that referenced this pull request Sep 27, 2017
@juergengunz
Copy link

@Kerumen it works fine for Mapview.Marker but when i use an animated Mapview.Marker.Animated, the rotation is not animated and it throws a warning to use an image with style transform instead...

@Kerumen Kerumen deleted the feature/ios-gmaps-marker-rotation branch October 13, 2017 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants