YMKPlacemarkMapObject

class YMKPlacemarkMapObject : YMKMapObject

Represents a geo-positioned object on the map.

Summary

Instance methods

func setIconWith(_ image: UIImage)
Sets an icon with the default style for the placemark

func setIconWith( image: UIImage, style: YMKIconStyle_)
Sets an icon with the given style for the placemark

func setIconWith( image: UIImage, callback: @escaping YMKCallback_)
Sets an icon with the default style for the placemark

func setIconWith(_ image: UIImage,
                   style: YMKIconStyle,
                callback: @escaping YMKCallback)
Sets an icon with the given style for the placemark

func setIconStyleWith( style: YMKIconStyle_)
Changes the icon style

func useCompositeIcon() -> YMKCompositeIcon
Returns CompositeIcon object that can be used to set icons and their styles for the placemark

func useModel() -> YMKModel
Returns Model object that can be used to set model and its style for the placemark

func useAnimation() -> YMKPlacemarkAnimation
Returns PlacemarkAnimation object that can be used to control animation of the placemark

func setViewWithView( view: YRTViewProvider_)
Sets the view with the default style for the placemark

func setViewWithView( view: YRTViewProvider, style: YMKIconStyle_)
Sets the view with the given style for the placemark

func setViewWithView( view: YRTViewProvider, callback: @escaping YMKCallback_)
Sets the view with the default style for the placemark

func setViewWithView( view: YRTViewProvider_,
                      style: YMKIconStyle,
                   callback: @escaping YMKCallback)
Sets the view with the given style for the placemark

func setScaleFunctionWithPoints(_ points: [NSValue])
Sets piecewise linear scale, depending on the zoom

func setTextWithText(_ text: String)
Sets the text for the placemark, current text style is used

func setTextWithText( text: String, style: YMKTextStyle_)
Sets the text with the given style for the placemark

func setTextStyleWith( style: YMKTextStyle_)
Changes the text style

Properties

var geometryYMKPoint { get set }
Undocumented

var direction: Float { get set }
Angle between the direction of an object and the direction to north

var opacity: Float { get set }
Opacity multiplicator for the placemark content

Instance methods

setIconWith(_:)

func setIconWith(_ image: UIImage)

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


setIconWith(_:style:)

func setIconWith( image: UIImage, style: YMKIconStyle_)

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


setIconWith(_:callback:)

func setIconWith( image: UIImage, callback: @escaping YMKCallback_)

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.


setIconWith(_:style:callback:)

func setIconWith(_ image: UIImage,
                   style: YMKIconStyle,
                callback: @escaping YMKCallback)

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.


setIconStyleWith(_:)

func setIconStyleWith( style: YMKIconStyle_)

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


useCompositeIcon()

func useCompositeIcon() -> YMKCompositeIcon

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()

func useModel() -> YMKModel

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()

func useAnimation() -> YMKPlacemarkAnimation

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


setViewWithView(_:)

func setViewWithView( view: YRTViewProvider_)

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


setViewWithView(_:style:)

func setViewWithView( view: YRTViewProvider, style: YMKIconStyle_)

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


setViewWithView(_:callback:)

func setViewWithView( view: YRTViewProvider, callback: @escaping YMKCallback_)

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:)

func setViewWithView( view: YRTViewProvider_,
                      style: YMKIconStyle,
                   callback: @escaping YMKCallback)

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(_:)

func setScaleFunctionWithPoints(_ points: [NSValue])

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(_:)

func setTextWithText(_ text: String)

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

Parameters

text

is a string in UTF-8 encoding


setTextWithText(_:style:)

func setTextWithText( text: String, style: YMKTextStyle_)

Sets the text with the given style for the placemark

Parameters

text

is a string in UTF-8 encoding


setTextStyleWith(_:)

func setTextStyleWith( style: YMKTextStyle_)

Changes the text style.


Properties

geometry

var geometry: YMKPoint { get set }

Undocumented


direction

var direction: Float { get set }

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


opacity

var opacity: Float { get set }

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


Предыдущая
Следующая