mapsplugin/cordova-plugin-googlemaps

Is there a way to prevent the map from requesting location permission?

Opened this issue · 2 comments

I'd like to prevent the map from requesting for permission since this is handled somewhere else.
I have tried:

var map = plugin.google.maps.Map.getMap(div, {
  controls: {
    myLocationButton: false,
    myLocation: false
  }
});

No luck. Please help!

I am having the same problem. I have both set to false and my app is not requesting location information from the user. You can see in iOS I do not have any location permissions set and it is all working fine, but on Android it is still asking for permission even though I am not requesting it.

IMG_051AAE2A0F6D-1

I'd like to prevent the map from requesting for permission since this is handled somewhere else. I have tried:

var map = plugin.google.maps.Map.getMap(div, {
  controls: {
    myLocationButton: false,
    myLocation: false
  }
});

No luck. Please help!

Caused by this line of code in PluginMap.java:
if (controls.has("myLocationButton") || controls.has("myLocation")) {

You need to remove myLocationButton and myLocation from controls property in order to prevent the check