Google Map native ionic 2 not working


#1

hello, im using


the map not showing on modals

but, in my console the cordinate latitue and longitude is showing
i try on debug on some device and it not working too

here is my code

loadMap() {

    let element: HTMLElement = document.getElementById('map');
    let map: GoogleMap = this.googleMaps.create(element);
    map.one(GoogleMapsEvent.MAP_READY).then(() => {
        var latitude, longitude;
        map.getMyLocation().then((userLocation) => {
            latitude = userLocation.latLng.lat;
            longitude = userLocation.latLng.lng;
            this.nativeGeocoder.reverseGeocode(latitude, longitude)
                .then((result: NativeGeocoderReverseResult) => localStorage.setItem("address", result.street))
                .catch((error: any) => console.log(error));
            // create LatLng object
            let ionic: LatLng = new LatLng(userLocation.latLng.lat, userLocation.latLng.lng);

            // create CameraPosition
            let position: CameraPosition = {
                target: ionic,
                zoom: 14,
                tilt: 30
            };

            // move the map's camera to position
            map.moveCamera(position);

            // create new marker
            let markerOptions: MarkerOptions = {
                position: ionic,
                title: 'Im Here !'
            };
            map.addMarker(markerOptions)
                .then((marker: Marker) => {
                    marker.showInfoWindow();
                });
        });

    });
}

in view

#map id=“map” style=“height: 500px;width: 100%;background-color: blue;”>

in page before im just parse modal
presentProfileModal() {
let profileModal = this.modalCtrl.create(MapModalPage);
profileModal.present();
}