PolygonDataSourceBuilder
public class PolygonDataSourceBuilder
extension PolygonDataSourceBuilder: NativeBase
extension PolygonDataSourceBuilder: Hashable
Builder of the polygons data source.
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 data source builder instance in the given context.
Declaration
Swift
public init(_ context: MapContext)Parameters
contextMap context to associate the data source with.
-
Configures the builder to use the given name for data source.
Declaration
Swift
public func withName(_ dataSourceName: String) -> PolygonDataSourceBuilderParameters
dataSourceNameName of the created data source. Must be unique.
Return Value
This data source builder instance.
-
Configures the builder to insert the given polygon in the data source.
Declaration
Swift
public func withPolygon(_ polygon: PolygonData) -> PolygonDataSourceBuilderParameters
polygonThe polygon to add.
Return Value
This data source builder instance.
-
Configures the builder to insert the given polygons in the data source.
Declaration
Swift
public func withPolygons(_ polygon: [PolygonData]) -> PolygonDataSourceBuilderParameters
polygonThe polygons to add.
Return Value
This data source builder instance.
-
Builds a PolygonDataSource instance.
Declaration
Swift
public func build() -> PolygonDataSourceReturn Value
Instance of the data source created with given polygons and attributes.