Hi all,
It’s been a while since the last post of iOS Databases Limit. Now, I’m doing an experiment about the geolocation on iPhone using Navigator – Geolocation on Google Maps.
This is just for your information about HTML5 navigator – GeoLocation. GeoLocation API is part of HTML5 library that can be used to define your device location.
methods:
getCurrentPosition(callback[, error[, opts]])
return: none;
watchPositioin(callback[, error[, opts]])
return: watchID (long)
clearWatch(watchID)
return: none;
/* callback -> triggered when success of getting position */
callback(position)
return: none;
position: {
coords: {
latitude: (double),
longitude: (double),
altitude: (double),
accuracy: (double),
altitudeAccuracy: (double),
heading: (double),
speed: (double)
},
timestamp: (timestamp)
};
/* callback -> triggered when error occur while getting position */
error(e)
return: none;
error {
PERMISSION_DENIED: 1;
POSITION_UNAVAILABLE: 2;
TIMEOUT: 3;
code: (enum);
message: (string)
};
/* Options */
opts: {
enableHighAccuracy: (boolean),
timeout: (long);
long maximumAge: (long);
};