MMKMapObject
@interface MMKMapObject : NSObject |
An object displayed on the map.
Summary
Instance methods
- (void)setVisibleWithVisible:(BOOL)visible |
- (void)addTapListenerWithTapListener: |
- (void)removeTapListenerWithTapListener: |
- (void)setDragListenerWithDragListener: |
Properties
@property (nonatomic, readonly, nonnull) MMKBaseMapObjectCollection *parent; |
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isVisible) |
@property (nonatomic, assign, unsafe_unretained, readwrite) float zIndex; |
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isDraggable) |
@property (nonatomic, assign, unsafe_unretained, readwrite, nullable) |
@property (nonatomic, readonly, getter=isValid) BOOL valid; |
Instance methods
setVisibleWithVisible:animation:callback:
- (void)setVisibleWithVisible:(BOOL)visible |
Manages visibility of the object.
Parameters |
|
animation |
Describes the transition between visible and not visible states. |
onFinished |
Called when the transition is finished. |
addTapListenerWithTapListener:
- (void)addTapListenerWithTapListener: |
Adds a tap listener to the object.
The class does not retain the object in the 'tapListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
removeTapListenerWithTapListener:
- (void)removeTapListenerWithTapListener: |
Removes the tap listener from the object.
setDragListenerWithDragListener:
- (void)setDragListenerWithDragListener: |
Sets a drag listener for the object. Each object can only have one drag listener.
The class does not retain the object in the 'dragListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
Properties
parent
@property (nonatomic, readonly, nonnull) MMKBaseMapObjectCollection *parent; |
Returns the collection of map objects that the current map object belongs to.
visible
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isVisible) |
Manages visibility of the object on the map. Default: true.
zIndex
@property (nonatomic, assign, unsafe_unretained, readwrite) float zIndex; |
Gets the z-index, which affects:
- Rendering order.
- Dispatching of UI events (taps and drags are dispatched to objects with higher z-indexes first).
draggable
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isDraggable) |
If true, the map object can be dragged by the user. Default: false.
userData
@property (nonatomic, assign, unsafe_unretained, readwrite, nullable) |
Use this property to attach any object-related metadata.
Optional property, can be nil.
valid
@property (nonatomic, readonly, getter=isValid) BOOL valid; |
Tells if this object is valid or no. Any method called on an invalid object will throw an exception. The object becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.