-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[google_maps_flutter] add zoom controls property #831
Conversation
@ened This is great, thanks! We would like to wait until we have maps implemented on both iOS and Android before actually further augmenting the API, because we are worried that they'll get out of sync otherwise (the current iOS implementation is temporarily dead code, remains of the overlay based plugin). Would you be ok with resubmitting in a few weeks once we have the iOS work more fleshed out? |
@amirh yes of course no problem. How could I help with the iOS port? Does it have blockers in the main project or engine? |
@amirh now updated as the iOS port has landed. |
Are you using the latest clang-format? You need to bump to at least clang 7 on your machine, then run |
Hi @ened , thanks for the PR, could you please rebase? |
Ok will do today. |
0feb4d0
to
ad1ed63
Compare
8ee836f
to
ad1ed63
Compare
@cyanglaz have updated this once again and reverted the manual setter method. It would force the |
...le_maps_flutter/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java
Outdated
Show resolved
Hide resolved
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.
LGTM, please rebase and also implement the assertion on iOS for the setter.
Thank you for reviewing again @cyanglaz. Are you absolutely sure that a assertion is necessary on iOS. Even a non-setter method assertion like this: assert(zoomControlsEnabled == true && Platform.isIOS,
'Property is not supported on iOS'), Will cause GoogleMap to loose the |
/// True if the map view should show zoom controls. This includes two buttons | ||
/// to zoom in and zoom out. The default value is to show zoom controls. | ||
/// | ||
/// This field is silently ignored on iOS. |
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.
Let's change this to: This is only supported on Android. And this field is silently ignored on iOS.
I see. Let's keep it as an no-op but update the doc to be clearer. |
Done. Additionally, not having the assertion also makes the client code a lot easier. Else I'd have to if/else wrap the zoomControls setter to null on iOS and the actual value on Android for example. Will land once green.. |
@ened It seems the PR is out of date. Would you be able to work on it and resolve conflicts? |
@cyanglaz done |
Adds an Android-only property for toggling zoom controls
Adds an Android-only property for toggling zoom controls
Adds an Android-only property for toggling zoom controls
Description
The Google Maps SDK on Android support the display of zoom control buttons in the bottom right (https://developers.google.com/maps/documentation/android-sdk/controls#zoom_controls).
The iOS SDK does NOT support this feature, at the moment.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.An existing test does not pass currently, this was introduced in #1953. Will include the fix in this PR.
Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?