Skip to content

Google Map Support #2398

Answered by CAYdenberg
simongroom asked this question in Q&A
Apr 8, 2024 · 1 comments · 7 replies
Discussion options

You must be logged in to vote

I wouldn't even try serverside rendering. If you have a "default" map just take a screenshot of that and send the image as the "no javascript" version of things.

On the needed route, load the google map javascript with a regular ol' script tag. Then in your island, in a useEffect hook instantiate the actual map according to the google maps docs. Don't use react if you don't need to, and don't use google-map-react as it's probably just it's probably just adding a lot of unnecessary complexity.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@simongroom
Comment options

@CAYdenberg
Comment options

@simongroom
Comment options

@simongroom
Comment options

@CAYdenberg
Comment options

Answer selected by simongroom
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