Search in sources :

Example 11 with GeoPoint

use of com.google.android.maps.GeoPoint in project ignition by mttkay.

the class IgnitedLocationSampleActivity method update.

private void update(Location location) {
    mapOverlays.clear();
    int lat = (int) (location.getLatitude() * 1E6);
    int lon = (int) (location.getLongitude() * 1E6);
    final float accuracy = location.getAccuracy();
    GeoPoint point = new GeoPoint(lat, lon);
    mapController.setCenter(point);
    mapOverlays.add(new AccuracyCircleOverlay(point, accuracy));
}
Also used : GeoPoint(com.google.android.maps.GeoPoint) AccuracyCircleOverlay(com.github.ignition.samples.location.overlays.AccuracyCircleOverlay) GeoPoint(com.google.android.maps.GeoPoint)

Aggregations

GeoPoint (com.google.android.maps.GeoPoint)11 Test (org.junit.Test)5 Point (android.graphics.Point)4 Ignore (org.junit.Ignore)2 Implementation (org.robolectric.annotation.Implementation)2 Paint (android.graphics.Paint)1 Drawable (android.graphics.drawable.Drawable)1 AccuracyCircleOverlay (com.github.ignition.samples.location.overlays.AccuracyCircleOverlay)1 MapView (com.google.android.maps.MapView)1 Overlay (com.google.android.maps.Overlay)1 Projection (com.google.android.maps.Projection)1