mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Geolocation works on Android
This commit is contained in:
parent
beb8dac747
commit
a4bb2a276e
@ -546,15 +546,17 @@ Geolocation.prototype.getCurrentPosition = function(successCallback, errorCallba
|
||||
}
|
||||
|
||||
// Run the global callback
|
||||
Geolocation.gotCurrentPosition = function(latitude, longitude)
|
||||
Geolocation.gotCurrentPosition = function(lat, lng)
|
||||
{
|
||||
if (latitude == "undefined" || longitude == "undefined")
|
||||
if (lat == "undefined" || lng == "undefined")
|
||||
{
|
||||
this.fail();
|
||||
}
|
||||
else
|
||||
{
|
||||
p = { lat: latitude, lng: longitude }
|
||||
p = {};
|
||||
p.latitude = lat;
|
||||
p.longitude = lng;
|
||||
this.global_success(p);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user