Class IconStyle

com.yandex.mapkit.map

java.lang.Object ⇽ IconStyle

public class IconStyle

The style of created icons.

Constructors

IconStyle(@Nullable PointF anchor, @Nullable RotationType rotationType, @Nullable Float zIndex, @Nullable Boolean flat, @Nullable Boolean visible, @Nullable Float scale, @Nullable Rect tappableArea)
IconStyle()

Use constructor with parameters in your code.

Methods

PointF getAnchor()

An anchor is used to alter image placement.

Boolean getFlat()

If true, the icon is displayed on the map surface.

RotationType getRotationType()

Icon rotation type.

Float getScale()

Scale of the icon.

Rect getTappableArea()

Tappable area on the icon.

Boolean getVisible()

Sets icon visibility.

Float getZIndex()

Z-index of the icon, relative to the placemark's z-index.

void serialize(Archive archive)
IconStyle setAnchor(@Nullable PointF anchor)

See getAnchor().

IconStyle setFlat(@Nullable Boolean flat)

See getFlat().

IconStyle setRotationType(@Nullable RotationType rotationType)

See getRotationType().

IconStyle setScale(@Nullable Float scale)

See getScale().

IconStyle setTappableArea(@Nullable Rect tappableArea)

See getTappableArea().

IconStyle setVisible(@Nullable Boolean visible)

See getVisible().

IconStyle setZIndex(@Nullable Float zIndex)

See getZIndex().

Constructor Detail

IconStyle

public IconStyle (@Nullable PointF anchor, @Nullable RotationType rotationType, @Nullable Float zIndex, @Nullable Boolean flat, @Nullable Boolean visible, @Nullable Float scale, @Nullable Rect tappableArea)

IconStyle

public IconStyle ()

Use constructor with parameters in your code.

This one is for bindings only!

Method Detail

getAnchor

public PointF getAnchor ()

An anchor is used to alter image placement.

Normalized: (0.0f, 0.0f) denotes the top left image corner; (1.0f, 1.0f) denotes bottom right. Default is (0.5f, 0.5f).Optional field, can be null.

getFlat

public Boolean getFlat ()

If true, the icon is displayed on the map surface.

If false, the icon is displayed on the screen surface. Default: false.Optional field, can be null.

getRotationType

public RotationType getRotationType ()

Icon rotation type.

Default: NoRotation.Optional field, can be null.

getScale

public Float getScale ()

Scale of the icon.

Default: 1.0f.Optional field, can be null.

getTappableArea

public Rect getTappableArea ()

Tappable area on the icon.

Coordinates are measured the same way as anchor coordinates. If rect is empty or invalid, the icon will not process taps. By default, icons process all taps.Optional field, can be null.

getVisible

public Boolean getVisible ()

Sets icon visibility.

Default: true.Optional field, can be null.

getZIndex

public Float getZIndex ()

Z-index of the icon, relative to the placemark's z-index.

Optional field, can be null.

serialize

public void serialize (Archive archive)

setAnchor

public IconStyle setAnchor (@Nullable PointF anchor)

See getAnchor().

setFlat

public IconStyle setFlat (@Nullable Boolean flat)

See getFlat().

setRotationType

public IconStyle setRotationType (@Nullable RotationType rotationType)

See getRotationType().

setScale

public IconStyle setScale (@Nullable Float scale)

See getScale().

setTappableArea

public IconStyle setTappableArea (@Nullable Rect tappableArea)

See getTappableArea().

setVisible

public IconStyle setVisible (@Nullable Boolean visible)

See getVisible().

setZIndex

public IconStyle setZIndex (@Nullable Float zIndex)

See getZIndex().