i tried this tutorial to get markers added on the map everything’s working fine but
when i navigate to other pages and then return to map page markers don’t appear ,only the first time need help …
i’m using menu to navigate through pages i tried everyhting even putting the method in the constructor and tried all the functions :
ionViewDidLoad() ,ionViewWillLoad(),ionViewDidEnter()…i’m helpless right now !! this is my method:
ionViewDidLoad(){
this.platform.ready().then(() => {
let mapLoaded = this.maps.init(this.mapElement.nativeElement,
this.pleaseConnect.nativeElement);
let locationsLoaded = this.load();
Promise.all([
mapLoaded,
locationsLoaded,
]).then((result) => {
if(result){
let locations = result[1];
for(let location of locations){
this.maps.addMarker(location);
}
this.maps.addMyPosition();
});
});
}