Class YMKPlacemarkMapObject

Represents a geo-positioned object on the map.

Instance Methods

- setIconStyleWithStyle:

Changes the icon style.

- setIconWithImage:

Sets an icon with the default style for the placemark.

- setIconWithImage:callback:

Sets an icon with the default style for the placemark.

- setIconWithImage:style:

Sets an icon with the given style for the placemark.

- setIconWithImage:style:callback:

Sets an icon with the given style for the placemark.

- setModelStyleWithModelStyle:

Changes the model style.

- setModelWithModelProvider:style:

Sets the model.

- setModelWithModelProvider:style:callback:

Sets the model.

- setScaleFunctionWithPoints:

Sets piecewise linear scale, depending on the zoom.

- setViewWithView:

Sets the view with the default style for the placemark.

- setViewWithView:callback:

Sets the view with the default style for the placemark.

- setViewWithView:style:

Sets the view with the given style for the placemark.

- setViewWithView:style:callback:

Sets the view with the given style for the placemark.

- useAnimation

Sets and returns the placemark animation.

- useCompositeIcon

Sets and returns the composite icon.

Properties

direction

Angle between the direction of an object and the direction to north.

geometry

Position of the object.

opacity

Opacity multiplicator for the placemark content.

Method Detail

-setIconStyleWithStyle:

- (void)setIconStyleWithStyle:(nonnull YMKIconStyle *)style 

Changes the icon style.

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

-setIconWithImage:

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

Sets an icon with the default style for the placemark.

Resets the animation, the composite icon, the view and the model.

-setIconWithImage:callback:

- (void)setIconWithImage:(nonnull UIImage *)image
                callback:(nonnull YMKCallback)callback 

Sets an icon with the default style for the placemark.

Resets the animation, the composite icon, the view and the model. 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:

- (void)setIconWithImage:(nonnull UIImage *)image
                   style:(nonnull YMKIconStyle *)style 

Sets an icon with the given style for the placemark.

Resets the animation, the composite icon, the view and the model.

-setIconWithImage:style:callback:

- (void)setIconWithImage:(nonnull UIImage *)image
                   style:(nonnull YMKIconStyle *)style
                callback:(nonnull YMKCallback)callback 

Sets an icon with the given style for the placemark.

Resets the animation, the composite icon, the view and the model. 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.

-setModelStyleWithModelStyle:

- (void)setModelStyleWithModelStyle:(nonnull YMKModelStyle *)modelStyle 

Changes the model style.

Valid only for the model and the animated model.

-setModelWithModelProvider:style:

- (void)setModelWithModelProvider:(nonnull id< YRTModelProvider >)modelProvider
                            style:(nonnull YMKModelStyle *)style 

Sets the model.

Resets icons, the animation and the view.

-setModelWithModelProvider:style:callback:

- (void)setModelWithModelProvider:(nonnull id< YRTModelProvider >)modelProvider
                            style:(nonnull YMKModelStyle *)style
                         callback:(nonnull YMKCallback)callback 

Sets the model.

Resets icons, the animation and the view. The callback will be called immediately after model loading finishes.

-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.

-setViewWithView:

- (void)setViewWithView:(nonnull YRTViewProvider *)view 

Sets the view with the default style for the placemark.

Resets icons, animation and the model.

-setViewWithView:callback:

- (void)setViewWithView:(nonnull YRTViewProvider *)view
               callback:(nonnull YMKCallback)callback 

Sets the view with the default style for the placemark.

Resets icons, animation and the model. The callback will be called immediately after the view finished loading.
Parameters:
onFinished

Called when the icon is loaded.

-setViewWithView:style:

- (void)setViewWithView:(nonnull YRTViewProvider *)view
                  style:(nonnull YMKIconStyle *)style 

Sets the view with the given style for the placemark.

Resets icons, animation and the model.

-setViewWithView:style:callback:

- (void)setViewWithView:(nonnull YRTViewProvider *)view
                  style:(nonnull YMKIconStyle *)style
               callback:(nonnull YMKCallback)callback 

Sets the view with the given style for the placemark.

Resets icons, animation and the model. The callback will be called immediately after the view finished loading.
Parameters:
onFinished

Called when the icon is loaded.

-useAnimation

- (nonnull YMKPlacemarkAnimation *)useAnimation

Sets and returns the placemark animation.

Resets the single icon, the composite icon, the view and the model.

-useCompositeIcon

- (nonnull YMKCompositeIcon *)useCompositeIcon

Sets and returns the composite icon.

Resets the single icon, the animation, the view and the model.

Property Detail

direction

(assign, readwrite) float direction

Angle between the direction of an object and the direction to north.

Measured in degrees. Default: 0.f.

geometry

(assign, readwrite) YMKPoint * geometry

Position of the object.

opacity

(assign, readwrite) float opacity

Opacity multiplicator for the placemark content.

Values below 0 will be set to 0. Default: 1.