this.map = leaflet.map(“mapId”, { zoomControl: false }).setView([17.385, 78.4867], 13);
leaflet.tileLayer(“https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png”, {
attribution: ‘’,
}).addTo(this.map);
this.map.locate({
setView: true,
maxZoom: 11
})
We have tried implementing the above code. It is working fine in online mode but does not work when offline. How can we implement current location & search locations functionality in leaflet maps when offline? Anyone who integrated offline leaflet maps with Ionic + Angular, please provide a solution.
Thanks in advance.
2 posts - 2 participants