Skip to content
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

[Bug] "AdvancedMarkerElement: map invalid: not an instance of MapsApiMap" #540

Open
alexthebake opened this issue Sep 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@alexthebake
Copy link

Description

We keep getting this error:

AdvancedMarkerElement: map invalid: not an instance of MapsApiMap

I'm not sure what's causing this issue to occur, but we keep running into it. There are a few things to note about our usage:

  • We're using the AdvancedMarker to create a TooltipMarker component
  • Our app renders a list of pages, each with their own Map, each receiving a unique location

At first I thought the error was perhaps being caused by some mounting/unmounting behavior that happens when switching between pages, or by how we implemented TooltipMarker, but I'm honestly not sure.

Steps to Reproduce

https://codesandbox.io/p/sandbox/advancedmarker-example-cyycp9

Getting the error to show up consistently is... not easy. The codesandbox linked above shows how the app is set up at a basic level, i.e. multiple pages rendering their own Map and a basic TooltipMarker implementation using AdvancedMarker.

Environment

  • Library version: 1.1.1
  • Google maps version: weekly
  • Browser and Version: Chrome 128
  • OS: Mac

Logs

No response

@alexthebake alexthebake added the bug Something isn't working label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant