MSFLocalVectorDataSource

Objective-C


@interface MSFLocalVectorDataSource : MSFVectorDataSource

Swift

class MSFLocalVectorDataSource : MSFVectorDataSource

A modifiable vector data source that keeps all the elements in the local memory. Optionally vector elements can be kept in a spatial index and only the visible elements get rendered. There can be a small delay before previously invisible elements become visible after view changes. This makes it suitable for cases where there are a large number of static vector elements.

The draw order of vector elements within the data source is undefined.

  • Constructs an LocalVectorDataSource object with no spatial index.

    Declaration

    Objective-C

    - (id)initWithProjection:(MSFProjection *)projection;

    Swift

    init!(projection: MSFProjection!)

    Parameters

    projection

    The projection used by this data source.

  • Constructs an LocalVectorDataSource object with specified spatial index.

    Declaration

    Objective-C

    - (id)initWithProjection:(MSFProjection *)projection
            spatialIndexType:(enum MSFLocalSpatialIndexType)spatialIndexType;

    Swift

    init!(projection: MSFProjection!, spatialIndexType: MSFLocalSpatialIndexType)

    Parameters

    projection

    The projection used by this data source.

    spatialIndexType

    The spatial index type to use.

  • Clear the data source by removing all elements.

    Declaration

    Objective-C

    - (void)clear;

    Swift

    func clear()
  • Returns all vector elements added to this data source using add() and addAll() methods.

    Declaration

    Objective-C

    - (MSFVectorElementVector *)getAll;

    Swift

    func getAll() -> MSFVectorElementVector!

    Return Value

    A vector containing all the vector elements in this data source.

  • Replaces all vector elements in the data source with the given list of vector elements.

    Declaration

    Objective-C

    - (void)setAll:(MSFVectorElementVector *)elements;

    Swift

    func setAll(_ elements: MSFVectorElementVector!)

    Parameters

    elements

    The list of new vector elements

  • Adds a vector element to the data source. The vector element’s coordinates are expected to be in the data source’s projection’s coordinate system. The order in which the elements are added has no effect on the order they get rendered.

    Declaration

    Objective-C

    - (void)add:(MSFVectorElement *)element;

    Swift

    func add(_ element: MSFVectorElement!)

    Parameters

    element

    The vector element to be added.

  • Adds multiple vector elements to the data source. The vector elements’ coordinates are expected to be in the data source’s projection’s coordinate system. The order in which the elements are added has no effect on the order they get rendered.

    Declaration

    Objective-C

    - (void)addAll:(MSFVectorElementVector *)elements;

    Swift

    func addAll(_ elements: MSFVectorElementVector!)

    Parameters

    elements

    A list of vector elements to be added.

  • Removes a vector element from the data source.

    Declaration

    Objective-C

    - (BOOL)remove:(MSFVectorElement *)element;

    Swift

    func remove(_ element: MSFVectorElement!) -> Bool

    Parameters

    element

    The vector element to be removed.

    Return Value

    True if the vector element existed in the data source.

  • Removes multiple vector elements from the data source.

    Declaration

    Objective-C

    - (BOOL)removeAll:(MSFVectorElementVector *)elements;

    Swift

    func removeAll(_ elements: MSFVectorElementVector!) -> Bool

    Parameters

    elements

    A list of vector elements to be removed.

    Return Value

    True if all listed elements were removed. False otherwise.

  • Returns the active geometry simplifier of the data source.

    Declaration

    Objective-C

    - (MSFGeometrySimplifier *)getGeometrySimplifier;

    Swift

    func getGeometrySimplifier() -> MSFGeometrySimplifier!

    Return Value

    The current geometry simplifier (can be null)

  • Attaches geometry simplifier to the data source. If the specified simplifier is null, detaches any active simplifier.

    Declaration

    Objective-C

    - (void)setGeometrySimplifier:(MSFGeometrySimplifier *)simplifier;

    Swift

    func setGeometrySimplifier(_ simplifier: MSFGeometrySimplifier!)

    Parameters

    simplifier

    The new geometry simplifier to use (can be null).

  • Returns the elements of this data source as a feature collection. The feature collection can be then serialized as a GeoJSON, for example.

    Declaration

    Objective-C

    - (MSFFeatureCollection *)getFeatureCollection;

    Swift

    func getFeatureCollection() -> MSFFeatureCollection!

    Return Value

    The feature collection containing all data source elements.

  • Loads all vector elements from specified feature collection by applying specified style.

    Declaration

    Objective-C

    - (void)addFeatureCollection:(MSFFeatureCollection *)featureCollection
                           style:(MSFStyle *)style;

    Swift

    func add(_ featureCollection: MSFFeatureCollection!, style: MSFStyle!)

    Parameters

    featureCollection

    The feature collection to load elements from.

    style

    The geometry collection style to use. Only elements compatible with style are created.

  • Undocumented

    Declaration

    Objective-C

    - (MSFMapBounds *)getDataExtent;

    Swift

    func getDataExtent() -> MSFMapBounds!
  • Undocumented

    Declaration

    Objective-C

    -(MSFMapBounds*)getDataExtentSwigExplicitMSFLocalVectorDataSource;

    Swift

    func getDataExtentSwigExplicitMSFLocalVectorDataSource() -> MSFMapBounds!
  • Undocumented

    Declaration

    Objective-C

    - (MSFVectorData *)loadElements:(MSFCullState *)cullState;

    Swift

    func loadElements(_ cullState: MSFCullState!) -> MSFVectorData!
  • Undocumented

    Declaration

    Objective-C

    -(MSFVectorData*)loadElementsSwigExplicitMSFLocalVectorDataSource: (MSFCullState*)cullState;

    Swift

    func loadElementsSwigExplicitMSFLocalVectorDataSource(_ cullState: MSFCullState!) -> MSFVectorData!
  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()