Package com.yandex.mapkit.map
Interface PlacemarkMapObject
All Superinterfaces:
interface PlacemarkMapObject extends MapObject
Represents a geo-positioned object on the map.
Summary
Methods
Type and modifiers |
Method and Description |
void |
setGeometry(@NonNull Point geometry) |
float |
getDirection() |
void |
setDirection(float direction) |
float |
getOpacity() |
void |
setOpacity(float opacity) |
void |
setIcon(@NonNull ImageProvider image) |
void |
setIcon(@NonNull ImageProvider image, |
void |
setIcon(@NonNull ImageProvider image, |
void |
setIcon(@NonNull ImageProvider image, |
void |
setIconStyle(@NonNull IconStyle style) |
useCompositeIcon() |
|
useAnimation() |
|
void |
setView(@NonNull ViewProvider view) |
void |
setView(@NonNull ViewProvider view, |
void |
setView(@NonNull ViewProvider view, |
void |
setView(@NonNull ViewProvider view, |
void |
setScaleFunction(@NonNull java.util.List<android.graphics.PointF> points) |
void |
setText(@NonNull java.lang.String text) |
void |
setText(@NonNull java.lang.String text, |
void |
setTextStyle(@NonNull TextStyle style) |
Methods
getGeometry
@NonNull |
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, |
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, |
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 |
|
|
Called when the icon is loaded. |
setIcon
void setIcon(@NonNull ImageProvider image, |
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 |
|
|
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 |
Sets and returns the composite icon.
Resets the single icon, the animation, the view and the model.
useAnimation
@NonNull |
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, |
Sets the view with the given style for the placemark.
Resets icons, animation 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. The callback will be called immediately after the view finished loading.
Parameters |
|
|
Called when the icon is loaded. |
setView
void setView(@NonNull ViewProvider view, |
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 |
|
|
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 |
|
|
is a string in UTF-8 encoding |
setText
void setText(@NonNull java.lang.String text, |
Sets the text with the given style for the placemark
Parameters |
|
|
is a string in UTF-8 encoding |
setTextStyle
void setTextStyle(@NonNull TextStyle style) |
Changes the text style.