Search in sources :

Example 1 with AccuracyCircleOverlay

use of com.github.ignition.samples.location.overlays.AccuracyCircleOverlay 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

AccuracyCircleOverlay (com.github.ignition.samples.location.overlays.AccuracyCircleOverlay)1 GeoPoint (com.google.android.maps.GeoPoint)1