PolygonOverlay

public class 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)

}

Important

This is a Public Preview API. It may be changed or removed at any time.
  • A unique ID to identify a specific annotation.

    Declaration

    Swift

    public let annotationID: String
  • tag

    The name or title of the annotation.

    Declaration

    Swift

    public var tag: String?
  • Indicates if a given annotation can produce delegate call on MapDelegate.

    Declaration

    Swift

    public var isSelectable: Bool
  • Color that will be used to fill outer area of the polygon.

    Declaration

    Swift

    public var outerColor: PolygonOverlayOptions.Color { get }