[google_maps_flutter_ios] Add Advanced marker support#10508
[google_maps_flutter_ios] Add Advanced marker support#10508jokerttu wants to merge 4 commits intoflutter:mainfrom
Conversation
8f811e9 to
26fd75a
Compare
|
Picking up the discussion from the main issue here: do you have a link to the tracking issue for the blocker here ("an issue with the GMSPinImage not rendering on the map", per this comment)? As noted in that discussion, the link is to a long-closed issue. |
Added tracking issue information to this PR description: |
16c74d8 to
df35a62
Compare
2c08201 to
b1b0038
Compare
|
|
||
| bool? buildingsEnabled; | ||
|
|
||
| PlatformMarkerType? markerType; |
There was a problem hiding this comment.
Please make this non-nullable to avoid a repeat of flutter/flutter#182540 on iOS (and for consistency with the changes in #11061).
There was a problem hiding this comment.
I completely forgot that the Android implementation (and the upcoming iOS implementation) will be used with the current version of the app-facing package because of the caret dependency constrain. I had only tested locally against the app-facing version that already includes the updated app-facing implementation; therefore nevers seeing this issue.
I tested Advanced Marker support using dependency_overrides for the Android and iOS implementations:
- Android does indeed crash.
- iOS does not; most likely because, in the enum check, a nil value falls back to the first enum case (0), which happens to work by accident.
I'll update this package to match the Android implementation and force the default value as "marker" if null given, before setting this as ready to review.
Would it be possible to run CI tests for the app-facing packages as well whenever there are changes in the endorsed federated package (using dependency_overrides), when the app-facing package version matches the dependency constraint? This would prevent this kind of accidents from happening again.
There was a problem hiding this comment.
Would it be possible to run CI tests for the app-facing packages as well whenever there are changes in the endorsed federated package (using dependency_overrides), when the app-facing package version matches the dependency constraint?
That's flutter/flutter#52115. The tl;dr is that I'm still not convinced the CI cost is worthwhile given the rarity of issues showing up only in integration tests.
There was a problem hiding this comment.
In this case, I think the first question would be: why are the integration tests that crash on Android not in the Android implementation package already?
There was a problem hiding this comment.
Yes, indeed!
And ther were no real reason to pass null value to the platfom layer in any case.
This is now fixed, and null value is not sent to the platform layer on iOS implementation either.
Still missing unit test for the null case, will add that before resolving this comment.
|
@stuartmorgan-g Note that Advanced Markers without any customizations (without PinConfig icon type), or those using a custom image asset, render correctly. The issue only affects markers that use GMSPinImage to customize the marker in native iOS code. We could still publish, but it must be clearly communicated to developers that Since Option 1: Option 2: Option 3: I’ll also create a separate issue describing the issue and link it to the code under TODO Additionally, this should be documented in the iOS implementation package’s README.md? |
b1b0038 to
da25bc6
Compare
We'll have to bypass our usual guidance against platform-specific docs in the platform interface in this case, and document it on
I don't think we should do anything at a code level, because the behavior isn't in code that we control. Let's say we ship an I think we should just put a prominent comment on the PinConfig class and constructor, and on the
This is severe enough that I would put it here rather than in the implementation package, especially since we still mostly haven't "federated" the README platform details yet for this plugin. |
da25bc6 to
d8397ec
Compare
This PR adds Advanced markers support to the iOS implementation of
google_maps_flutter.Approved combined PR: #7882
Approved and merged platform interface PR: #9737
Issue: flutter/flutter#155526
Blocker:
GMSAdvancedMarker is not rendered when the marker icon is a GMSPinImage instance. Tracking issue:
https://issuetracker.google.com/issues/370536110
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3