
public class Polyline extends OverlayWithIW
| Modifier and Type | Class and Description |
|---|---|
static interface |
Polyline.OnClickListener |
Overlay.Snappable| Modifier and Type | Field and Description |
|---|---|
protected boolean |
mGeodesic |
protected Polyline.OnClickListener |
mOnClickListener |
protected Paint |
mPaint |
boolean |
mRepeatPath |
mInfoWindow, mRelatedObject, mSnippet, mSubDescription, mTitleSHADOW_X_SKEW, SHADOW_Y_SCALEDEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET| Constructor and Description |
|---|
Polyline() |
Polyline(Context ctx)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addGreatCircle(GeoPoint startPoint,
GeoPoint endPoint,
int numberOfPoints) |
protected void |
addPoint(GeoPoint aPoint) |
protected void |
addPoint(int aLatitudeE6,
int aLongitudeE6) |
protected void |
clearPath() |
void |
draw(Canvas canvas,
MapView mapView,
boolean shadow)
Draw the overlay over the map.
|
protected void |
drawOld(Canvas canvas,
MapView mapView,
boolean shadow) |
int |
getColor() |
int |
getNumberOfPoints() |
Paint |
getPaint() |
List<GeoPoint> |
getPoints() |
float |
getWidth() |
boolean |
isCloseTo(GeoPoint point,
double tolerance,
MapView mapView)
Detection is done is screen coordinates.
|
boolean |
isGeodesic() |
boolean |
isVisible() |
protected 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). |
protected void |
precomputePoints(Projection pj) |
void |
setColor(int color) |
void |
setGeodesic(boolean geodesic)
Sets whether to draw each segment of the line as a geodesic or not.
|
void |
setOnClickListener(Polyline.OnClickListener listener) |
void |
setPoints(List<GeoPoint> points)
Set the points.
|
void |
setVisible(boolean visible) |
void |
setWidth(float width) |
void |
showInfoWindow(GeoPoint position) |
closeInfoWindow, getInfoWindow, getRelatedObject, getSnippet, getSubDescription, getTitle, isInfoWindowOpen, onDestroy, setInfoWindow, setRelatedObject, setSnippet, setSubDescription, setTitledrawAt, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onLongPress, onScroll, onShowPress, onSingleTapUp, onTouchEvent, onTrackballEvent, setEnabledprotected boolean mGeodesic
protected Paint mPaint
public boolean mRepeatPath
protected Polyline.OnClickListener mOnClickListener
@Deprecated public Polyline(Context ctx)
Polyline() insteadpublic Polyline()
protected void clearPath()
protected void addPoint(GeoPoint aPoint)
protected void addPoint(int aLatitudeE6,
int aLongitudeE6)
public int getNumberOfPoints()
public int getColor()
public float getWidth()
public Paint getPaint()
public boolean isVisible()
public boolean isGeodesic()
public void setColor(int color)
public void setWidth(float width)
public void setVisible(boolean visible)
public void setOnClickListener(Polyline.OnClickListener listener)
protected void addGreatCircle(GeoPoint startPoint, GeoPoint endPoint, int numberOfPoints)
public void setPoints(List<GeoPoint> points)
public void setGeodesic(boolean geodesic)
protected void precomputePoints(Projection pj)
protected void drawOld(Canvas canvas,
MapView mapView,
boolean shadow)
public void draw(Canvas canvas,
MapView mapView,
boolean shadow)
Overlaypublic boolean isCloseTo(GeoPoint point, double tolerance, MapView mapView)
point - tolerance - in pixelspublic void showInfoWindow(GeoPoint position)
public 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 Overlayprotected boolean onClickDefault(Polyline polyline, MapView mapView, GeoPoint eventPos)