
public class Polyline extends PolyOverlayWithIW
| Modifier and Type | Class and Description |
|---|---|
static interface |
Polyline.OnClickListener
Internal method used to ensure that the infowindow will have a default position in all cases,
so that the user can call showInfoWindow even if no tap occured before.
|
Overlay.Snappable| Modifier and Type | Field and Description |
|---|---|
protected Polyline.OnClickListener |
mOnClickListener |
mDensity, mFillPaint, mHoles, mOriginalPoints, mOutline, mOutlinePaint, mPathmId, mInfoWindow, mRelatedObject, mSnippet, mSubDescription, mTitlemBounds, SHADOW_X_SKEW, SHADOW_Y_SCALEDEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET| Constructor and Description |
|---|
Polyline()
If MapView is not provided, infowindow popup will not function unless you set it yourself.
|
Polyline(MapView mapView)
If MapView is null, infowindow popup will not function unless you set it yourself.
|
Polyline(MapView pMapView,
boolean pUsePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPoint(GeoPoint p)
Add the point at the end.
|
GeoPoint |
getCloseTo(GeoPoint point,
double tolerance,
MapView mapView) |
int |
getColor()
Deprecated.
Use {
PolyOverlayWithIW.getOutlinePaint()} instead |
double |
getDistance() |
Paint |
getPaint()
Deprecated.
Use {
PolyOverlayWithIW.getOutlinePaint()} instead |
ArrayList<GeoPoint> |
getPoints() |
float |
getWidth()
Deprecated.
Use {
PolyOverlayWithIW.getOutlinePaint()} instead |
boolean |
isCloseTo(GeoPoint point,
double tolerance,
MapView mapView)
Detection is done is screen coordinates.
|
boolean |
onClickDefault(Polyline polyline,
MapView mapView,
GeoPoint eventPos)
default behaviour when no click listener is set
|
void |
onDetach(MapView mapView)
Override to perform clean up of resources before shutdown.
|
boolean |
onSingleTapConfirmed(MotionEvent event,
MapView mapView)
By default does nothing (
return false). |
void |
setColor(int color)
Deprecated.
Use {
PolyOverlayWithIW.getOutlinePaint()} instead |
void |
setDensityMultiplier(float multiplier) |
void |
setOnClickListener(Polyline.OnClickListener listener) |
void |
setPoints(List<GeoPoint> points)
Set the points.
|
void |
setWidth(float width)
Deprecated.
Use {
PolyOverlayWithIW.getOutlinePaint()} instead |
draw, getFillPaint, getInfoWindowLocation, getOutlinePaint, isGeodesic, isVisible, setDefaultInfoWindowLocation, setGeodesic, setInfoWindow, setInfoWindowLocation, setMilestoneManagers, setVisible, showInfoWindowcloseInfoWindow, getId, getInfoWindow, getRelatedObject, getSnippet, getSubDescription, getTitle, isInfoWindowOpen, onDestroy, setId, setRelatedObject, setSnippet, setSubDescription, setTitledraw, drawAt, getBounds, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onLongPress, onPause, onResume, onScroll, onShowPress, onSingleTapUp, onTouchEvent, onTrackballEvent, setEnabledprotected Polyline.OnClickListener mOnClickListener
public Polyline()
public Polyline(MapView mapView)
public Polyline(MapView pMapView, boolean pUsePath)
pUsePath - true if you want the drawing to use Path instead of Canvas.drawLines
Not recommended in all cases, given the performances.
Useful though if you want clean alpha vertices
cf. https://github.com/osmdroid/osmdroid/issues/1280@Deprecated public int getColor()
PolyOverlayWithIW.getOutlinePaint()} instead@Deprecated public float getWidth()
PolyOverlayWithIW.getOutlinePaint()} instead@Deprecated public Paint getPaint()
PolyOverlayWithIW.getOutlinePaint()} instead@Deprecated public void setColor(int color)
PolyOverlayWithIW.getOutlinePaint()} instead@Deprecated public void setWidth(float width)
PolyOverlayWithIW.getOutlinePaint()} insteadpublic void setOnClickListener(Polyline.OnClickListener listener)
public void setDensityMultiplier(float multiplier)
public void setPoints(List<GeoPoint> points)
public void addPoint(GeoPoint p)
public boolean isCloseTo(GeoPoint point, double tolerance, MapView mapView)
point - tolerance - in pixelspublic GeoPoint getCloseTo(GeoPoint point, double tolerance, MapView mapView)
point - tolerance - in pixelspublic boolean onSingleTapConfirmed(MotionEvent event, MapView mapView)
Overlayreturn false). If you handled the Event, return true
, otherwise return false. If you returned true none of the following Overlays
or the underlying MapView has the chance to handle this event.onSingleTapConfirmed in class Overlaypublic boolean onClickDefault(Polyline polyline, MapView mapView, GeoPoint eventPos)
public void onDetach(MapView mapView)
OverlayonDetach in class PolyOverlayWithIWpublic double getDistance()
getDistance in class PolyOverlayWithIW