]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - js/geometa.js
Localisation updates for !StatusNet from !translatewiki.net !sntrans
[quix0rs-gnu-social.git] / js / geometa.js
index 9c603ceaee3ce18eb4d1eb5bebd9eda0c7535738..21deb18852a2102c225af7091bd2d534d56cf201 100644 (file)
@@ -103,7 +103,7 @@ var AjaxGeoLocation = (function() {
         if (!hasGoogleLoader() && !loading) {
             loading = true;
             var s = document.createElement('script');
-            s.src = 'http://www.google.com/jsapi?callback=_google_loader_apiLoaded';
+            s.src = (document.location.protocol == "https:"?"https://":"http://") + 'www.google.com/jsapi?callback=_google_loader_apiLoaded';
             s.type = "text/javascript";
             document.getElementsByTagName('body')[0].appendChild(s);
         }
@@ -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);