Polygon
A polygon on the map: a closed shape with optional holes.
The polygon is a live handle, as returned by OpenMapView.addPolygon: setting a property, e.g. polygon.strokeWidth = 16f, redraws the map right away, and remove takes it off the map. Java code uses the getters and setters, e.g. polygon.setStrokeColor(0xFFFF0000).
Parameters
the geographic coordinates of the outline, at least 3; the last point connects to the first
the outline color
the outline width in pixels
the stroke pattern, e.g. dashed; null for a solid line
the stroke pattern as dots, dashes and gaps, used instead of strokePattern if not null
the shape of line ends
the shape of the corners
the color of the interior
holes cut out of the interior, each with at least 3 points
whether segments are drawn as great-circle paths instead of straight lines on the Mercator map
whether the polygon is visible
whether a tap on the polygon is reported to its click listener
draw order: polygons with a higher zIndex are drawn on top
optional user data
Constructors
Properties
fillColor as an ARGB color int, e.g. for Java code.
The stroke pattern as dots, dashes and gaps, used instead of strokePattern if not null
The outline color
strokeColor as an ARGB color int, e.g. for Java code.
The shape of the corners
The stroke pattern, e.g. dashed; null for a solid line
The outline width in pixels
Functions
Returns a new polygon with the given properties changed, not added to any map.
The fill color as an ARGB color int, like getFillColor() of the Maps SDK.
The shape of line ends as a Cap, e.g. for Java code.
The stroke color as an ARGB color int, like getStrokeColor() of the Maps SDK.
The shape of the corners as a JointType constant, like getStrokeJointType() of the Maps SDK.
Sets the fill color from an ARGB color int, like setFillColor(int) of the Maps SDK.
Sets the shape of line ends, e.g. setStrokeCap(new RoundCap()) from Java.
Sets the stroke color from an ARGB color int, like setStrokeColor(int) of the Maps SDK.
Sets the shape of the corners from a JointType constant, like setStrokeJointType(int) of the Maps SDK.
Sets strokePattern from an android.graphics.PathEffect, e.g. a DashPathEffect from Java.
Sets pattern from dots, dashes and gaps, like setStrokePattern(List) of the Maps SDK.