-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 minZoom and maxZoom properties for android and ios #1360
Add minZoom and maxZoom properties for android and ios #1360
Conversation
So basically if I have two markers on the map very close to each other but I set |
Well yeah which is quite logic. What will happen is that, if the required zoom to fit your markers is more than the maxZoomLevel, you will have your map at this maxZoomLevel (same case for minZoomLevel). |
Then this PR is very good. What if I want to use |
This is a global setting for the map yeah, but something which has to be tested is to set the max/min possible zoom values in case you do a fitMarkers by settings the props with a state value. |
PR updated, i forgot to add some things to the AIRMap.h, and GMaps for iOS was not working correctly |
lib/components/MapMarker.js
Outdated
@@ -257,7 +257,7 @@ class MapMarker extends React.Component { | |||
let image; | |||
if (this.props.image) { | |||
image = resolveAssetSource(this.props.image) || {}; | |||
image = image.uri; | |||
image = image.uri || this.props.image; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What warrants this change?
lib/ios/AirGoogleMaps/GlobalVars.m
Outdated
// GlobalVars.m | ||
// | ||
// Created by Eric Kim on 2017-04-04. | ||
// Copyright © 2017 Apply Digital. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a legal expert but i'm guessing this would have to change
0361b3b
to
6213a1d
Compare
6213a1d
to
e30c5b9
Compare
Corrected that, i got confused when merging some branches, but it's ok now |
…-upstream * upstream/master: Add minZoom and maxZoom properties for android and ios (react-native-maps#1360) Reference install solution in issue react-native-maps#718 in install docs (react-native-maps#1448) updates npm cache clean command (react-native-maps#1450) v0.15.3 Added BatchedBridge Upgraded ios deps Use prop-types and add supprort for RN 0.45 Allow react 16.0.0-alpha [Android] Code cleanup step I - reformatting (react-native-maps#1415) Fixes google map null pointer exception (react-native-maps#1403) [iOS - Google Maps] Fix animateToCoordinate and animateToRegion (react-native-maps#1115) Update from View.propTypes to ViewPropTypes to match RN v0.44.0 (react-native-maps#1323) Fix import header for React Native 0.44.2 (react-native-maps#1362) Fix a couple typos (react-native-maps#1375)
* 'master' of github.com:Vizzuality/react-native-maps: fix: error syntax on AirMaps max and min zoom level not nil check Add minZoom and maxZoom properties for android and ios (react-native-maps#1360) Reference install solution in issue react-native-maps#718 in install docs (react-native-maps#1448) updates npm cache clean command (react-native-maps#1450) v0.15.3 Added BatchedBridge Upgraded ios deps Use prop-types and add supprort for RN 0.45 Allow react 16.0.0-alpha [Android] Code cleanup step I - reformatting (react-native-maps#1415) Fixes google map null pointer exception (react-native-maps#1403) [iOS - Google Maps] Fix animateToCoordinate and animateToRegion (react-native-maps#1115) Update from View.propTypes to ViewPropTypes to match RN v0.44.0 (react-native-maps#1323) Fix import header for React Native 0.44.2 (react-native-maps#1362) Fix a couple typos (react-native-maps#1375)
…maps#1360) * Add minZoom and maxZoom properties for android and ios * Add min/max zoom level properties to AIRMap.h * Fix assignation for zoom levels for gmaps ios * Resolve conflicts, fix potential nil value on ios * Resolve conflicts
…maps#1360) * Add minZoom and maxZoom properties for android and ios * Add min/max zoom level properties to AIRMap.h * Fix assignation for zoom levels for gmaps ios * Resolve conflicts, fix potential nil value on ios * Resolve conflicts
I'm using react-native-maps 0.17.1. I set maxZoomLevel=10 and minZoomLevel=8, but I still can zoom in/out like nothing is limited. Does anyone have same problem? |
Strange behavior on Android.
Maybe conflicts with onLayout props? |
Adding ability to set minZoomLevel and maxZoomLevel for both iOS and Android (GMaps included for iOS).
Need maybe some review for iOS, as i did a dumb implementation of https://github.com/johndpope/MKMapViewZoom .