Page 1 of 2

GeoLocation bug?

Posted: Thu Jun 26, 2014 2:56 pm
by Kevin Preston

I am trying to use the GeoLocation Service - I have set the request parameters as follows :-
maximumAge: 60000
timeout: 5000
enableHighAccuracy: true
watchPosition: true

If you invoke the service indoors (no satellites available) or with the GPS function on the device switched off you never receive the error event which should arrive after 'timeout' has expired.
If you use :-
navigator.geolocation.watchPosition(onSuccess, onError,{ maximumAge: 60000, timeout: 5000, enableHighAccuracy: true });

then you get the appropriate error raised.


GeoLocation bug?

Posted: Thu Jun 26, 2014 4:50 pm
by Evgene Karachevtsev

Hello Kevin,

You need to set the handler of event "fail" for geolocation_service like to REST services yourself: http://devcenter.appery.io/documentat...


GeoLocation bug?

Posted: Thu Jun 26, 2014 5:16 pm
by Kevin Preston

Evgene,
Sorry perhaps I didn't explain what I meant properly.
The 'fail' event will fire as in your link but how do you find the reason for the failure eg GPS switched off or no satellite?

Kevin


GeoLocation bug?

Posted: Thu Jun 26, 2014 6:24 pm
by Evgene Karachevtsev

Kevin,

Yes, for handler on event "fail" no options are passed, so there is no opportunity to clarify the details, but you can use the event "complete" in its handler parameters are passed.


GeoLocation bug?

Posted: Fri Jun 27, 2014 8:28 am
by Kevin Preston

Evgene,
Could you give an example how to access the parameters as 'textStatus' shows as 'undefined'
Thanks,
Kevin


GeoLocation bug?

Posted: Fri Jun 27, 2014 1:14 pm
by Kevin Preston

Any update?


GeoLocation bug?

Posted: Fri Jun 27, 2014 1:17 pm
by Kateryna Grynko

Hi Kevin,

Unfortunately, not yet. Working on it.


GeoLocation bug?

Posted: Fri Jun 27, 2014 1:23 pm
by Kevin Preston

OK thanks.


GeoLocation bug?

Posted: Fri Jun 27, 2014 2:52 pm
by Evgene Karachevtsev

Hello Kevin,

It was misconception, sorry for this. You do can get detailed information in the handler of event "fail". Despite the fact that in the UI builder you can't see passed parameters, you still have access to three parameters jqXHR, textStatus and errorThrown. They contain details of the error.


GeoLocation bug?

Posted: Fri Jun 27, 2014 3:03 pm
by Kevin Preston

Thanks, I'll try it.

Kevin