blob: d4ac68b637d0a90a3559c8323f7b7c8bc1be4e23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
package cgeo.geocaching.maps.google;
import cgeo.geocaching.R;
import cgeo.geocaching.cgCoord;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.go4cache.Go4CacheUser;
import cgeo.geocaching.maps.interfaces.CachesOverlayItemImpl;
import cgeo.geocaching.maps.interfaces.GeoPointImpl;
import cgeo.geocaching.maps.interfaces.MapFactory;
import cgeo.geocaching.maps.interfaces.OtherCachersOverlayItemImpl;
import com.google.android.maps.MapActivity;
import android.content.Context;
public class GoogleMapFactory implements MapFactory {
@Override
public Class<? extends MapActivity> getMapClass() {
return GoogleMapActivity.class;
}
@Override
public int getMapViewId() {
return R.id.map;
}
@Override
public int getMapLayoutId() {
return R.layout.map_google;
}
@Override
public GeoPointImpl getGeoPointBase(final Geopoint coords) {
return new GoogleGeoPoint(coords.getLatitudeE6(), coords.getLongitudeE6());
}
@Override
public CachesOverlayItemImpl getCachesOverlayItem(final cgCoord coordinate, final CacheType type) {
GoogleCacheOverlayItem baseItem = new GoogleCacheOverlayItem(coordinate, type);
return baseItem;
}
@Override
public OtherCachersOverlayItemImpl getOtherCachersOverlayItemBase(Context context, Go4CacheUser userOne) {
GoogleOtherCachersOverlayItem baseItem = new GoogleOtherCachersOverlayItem(context, userOne);
return baseItem;
}
}
|