' +
- '' +
- '' +
- '' + points[i].date + '');
- }
-
- updateState();
- updateTitle();
-
addEventListener('popstate', function(state) {
var state = state.state;
if (!state) {
return;
}
- console.log("pop")
resolving_hash += 1;
map.setView(state.pos, state.zoom);
setTimeout(
@@ -98,6 +95,11 @@
500
)
});
+
+ map.on('moveend', updateState);
+
+ updateState();
+ updateTitle();
{% endblock %}
diff --git a/templates/photo.html b/templates/photo.html
index bd2fca1..94691e2 100644
--- a/templates/photo.html
+++ b/templates/photo.html
@@ -42,19 +42,6 @@
}).addTo(map);
L.marker(position).addTo(map);
-
- var refreshResults = function() {
- var southWest = map.getBounds().getSouthWest();
- var northEast = map.getBounds().getNorthEast();
- var northWest = map.getBounds().getNorthWest();
- var southEast = map.getBounds().getSouthEast();
- console.log(southWest, northEast, northWest, southEast)
- }
-
- map.on('moveend', refreshResults);
-
- refreshResults();
-
{{ image.lat }}, {{ image.lon }}