So what am I doing is trying to get a map from a certain part and load it, it works with the browser and using ionic serve
but when doing apk file (ionic build
) and after installing the app it only shows grey color. I follow this tutorial to work in offline.
Below is my code
this.map = leaflet.map('map', { center: [8.48252667, 124.64722222], zoom: 16, trackResize: false});
leaflet.tileLayer('../assets/Northmin/{z}/{x}/{y}.png', {
attribution: 'Sample',
maxZoom: 16
}).addTo(this.map);
leaflet.marker([8.48252667, 124.64722222], {
title: 'Marker', alt: 'marker', icon: leaflet.icon({
iconUrl: '../assets/imgs/bank.png',
iconSize: [38, 38],
iconAnchor: [22, 94],
popupAnchor: [-3, -76],
shadowSize: [68, 95],
shadowAnchor: [22, 94]
})
}).addTo(this.map);
Is this the problem of loading the layer?