PolygonOverlay
public protocol PolygonOverlay : Annotation
A polygon overlay can be built by setting the outer area color and adding inner polygons. Only one inner polygon is supported, but the inner polygons can be nested. Example:
let innerOptions = InnerPolygonOptions(fillColor: .red
coordinates: coordinates)
innerOptions.nestedPolygonOptions = InnerPolygonOptions(
fillColor: UIColor.blue,
coordinates: coordinates
)
let polygonOptions = PolygonOverlayOptions(outerColor: .green,
innerPolygonOptions: innerOptions)
try? mapView.map.addPolygonOverlay(options: polygonOptions)
}
-
Color that will be used to fill outer area of the polygon.
Declaration
Swift
var outerColor: PolygonOverlayOptions.Color { get }