I have a program which shows a map. If you drag the map, a class variable should change or i want to call a method to do something after map was dragged.
i use inonic3 with angular (ts) and have the following code:
loadmap() {
// Define and add Leaflet Map with OSM TileLayer
this.map = leaflet.map("map");
leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attributions: 'OpenStreetMap',
}).addTo(this.map);
this.map.setZoom(25);
this.map.setView([0,0])
console.log('MapLoadSuccsess');
this.map.on("dragend", function(e) {
this.loconoff = false;
console.log("post Drag: " + this.loconoff);
dosomething();
});