Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
Monaca Localkit getCurrentPosition Doesn't Seem to Work
baystar47 last edited by baystar47
I have upgraded Monaca Localkit to 2.1.3.
During Monaca Localkit Preview, when I call the
navigator.geolocation.getCurrentPosition(successFunc, errorFunc, geoOptions)
function, I always get the following error.
"Network location provider at ‘https://www.googleapis.com/’ : Returned error code 400
It used to work in the previous Monaca Localkit version (I forgot the version #) and it works when I run the code with a regular browser such as Chrome.
(I am running the code not on a phone but on my desktop Mac)
I thought perhaps I need to specify a Google API Key which I have tried but still get an error.
Is there an issue with Monaca Localkit using geolocation?
Is there a work around??
munsterlander 侍 last edited by
@baystar47 Take a look at:
The good thing is, we know the request is working and something is just malformed in our request due to the error code. This would mean it is not a Monaca issue and is a coding issue. Since it used to work, I would assume it would come down to a config issue in the app now - meaning, that once compiled, something isn’t being carried over where we think it should be going. If I remember correctly, Monaca changed the Android config files recently. Hopefully, this is a starting point. Does the error code return in details about the 400 code?
I don’t think it’s an issue related to Localkit itself as we don’t include anything that can interfere with the location. If you think it’s version related, I suggest you to try to download an older version of localkit and test it again. Here is the link