Interface PlacemarkMapObject

com.yandex.mapkit.map

public interface PlacemarkMapObject extends MapObject

All Superinterfaces:
MapObject

Represents a geo-positioned object on the map.

Methods

float getDirection()

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

Point getGeometry()

Position of the object.

float getOpacity()

Opacity multiplicator for the placemark content.

void setDirection(float direction)
void setGeometry(@NonNull Point geometry)
void setIcon(@NonNull ImageProvider image)

Sets an icon with the default style for the placemark.

void setIcon(@NonNull ImageProvider image, @NonNull IconStyle style)

Sets an icon with the given style for the placemark.

void setIcon(@NonNull ImageProvider image, @NonNull Callback onFinished)

Sets an icon with the default style for the placemark.

void setIcon(@NonNull ImageProvider image, @NonNull IconStyle style, @NonNull Callback onFinished)

Sets an icon with the given style for the placemark.

void setIconStyle(@NonNull IconStyle style)

Changes the icon style.

void setModel(@NonNull ModelProvider modelProvider, @NonNull ModelStyle style)

Sets the model.

void setModel(@NonNull ModelProvider modelProvider, @NonNull ModelStyle style, @NonNull Callback onFinished)

Sets the model.

void setModelStyle(@NonNull ModelStyle modelStyle)

Changes the model style.

void setOpacity(float opacity)
void setScaleFunction(@NonNull List< PointF > points)

Sets piecewise linear scale, depending on the zoom.

void setView(@NonNull ViewProvider view)

Sets the view with the default style for the placemark.

void setView(@NonNull ViewProvider view, @NonNull IconStyle style)

Sets the view with the given style for the placemark.

void setView(@NonNull ViewProvider view, @NonNull Callback onFinished)

Sets the view with the default style for the placemark.

void setView(@NonNull ViewProvider view, @NonNull IconStyle style, @NonNull Callback onFinished)

Sets the view with the given style for the placemark.

PlacemarkAnimation useAnimation()

Sets and returns the placemark animation.

CompositeIcon useCompositeIcon()

Sets and returns the composite icon.

Method Detail

getDirection

public float getDirection ()

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

Measured in degrees. Default: 0.f.

getGeometry

public Point getGeometry ()

Position of the object.

getOpacity

public float getOpacity ()

Opacity multiplicator for the placemark content.

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

setDirection

public void setDirection (float direction)

setGeometry

public void setGeometry (@NonNull Point geometry)

setIcon

public void setIcon (@NonNull ImageProvider image)

Sets an icon with the default style for the placemark.

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

setIcon

public void setIcon (@NonNull ImageProvider image, @NonNull IconStyle style)

Sets an icon with the given style for the placemark.

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

setIcon

public void setIcon (@NonNull ImageProvider image, @NonNull Callback onFinished)

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.

setIcon

public void setIcon (@NonNull ImageProvider image, @NonNull IconStyle style, @NonNull Callback onFinished)

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.

setIconStyle

public void setIconStyle (@NonNull IconStyle style)

Changes the icon style.

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

setModel

public void setModel (@NonNull ModelProvider modelProvider, @NonNull ModelStyle style)

Sets the model.

Resets icons, the animation and the view.

setModel

public void setModel (@NonNull ModelProvider modelProvider, @NonNull ModelStyle style, @NonNull Callback onFinished)

Sets the model.

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

setModelStyle

public void setModelStyle (@NonNull ModelStyle modelStyle)

Changes the model style.

Valid only for the model and the animated model.

setOpacity

public void setOpacity (float opacity)

setScaleFunction

public void setScaleFunction (@NonNull List< PointF > 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.

setView

public void setView (@NonNull ViewProvider view)

Sets the view with the default style for the placemark.

Resets icons, animation and the model.

setView

public void setView (@NonNull ViewProvider view, @NonNull IconStyle style)

Sets the view with the given style for the placemark.

Resets icons, animation and the model.

setView

public void setView (@NonNull ViewProvider view, @NonNull Callback onFinished)

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.

setView

public void setView (@NonNull ViewProvider view, @NonNull IconStyle style, @NonNull Callback onFinished)

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

public PlacemarkAnimation useAnimation ()

Sets and returns the placemark animation.

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

useCompositeIcon

public CompositeIcon useCompositeIcon ()

Sets and returns the composite icon.

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