Interface CompositeIcon

com.yandex.mapkit.map

public interface CompositeIcon

Combines multiple icons into one.

Methods

boolean isValid()

Tells if this CompositeIcon is valid or no.

void removeAll()

Removes all layers.

void removeIcon(@NonNull String name)

Removes the named layer.

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

Creates or resets a named layer with an icon and its style.

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

Creates or resets a named layer that contains an icon and its style.

void setIconStyle(@NonNull String name, @NonNull IconStyle style)

Changes the icon style for a specific layer.

Method Detail

isValid

public boolean isValid ()

Tells if this CompositeIcon is valid or no.

Any other method (except for this one) called on an invalid CompositeIcon will throw java.lang.RuntimeException. An instance becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.

removeAll

public void removeAll ()

Removes all layers.

removeIcon

public void removeIcon (@NonNull String name)

Removes the named layer.

setIcon

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

Creates or resets a named layer with an icon and its style.

setIcon

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

Creates or resets a named layer that contains an icon and its style.

Parameters:
onFinished

Called when an icon is loaded.

setIconStyle

public void setIconStyle (@NonNull String name, @NonNull IconStyle style)

Changes the icon style for a specific layer.