TTMapStyle
Objective-C
@interface TTMapStyle : NSObject
Swift
class TTMapStyle : NSObject
TTMapStyle class that represents map style.
-
Add a layer to the style. The layer is added above all existing layers.
Declaration
Objective-C
- (void)addLayer:(TTMapLayer *_Nonnull)layer withReference:(NSString *_Nonnull)reference;Swift
func add(_ layer: TTMapLayer, withReference reference: String)Parameters
layerTTMapLayer.
referenceReference ID of Layer.
-
Removes the layer with provided id from the style.
Declaration
Objective-C
- (TTMapLayer *_Nonnull)removeLayer:(NSString *_Nonnull)ID;Swift
func removeLayer(_ ID: String) -> TTMapLayerParameters
IDremoved map layer.
Return Value
TTMapLayer
-
Moves the layer before provided id from the style.
Declaration
Objective-C
- (void)moveLayer:(NSString *_Nonnull)ID behindLayer:(NSString *_Nonnull)referenceID;Swift
func moveLayer(_ ID: String, behindLayer referenceID: String)Parameters
IDid the id of the layer to be moved.
referenceIdthe id of the layer this layer is to be moved behind.
-
Moves given layer to front.
Declaration
Objective-C
- (void)moveLayerToFrontWithId:(NSString *_Nonnull)ID;Swift
func moveLayerToFront(withId ID: String)Parameters
IDid the id of the layer to be moved.
-
Moves given layer to front.
Declaration
Objective-C
- (void)moveLayerToFront:(TTMapLayer *_Nonnull)mapLayer;Swift
func moveLayer(toFront mapLayer: TTMapLayer)Parameters
mapLayerTTMapLayer to be moved.
-
Returns the array of TTMapLayer.
Declaration
Objective-C
- (NSArray<TTMapLayer *> *_Nonnull)getLayers;Swift
func getLayers() -> [TTMapLayer]Return Value
NSArray
* -
Provides access to the layer with provided id if such layer is present in the style.
Declaration
Objective-C
- (TTMapLayer *_Nullable)getLayerByID:(NSString *_Nonnull)ID;Swift
func getLayerByID(_ ID: String) -> TTMapLayer?Parameters
IDID of Layer.
Return Value
TTMapLayer*
-
Provides access to the array of layer with provided regex if such layers are present in the style.
Declaration
Objective-C
- (NSArray<TTMapLayer *> *_Nonnull)getLayersByRegex:(NSString *_Nonnull)regex;Swift
func getLayersByRegex(_ regex: String) -> [TTMapLayer]Parameters
regexregex.
Return Value
NSArray
*. -
Provides access to the array of layer with provided regex if such layers are present in the style.
Declaration
Objective-C
- (NSArray<TTMapLayer *> *_Nonnull)getLayersBySourceLayerRegex: (NSString *_Nonnull)regexs;Swift
func getLayersBySourceLayerRegex(_ regexs: String) -> [TTMapLayer]Parameters
regexsregexs.
Return Value
NSArray
*. -
Provides access to the array of layer with provided regex if such layers are present in the style.
Declaration
Objective-C
- (NSArray<TTMapLayer *> *_Nonnull)getLayersByRegexs: (NSArray<NSString *> *_Nonnull)regexs;Swift
func getLayersByRegexs(_ regexs: [String]) -> [TTMapLayer]Parameters
regexsregexs
Return Value
NSArray
*. -
Provides access to the array of layer with provided regex if such layers are present in the style.
Declaration
Objective-C
- (NSArray<TTMapLayer *> *_Nonnull)getLayersBySourceLayerRegexs: (NSArray<NSString *> *_Nonnull)regex;Swift
func getLayersBySourceLayerRegexs(_ regex: [String]) -> [TTMapLayer]Parameters
regexregex description
Return Value
NSArray
*.
-
Adds a source to the style.
Declaration
Objective-C
- (void)addSource:(TTMapSource *_Nonnull)source;Swift
func add(_ source: TTMapSource)Parameters
sourceTTMapSource.
-
Removes the source with provided id from the style.
Declaration
Objective-C
- (void)removeSource:(NSString *_Nonnull)ID withVisitor:(id<TTMapSourceVisitor> _Nullable)visitor;Swift
func removeSource(_ ID: String, with visitor: TTMapSourceVisitor?)Parameters
IDID of Source.
visitorTTMapSourceVisitor protocol.
-
Gets the source with provided id from the style.
Declaration
Objective-C
- (void)getSource:(NSString *_Nonnull)ID withVisitor:(id<TTMapSourceVisitor> _Nonnull)visitor;Swift
func getSource(_ ID: String, with visitor: TTMapSourceVisitor)Parameters
IDID of Source.
visitorTTMapSourceVisitor protocol.
-
Adds a image to the style.
Declaration
Objective-C
- (void)addImage:(id)image withID:(NSString *_Nonnull)ID;Swift
func addImage(_ image: Any!, withID ID: String)Parameters
imageUIImage.
IDof image.
-
Removes the image with provided id from the style.
Declaration
Objective-C
- (void)removeImage:(NSString *_Nonnull)ID;Swift
func removeImage(_ ID: String)Parameters
IDID of Image.
-
Return to the image with provided id if such image is present in the style.
Declaration
Objective-C
- (id)getImage:(NSString *_Nonnull)ID;Swift
func getImage(_ ID: String) -> Any!Parameters
IDID of Image.
Return Value
UIImage.
-
Return true if layer exists.
Declaration
Objective-C
- (_Bool)layerExists:(TTMapLayer *_Nonnull)layer;Swift
func layerExists(_ layer: TTMapLayer) -> BoolParameters
layerTTMapLayer.
Return Value
true if layer exists.
-
Return true if source exists.
Declaration
Objective-C
- (_Bool)sourceExists:(TTMapSource *_Nonnull)source;Swift
func sourceExists(_ source: TTMapSource) -> BoolParameters
sourceTTMapSource.
Return Value
true if source exists.
TTMapStyle Class Reference