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

Allow Zoom Control & Location Button Customization #104

Open
wants to merge 4 commits into
base: master
from

Conversation

@forrestbice
Copy link

forrestbice commented May 23, 2017

Allowing the user to set not only MyLocationEnabled but also ZoomControlsEnabled and MyLocationButtonEnabled

Attempts to address #103

Allowing the user to set not only `MyLocationEnabled` but also `ZoomControlsEnabled` and `MyLocationButtonEnabled`
forrestbice added 3 commits May 23, 2017
Zoom Controls & Location Button
Not sure about `isZoomControlsEnabled` & `isMyLocationButtonEnabled` will need to look more into the Google Maps JS API
@@ -267,11 +264,7 @@ public void onMapClick(LatLng latLng) {
}

@Override public void setMyLocationEnabled(boolean enabled) {
if (myLocationEnabled != enabled) {
if (RuntimePermissionUtils.checkLocationPermissions(getActivity(), this)) {

This comment has been minimized.

@felipecsl

felipecsl May 24, 2017 Contributor

why remove this?

This comment has been minimized.

@forrestbice

forrestbice May 24, 2017 Author

Setting the myLocationEnabled flag here on NativeGoogleMapFragment doesn't require location permissions. If anything I think this check should live on within onLocationPermissionsGranted here https://github.com/forrestbice/AirMapView/blob/30b6f1e28836e6c9e737cd41548b64b761b23035/library/src/main/java/com/airbnb/android/airmapview/NativeGoogleMapFragment.java#L270 but since the caller is responsible for calling onLocationPermissionsGranted it seemed fine to offload the responsibility of the permission check as well. Note: The //noinspection MissingPermission lint flag was already present within onLocationPermissionsGranted


@Override public void setMyLocationButtonEnabled(boolean enabled) {
// no-op
}

This comment has been minimized.

@felipecsl

felipecsl May 24, 2017 Contributor

are these not supported by the google maps js api?

This comment has been minimized.

@forrestbice

forrestbice May 24, 2017 Author

I wasn't able to find it but I'm not super familiar with the JS library. Was looking here https://developers.google.com/maps/documentation/javascript/reference. Let me know if I should be looking elsewhere

@forrestbice
Copy link
Author

forrestbice commented Feb 14, 2018

@felipecsl if you're willing to look at my comment responses I'll go ahead and rebase this to resolve conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.