I’m using google maps in my app … I have a list of Clinics every clinic have latitude and longitude loaded from the server using API’s calls
but sometimes the map doesn’t work
my code
loadMapC() {
let mapOptions: GoogleMapOptions = {
controls: {
'compass': false,
'zoom': false,
},
gestures: {
'scroll': false,
'tilt': false,
'zoom': false,
'rotate': false
},
camera: {
target: {
lat: this.ClinicData.lat,
lng: this.ClinicData.long
},
zoom: 15,
tilt: 0
}
};
this.map = GoogleMaps.create('map_canvas', mapOptions);
this.map.setOptions({
draggable: false
});
let marker: Marker = this.map.addMarkerSync({
// title: this.name ,
icon: 'blue',
animation: 'DROP',
position: {
lat: this.ClinicData.lat,
lng: this.ClinicData.long
}
});
marker.on(GoogleMapsEvent.MARKER_CLICK).subscribe(() => { });
}
example