summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-11-20 15:06:31 -0500
committerCraig Andrews <candrews@integralblue.com>2009-11-20 15:18:39 -0500
commita3285faac1b2c9486bbbd8fe75efdb83b3daffdc (patch)
treef76aae6af011312e4a6732a8006af5691812384f /js
parentb688c572c9dd8a17fcedb40358dd0499357abdab (diff)
Make the Google Client Location API's output compliant with the w3c geolocation specification
Diffstat (limited to 'js')
-rw-r--r--js/geometa.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/js/geometa.js b/js/geometa.js
index 9c603ceae..26b66e768 100644
--- a/js/geometa.js
+++ b/js/geometa.js
@@ -161,22 +161,23 @@ var AjaxGeoLocation = (function() {
var cl = google.loader.ClientLocation;
var position = {
- latitude: cl.latitude,
- longitude: cl.longitude,
- altitude: null,
- accuracy: 43000, // same as Gears accuracy over wifi?
- altitudeAccuracy: null,
- heading: null,
- velocity: null,
- timestamp: new Date(),
-
+ coords: {
+ latitude: cl.latitude,
+ longitude: cl.longitude,
+ altitude: null,
+ accuracy: 43000, // same as Gears accuracy over wifi?
+ altitudeAccuracy: null,
+ heading: null,
+ speed: null,
+ },
// extra info that is outside of the bounds of the core API
address: {
city: cl.address.city,
country: cl.address.country,
country_code: cl.address.country_code,
region: cl.address.region
- }
+ },
+ timestamp: new Date()
};
successCallback(position);