• О MapKit
    • Начало работы
  • Стили карты
  • Версии MapKit
  • Часто задаваемые вопросы
  • Обратная связь

Package com.yandex.mapkit.layers

Class LayerOptions

java.lang.Object
    ↳ com.yandex.mapkit.layers.LayerOptions

final class LayerOptions implements Serializable

Options that are used when adding a layer to the map.

Summary

Constructors

Signature and Description

LayerOptions(boolean active,
             boolean nightModeAvailable,
             boolean cacheable,
             boolean animateOnActivation,
             long tileAppearingAnimationDuration,
             @NonNull OverzoomMode overzoomMode,
             boolean transparent,
             boolean versionSupport)

LayerOptions()
Use constructor with parameters in your code.

Methods

Type and modifiers

Method and Description

boolean

getActive()
Inactive layers are not displayed on the map and do not request any tiles from TileProvider.

LayerOptions

setActive(boolean active)
See #getActive().

boolean

getNightModeAvailable()
Indicates the availability of night mode for this layer (for example, night mode is disabled for the satellite layer).

LayerOptions

setNightModeAvailable(boolean nightModeAvailable)
See #getNightModeAvailable().

boolean

getCacheable()
Determines whether tiles are cached on persistent storage or not.

LayerOptions

setCacheable(boolean cacheable)
See #getCacheable().

boolean

getAnimateOnActivation()
Indicates whether layer activation/deactivation should be animated.

LayerOptions

setAnimateOnActivation(boolean animateOnActivation)
See #getAnimateOnActivation().

long

getTileAppearingAnimationDuration()
Specifies duration of tile appearing animation.

LayerOptions

setTileAppearingAnimationDuration(long tileAppearingAnimationDuration)
See #getTileAppearingAnimationDuration().

OverzoomMode

getOverzoomMode()
Whether to render tiles from adjacent zoom levels in place of absent or translucent tiles.

LayerOptions

setOverzoomMode(@NonNull OverzoomMode overzoomMode)
See #getOverzoomMode().

boolean

getTransparent()
Set this flag if layer is transparent, that is parts of underlying layers can be seen through it.

LayerOptions

setTransparent(boolean transparent)
See #getTransparent().

boolean

getVersionSupport()
Determines if layer supports versioning

LayerOptions

setVersionSupport(boolean versionSupport)
See #getVersionSupport().

void

serialize(com.yandex.runtime.bindings.Archive archive)

Constuctors

LayerOptions

LayerOptions(boolean active,
             boolean nightModeAvailable,
             boolean cacheable,
             boolean animateOnActivation,
             long tileAppearingAnimationDuration,
             @NonNull OverzoomMode overzoomMode,
             boolean transparent,
             boolean versionSupport)


LayerOptions

LayerOptions()

Use constructor with parameters in your code.

This one is for bindings only!


Methods

getActive

boolean getActive()

Inactive layers are not displayed on the map and do not request any tiles from TileProvider.


setActive

LayerOptions setActive(boolean active)

See #getActive().


getNightModeAvailable

boolean getNightModeAvailable()

Indicates the availability of night mode for this layer (for example, night mode is disabled for the satellite layer).

Default: true.


setNightModeAvailable

LayerOptions setNightModeAvailable(boolean nightModeAvailable)

See #getNightModeAvailable().


getCacheable

boolean getCacheable()

Determines whether tiles are cached on persistent storage or not.


setCacheable

LayerOptions setCacheable(boolean cacheable)

See #getCacheable().


getAnimateOnActivation

boolean getAnimateOnActivation()

Indicates whether layer activation/deactivation should be animated.


setAnimateOnActivation

LayerOptions setAnimateOnActivation(boolean animateOnActivation)

See #getAnimateOnActivation().


getTileAppearingAnimationDuration

long getTileAppearingAnimationDuration()

Specifies duration of tile appearing animation.

Can be set to 0 to disable animation. Default: 400 ms


setTileAppearingAnimationDuration

LayerOptions setTileAppearingAnimationDuration(long tileAppearingAnimationDuration)

See #getTileAppearingAnimationDuration().


getOverzoomMode

@NonNull
OverzoomMode getOverzoomMode()

Whether to render tiles from adjacent zoom levels in place of absent or translucent tiles.


setOverzoomMode

LayerOptions setOverzoomMode(@NonNull OverzoomMode overzoomMode)

See #getOverzoomMode().


getTransparent

boolean getTransparent()

Set this flag if layer is transparent, that is parts of underlying layers can be seen through it.

This will disable some rendering optimizations that take advantage of layer opacity.


setTransparent

LayerOptions setTransparent(boolean transparent)

See #getTransparent().


getVersionSupport

boolean getVersionSupport()

Determines if layer supports versioning


setVersionSupport

LayerOptions setVersionSupport(boolean versionSupport)

See #getVersionSupport().


serialize

@Override
void serialize(com.yandex.runtime.bindings.Archive archive)


Предыдущая
Следующая