Update AndroidGraphics.java
add static makeMarker to create Marker from Drawable
This commit is contained in:
parent
8eb6377a69
commit
9ec72aabe3
@ -91,13 +91,13 @@ public final class AndroidGraphics extends CanvasAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static MarkerSymbol makeMarker(Resources res, int id, HotspotPlace place) {
|
public static MarkerSymbol makeMarker(Resources res, int id, HotspotPlace place) {
|
||||||
|
return makeMarker(res.getDrawable(id), place);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MarkerSymbol makeMarker(Drawable drawable, HotspotPlace place) {
|
||||||
if (place == null)
|
if (place == null)
|
||||||
place = HotspotPlace.CENTER;
|
place = HotspotPlace.CENTER;
|
||||||
|
|
||||||
Drawable drawable = res.getDrawable(id);
|
|
||||||
|
|
||||||
return new MarkerSymbol(drawableToBitmap(drawable), place);
|
return new MarkerSymbol(drawableToBitmap(drawable), place);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user