Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save josefadamcik/56823b0c23f4dd9c13d1977a02bc4dea to your computer and use it in GitHub Desktop.
Save josefadamcik/56823b0c23f4dd9c13d1977a02bc4dea to your computer and use it in GitHub Desktop.
SO: comment - osmdroid markers
public class PPSimpleFastPointOverlayActivity extends SimpleFastPointOverlay {
private Bitmap mIcon;
public PPSimpleFastPointOverlayActivity(PointAdapter pointList, SimpleFastPointOverlayOptions style) {
super(pointList, style);
}
public PPSimpleFastPointOverlayActivity(PointAdapter pointList) {
super(pointList);
}
protected void drawPointAt(Canvas canvas, float x, float y, boolean showLabel, String label, Paint pointStyle, Paint textStyle){
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inSampleSize = 1;
if (mBitmap == null) {
//lazy initializatoin
mBitmap = BitmapFactory.decodeResource(PPSession.getContainerContext().getResources(), R.drawable.logo_small, opt);
}
canvas.drawBitmap(mBitmap, x, y, pointStyle);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment