JavaScript + mobile-spec tests exist. Next step is updating the native framework to conform to the API differences imposed by exec calls for Android, webOS and iOS. The following is something I wrote up for the cordova mailing list which describes the API changes enforced by exec and what actions the native framework should implement, along with what parameters are provided.

All of this means the the API on the native side for geolocation will change (sorry iOS!). Basically we have three actions that the Geolocation plugin should listen for:

getLocation, which takes as parameters enableHighAccuracy (boolean) and maximumAge (int as milliseconds).

addWatch, parameter: only the usual callbackID required.

clearWatch, parameter: only the usual callbackID required.

getLocation should require very little changing (other than not needing the timeout parameter anymore, since that is handled on the JS side in my patch).

addWatch should keep a list of callback Ids, and, as soon as we have one watch started, the native framework should start watching the position for a "significant position difference". Once that happens, it should fire the success callback(s) for all stored watch callback Ids. If there is an issue retrieving position, it should fire the error callback(s) for all stored watch callback Ids.

Filip Maj
added a comment - 28/Mar/12 01:12 JavaScript + mobile-spec tests exist. Next step is updating the native framework to conform to the API differences imposed by exec calls for Android, webOS and iOS. The following is something I wrote up for the cordova mailing list which describes the API changes enforced by exec and what actions the native framework should implement, along with what parameters are provided.
All of this means the the API on the native side for geolocation will change (sorry iOS!). Basically we have three actions that the Geolocation plugin should listen for:
getLocation, which takes as parameters enableHighAccuracy (boolean) and maximumAge (int as milliseconds).
addWatch, parameter: only the usual callbackID required.
clearWatch, parameter: only the usual callbackID required.
getLocation should require very little changing (other than not needing the timeout parameter anymore, since that is handled on the JS side in my patch).
addWatch should keep a list of callback Ids, and, as soon as we have one watch started, the native framework should start watching the position for a "significant position difference". Once that happens, it should fire the success callback(s) for all stored watch callback Ids. If there is an issue retrieving position, it should fire the error callback(s) for all stored watch callback Ids.

Filip Maj
added a comment - 28/Mar/12 23:37 I have a branch for the necessary changes for the native side for iOS set up. Pending reviews from a few other iOS folk, iOS should be done for this shortly.