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.

- setModelWithObj:textureProvider:style:

Sets the model.

- setModelWithObj:textureProvider:style:callback:

Sets the model.

- setScaleFunctionWithPoints:

Sets piecewise linear scale depending on the zoom.

- setViewWithView:

Sets the view with the default style to 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.

- useAnimatedIcon

Sets and returns the animated icon.

- 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 animated icon, 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 animated icon, 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 animated icon, 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 animated icon, 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.

-setModelWithObj:textureProvider:style:

- (void)setModelWithObj:(nonnull NSString *)obj
        textureProvider:(nonnull UIImage *)textureProvider
                  style:(nonnull YMKModelStyle *)style 

Sets the model.

Resets icons and the view.

-setModelWithObj:textureProvider:style:callback:

- (void)setModelWithObj:(nonnull NSString *)obj
        textureProvider:(nonnull UIImage *)textureProvider
                  style:(nonnull YMKModelStyle *)style
               callback:(nonnull YMKCallback)callback 

Sets the model.

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

'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 a point is null or points.empty() it resets the function to default. If points.size() == 1, scale is constant and equals point.y.

-setViewWithView:

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

Sets the view with the default style to the placemark.

Resets icons 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 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 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 and the model. The callback will be called immediately after the view finished loading.
Parameters:
onFinished

Called when the icon is loaded.

-useAnimatedIcon

- (nonnull YMKAnimatedIcon *)useAnimatedIcon

Sets and returns the animated icon.

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 animated icon, 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.