Repository navigation
Uncaught TypeError: Illegal constructor in AdvancedMarker nextjs 14 #225
|
I am getting this error in nextjs 14 when I open the page first time . I have a search page for places when I redirect to search It browser gives me this error and If I refresh the page It works fine Here is the code. I want to highlight when hover on placelocation card |
Answered by
usefulthink
Feb 18, 2024
Replies: 2 comments 1 reply
1 reply
Answer selected by
Lalman888
On dev it is saved my life. I was sitting 4h to undestand, why my new Marker isnt working, but map is. Then, readed that and launched production, and guess what, it was working entire time :/ *Thank you |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

As for the error-message, that is something coming from the maps API. I think I've seen something like that before when the maps API was accidentally loaded multiple times. Creating an instance of an unregistered web-component will trigger this error:
This can happen when the maps API is loaded multiple times since the custom elements (
<gmp-advanced-marker>) can only be defined once. After loading the api a second time the new element classes can't get registered (th…