|
@@ -118,7 +118,7 @@ function renderStat(stat, ll) {
|
118
|
118
|
}
|
119
|
119
|
|
120
|
120
|
if (map.getZoom() < 18) {
|
121
|
|
- map.setView(ll, 18);
|
|
121
|
+ map.setView(ll, 18, {animate: true});
|
122
|
122
|
}
|
123
|
123
|
|
124
|
124
|
L.popup({opacity: 0.8})
|
|
@@ -155,7 +155,7 @@ L.tileLayer('https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x
|
155
|
155
|
var layer = L.featureGroup().addTo(map);
|
156
|
156
|
var labelLayer = L.featureGroup().addTo(map);
|
157
|
157
|
|
158
|
|
-map.on("zoomend", function () {
|
|
158
|
+map.on("moveend", function () {
|
159
|
159
|
render();
|
160
|
160
|
});
|
161
|
161
|
|
|
@@ -216,7 +216,7 @@ function render() {
|
216
|
216
|
|
217
|
217
|
if (map.getZoom() > 15) {
|
218
|
218
|
labelLayer.addLayer(L.featureGroup(labels));
|
219
|
|
- layer.addLayer(L.featureGroup(groups).on('click', function(a) { console.log(a);}));
|
|
219
|
+ layer.addLayer(L.featureGroup(groups).on('click', function(a) { console.log(a.layer.options);}));
|
220
|
220
|
layer.addLayer(L.featureGroup(suggs).on('click', function(a) { openStat(a.layer.options.id, a.layer.getBounds().getCenter());}));
|
221
|
221
|
}
|
222
|
222
|
|