mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
Fixed ridiculous error in Javascript for GeoLocation
This commit is contained in:
@@ -21,6 +21,7 @@ public class GeoBroker {
|
||||
{
|
||||
mCtx = ctx;
|
||||
mAppView = view;
|
||||
geoListeners = new HashMap<String, GeoListener>();
|
||||
}
|
||||
|
||||
public void getCurrentLocation()
|
||||
|
||||
@@ -47,7 +47,7 @@ public class GeoListener {
|
||||
params += "," + loc.getSpeed() + "," + loc.getTime();
|
||||
if(id != "global")
|
||||
{
|
||||
mAppView.loadUrl("javascript:navigator.geolocation.success(" + id + "," + params + ")");
|
||||
mAppView.loadUrl("javascript:navigator._geo.success(" + id + "," + params + ")");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,11 +55,11 @@ public class GeoListener {
|
||||
{
|
||||
// Do we need to know why? How would we handle this?
|
||||
if (id != "global") {
|
||||
mAppView.loadUrl("javascript:navigator.geolocation.fail(" + id + ")");
|
||||
mAppView.loadUrl("javascript:navigator._geo.fail(" + id + ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
mAppView.loadUrl("javascript:navigator.geolocation.fail()");
|
||||
mAppView.loadUrl("javascript:navigator._geo.fail()");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user