[
https://issues.apache.org/jira/browse/CB-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shazron Abdullah updated CB-3027:
---------------------------------
Fix Version/s: (was: 2.7.0)
2.8.0
> getCurrentPosition timeout does not work and it blocks application execution
> ----------------------------------------------------------------------------
>
> Key: CB-3027
> URL: https://issues.apache.org/jira/browse/CB-3027
> Project: Apache Cordova
> Issue Type: Bug
> Components: iOS
> Affects Versions: 2.5.0, 2.6.0
> Environment:
> Reporter: Pepe Cano
> Assignee: Shazron Abdullah
> Priority: Critical
> Fix For: 2.8.0
>
>
> I have experienced this problem with cordova 2.5 & 2.6 in iOS 6.1.3, iPhone 4.
> Timeout param is not working, so I decided to implement the same behavior
> with timing-function, however _getCurrentPosition_ seems to be executed
> synchronously instead of asynchronously, and because _timeout_ does not work,
> neither locationTimeout function or error callback are executed and the
> application is blocked waiting for getCurrentPosition response.
> {code}
> var positionError = function() {
> /// do something on error
> };
> var locationTimeout = window.setTimeout(function() {
> // work-around to solve timeout error
> positionError();
> }, 1000);
> navigator.geolocation.getCurrentPosition( function(response) {
> clearTimeout(locationTimeout);
> positionNext(response);
> }, function(error) {
> clearTimeout(locationTimeout);
> positionError();
> }, { maximumAge: 3000, timeout: 1000 });
> {code}
> Could I misunderstand any internal functionality?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira