Skip to content Skip to sidebar Skip to footer

Rails 4 - Gmaps4rails - Map Won't Render

I'm struggling to get my google maps to work in my Rails app. It was all working fine - I moved on to work on the next feature and have come back to find it no longer works. I hav

Solution 1:

So your problem is with these two lines:

<scriptsrc="//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js"></script><scriptsrc='//google-maps-utility-library-v3.googlecode.com/svn/tags/infobox/1.1.9/src/infobox_packed.js'type='text/javascript'></script>

Somebody referenced markerclusterer and infobox libraries directly from Google SVN (which is a bad practise) and the library was moved to Github couple of weeks ago.

You can download the infobox library from here to your project and reference infobox_packed.js file:

<scriptsrc='path/to/infobox_packed.js'type='text/javascript'></script>

Similarly, you can download the marker clusterer library here. Careful: for marker cluster you will need both src and images.

Please read this SO question and answers, also this one and maybe this one. I strongly advice you to read all the answers in the questions, as some of them contain bad solutions (reference libraries from the new github location, instead of downloading them to your project and referencing them from there is bad practise)

Post a Comment for "Rails 4 - Gmaps4rails - Map Won't Render"