Search in sources :

Example 1 with Polyline

use of org.osmdroid.views.overlay.Polyline in project collect by opendatakit.

the class GeoShapeOsmMapActivity method overlayPointPathListener.

private void overlayPointPathListener() {
    overlayEvents = new MapEventsOverlay(receive);
    polyline = new Polyline();
    polyline.setColor(Color.RED);
    Paint paint = polyline.getPaint();
    paint.setStrokeWidth(stroke_width);
    map.getOverlays().add(polyline);
    map.getOverlays().add(overlayEvents);
    map.invalidate();
}
Also used : MapEventsOverlay(org.osmdroid.views.overlay.MapEventsOverlay) Polyline(org.osmdroid.views.overlay.Polyline) Paint(android.graphics.Paint)

Example 2 with Polyline

use of org.osmdroid.views.overlay.Polyline in project collect by opendatakit.

the class GeoTraceOsmMapActivity method overlayMapLayerListener.

private void overlayMapLayerListener() {
    polyline = new Polyline();
    polyline.setColor(Color.RED);
    Paint paint = polyline.getPaint();
    paint.setStrokeWidth(5);
    mapView.getOverlays().add(polyline);
    mapView.invalidate();
}
Also used : Polyline(org.osmdroid.views.overlay.Polyline) Paint(android.graphics.Paint)

Aggregations

Paint (android.graphics.Paint)2 Polyline (org.osmdroid.views.overlay.Polyline)2 MapEventsOverlay (org.osmdroid.views.overlay.MapEventsOverlay)1