Interface IconSet

com.yandex.mapkit.map

public interface IconSet

A set of icons, which can be used in custom geojson layers.

Methods

void add(@NonNull ImageProvider image)

Adds the image to the icon set.

void add(@NonNull String id, @NonNull ImageProvider image)

Adds the image with the given ID to the icon source.

void add(@NonNull AnimatedImageProvider image)

Adds the animated image to the icon set.

void add(@NonNull String id, @NonNull AnimatedImageProvider image)

Adds the animated image with the given ID to the icon source.

boolean isValid()

Tells if this IconSet is valid or no.

Method Detail

add

public void add (@NonNull ImageProvider image)

Adds the image to the icon set.

The image provider's ID will be used as the icon ID. The image size is scaled using the formula "value = scaleFactor / 4". The same ID should be used in geojson tiles.

add

public void add (@NonNull String id, @NonNull ImageProvider image)

Adds the image with the given ID to the icon source.

The image size is scaled using the formula "value = scaleFactor / 4". The same ID should be used in geojson tiles.

add

public void add (@NonNull AnimatedImageProvider image)

Adds the animated image to the icon set.

The image provider's ID will be used as the icon ID. The image size is scaled using the formula "value = scaleFactor / 4". The same ID should be used in geojson tiles.

add

public void add (@NonNull String id, @NonNull AnimatedImageProvider image)

Adds the animated image with the given ID to the icon source.

The image size is scaled using the formula "value = scaleFactor / 4". The same ID should be used in geojson tiles.

isValid

public boolean isValid ()

Tells if this IconSet is valid or no.

Any other method (except for this one) called on an invalid IconSet 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.