Created
August 7, 2018 10:31
-
-
Save josefadamcik/56823b0c23f4dd9c13d1977a02bc4dea to your computer and use it in GitHub Desktop.
SO: comment - osmdroid markers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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