Closed leabdalla closed 4 years ago
My map is working good but its always asking for gps permission on Android and iOS devices and I don't need that, causa I'm starting the map in a certain location coming from API.
I'm starting the map this way:
startMap(){ this.map = GoogleMaps.create('map', { camera: { target:{lat:-23.5486, lng:-46.6392}, zoom: 18 }, controls: { 'compass' : false, 'myLocationButton' : false, 'myLocation' : true, // (blue dot) 'indoorPicker' : false, 'zoom' : false, // android only 'mapToolbar' : false // android only }, gestures: { scroll : true, tilt : false, zoom : true, rotate : false }, preferences: { zoom: {minZoom:6, maxZoom:10}, building: true } }); this.map.one(GoogleMapsEvent.MAP_READY).then( (data:any) => { let coordinates:LatLng = new LatLng(apidata.latitude, apidata.longitude); let position = { target: coordinates, zoom: apidata.zoomlevel }; this.map.animateCamera(position); }); }
How can I prevent the plugin from asking user's permission?
Try setting myLocation to false.
myLocation
it worked, thanks!
Setting myLocation to false doesn't work for me. Any other ideas?
My map is working good but its always asking for gps permission on Android and iOS devices and I don't need that, causa I'm starting the map in a certain location coming from API.
I'm starting the map this way:
How can I prevent the plugin from asking user's permission?