Skip to content

[google_maps_web] Migrate legacy Markers to Advanced Markers. #130472

Open

Description

@ditman

Is there an existing issue for this?

Use case

The following deprecation notice is starting to show when using regular markers:

As of February 21st, 2024, google.maps.Marker is deprecated. Please use google.maps.marker.AdvancedMarkerElement instead.

At this time, google.maps.Marker is not scheduled to be discontinued, but google.maps.marker.AdvancedMarkerElement is recommended over google.maps.Marker.

While google.maps.Marker will continue to receive bug fixes for any major regressions, existing bugs in google.maps.Marker will not be addressed.

At least 12 months notice will be given before support is discontinued. Please see https://developers.google.com/maps/deprecations for additional details and https://developers.google.com/maps/documentation/javascript/advanced-markers/migration for the migration guide.

We should explore ways to use AdvancedMarkerElements instead of Markers.


The web plugin uses (now) Legacy Markers, which aren't very powerful compared to their mobile counterparts.

Users have complained about the lack of customization, like:

  • size
  • hue rotation (different colors)
  • marker rotation (actually rotate the marker around its center)

Proposal

Migrate to Advanced Markers:

Activity

  1. added
    c: new featureNothing broken; request for a new capability
    p: mapsGoogle Maps plugin
    platform-webWeb applications specifically
    on Jul 13, 2023
  2. added
    team-webOwned by Web platform team
    and removed on Jul 13, 2023
  3. stuartmorgan-g commented on Jul 13, 2023

    @stuartmorgan-g
    Contributor

    (Things entirely internal to one platform's plugin implementation fall under team-thatplatform in the new world order.)

  4. added
    P3Issues that are less important to the Flutter project
    P2Important issues not at the top of the work list
    and removed
    P3Issues that are less important to the Flutter project
    on Jul 13, 2023
  5. ditman commented on Jul 13, 2023

    @ditman
    MemberAuthor

    Nobody has asked for this yet (directly), so triaging low-ish.

  6. raphael-bmec-co commented on Oct 12, 2023

    @raphael-bmec-co

    I'll directly ask for this so we can bump it up the priority list. The behaviour of markers on the web at the moment is very limited and I have other open issues that would be resolved by this.

  7. ditman commented on Apr 27, 2024

    @ditman
    MemberAuthor

    Note that migrating to the advanced markers will require creating a Map ID, according to the migration instructions:

    1. Add a map ID to your map initialization code. For example mapId: 'DEMO_MAP_ID'. It's fine to use "DEMO_MAP_ID" if you don't have a map ID already.
  8. raphael-bmec-co commented on Apr 27, 2024

    @raphael-bmec-co

    @ditman any chance of bumping the priority now based on the depreciation 🙏?

    We've got a horribly hacky fork of the whole flutter repository going on to work around the patching implementation of web support 🙈

  9. PatrickKanne commented on Jul 4, 2024

    @PatrickKanne
  10. ditman commented on Jul 9, 2024

    @ditman
    MemberAuthor

    No progress on this one yet, my first priorities are to enable the flutter/packages packages to compile with --wasm, before adding new features. Maps is close, but still pending a migration to the v8.0.0 of a14n's js-interop library.

  11. Rexios80 commented on Jul 22, 2024

    @Rexios80
    Member

    No progress on this one yet, my first priorities are to enable the flutter/packages packages to compile with --wasm, before adding new features. Maps is close, but still pending a migration to the v8.0.0 of a14n's js-interop library.

    For anyone tracking this, there is an in-progress PR for that migration here: flutter/packages#7077

  12. aednlaxer commented on Sep 23, 2024

    @aednlaxer

    Sharing a design doc for adding advanced markers support to google_maps_flutter: #155526
    That should also resolve the legacy markers deprecation notice on web

  13. cedvdb commented on Nov 4, 2024

    @cedvdb
    Contributor

    Nobody has asked for this yet (directly), so triaging low-ish.

    Not directly but #24213 is the 9th most upvoted issue, advanced markers may cover that issue

  14. ditman commented on Nov 5, 2024

    @ditman
    MemberAuthor

    Nobody has asked for this yet (directly), so triaging low-ish.

    Not directly but #24213 is the 9th most upvoted issue, advanced markers may cover that issue

    This could maybe be done with a multi-view embedding on the web, I'm not sure about other platforms, and also not sure about the compositing of views, if we want to get super fancy :S

  15. cedvdb commented on Feb 18, 2025

    @cedvdb
    Contributor

    We are now past (almost) the 12 months notice.

    This could maybe be done with a multi-view embedding on the web,

    ugh perfs.. Practically speaking there are some overlaps on some of the use cases advanced markers provide and what people actually want in that linked issue (said differently, it's not flutter widgets but it solves some issues found in that thread).

    It's also the same idea behind this issue, so the real demand is higher than what may appear on the upvote count of this specific issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityp: mapsGoogle Maps pluginplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions