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.

  • Remove all features

    Declaration

    Swift

    public func clear()
  • Check if layer contains feature

    Declaration

    Swift

    public func contains(feature: CMFeature) -> Bool

    Parameters

    feature

    Feature 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) -> Bool

    Parameters

    feature

    Feature to add

    Return Value

    True: success, False: fails

  • Put features

    Declaration

    Swift

    public func put(features: Set<CMFeature>) -> Bool

    Parameters

    features

    Array feature to add

    Return Value

    True: success, False: fails

  • Remove features

    Declaration

    Swift

    public func remove(features: Set<CMFeature>)

    Parameters

    features

    Array features to remove

  • Remove feature

    Declaration

    Swift

    public func remove(feature: CMFeature)

    Parameters

    feature

    Feature to remove