Package com.yandex.mapkit.map

Interface PlacemarkMapObject

All Superinterfaces:

MapObject

interface PlacemarkMapObject extends MapObject

Represents a geo-positioned object on the map.

Summary

Methods

Type and modifiers

Method and Description

Point

getGeometry()

void

setGeometry(@NonNull Point geometry)

float

getDirection()
Angle between the direction of an object and the direction to north.

void

setDirection(float direction)

float

getOpacity()
Opacity multiplicator for the placemark content.

void

setOpacity(float opacity)

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.

CompositeIcon

useCompositeIcon()
Sets and returns the composite icon.

PlacemarkAnimation

useAnimation()
Sets and returns the placemark animation.

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.

void

setScaleFunction(@NonNull java.util.List<android.graphics.PointF> points)
Sets piecewise linear scale, depending on the zoom.

void

setText(@NonNull java.lang.String text)
Sets the text for the placemark, current text style is used

void

setText(@NonNull java.lang.String text,
        @NonNull TextStyle style)

Sets the text with the given style for the placemark

void

setTextStyle(@NonNull TextStyle style)
Changes the text style.

Methods

getGeometry

@NonNull
Point getGeometry()


setGeometry

void setGeometry(@NonNull Point geometry)


getDirection

float getDirection()

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

Measured in degrees. Default: 0.f.


setDirection

void setDirection(float direction)


getOpacity

float getOpacity()

Opacity multiplicator for the placemark content.

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


setOpacity

void setOpacity(float opacity)


setIcon

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

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

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

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

void setIconStyle(@NonNull IconStyle style)

Changes the icon style.

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


useCompositeIcon

@NonNull
CompositeIcon useCompositeIcon()

Sets and returns the composite icon.

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


useAnimation

@NonNull
PlacemarkAnimation useAnimation()

Sets and returns the placemark animation.

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


setView

void setView(@NonNull ViewProvider view)

Sets the view with the default style for the placemark.

Resets icons, animation and the model.


setView

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

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

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.


setScaleFunction

void setScaleFunction(@NonNull java.util.List<android.graphics.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.


setText

void setText(@NonNull java.lang.String text)

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

Parameters

text

is a string in UTF-8 encoding


setText

void setText(@NonNull java.lang.String text,
             @NonNull TextStyle style)

Sets the text with the given style for the placemark

Parameters

text

is a string in UTF-8 encoding


setTextStyle

void setTextStyle(@NonNull TextStyle style)

Changes the text style.


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