diff --git a/app/assets/javascripts/places.js.erb b/app/assets/javascripts/places.js.erb index ca24f42f1..f99ab4682 100644 --- a/app/assets/javascripts/places.js.erb +++ b/app/assets/javascripts/places.js.erb @@ -1,18 +1,18 @@ map = L.map('map').setView([0.0, -0.0], 2); L.tileLayer("http://{s}.tile.cloudmade.com/<%= ENV['CLOUDMADE_KEY'] %>/997/256/{z}/{x}/{y}.png", { - attribution: 'blah', + attribution: 'Map data © OpenStreetMap contributors under ODbL | Imagery © Cloudmade', maxZoom: 18 }).addTo(map); -markers = new L.MarkerClusterGroup({spiderfyOnMaxZoom: true, showCoverageOnHover: true, zoomToBoundsOnClick: true}); +markers = new L.MarkerClusterGroup(); $.getJSON('/members.json', function(members) { - $.each(members, function(i, m){ + $.each(members, function(i, m) { if (m.latitude && m.longitude) { - marker = new L.Marker(new L.LatLng(m.latitude, m.longitude)) - link = "
" - where = "" + m.location + "
" - marker.bindPopup(link + where).openPopup() - markers.addLayer(marker) + marker = new L.Marker(new L.LatLng(m.latitude, m.longitude)); + link = ""; + where = "" + m.location + "
"; + marker.bindPopup(link + where).openPopup(); + markers.addLayer(marker); } }); });