use of org.oscim.layers.marker.MarkerSymbol in project PocketMaps by junjunguo.
the class MapHandler method createMarkerItem.
private MarkerItem createMarkerItem(GeoPoint p, int resource, float offsetX, float offsetY) {
// Drawable drawable = activity.getDrawable(resource); // Since API21
Drawable drawable = ContextCompat.getDrawable(activity, resource);
Bitmap bitmap = AndroidGraphics.drawableToBitmap(drawable);
MarkerSymbol markerSymbol = new MarkerSymbol(bitmap, offsetX, offsetY);
MarkerItem markerItem = new MarkerItem("", "", p);
markerItem.setMarker(markerSymbol);
return markerItem;
}
Aggregations