-
@Deprecated() public class OsmPath extends Path
Since the osmdroid canvas coordinate system is changing with every scroll, the x/y coordinates of lat/long points is also always changing. Converting from lat/long to pixel values is a potentially expensive operation and shouldn't be performed in the draw() cycle. Instead of recalculating your Path points every draw cycle, you can use an OsmPath and call onDrawCycle at the start of your draw call. This will simply shift the Path the proper amount so that it is in the correct pixel position.
-
-
Method Summary
Modifier and Type Method Description voidonDrawCycle(Projection proj)Call this method at the beginning of every draw() call. -
Methods inherited from class android.graphics.Path
addArc, addCircle, addOval, addPath, addRect, addRoundRect, approximate, arcTo, close, computeBounds, cubicTo, getFillType, incReserve, isConvex, isEmpty, isInverseFillType, isRect, lineTo, moveTo, offset, op, quadTo, rCubicTo, rLineTo, rMoveTo, rQuadTo, reset, rewind, set, setFillType, setLastPoint, toggleInverseFillType, transform -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
OsmPath
OsmPath()
-
OsmPath
OsmPath(Path src)
-
-
Method Detail
-
onDrawCycle
void onDrawCycle(Projection proj)
Call this method at the beginning of every draw() call.
-
-
-
-