The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

502836 (1) [Avatar] Offline
#1
I have no idea how to solve this.
Seems like once the coordinated are accessed from the db, the map disappears.
Checked out the codes, everything seems to be fine.

Does anyone have a solution?
Joerg Jooss (9) [Avatar] Offline
#2
The same happened to me—sometimes the maps would show correctly, but most times they wouldn't. Once I looked at my browser's developer console (aka F12 tools), I saw that maps.googleapis.com returned 403 Forbidden whenever the map was not displayed. Long story short: It seems that you now need an API key to use maps.googleapis.com (you can get one at https://console.developers.google.com/). After adding the API key to maps URL in location-info-pug (or rather passing it through the controller to the view), the map feature worked fine again.
simon.holmes (148) [Avatar] Offline
#3
Hi both

Thanks for stepping in Joerg. You're right, I think that's the most likely cause.

Google are starting to enforce the API key usage which they didn't when I started writing.

I'll get the book updated to cover this before the final version. Thanks for highlighting the issue.

Cheers
Simon