PolygonDataAccessor

public class PolygonDataAccessor
extension PolygonDataAccessor: NativeBase
extension PolygonDataAccessor: Hashable

Polygon data accessor used for manipulating polygons that are part of a PolygonDataSource.

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.

  • Gets polygon geometry.

    Declaration

    Swift

    public func getGeometry() -> GeoPolygon

    Return Value

    The polygon geometry.

  • Gets polygon attributes accessor.

    Declaration

    Swift

    public func getAttributes() -> DataAttributesAccessor

    Return Value

    The polygon attributes accessor.

  • Replaces polygon geometry. The outer boundary has to be ordered clockwise and closed.

    Altitude of the vertices is ignored.

    The visual behaviour for self-intersecting outer boundary is undefined.

    Declaration

    Swift

    public func setGeometry(_ geometry: GeoPolygon)

    Parameters

    geometry

    Geometry of the polygon. The outer boundary has to be ordered clockwise and closed. Altitude of the vertices is ignored. The visual behaviour for self-intersecting outer boundary is undefined.

  • Replaces polygon attributes.

    Declaration

    Swift

    public func setAttributes(_ attributes: DataAttributes)

    Parameters

    attributes

    The attributes.