MaplyVectorStyleDelegate
Objective-C
@protocol MaplyVectorStyleDelegate <NSObject>
Swift
protocol MaplyVectorStyleDelegate : NSObjectProtocol
Protocol for styling the vectors.
You pass in an object which adheres to this protocol and will style the vectors read by a MaplyMapnikVectorTiles object. In general, this will be a parsed Mapnik vector file, but you can substitute your own logic as well.
-
Return the styles that apply to the given feature (attributes).
Declaration
Objective-C
- (nullable NSArray *) stylesForFeatureWithAttributes:(NSDictionary *_Nonnull)attributes onTile:(MaplyTileID)tileID inLayer:(NSString *_Nonnull)layer viewC:(NSObject<MaplyRenderControllerProtocol> *_Nonnull)viewC;
Swift
func stylesForFeature(attributes: [AnyHashable : Any] = [:], onTile tileID: MaplyTileID, inLayer layer: String, viewC: NSObjectProtocol & MaplyRenderControllerProtocol) -> [Any]?
-
Return true if the given layer is meant to display for the given tile (zoom level)
Declaration
Objective-C
- (BOOL)layerShouldDisplay:(NSString *_Nonnull)layer tile:(MaplyTileID)tileID;
Swift
func layerShouldDisplay(_ layer: String, tile tileID: MaplyTileID) -> Bool
-
Return the style associated with the given UUID.
Declaration
Objective-C
- (nullable NSObject<MaplyVectorStyle> *) styleForUUID:(long long)uiid viewC:(NSObject<MaplyRenderControllerProtocol> *_Nonnull)viewC;
Swift
func style(forUUID uiid: Int64, viewC: NSObjectProtocol & MaplyRenderControllerProtocol) -> MaplyVectorStyle?
-
Return the style for the background
Declaration
Objective-C
- (nullable NSObject<MaplyVectorStyle> *)backgroundStyleViewC: (NSObject<MaplyRenderControllerProtocol> *_Nonnull)viewC;
Swift
func backgroundStyleViewC(_ viewC: NSObjectProtocol & MaplyRenderControllerProtocol) -> MaplyVectorStyle?
-
Undocumented
Declaration
Objective-C
- (NSArray * __nonnull)allStyles;
Swift
func allStyles() -> [Any]