GLMapImage

Objective-C


@interface GLMapImage : GLMapDrawable

Swift

class GLMapImage : GLMapDrawable

GLMapImagedraws a image on map.

  • Initializes empty image that will be displayed with given drawOrder

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDrawOrder:(int32_t)drawOrder;

    Swift

    init(drawOrder: Int32)

    Parameters

    drawOrder

    drawOrder of object

  • Initializes image that will be injected into map tile data (for example you can set vector object that can be displayed under map elements)

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()
  • Loads image into GLMapImage This variant will not load anything into OpenGL util GLMapImage will be added to some mapView that will try to render it. UIImage will be retained by GLMapDrawable.

    Declaration

    Objective-C

    - (void)setImage:(nonnull PlatformImage *)image
          completion:(dispatch_block_t _Nullable)completion;

    Swift

    func setImage(_ image: NSImage) async

    Parameters

    image

    New image to display on map

    completion

    A block called when image is replaced.

  • Loads image into GLMapImage This variant of function loads OpenGL data into given mapView and does not retain image itself You must call this function for every mapView where you will display the image

    Declaration

    Objective-C

    - (void)setImage:(nonnull PlatformImage *)image
          forMapView:(nonnull GLMapView *)mapView
          completion:(dispatch_block_t _Nullable)completion;

    Swift

    func setImage(_ image: NSImage, for mapView: GLMapView) async

    Parameters

    image

    New image to laod

    mapView

    where to load openGL resources

    completion

    A block called when image is replaced.