ionViewDidLoad() {
GoogleMap.isAvailable().then( () => {
this.loadMap()
}).catch(() => {
alert('Maps not working')
})
}
loadMap() {
let map:GoogleMap = new GoogleMap('map', {
backgroundColor: 'white',
timeout: 10000,
enableHighAccuracy: true,
controls: {
compass: true,
myLocationButton: true,
indoorPicker: true,
zoom: true
},
gestures: {
scroll: true,
tilt: true,
rotate: true,
zoom: true
}
})
let default_location: GoogleMapsLatLng = new GoogleMapsLatLng(AppConfig.DEFAULT_MAP_LOCATION.lat, AppConfig.DEFAULT_MAP_LOCATION.long)
map.one(GoogleMapsEvent.MAP_READY).then(() => {
this.loader.dismiss()
console.log('Map is ready!')
let position: CameraPosition = {
target: default_location,
zoom: 20
}
// // move the map's camera to position
map.moveCamera(default_location);
})
}
The main problem is that i cant set zoom. It is always the same no matter what I did