GLMapVectorObjectArray


@interface GLMapVectorObjectArray : NSObject

GLMapVectorObjectArray is fast and compact container for vector objects. It uses C++ vector of C++ objects inside.

  • Initializes empty array *

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Initializes empty array with given initial capacity *

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCapacity:(NSUInteger)capacity;
  • Returns the object located at the specified index. If index is beyond the end of the array (that is, if index is greater than or equal to the value returned by count), an NSRangeException is raised.

    Declaration

    Objective-C

    - (nonnull GLMapVectorObject *)objectAtIndex:(NSUInteger)index;

    Parameters

    index

    An index within the bounds of the array.

    Return Value

    The object located at index.

  • Returns the object at the specified index. This method has the same behavior as the objectAtIndex: method. If index is beyond the end of the array (that is, if index is greater than or equal to the value returned by count), an NSRangeException is raised. You shouldn’t need to call this method directly. Instead, this method is called when accessing an object by index using subscripting.

    Declaration

    Objective-C

    - (nonnull GLMapVectorObject *)objectAtIndexedSubscript:(NSUInteger)index;

    Parameters

    index

    An index within the bounds of the array.

    Return Value

    The object located at index.

  • The number of objects in the array.

    Declaration

    Objective-C

    @property (atomic, readonly) NSUInteger count;
  • Calculates bbox of all objects in array

    Declaration

    Objective-C

    @property (atomic, readonly) GLMapBBox bbox;

    Return Value

    bbox of all objects in array

  • Adds object to array *

    Declaration

    Objective-C

    - (void)addObject:(nonnull GLMapVectorObject *)object;
  • Inserts object to array at given index *

    Declaration

    Objective-C

    - (void)insertObject:(nonnull GLMapVectorObject *)object
                 atIndex:(NSUInteger)index;
  • Inserts objects to array at given indexes *

    Declaration

    Objective-C

    - (void)insertObjects:(nonnull NSArray<GLMapVectorObject *> *)objects
                atIndexes:(nonnull NSIndexSet *)indexSet;
  • Removes object at given index *

    Declaration

    Objective-C

    - (void)removeObjectAtIndex:(NSUInteger)index;
  • Removes object at given indexes *

    Declaration

    Objective-C

    - (void)removeObjectsAtIndexes:(nonnull NSIndexSet *)indexSet;
  • Removes all objects from array *

    Declaration

    Objective-C

    - (void)removeAllObjects;
  • Converts GLMApVectorObjectArray to NSArray *

    Declaration

    Objective-C

    - (nonnull NSArray<GLMapVectorObject *> *)array;
  • Cluster array with radius

    Declaration

    Objective-C

    - (nonnull NSArray<GLMapVectorObjectArray *> *)clusterWithRadius:(double)radius;