
public class Polygon extends PolyOverlayWithIW
InfoWindow (a bubble).
Mimics the Polygon class from Google Maps Android API v2 as much as possible. Main differences:
- Doesn't support: Z-Index, Geodesic mode
- Supports InfoWindow.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Polygon.OnClickListener |
Overlay.Snappable| Modifier and Type | Field and Description |
|---|---|
protected Polygon.OnClickListener |
mOnClickListener |
mDensity, mFillPaint, mHoles, mOutline, mOutlinePaint, mPathmId, mInfoWindow, mRelatedObject, mSnippet, mSubDescription, mTitlemBounds, SHADOW_X_SKEW, SHADOW_Y_SCALEDEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET| Modifier and Type | Method and Description |
|---|---|
protected boolean |
click(MapView pMapView,
GeoPoint pEventPos) |
int |
getFillColor()
Deprecated.
Use
getFillPaint() instead |
Paint |
getFillPaint() |
List<List<GeoPoint>> |
getHoles()
returns a copy of the holes this polygon contains
|
List<GeoPoint> |
getPoints()
Deprecated.
Use
PolyOverlayWithIW.getActualPoints() instead |
int |
getStrokeColor()
Deprecated.
Use
PolyOverlayWithIW.getOutlinePaint() instead |
float |
getStrokeWidth()
Deprecated.
Use
PolyOverlayWithIW.getOutlinePaint() instead |
boolean |
onClickDefault(Polygon polygon,
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.
|
static ArrayList<GeoPoint> |
pointsAsCircle(GeoPoint center,
double radiusInMeters)
Build a list of GeoPoint as a circle.
|
static ArrayList<IGeoPoint> |
pointsAsRect(BoundingBox rectangle)
Build a list of GeoPoint as a rectangle.
|
static ArrayList<IGeoPoint> |
pointsAsRect(GeoPoint center,
double lengthInMeters,
double widthInMeters)
Build a list of GeoPoint as a rectangle.
|
void |
setFillColor(int fillColor)
Deprecated.
Use
getFillPaint() instead |
void |
setHoles(List<? extends List<GeoPoint>> holes) |
void |
setOnClickListener(Polygon.OnClickListener listener) |
void |
setStrokeColor(int color)
Deprecated.
Use
PolyOverlayWithIW.getOutlinePaint() instead |
void |
setStrokeWidth(float width)
Deprecated.
Use
PolyOverlayWithIW.getOutlinePaint() instead |
addPoint, contains, draw, getActualPoints, getBounds, getCloseTo, getDistance, getInfoWindowLocation, getOutlinePaint, getOutlinePaintLists, isCloseTo, isGeodesic, isVisible, onSingleTapConfirmed, setDefaultInfoWindowLocation, setDensityMultiplier, setDowngradeDisplay, setDowngradePixelSizes, setGeodesic, setInfoWindow, setInfoWindowLocation, setMilestoneManagers, setPoints, setVisible, showInfoWindow, usePathcloseInfoWindow, 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 Polygon.OnClickListener mOnClickListener
public Polygon()
public Polygon(MapView mapView)
@Deprecated public int getFillColor()
getFillPaint() instead@Deprecated public int getStrokeColor()
PolyOverlayWithIW.getOutlinePaint() instead@Deprecated public float getStrokeWidth()
PolyOverlayWithIW.getOutlinePaint() insteadpublic Paint getFillPaint()
getFillPaint in class PolyOverlayWithIW@Deprecated public List<GeoPoint> getPoints()
PolyOverlayWithIW.getActualPoints() instead@Deprecated public void setFillColor(int fillColor)
getFillPaint() instead@Deprecated public void setStrokeColor(int color)
PolyOverlayWithIW.getOutlinePaint() instead@Deprecated public void setStrokeWidth(float width)
PolyOverlayWithIW.getOutlinePaint() insteadpublic List<List<GeoPoint>> getHoles()
public static ArrayList<GeoPoint> pointsAsCircle(GeoPoint center, double radiusInMeters)
center - center of the circleradiusInMeters - public static ArrayList<IGeoPoint> pointsAsRect(BoundingBox rectangle)
rectangle - defined as a BoundingBoxpublic static ArrayList<IGeoPoint> pointsAsRect(GeoPoint center, double lengthInMeters, double widthInMeters)
center - of the rectanglelengthInMeters - on longitudewidthInMeters - on latitudepublic void onDetach(MapView mapView)
OverlayonDetach in class PolyOverlayWithIWpublic boolean onClickDefault(Polygon polygon, MapView mapView, GeoPoint eventPos)
public void setOnClickListener(Polygon.OnClickListener listener)
listener - protected boolean click(MapView pMapView, GeoPoint pEventPos)
click in class PolyOverlayWithIW