Search in sources :

Example 1 with MarkerItem

use of org.oscim.layers.marker.MarkerItem in project graphhopper by graphhopper.

the class MainActivity method createMarkerItem.

@SuppressWarnings("deprecation")
private MarkerItem createMarkerItem(GeoPoint p, int resource) {
    Drawable drawable = getResources().getDrawable(resource);
    Bitmap bitmap = AndroidGraphics.drawableToBitmap(drawable);
    MarkerSymbol markerSymbol = new MarkerSymbol(bitmap, 0.5f, 1);
    MarkerItem markerItem = new MarkerItem("", "", p);
    markerItem.setMarker(markerSymbol);
    return markerItem;
}
Also used : Bitmap(org.oscim.backend.canvas.Bitmap) MarkerSymbol(org.oscim.layers.marker.MarkerSymbol) MarkerItem(org.oscim.layers.marker.MarkerItem) Drawable(android.graphics.drawable.Drawable)

Aggregations

Drawable (android.graphics.drawable.Drawable)1 Bitmap (org.oscim.backend.canvas.Bitmap)1 MarkerItem (org.oscim.layers.marker.MarkerItem)1 MarkerSymbol (org.oscim.layers.marker.MarkerSymbol)1