AWFMapOverlayFactory
Objective-C
@protocol AWFMapOverlayFactory <NSObject>
Swift
protocol AWFMapOverlayFactory : NSObjectProtocol
The AWFMapOverlayFactory protocol is adopted by an object that provides the necessary overlay and annotation objects required for rendering
elements using a specific mapping strategy.
-
Returns an array of overlay objects for a series of
AWFGeographicObjectinstances.Declaration
Objective-C
- (nonnull NSArray *)overlaysFromObjects:(nonnull NSArray *)objects;Swift
func overlays(from objects: [Any]) -> [Any]Parameters
objectsAn array of
AWFGeographicObjectinstances to create overlays forReturn Value
An array of overlay objects
-
Returns an array of polygon overlay objects for a series of
AWFGeographicObjectinstances. These objects must have a valid polygon string orAWFGeoPolygoninstance in order for a polygon to be created for it.Declaration
Objective-C
- (nonnull NSArray<NSObject<AWFPolygon> *> *)polygonsFromObjects: (nonnull NSArray *)objects;Parameters
objectsAn array of
AWFGeographicObjectinstances to create polygon overlays forReturn Value
An array of polygon objects
-
Returns an array of polyline overlay objects for a series of
AWFGeographicObjectinstances. These objects must have a valid polyline string orAWFGeoPolygoninstance in order for a polyline to be created for it.Declaration
Objective-C
- (nonnull NSArray<NSObject<AWFPolyline> *> *)polylinesFromObjects: (nonnull NSArray *)objects;Parameters
objectsAn array of
AWFGeographicObjectinstances to create polyline overlays forReturn Value
An array of polyline objects
-
Returns an array of polygon overlay objects for a series of
AWFGeoPolygoninstances.Declaration
Objective-C
- (nonnull NSArray *)polygonsFromGeoPolygons:(nonnull NSArray *)geoPolygons;Swift
func polygons(fromGeoPolygons geoPolygons: [Any]) -> [Any]Parameters
geoPolygonsAn array of
AWFGeoPolygonobjects to create polygon overlays forReturn Value
An array of polygon objects
-
Returns an array of polyline overlay objects for a series of
AWFGeoPolygoninstances.Declaration
Objective-C
- (nonnull NSArray *)polylinesFromGeoPolygons:(nonnull NSArray *)geoPolygons;Swift
func polylines(fromGeoPolygons geoPolygons: [Any]) -> [Any]Parameters
geoPolygonsAn array of
AWFGeoPolygonobjects to create polyline overlays forReturn Value
An array of polyline objects
-
Returns a single overlay object that conforms to the
AWFMultiShapeOverlayprotocol for managing and rendering multiple polygons and polylines into a single overlay renderer.Declaration
Objective-C
- (nonnull id) combinedOverlayForPolygons:(nonnull NSArray<id<AWFPolygon>> *)polygons polylines:(nonnull NSArray<id<AWFPolyline>> *)polylines;Parameters
polygonsAn array of polygons to add to the overlay.
polylinesAn array of polylines to add to the overlay.
Return Value
The multi-shape overlay instance
-
Iterates through an array of polygon objects and returns an array of polygon overlays that the strategy’s map view requires when adding to the map. This method will pull out the overlay instances stored within
AWFPolygonandAWFPolylineobjects in order to add them to the map view.Declaration
Objective-C
- (nonnull NSArray *)reducePolygonsToMapPolygons:(nonnull NSArray *)polygons;Swift
func reducePolygons(toMapPolygons polygons: [Any]) -> [Any]Parameters
polygonsAn array of polygon objects.
Return Value
An array of polygon overlay instances that can be added to the map view.
-
Returns a tile data layer initialized with the
URLTemplateto use for tile URLs.Declaration
Objective-C
- (nonnull AWFTileSource *)tileOverlayWithURLTemplate: (nonnull NSString *)URLTemplate;Swift
func tileOverlay(withURLTemplate URLTemplate: String) -> AWFTileSourceParameters
URLTemplateThe template for generating tile URLs
Return Value
An initialized tile data source object
-
Returns a tile source initialized with the
URLTemplateto use for tile URLs.Declaration
Objective-C
- (nonnull AWFTileSource *)tileOverlayWithURLTemplate: (nonnull NSString *)URLTemplate isAmp:(BOOL)isAmp;Swift
func tileOverlay(withURLTemplate URLTemplate: String, isAmp: Bool) -> AWFTileSourceParameters
URLTemplateThe template for generating tile URLs
isAmpWhether or not the returned source should be an AMP tile source
Return Value
An initialized tile data source object
-
Returns an array of annotation objects for a series of
AWFGeographicObjectinstances. These objects must have a valid coordinate in order for an annotation to be created for it.Declaration
Objective-C
- (nonnull NSArray *)annotationsFromObjects:(nonnull NSArray *)objects;Swift
func annotations(from objects: [Any]) -> [Any]Parameters
objectsAn array of
AWFGeographicObjectinstances to create annotations forReturn Value
An array of annotation objects
-
Returns an array of text annotation objects for a series of
AWFGeographicObjectinstances. These objects must have a valid coordinate in order for an annotation to be created for it.Declaration
Objective-C
- (nonnull NSArray *)textAnnotationsFromObjects:(nonnull NSArray *)objects;Swift
func textAnnotations(from objects: [Any]) -> [Any]Parameters
objectsAn array of
AWFGeographicObjectinstances to create annotations forReturn Value
An array of annotation objects
View on GitHub
AWFMapOverlayFactory Protocol Reference