
public abstract class PolyOverlayWithIW extends OverlayWithIW
Overlay.Snappable| Modifier and Type | Field and Description |
|---|---|
protected float |
mDensity |
protected Paint |
mFillPaint |
protected List<LinearRing> |
mHoles |
protected LinearRing |
mOutline |
protected Paint |
mOutlinePaint |
protected Path |
mPath |
mId, mInfoWindow, mRelatedObject, mSnippet, mSubDescription, mTitlemBounds, SHADOW_X_SKEW, SHADOW_Y_SCALEDEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET| Modifier | Constructor and Description |
|---|---|
protected |
PolyOverlayWithIW(MapView pMapView,
boolean pUsePath,
boolean pClosePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPoint(GeoPoint p) |
protected abstract boolean |
click(MapView pMapView,
GeoPoint pEventPos) |
boolean |
contains(MotionEvent pEvent)
Used to be if
Polygon
Important note: this function returns correct results only if the Poly has been drawn before,
and if the MapView positioning has not changed. |
void |
draw(Canvas pCanvas,
Projection pProjection) |
List<GeoPoint> |
getActualPoints() |
BoundingBox |
getBounds()
Gets the bounds of the overlay, useful for skipping draw cycles on overlays
that are not in the current bounding box of the view
|
GeoPoint |
getCloseTo(GeoPoint pPoint,
double pTolerance,
MapView pMapView) |
double |
getDistance() |
protected Paint |
getFillPaint() |
GeoPoint |
getInfoWindowLocation() |
Paint |
getOutlinePaint() |
List<PaintList> |
getOutlinePaintLists()
assuming if someone uses this method, someone wants to use List
|
boolean |
isCloseTo(GeoPoint pPoint,
double pTolerance,
MapView pMapView) |
boolean |
isGeodesic() |
boolean |
isVisible() |
void |
onDetach(MapView mapView)
Override to perform clean up of resources before shutdown.
|
boolean |
onSingleTapConfirmed(MotionEvent pEvent,
MapView pMapView)
|
protected void |
setDefaultInfoWindowLocation()
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.
|
void |
setDensityMultiplier(float pDensityMultiplier) |
void |
setDowngradeDisplay(boolean pDowngradeDisplay) |
void |
setDowngradePixelSizes(int pPolySize,
int pRectangleSize) |
void |
setGeodesic(boolean geodesic)
Sets whether to draw each segment of the line as a geodesic or not.
|
void |
setInfoWindow(InfoWindow infoWindow)
Set the InfoWindow to be used.
|
void |
setInfoWindowLocation(GeoPoint location)
Sets the info window anchor point to a geopoint location
|
void |
setMilestoneManagers(List<MilestoneManager> pMilestoneManagers) |
void |
setPoints(List<GeoPoint> points) |
void |
setVisible(boolean visible) |
void |
showInfoWindow()
Show the infowindow, if any.
|
void |
usePath(boolean pUsePath) |
closeInfoWindow, getId, getInfoWindow, getRelatedObject, getSnippet, getSubDescription, getTitle, isInfoWindowOpen, onDestroy, setId, setRelatedObject, setSnippet, setSubDescription, setTitledraw, drawAt, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onLongPress, onPause, onResume, onScroll, onShowPress, onSingleTapUp, onTouchEvent, onTrackballEvent, setEnabledprotected LinearRing mOutline
protected List<LinearRing> mHoles
protected Paint mOutlinePaint
protected Paint mFillPaint
protected Path mPath
protected float mDensity
protected PolyOverlayWithIW(MapView pMapView, boolean pUsePath, boolean pClosePath)
public void usePath(boolean pUsePath)
public void setVisible(boolean visible)
public boolean isVisible()
public Paint getOutlinePaint()
public List<PaintList> getOutlinePaintLists()
protected Paint getFillPaint()
public void setGeodesic(boolean geodesic)
public boolean isGeodesic()
public void setInfoWindow(InfoWindow infoWindow)
setInfoWindow in class OverlayWithIWinfoWindow - the InfoWindow to be opened when tapping the overlay.
This InfoWindow MUST be able to handle an OverlayWithIW (as BasicInfoWindow does).
Set it to null to remove an existing InfoWindow.public void showInfoWindow()
public void setInfoWindowLocation(GeoPoint location)
public GeoPoint getInfoWindowLocation()
public void setMilestoneManagers(List<MilestoneManager> pMilestoneManagers)
public double getDistance()
protected void setDefaultInfoWindowLocation()
public void draw(Canvas pCanvas, Projection pProjection)
public void onDetach(MapView mapView)
Overlaypublic BoundingBox getBounds()
Overlaypublic void addPoint(GeoPoint p)
public List<GeoPoint> getActualPoints()
public void setDowngradeDisplay(boolean pDowngradeDisplay)
setDowngradePixelSizes(int, int)public void setDowngradePixelSizes(int pPolySize,
int pRectangleSize)
pPolySize - Size in pixels below which we will display an optimized list of segmentspRectangleSize - Size in pixels below which we will display a mere rectangle (faster);
supposed to be lower than pPolySizesetDowngradeDisplay(boolean)public void setDensityMultiplier(float pDensityMultiplier)
Polylinepublic boolean contains(MotionEvent pEvent)
Polygon
Important note: this function returns correct results only if the Poly has been drawn before,
and if the MapView positioning has not changed.public boolean isCloseTo(GeoPoint pPoint, double pTolerance, MapView pMapView)
pTolerance - in pixelsPolyline
Detection is done is screen coordinates.public GeoPoint getCloseTo(GeoPoint pPoint, double pTolerance, MapView pMapView)
pTolerance - in pixelsPolyline
Detection is done is screen coordinates.public boolean onSingleTapConfirmed(MotionEvent pEvent, MapView pMapView)
Polyline and Polygon
Default listener for a single tap event on a Poly:
set the infowindow at the tapped position, and open the infowindow (if any).onSingleTapConfirmed in class Overlay