GLMapDrawable
@interface GLMapDrawable : GLMapDrawObject
Normal drawable: 0, GLMapPointMax GLMapPointMax, GLMapPointMax ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ ╭────────────────────T ┃ ┃ │ │ ┃ ┃ │←╍╍╍╍╍╍╍╍╍╍╍╍╍P │ ┃ ┃ │ ╏ │ ┃ ┃ │ ╏ │ ┃ ┃ │ ↓ │ ┃ ┃ O──────────────┴─────╯ ┃ ↑ ┃ ┗━→━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ 0,0 GLMapPointMax,0
P = position (GLMapPoint) O = position - offset * scale (pt) T = O + size * scale (pt)
Drawable that uses transform: 0, GLMapPointMax GLMapPointMax, GLMapPointMax ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ ╭────────────────────T ┃ ┃ │ │ ┃ ┃ │ │ ┃ ┃ │ │ ┃ ┃ │ │ ┃ ┃ │ │ ┃ ┃ P────────────────────╯ ┃ ↑ ┃ ┗━━→━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ 0,0 GLMapPointMax,0
P = position (GLMapPoint) T = position + size * scale (GLMapPoint) *
-
Initializes empty image that will be displayed with given drawOrder
Declaration
Objective-C
- (instancetype _Nonnull)initWithDrawOrder:(int32_t)drawOrder;Parameters
drawOrderdrawOrder 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
- (instancetype _Nonnull)init;
-
When set to
YESimage rotates with map. Default value is ‘NO’Declaration
Objective-C
@property (atomic, assign, unsafe_unretained, readwrite) BOOL rotatesWithMap; -
GLMapTransform mode of drawable
Declaration
Objective-C
@property (atomic, assign, unsafe_unretained, readwrite) GLMapTransformMode transformMode; -
A position that sets image position in map internal coordinates For vector object adds translation Animatable.
Declaration
Objective-C
@property (atomic, assign, unsafe_unretained, readwrite) GLMapPoint position; -
A size of image in pixels Can be used for image and text
Declaration
Objective-C
@property (atomic, readonly) CGSize size; -
Scale of object. (by default is 1.0) Animatable.
Declaration
Objective-C
@property (atomic, assign, unsafe_unretained, readwrite) double scale; -
A float variable that defines image angle Animatable.
Declaration
Objective-C
@property (atomic, assign, unsafe_unretained, readwrite) float angle;
-
Loads image into
GLMapDrawableThis variant will not load anything into OpenGL utilGLMapDrawablewill be added to some mapView that will try to render it.UIImagewill be retained byGLMapDrawable.Declaration
Objective-C
- (void)setImage:(UIImage *_Nonnull)image completion:(dispatch_block_t _Nullable)completion;Parameters
imageNew image to display on map
completionA block called when image is replaced.
-
Loads image into
GLMapDrawableThis 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 imageDeclaration
Objective-C
- (void)setImage:(UIImage *_Nonnull)image forMapView:(GLMapView *_Nonnull)mapView completion:(dispatch_block_t _Nullable)completion;Parameters
imageNew image to laod
mapViewwhere to load openGL resources
completionA block called when image is replaced.
-
Sets text to draw
See
Declaration
Objective-C
- (void)setText:(NSString *_Nonnull)text withStyle:(GLMapVectorStyle *_Nonnull)style completion:(dispatch_block_t _Nullable)completion;Parameters
textNew text
styleA style object used for text
completionA block called when text is replaced.
-
Sets vector object to draw
See
Declaration
Objective-C
- (void)setVectorObject:(GLMapVectorObject *_Nonnull)object withStyle:(GLMapVectorCascadeStyle *_Nonnull)style completion:(dispatch_block_t _Nullable)completion;Parameters
objectobject to draw
styleA style of object
completionA block called when object ready to draw
-
Sets vector objects to draw
See
Declaration
Objective-C
- (void)setVectorObjects:(GLMapVectorObjectArray *_Nonnull)objects withStyle:(GLMapVectorCascadeStyle *_Nonnull)style completion:(dispatch_block_t _Nullable)completion;Parameters
objectsobjects to draw
styleA style of object
completionA block called when object ready to draw
-
Tests if point is inside of image
Declaration
Objective-C
- (BOOL)hitTest:(CGPoint)point onMap:(GLMapView *_Nonnull)mapView withPaddings:(UIEdgeInsets)paddings;Parameters
mapViewmapView where images is displayed
pointpoint to check
paddingspaddings of image
Return Value
trueif point is inside image
Install in Dash
GLMapDrawable Class Reference