GLMapImageGroupDataSource

Objective-C

@protocol GLMapImageGroupDataSource

Swift

protocol GLMapImageGroupDataSource

GLMapImageGroupDataSource is a callback that provides information about images.

Warning

Do not edit the image group while it is being updated.
  • Called at the start of updating the image group.

    Declaration

    Objective-C

    - (void)startUpdate;

    Swift

    func startUpdate()
  • Called at the end of updating the image group.

    Declaration

    Objective-C

    - (void)endUpdate;

    Swift

    func endUpdate()
  • Returns the number of unique images.

    Declaration

    Objective-C

    - (NSInteger)getVariantsCount;

    Swift

    func getVariantsCount() -> Int
  • Returns an image.

    Declaration

    Objective-C

    - (PlatformImage *_Nonnull)getVariant:(NSInteger)index
                                   offset:(CGPoint *_Nonnull)offset;

    Swift

    func getVariant(_ index: Int, offset: UnsafeMutablePointer<CGPoint>) -> NSImage

    Parameters

    index

    The index of the image in the range [0..getVariantsCount).

    offset

    The offset of the image in points.

  • Returns the number of images to draw.

    Declaration

    Objective-C

    - (NSInteger)getImagesCount;

    Swift

    func getImagesCount() -> Int
  • Fills information for an image.

    Declaration

    Objective-C

    - (void)getImageInfo:(NSInteger)index
                vairiant:(uint32_t *_Nonnull)variant
                position:(GLMapPoint *_Nonnull)position;

    Swift

    func getImageInfo(_ index: Int, vairiant variant: UnsafeMutablePointer<UInt32>, position: UnsafeMutablePointer<GLMapPoint>)

    Parameters

    index

    The index of the image in the range [0..getImagesCount).

    variant

    The index of the image to draw in the range [0..getVariantsCount).

    position

    The position where the image will be drawn.