GLMapDrawable
Objective-C
@interface GLMapDrawable : GLMapDrawObject
Swift
class 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) *
-
Unavailable
GLMapDrawable is abstract class
Plain -init is disabled
Declaration
Objective-C
- (instancetype _Nonnull)init;
-
When set to
YES
image rotates with map. Default value is ‘NO’Declaration
Objective-C
@property BOOL rotatesWithMap;
Swift
var rotatesWithMap: Bool { get set }
-
GLMapTransform mode of drawable
Declaration
Objective-C
@property GLMapTransformMode transformMode;
Swift
var transformMode: GLMapTransformMode { get set }
-
A position that sets image position in map internal coordinates For vector object adds translation Animatable.
-
Image offset from the
position
point, measured in image pixels. Can be used for both image and text. When the offset is (0, 0), the bottom-left corner of the image is displayed at the position. When the offset is (image.size.width / 2, 0), it is ideal for a pin. Animatable.Declaration
Objective-C
@property CGPoint offset;
Swift
var offset: CGPoint { get set }
-
A size of image in pixels Can be used for image and text
Declaration
Objective-C
@property (readonly) CGSize size;
Swift
var size: CGSize { get }
-
Scale of object. (by default is 1.0) Animatable.
Declaration
Objective-C
@property double scale;
Swift
var scale: Double { get set }
-
A float variable that defines image angle Animatable.
Declaration
Objective-C
@property float angle;
Swift
var angle: Float { get set }
-
Tests if point is inside of image
Declaration
Objective-C
- (BOOL)hitTest:(CGPoint)point onMap:(GLMapView *_Nonnull)mapView withPaddings:(PlatformEdgeInsets)paddings;
Swift
func hitTest(_ point: CGPoint, onMap mapView: GLMapView, withPaddings paddings: PlatformEdgeInsets) -> Bool
Parameters
mapView
mapView where images is displayed
point
point to check
paddings
paddings of image
Return Value
true
if point is inside image