-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[google_maps_flutter_platform_(web/android/ios)] Add a new zIndexInt param to marker and deprecate zIndex #9408
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
Changes from 1 commit
9ec71a6
2b3db64
fd18f22
5fdb91b
26b6037
f7726bf
d619269
378b108
9ab5e86
1824936
4ad3e6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ publish_to: none | |
|
|
||
| environment: | ||
| sdk: ^3.6.0 | ||
| flutter: ">=3.27.0" | ||
| flutter: '>=3.27.0' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does this PR change the style of all the string values in pubspec.yaml files to deviate from our usual style?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume there might be something wrong with my linte, will fix that. I had to do it manually for the interface package |
||
|
|
||
| dependencies: | ||
| cupertino_icons: ^1.0.5 | ||
|
|
@@ -18,7 +18,7 @@ dependencies: | |
| # The example app is bundled with the plugin so we use a path dependency on | ||
| # the parent directory to use the current plugin's version. | ||
| path: ../ | ||
| google_maps_flutter_platform_interface: ^2.11.0 | ||
| google_maps_flutter_platform_interface: ^2.12.1 | ||
|
|
||
| dev_dependencies: | ||
| build_runner: ^2.1.10 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,11 @@ name: google_maps_flutter_android | |
| description: Android implementation of the google_maps_flutter plugin. | ||
| repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_android | ||
| issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 | ||
| version: 2.16.1 | ||
| version: 2.16.2 | ||
|
|
||
| environment: | ||
| sdk: ^3.6.0 | ||
| flutter: ">=3.27.0" | ||
| flutter: '>=3.27.0' | ||
|
|
||
| flutter: | ||
| plugin: | ||
|
|
@@ -21,7 +21,7 @@ dependencies: | |
| flutter: | ||
| sdk: flutter | ||
| flutter_plugin_android_lifecycle: ^2.0.1 | ||
| google_maps_flutter_platform_interface: ^2.11.0 | ||
| google_maps_flutter_platform_interface: ^2.12.1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the PR again... do we actually need any of the changes to this file? It looks like the only actual change is to the integration tests and the example pubspec, and those don't require publishing the package.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In that case Im gonna close this PR. And since it doesn't need a new version, the main PR's overrides can all be removed.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't it need to target the updated platform interface package though? Not sure if Im misunderstanding this line from the federated packages section
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
What is "it" here? If it's If it's the app-facing package (in the other PR), yes, because it's exporting that surface to clients.
See the explanation in the following sentence for the reason this would need to be done. For example, if the platform interface adds a new
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok got it. For android we dont't need a new version. I guess even web doesn't need a new version by the same logic since that's just a comment change?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Correct; IIRC the tooling will do the right thing with a comment-only change, but if not we can override the version check. |
||
| stream_transform: ^2.0.0 | ||
|
|
||
| dev_dependencies: | ||
|
|
@@ -30,7 +30,7 @@ dev_dependencies: | |
| flutter_test: | ||
| sdk: flutter | ||
| mockito: ^5.4.4 | ||
| pigeon: ^22.6.0 | ||
| pigeon: ^22.7.4 | ||
| plugin_platform_interface: ^2.1.7 | ||
|
|
||
| topics: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,11 @@ name: google_maps_flutter_ios | |
| description: iOS implementation of the google_maps_flutter plugin. | ||
| repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios | ||
| issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 | ||
| version: 2.15.2 | ||
| version: 2.15.3 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, the only change to this package is to a file in the example app that's not the one visible on pub.dev, so this should be exempt from versioning.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although, why is only the example changing for iOS? Shouldn't it be using
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right, not sure how that ended up getting removed or at what point. I think the reasonable thing to do would be to make ios's
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, the iOS changes look good here. Based on the CI failure though, it appears that the Obj-C compiler flags 64-bit int assignment to 32-bit int assignment as lossy, but did not flag it when it was assigning a double to a 32-bit int. Odd, but you'll need to add an explicit cast here to make the analysis check happy.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's seems reasonable from flags. |
||
|
|
||
| environment: | ||
| sdk: ^3.6.0 | ||
| flutter: ">=3.27.0" | ||
| flutter: '>=3.27.0' | ||
|
|
||
| flutter: | ||
| plugin: | ||
|
|
@@ -19,7 +19,7 @@ flutter: | |
| dependencies: | ||
| flutter: | ||
| sdk: flutter | ||
| google_maps_flutter_platform_interface: ^2.11.0 | ||
| google_maps_flutter_platform_interface: ^2.12.1 | ||
| stream_transform: ^2.0.0 | ||
|
|
||
| dev_dependencies: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -272,7 +272,7 @@ gmaps.InfoWindowOptions? _infoWindowOptionsFromMarker(Marker marker) { | |
|
|
||
| return gmaps.InfoWindowOptions() | ||
| ..content = container | ||
| ..zIndex = marker.zIndex; | ||
| ..zIndex = marker.effectiveZIndex; | ||
| // TODO(ditman): Compute the pixelOffset of the infoWindow, from the size of the Marker, | ||
| // and the marker.infoWindow.anchor property. | ||
| } | ||
|
|
@@ -453,8 +453,8 @@ Future<gmaps.Icon?> _gmIconFromBitmapDescriptor( | |
| return icon; | ||
| } | ||
|
|
||
| // Computes the options for a new [gmaps.Marker] from an incoming set of options | ||
| // [marker], and the existing marker registered with the map: [currentMarker]. | ||
| /// Computes the options for a new [gmaps.Marker] from an incoming set of options | ||
| /// [marker], and the existing marker registered with the map: [currentMarker]. | ||
| Future<gmaps.MarkerOptions> _markerOptionsFromMarker( | ||
| Marker marker, | ||
| gmaps.Marker? currentMarker, | ||
|
|
@@ -465,7 +465,7 @@ Future<gmaps.MarkerOptions> _markerOptionsFromMarker( | |
| marker.position.longitude, | ||
| ) | ||
| ..title = sanitizeHtml(marker.infoWindow.title ?? '') | ||
| ..zIndex = marker.zIndex | ||
| ..zIndex = marker.effectiveZIndex | ||
| ..visible = marker.visible | ||
| ..opacity = marker.alpha | ||
| ..draggable = marker.draggable | ||
|
|
@@ -730,3 +730,13 @@ gmaps.LatLng _pixelToLatLng(gmaps.Map map, int x, int y) { | |
|
|
||
| return projection.fromPointToLatLng(point)!; | ||
| } | ||
|
|
||
| extension on Marker { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extensions violate Flutter's style guide. There are cases where we have to use them for JS interop, but that doesn't apply here. Why do we need this at all, vs just using
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right. IIRC this was written when 2 different parameters were there initially, now that we don't allow the constructor to pass in both at the same time, this isn't required |
||
| // We compare with zero because zIndexInt if non zero should get higher priority than zIndex | ||
| num? get effectiveZIndex { | ||
| if (zIndexInt != 0) { | ||
| return zIndexInt; | ||
| } | ||
| return zIndex; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,11 @@ name: google_maps_flutter_web | |
| description: Web platform implementation of google_maps_flutter | ||
| repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_web | ||
| issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 | ||
| version: 0.5.12 | ||
| version: 0.5.13 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be 0.5.12+1 as it's a very small change. |
||
|
|
||
| environment: | ||
| sdk: ^3.6.0 | ||
| flutter: ">=3.27.0" | ||
| flutter: '>=3.27.0' | ||
|
|
||
| flutter: | ||
| plugin: | ||
|
|
@@ -23,10 +23,10 @@ dependencies: | |
| flutter_web_plugins: | ||
| sdk: flutter | ||
| google_maps: ^8.0.0 | ||
| google_maps_flutter_platform_interface: ^2.10.0 | ||
| google_maps_flutter_platform_interface: ^2.12.1 | ||
| sanitize_html: ^2.0.0 | ||
| stream_transform: ^2.0.0 | ||
| web: ">=0.5.1 <2.0.0" | ||
| web: '>=0.5.1 <2.0.0' | ||
|
|
||
| dev_dependencies: | ||
| flutter_test: | ||
|
|
||
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.
The changes to this file can be reverted as well; we don't need to CHANGELOG an integration test comment.