apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.27k stars 382 forks source link

this.clusterer is null #443

Closed bunnymatic closed 10 years ago

bunnymatic commented 10 years ago

hey there

I've been trying to figure out what's going on and have no success. The issue that I'm seeing is that the clusterer is null and so when i call addMarkers() i get a js failure at handler.js:35

 this.clusterer.addMarker(marker);

The browser is complaining that clusterer is null. I checked to see that i have the markerclustererplus js included after the gmap for rails javascript. I've been comparing my own page with your sample page and can't see any differences.

From the js console, I can see that MarkerClusterer and related objects have been defined, so the js is clearly getting loaded.

Do you have any idea why the clusterer might not be getting built? There are no other JS errors and I'm not even sure where to start looking for the issue.

Thanks for any tips or guidance. screen shot 2014-06-07 at 4 29 36 pm

bunnymatic commented 10 years ago

Nevermind. As it turns out, my initialization code (where I call Gmaps.build) was getting included by the asset pipeline and manually later on the same page. In one case, the marker_data was empty.

I'll close the issue.

cheers