diff --git a/src/app.js b/src/app.js index c76535e..8808d5d 100644 --- a/src/app.js +++ b/src/app.js @@ -21,6 +21,11 @@ L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18 }).addTo(Map); +//Event for when movement (dragging the map) ends. Request new geolets from API here. +Map.on('moveend', function (e) { + console.log('Moveend triggered. Bounding box (request all geolets in this box from API endpoint):', Map.getBounds()); +}); + function makeDummyLayer(markerPos) { //All layers will have to be initialized like this