MMKPlacemarkMapObject

@interface MMKPlacemarkMapObject : MMKMapObject

Represents a geo-positioned object on the map.

Summary

Instance methods

- (void)setIconWithImage:(nonnull UIImage *)image;
Sets an icon with the default style for the placemark

- (void)setIconWithImage:(nonnull UIImage *)image
                   style:(nonnull MMKIconStyle *)style;

Sets an icon with the given style for the placemark

- (void)setIconWithImage:(nonnull UIImage *)image
                callback:(nonnull MMKCallback)callback;

Sets an icon with the default style for the placemark

- (void)setIconWithImage:(nonnull UIImage *)image
                   style:(nonnull MMKIconStyle *)style
                callback:(nonnull MMKCallback)callback;

Sets an icon with the given style for the placemark

- (void)setIconStyleWithStyle:(nonnull MMKIconStyle *)style;
Changes the icon style

- (nonnull MMKCompositeIcon *)useCompositeIcon;
Returns CompositeIcon object that can be used to set icons and their styles for the placemark

- (nonnull MMKModel *)useModel;
Returns Model object that can be used to set model and its style for the placemark

- (nonnull MMKPlacemarkAnimation *)useAnimation;
Returns PlacemarkAnimation object that can be used to control animation of the placemark

- (void)setViewWithView:(nonnull MRTViewProvider *)view;
Sets the view with the default style for the placemark

- (void)setViewWithView:(nonnull MRTViewProvider *)view
                  style:(nonnull MMKIconStyle *)style;

Sets the view with the given style for the placemark

- (void)setViewWithView:(nonnull MRTViewProvider *)view
               callback:(nonnull MMKCallback)callback;

Sets the view with the default style for the placemark

- (void)setViewWithView:(nonnull MRTViewProvider *)view
                  style:(nonnull MMKIconStyle *)style
               callback:(nonnull MMKCallback)callback;

Sets the view with the given style for the placemark

- (void)setScaleFunctionWithPoints:(nonnull NSArray<NSValue *> *)points;
Sets piecewise linear scale, depending on the zoom

- (void)setTextWithText:(nonnull NSString *)text;
Sets the text for the placemark, current text style is used

- (void)setTextWithText:(nonnull NSString *)text
                  style:(nonnull MMKTextStyle *)style;

Sets the text with the given style for the placemark

- (void)setTextStyleWithStyle:(nonnull MMKTextStyle *)style;
Changes the text style

Properties

@property (nonatomic, assign, unsafe_unretained, readwrite, nonnull)
    MMKPoint *geometry;

Undocumented

@property (nonatomic, assign, unsafe_unretained, readwrite) float direction;
Angle between the direction of an object and the direction to north

@property (nonatomic, assign, unsafe_unretained, readwrite) float opacity;
Opacity multiplicator for the placemark content

Instance methods

setIconWithImage:

- (void)setIconWithImage:(nonnull UIImage *)image;

Sets an icon with the default style for the placemark. Switches off and resets model/composite icon/animation/view.


setIconWithImage:style:

- (void)setIconWithImage:(nonnull UIImage *)image
                   style:(nonnull MMKIconStyle *)style;

Sets an icon with the given style for the placemark. Switches off and resets model/composite icon/animation/view.


setIconWithImage:callback:

- (void)setIconWithImage:(nonnull UIImage *)image
                callback:(nonnull MMKCallback)callback;

Sets an icon with the default style for the placemark. Switches off and resets model/composite icon/animation/view. The callback is called immediately after the image finished loading. This means you can, for example, change the placemark visibility with a new icon.

Parameters

onFinished

Called when the icon is loaded.


setIconWithImage:style:callback:

- (void)setIconWithImage:(nonnull UIImage *)image
                   style:(nonnull MMKIconStyle *)style
                callback:(nonnull MMKCallback)callback;

Sets an icon with the given style for the placemark. Switches off and resets model/composite icon/animation/view. The callback is called immediately after the image finished loading. This means you can, for example, change the placemark visibility with a new icon.

Parameters

onFinished

Called when the icon is loaded.


setIconStyleWithStyle:

- (void)setIconStyleWithStyle:(nonnull MMKIconStyle *)style;

Changes the icon style. Valid only for the single icon, the view and the animated icon.


useCompositeIcon

- (nonnull MMKCompositeIcon *)useCompositeIcon;

Returns CompositeIcon object that can be used to set icons and their styles for the placemark. Switches off and resets icon/model/animation/view.


useModel

- (nonnull MMKModel *)useModel;

Returns Model object that can be used to set model and its style for the placemark. Switches off and resets icon/composite icon/animation/view.


useAnimation

- (nonnull MMKPlacemarkAnimation *)useAnimation;

Returns PlacemarkAnimation object that can be used to control animation of the placemark. Switches off and resets icon/composite icon/model/view.


setViewWithView:

- (void)setViewWithView:(nonnull MRTViewProvider *)view;

Sets the view with the default style for the placemark. Switches off and resets icon/composite icon/animation/model.


setViewWithView:style:

- (void)setViewWithView:(nonnull MRTViewProvider *)view
                  style:(nonnull MMKIconStyle *)style;

Sets the view with the given style for the placemark. Switches off and resets icon/composite icon/animation/view.


setViewWithView:callback:

- (void)setViewWithView:(nonnull MRTViewProvider *)view
               callback:(nonnull MMKCallback)callback;

Sets the view with the default style for the placemark. Switches off and resets icon/composite icon/animation/view. The callback will be called immediately after the view finished loading.

Parameters

onFinished

Called when the icon is loaded.


setViewWithView:style:callback:

- (void)setViewWithView:(nonnull MRTViewProvider *)view
                  style:(nonnull MMKIconStyle *)style
               callback:(nonnull MMKCallback)callback;

Sets the view with the given style for the placemark. Switches off and resets icon/composite icon/animation/view. The callback will be called immediately after the view finished loading.

Parameters

onFinished

Called when the icon is loaded.


setScaleFunctionWithPoints:

- (void)setScaleFunctionWithPoints:(nonnull NSArray<NSValue *> *)points;

Sets piecewise linear scale, depending on the zoom. The 'points' must be sorted by x; x coordinates must be unique. If zoom < minZoom(points) or zoom > maxZoom(points), it is set within the defined bounds before applying the function. By default, the scale function is defined by a single point (1, 1). If points is null or points.empty(), it resets the function to the default. If points.size() == 1, the scale is constant and equals point.y.


setTextWithText:

- (void)setTextWithText:(nonnull NSString *)text;

Sets the text for the placemark, current text style is used

Parameters

text

is a string in UTF-8 encoding


setTextWithText:style:

- (void)setTextWithText:(nonnull NSString *)text
                  style:(nonnull MMKTextStyle *)style;

Sets the text with the given style for the placemark

Parameters

text

is a string in UTF-8 encoding


setTextStyleWithStyle:

- (void)setTextStyleWithStyle:(nonnull MMKTextStyle *)style;

Changes the text style.


Properties

geometry

@property (nonatomic, assign, unsafe_unretained, readwrite, nonnull)
    MMKPoint *geometry;

Undocumented


direction

@property (nonatomic, assign, unsafe_unretained, readwrite) float direction;

Angle between the direction of an object and the direction to north. Measured in degrees. Default: 0.f.


opacity

@property (nonatomic, assign, unsafe_unretained, readwrite) float opacity;

Opacity multiplicator for the placemark content. Values below 0 will be set to 0. Default: 1.