TTMapLayer
Objective-C
@interface TTMapLayer : NSObject
Swift
class TTMapLayer : NSObject
TTMapLayer class that represents map layer.
-
Creates a layer based on provided JSON style.
Declaration
Objective-C
+ (TTMapLayer *_Nullable)createWithStyleJSON:(NSString *_Nonnull)styleJSON withMap:(TTMapView *_Nonnull)mapView;
Swift
class func create(withStyleJSON styleJSON: String, withMap mapView: TTMapView) -> TTMapLayer?
Parameters
styleJSON
NSString defining properties of exactly one layer.
Return Value
TTMapLayer newly created layer or nil when json cant be parsed.
-
Returns the id (a human-readable name) of the layer.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull ID;
Swift
var id: String { get }
-
Returns the id (a human-readable name) of the source of data for this layer.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull sourceID;
Swift
var sourceID: String { get }
-
Returns the id of the source layer of this layer.
Declaration
Objective-C
@property (nonatomic) NSString *_Nonnull sourceLayerID;
Swift
var sourceLayerID: String { get set }
-
Returns the visibility of this layer.
Declaration
Objective-C
@property (nonatomic) TTMapLayerVisibility visibility;
Swift
var visibility: TTMapLayerVisibility { get set }
-
Returns the smallest zoom value the layer is visible at.
Declaration
Objective-C
@property (nonatomic) double minZoom;
Swift
var minZoom: Double { get set }
-
Returns the largest zoom value the layer is visible at.
Declaration
Objective-C
@property (nonatomic) double maxZoom;
Swift
var maxZoom: Double { get set }