meteor-google-maps
meteor-google-maps copied to clipboard
Position retrieval times out in ios app
I'm trying to run the Reactive geolocation example.
When i do: meteor run ios
, then
In the simulator The map shows up correctly for about 8 seconds and then it goes away and I see the message:
Geolocation failed: Position retrieval timed out.
Is this a bug ? or is there a way around this. Everything works fine on the desktop browser.
Hey, I'm not entirely sure but it's probably something to do with the application not having permission to access geolocation information. Possibly some config required there.
I use this in mobile-config:
App.accessRule('https://*.googleapis.com/*');
App.accessRule('https://*.google.com/*');
App.accessRule('https://*.gstatic.com/*');
Might be worth looking here https://github.com/meteor/mobile-packages/issues
The most relevant issue might be this one: https://github.com/meteor/mobile-packages/issues/62 May be also subscriptions etc could be involved ?
The app is just a plain new app with the Reactive geolocation example in a layout using iron router: the app is here: https://github.com/kjetilge/ReactiveGeolocation Have you tested this code on mobile ?
Just had a look into it myself and I believe the issue you linked is the issue I'm also seeing.
Have you guys found a solution?
I am having this issue as well...
Hey guys from both @kjetilge and my own testing I'm pretty sure that this is the underlying issue https://github.com/meteor/mobile-packages/issues/62
I am having this issue as well... geolocation is working on browser but not on iOS... any help/fix?
The geolocation code is a page long, shouldn't be too hard to fix, perhaps going off of this fork: https://github.com/meteor/mobile-packages/pull/87
I am having the same issue. Was this ever fixed?
Same issue here, anyone fixed it ?
PS : Why isn't there anyone with a proper solution here ? This issue is opened since July and many people are having it.
@Loschcode unfortunately the root of the problem lies with the geolocation package
For everyone with this issue: http://stackoverflow.com/a/31074901/4541800 This is my solution (won't suit everyone):
// Don't show error if error.code === 3 (Timeout)
geolocationError() {
let error = Geolocation.error();
return error && error.code !== 3 && error.message;
}
Is there any solution to this Problem. Everything works fins but when we pan fast or click many times then the map becomes idle and give unpleasent experience. actually it throws error as Geolocation failed: Position retrieval timed out. Any input.
I've figured out the solution to this problem. Go to the info.plist file for your app in Xcode and add two entries:
NSLocationWhenInUseUsageDescription NSLocationAlwaysUsageDescription
The values can be any strings you want to display to the user for why he should allow geolocation for your app. Rebuild and deploy.
@adimittal you saved the day