aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/maps/google/GoogleMapController.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/maps/google/GoogleMapController.java')
-rw-r--r--main/src/cgeo/geocaching/maps/google/GoogleMapController.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapController.java b/main/src/cgeo/geocaching/maps/google/GoogleMapController.java
index fdd971c..096cd61 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleMapController.java
+++ b/main/src/cgeo/geocaching/maps/google/GoogleMapController.java
@@ -16,12 +16,17 @@ public class GoogleMapController implements MapControllerImpl {
@Override
public void animateTo(GeoPointImpl geoPoint) {
- mapController.animateTo((GeoPoint) geoPoint);
+ mapController.animateTo(castToGeoPointImpl(geoPoint));
+ }
+
+ private static GeoPoint castToGeoPointImpl(GeoPointImpl geoPoint) {
+ assert geoPoint instanceof GeoPoint;
+ return (GeoPoint) geoPoint;
}
@Override
public void setCenter(GeoPointImpl geoPoint) {
- mapController.setCenter((GeoPoint) geoPoint);
+ mapController.setCenter(castToGeoPointImpl(geoPoint));
}
@Override