diff options
-rw-r--r-- | src/org/traccar/model/CellTower.java | 10 | ||||
-rw-r--r-- | src/org/traccar/model/Network.java | 2 | ||||
-rw-r--r-- | test/org/traccar/geolocation/GeolocationProviderTest.java | 10 |
3 files changed, 16 insertions, 6 deletions
diff --git a/src/org/traccar/model/CellTower.java b/src/org/traccar/model/CellTower.java index e572dfb10..74ed8a4ea 100644 --- a/src/org/traccar/model/CellTower.java +++ b/src/org/traccar/model/CellTower.java @@ -46,6 +46,16 @@ public class CellTower { return fromLacCid(lac, cid); } + private String radioType; + + public String getRadioType() { + return radioType; + } + + public void setRadioType(String radioType) { + this.radioType = radioType; + } + private Long cellId; public Long getCellId() { diff --git a/src/org/traccar/model/Network.java b/src/org/traccar/model/Network.java index 389ce1fdd..c5be95887 100644 --- a/src/org/traccar/model/Network.java +++ b/src/org/traccar/model/Network.java @@ -50,7 +50,7 @@ public class Network { this.homeMobileNetworkCode = homeMobileNetworkCode; } - private String radioType; + private String radioType = "gsm"; public String getRadioType() { return radioType; diff --git a/test/org/traccar/geolocation/GeolocationProviderTest.java b/test/org/traccar/geolocation/GeolocationProviderTest.java index adfd36b96..5a701d859 100644 --- a/test/org/traccar/geolocation/GeolocationProviderTest.java +++ b/test/org/traccar/geolocation/GeolocationProviderTest.java @@ -13,16 +13,16 @@ public class GeolocationProviderTest extends BaseTest { @Test public void test() throws Exception { if (enable) { - testGoogleLocationProvider(); + testLocationProvider(); } } - public void testGoogleLocationProvider() throws Exception { - GoogleGeolocationProvider locationProvider = new GoogleGeolocationProvider("KEY"); + public void testLocationProvider() throws Exception { + MozillaGeolocationProvider provider = new MozillaGeolocationProvider(); - Network network = new Network(CellTower.from(260, 2, 10250, 26511)); + Network network = new Network(CellTower.from(208, 1, 2, 1234567)); - locationProvider.getLocation(network, new GeolocationProvider.LocationProviderCallback() { + provider.getLocation(network, new GeolocationProvider.LocationProviderCallback() { @Override public void onSuccess(double latitude, double longitude, double accuracy) { Assert.assertEquals(60.07254, latitude, 0.00001); |