I put this <script src="https://maps.googleapis.com/maps/api/js?key=$API_KEY&callback=initMap" async> </script> on recipes/map.html.erb and i removed all application.js code and meta tag with api key from layouts/application.html.erb because it dosen't work in production. Thanks!
Thanks, Dave!
Really enjoying the maps episodes!
Yes, thanks for that.
Did you see a way of getting from actual addresses to those coordinates that you used ?
Check out episode 84 where the geocoding from street address to coordinates is done via the geocoder gem.
It works on local environment but in production mode (heroku) don't.
Thank you for this tutorials!
I put this <script src="https://maps.googleapis.com/maps/api/js?key=$API_KEY&callback=initMap" async> </script> on recipes/map.html.erb and i removed all application.js code and meta tag with api key from layouts/application.html.erb because it dosen't work in production. Thanks!
Any JS errors?
Yes because of `` used on $.getScript(`https://maps.googleapis.com/maps/api/js?key=${google_map}&callback=initMap`); :D