Clarification on Error: Multiple maps with the same ID #2420
Unanswered
johnnyboustany
asked this question in
Q&A
Replies: 1 comment
-
As the error suggests, you need to specify different ids if you are using multiple maps with the MapProvider. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description:
I encountered an error related to multiple maps having the same ID. The error is thrown in the onMapMount function in the MapProvider. I have a stable ID set for the map and everything is working as expected. However, I get the JS error "Multiple maps with the same ID" in the console. I am using reuseMaps to reduce the number of map instances being used.
Steps to Reproduce:
Error Message:
Error: Multiple maps with the same id: ${id}
Relevant Line in Code:
Line 25 in use-map.tsx
Question:
I am assuming that this is the intended behavior but is there a recommended way implementation-wise to handle or avoid this error? I know that the docs mention that you can specify an ID for the map but I have not come across anything about the duplicate map issue. Any guidance or advice would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions