GLMapImage
Objective-C
@interface GLMapImage : GLMapDrawable
Swift
class GLMapImage : GLMapDrawable
GLMapImage draws an image on the map.
-
Initializes an empty image that will be displayed with the given drawOrder.
Declaration
Objective-C
- (nonnull instancetype)initWithDrawOrder:(int32_t)drawOrder;Swift
init(drawOrder: Int32)Parameters
drawOrderThe draw order of the object.
-
Initializes an image that will be injected into map tile data (for example, you can add a vector object that is drawn beneath map elements).
Declaration
Objective-C
- (nonnull instancetype)init;Swift
init() -
Loads an image into
GLMapImage. This method does not upload data to OpenGL until the image is added to a map view for rendering. TheUIImageinstance is retained byGLMapDrawable.Declaration
Objective-C
- (void)setImage:(nonnull PlatformImage *)image completion:(dispatch_block_t _Nullable)completion;Swift
func setImage(_ image: NSImage) asyncParameters
imageThe new image to display on the map.
completionA block called when the image is replaced.
-
Loads an image into
GLMapImageand immediately uploads the OpenGL data to the specified map view. The image object itself is not retained. Call this method for every map view that 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) asyncParameters
imageThe new image to load.
mapViewThe map view where the OpenGL resources are allocated.
completionA block called when the image is replaced.
Install in Dash