Map not showing twice


#1

Hi, i am using leaflet to show offline map with mbtiles on my ionic application. When i open the map for the first time it comes properly but when i close and open it again nothing (No map).
Can any body help me with this issue ?

Here is the code

` this.center = [lat,long];
this.map = L.map(‘homeMapOff’, {
center: this.center,
zoom: 9
});

let mb = L.tileLayer.mbTiles('assets/tiles/myFile.mbtiles', {
  minZoom: 9,
  maxZoom: 12
}).addTo(this.map); 

mb.on('databaseloaded', function(ev) {
  console.info('MBTiles DB loaded', ev); 
}); 

mb.on('databaseerror', function(ev) {
  console.info('MBTiles DB error', ev); 
});`

Thanks.