PolygonDataBuilder
public class PolygonDataBuilder
extension PolygonDataBuilder: NativeBase
extension PolygonDataBuilder: Hashable
Builder of PolygonData instances.
The builder can create PolygonData instances for polygons with an outer boundary and
optionally one or more inner boundaries (holes).
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
-
Creates a builder instance.
Declaration
Swift
public init() -
Configures the builder with geometry for the polygon to be created.
Declaration
Swift
public func withGeometry(_ geometry: GeoPolygon) -> PolygonDataBuilderParameters
geometryGeometry of the polygon. The outer boundary has to be ordered clockwise and closed. Any inner boundary has to be ordered counterclockwise and closed. Altitude of boundary vertices is ignored. The visual behaviour for self-intersecting outer boundary is undefined.
Return Value
The builder.
-
Configures the builder with custom attributes for polygon to be created.
Declaration
Swift
public func withAttributes(_ attributes: DataAttributes) -> PolygonDataBuilderParameters
attributesCustom data attributes to be associated with the polygon.
Return Value
The builder.
-
Builds an instance of
PolygonDataand resets the builder instance.Declaration
Swift
public func build() -> PolygonDataReturn Value
Instance of
PolygonDatacreated with the configured parameters.