Skip to content

Setting MapID? #3058

Answered by itsmeyaw
itsmeyaw asked this question in Q&A
Discussion options

You must be logged in to vote

Heyy, get back to you as there might be anyone still having similar issues. You need to pass the map id inside an MapOptions object and pass it to the options parameter in your GoogleMap component. E.g.,

const options = useMemo<MapOptions>(() => ({
        mapId: mapId
    }), [])

<GoogleMap options={options}/>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by itsmeyaw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants