Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49312

Offline Leaflet Map not showing the map only grey color

$
0
0

@kevinpallado wrote:

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?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49312

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>