From: Liu, Xin Date: Thu, 20 Jun 2013 01:48:38 +0000 (+0800) Subject: Improve LocationGPS by adding speed in behavior X-Git-Tag: 2.2.1_release~228^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b40334a2a11e089ec2da9d117dd709599851edab;p=test%2Ftct%2Fweb%2Fbehavior.git Improve LocationGPS by adding speed in behavior Signed-off-by: Liu, Xin --- diff --git a/tests/LocationGPS/index.html b/tests/LocationGPS/index.html index 33732e2..9787874 100755 --- a/tests/LocationGPS/index.html +++ b/tests/LocationGPS/index.html @@ -56,6 +56,9 @@ Authors:
Longitude:
+
+ Speed: +
diff --git a/tests/LocationGPS/js/main.js b/tests/LocationGPS/js/main.js index fdac923..3658a06 100755 --- a/tests/LocationGPS/js/main.js +++ b/tests/LocationGPS/js/main.js @@ -45,6 +45,7 @@ function initialize() { textonly: false, html: "" }); + DisablePassButton(); try { navigator.geolocation.watchPosition(successCallback, errorCallback, { maximumAge: 60000}); } catch (err) { @@ -55,9 +56,11 @@ function initialize() { function successCallback (position) { $.mobile.loading('hide'); + EnablePassButton(); var coordinates = position.coords; jQuery("#latitudeDiv").html("Latitude: " + coordinates.latitude); jQuery("#longitudeDiv").html("Longitude: " + coordinates.longitude); + jQuery("#speedDiv").html("Speed: " + coordinates.speed); } function errorCallback (error) {