You’re not receiving notifications from this thread.
How to use Google Maps and Markers Discussion
Awesome video. I am wondering how would I take the show page and link it to a different js file. The index.js is global correct? What would be the best way to setup a show view with just the map for a specific item?
I would love you to cover how to make custom infowindows with custom colors, content, without the "x" button, etc ( a la Airbnb for example ).
Keep it up
I would love to use this with a population density overlay.. does anyone know where I can get that data?
Does anybody know some good setup defaults using Gmaps with webpacker & Rails 6?
Super late reply, but I figured out how to properly import this while using Webpack and Rails.
application.js file, instead of simply having
import 'gmaps';, do the following:
import 'gmaps'; import GMaps from 'gmaps'; window.GMaps = GMaps;
This also applies for those of you (like me) who keep getting "function is not defined" errors.
Would you be so kind to cover how to highlight respective marker once the mouse pointer hover over the database record ?
How do you add
Here a git repo of the implementation of this episode with a brand new rails 6 app:
What Tyler polzin says is good, but you need to include your google api js before everything ;)
Let me know if you could do it !
I get this
<script src="https://maps.googleapis.com/maps/api/js?key=<%= Rails.application.credentials.dig(:google, :google_maps_api_key) %>&libraries=places&callback=initMap" async defer data-turbolinks-eval="false"></script>
What am I missing?