CMLayer
public class CMLayer: NSObject, CMRemoveObserver
Feature layer.
Usage example:
// Create layer
MapController map = ...;
let layer = CMLayer(name: my_layer
, mapController: map, isBaseLayer: true)
// Add feature
Marker marker = ...;
let success = layer.put(feature: marker)
Copyright © 2017 Nexusgeographics All rights reserved.
-
Layer name
Declaration
Swift
public var name: String -
Is base layer
Declaration
Swift
public var isBaseLayer: Bool -
The layer delegate
Declaration
Swift
public var delegate: CMLayerDelegate? -
Undocumented
Declaration
Swift
public class CMLayer: NSObject, CMRemoveObserver -
Undocumented
Declaration
Swift
public class CMLayer: NSObject, CMRemoveObserver
-
Declaration
Swift
public func onRemoved(observable: CMRemoveObservable)Parameters
observable
-
Remove all features
Declaration
Swift
public func clear() -
Check if layer contains feature
Declaration
Swift
public func contains(feature: CMFeature) -> BoolParameters
featureFeature to check
Return Value
True if layer contains feature, otherwise false
-
Gets all layer features
Declaration
Swift
public func getFeatures() -> Set<CMFeature>Return Value
All features
-
Put feature
Declaration
Swift
public func put(feature: CMFeature) -> BoolParameters
featureFeature to add
Return Value
True: success, False: fails
-
Put features
Declaration
Swift
public func put(features: Set<CMFeature>) -> BoolParameters
featuresArray feature to add
Return Value
True: success, False: fails
-
Remove features
Declaration
Swift
public func remove(features: Set<CMFeature>)Parameters
featuresArray features to remove
-
Remove feature
Declaration
Swift
public func remove(feature: CMFeature)Parameters
featureFeature to remove
CMLayer Class Reference