From 39ec7accd759fd60706523b366977ba371efd168 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Thu, 8 Sep 2011 00:00:58 +0200 Subject: Refactoring to use Geopoint for coordinates This uses the new Geopoint immutable class discussed in #58. No more independent longitude or latitude fields -- they are now treated and defined as a consistent pair. --- src/cgeo/geocaching/googlemaps/googleMapFactory.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cgeo/geocaching/googlemaps/googleMapFactory.java') diff --git a/src/cgeo/geocaching/googlemaps/googleMapFactory.java b/src/cgeo/geocaching/googlemaps/googleMapFactory.java index ba62737..96f90f8 100644 --- a/src/cgeo/geocaching/googlemaps/googleMapFactory.java +++ b/src/cgeo/geocaching/googlemaps/googleMapFactory.java @@ -4,6 +4,7 @@ import android.content.Context; import cgeo.geocaching.R; import cgeo.geocaching.cgCoord; import cgeo.geocaching.cgUser; +import cgeo.geocaching.geopoint.Geopoint; import cgeo.geocaching.mapinterfaces.CacheOverlayItemImpl; import cgeo.geocaching.mapinterfaces.GeoPointImpl; import cgeo.geocaching.mapinterfaces.MapFactory; @@ -29,8 +30,8 @@ public class googleMapFactory implements MapFactory{ } @Override - public GeoPointImpl getGeoPointBase(int latE6, int lonE6) { - return new googleGeoPoint(latE6, lonE6); + public GeoPointImpl getGeoPointBase(final Geopoint coords) { + return new googleGeoPoint(coords.getLatitudeE6(), coords.getLongitudeE6()); } @Override -- cgit v1.1