Package com.yandex.mapkit.map

Interface CompositeIcon

interface CompositeIcon

Combines multiple icons into one.

Summary

Methods

Type and modifiers

Method and Description

void

setIcon(@NonNull java.lang.String name,
        @NonNull ImageProvider image,
        @NonNull IconStyle style)

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

void

setIcon(@NonNull java.lang.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 java.lang.String name,
             @NonNull IconStyle style)

Changes the icon style for a specific layer.

void

removeIcon(@NonNull java.lang.String name)
Removes the named layer.

void

removeAll()
Removes all layers.

boolean

isValid()
Tells if this CompositeIcon is valid or not.

Methods

setIcon

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

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


setIcon

void setIcon(@NonNull java.lang.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

void setIconStyle(@NonNull java.lang.String name,
                  @NonNull IconStyle style)

Changes the icon style for a specific layer.


removeIcon

void removeIcon(@NonNull java.lang.String name)

Removes the named layer.


removeAll

void removeAll()

Removes all layers.


isValid

boolean isValid()

Tells if this CompositeIcon is valid or not.

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.