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

Closed
wants to merge 4 commits into from

Conversation

forrestbice
Copy link

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`
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)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these not supported by the google maps js api?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

@forrestbice
Copy link
Author

Closing this as I never got a response from @felipecsl. However, if you're able to take a look I'll rebase this when I can. Closing for now.

@forrestbice forrestbice closed this Apr 6, 2021
@forrestbice forrestbice deleted the patch-1 branch April 6, 2021 20:01
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.

None yet

3 participants