Added mapmove event.

This commit is contained in:
Robin 2016-07-14 20:00:22 +02:00
parent 71d1a3ab5f
commit c5ebf39abf

View File

@ -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