[google_maps_flutter_web] Fix AdvancedMarker anchors on web#11966
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request implements AdvancedMarker anchor handling for the Google Maps Flutter Web plugin. It introduces helper functions to convert anchor offsets to CSS percentage strings and apply them as anchorLeft and anchorTop properties on the underlying AdvancedMarkerElement and its options. Additionally, an integration test has been added to verify that anchors are correctly set and updated. I have no feedback to provide.
There was a problem hiding this comment.
Code Review
This pull request fixes the anchor handling for AdvancedMarker on the web platform by introducing helper functions to convert anchor offsets to CSS percentages and apply them to AdvancedMarkerElementOptions and AdvancedMarkerElement. It also adds an integration test to verify anchor positioning and updates, and bumps the package version to 0.6.2+4. There are no review comments, and I have no feedback to provide.
Fixes AdvancedMarker anchor handling in
google_maps_flutter_web.Previously
AdvancedMarker.anchorwas not applied on web, so custom advanced marker content was positioned as if it used the default anchor. This caused markers with non-default anchors to appear offset from their intended map coordinates.This PR converts Flutter marker anchor offsets into the Google Maps JavaScript Advanced Marker
anchorLeftandanchorTopCSS offset properties when creating marker options, and reapplies those properties when an existing advanced marker is updated.Adds integration test coverage for creating and updating an
AdvancedMarkerwith custom anchors.Addresses flutter/flutter#80578.
Pre-Review Checklist
[shared_preferences]///).