Rails 4 - Gmaps4Rails - map won't render

前端 未结 1 1292
庸人自扰
庸人自扰 2020-12-22 11:14

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 lon

相关标签:
1条回答
  • 2020-12-22 11:55

    So your problem is with these two lines:

    <script src="//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js"></script>
    <script src='//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:

    <script src='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)

    0 讨论(0)
提交回复
热议问题