Closed danieltanasec closed 3 years ago
Please share your project files on GitHub
I cannot share the project unfortunately. It is a private app.
I can prepare a test demo to see if it behaves the same
I don't mind private or public repo.
I have prepared a test demo at https://github.com/Tzuya14/test_ionic_gm_location_android. Still same issue.. The app requests location permission, the map is centered to my actual location, but no blue dot is displayed.
I come back with an update. After I closed and opened the app multiple times I observed that once the blue dot appeared on the map, the next time I reopened the app it disappeared again.. Still this is strange.
I tested your code. Your situation has been reproduced first couple of times when I tried with your API key. (But your API key is restricted, that's why I could not see the map)
I changed to my API key, then solved the situation. I don't know why. Even, after closing the app, launch it again, no problem at all.
Blue dot is displayed by Google Maps SDK for Android itself, not this plugin. That's why I can not do anything
I understand. So it may be an API issue. I will look into it. Thanks a lot for your help.
I observed in the console that I get the error E/PluginLocationService: ===> googleApiClient.isConnected() is not connected Could it be related in some way to this issue? I tried to renew the API with no restrictions, activated all MAPS related services, fixed all issues in Android manifest and still no luck..
Maybe your Google Play Services is old?
I use a Huawei mobile for testing :). Could that be the issue?
Possible. Please try another Android phone which is not China maker brand.
I'm submitting a ... (check one with "x")
If you choose 'problem or bug report', please select OS: (check one with "x")
cordova information: (run
$> cordova plugin list
)If you use
@ionic-native/google-maps
, please tell the package.json (only@ionic-native/core
and@ionic-native/google-maps
are fine mostly)Current behavior: setMyLocationEnabled(true) doesn't display the blue dot on Android, only on iOS. Also setting myLocation to true while generating the map behaves the same.
let mapOptions: GoogleMapOptions = { camera: { target: myLocation.latLng, zoom: this.zoom, tilt: 30, }, styles: mapStyle, preferences: { zoom: {minZoom: 6, maxZoom: 20} }, controls: { myLocation: true } };
Screen capture or video record: