• About MapKit
    • Getting started
  • Map styles
  • MapKit SDK versions
  • Frequently asked questions
  • Contact us

Package com.yandex.mapkit.layers

Interface Layer

interface Layer

Interface for working with the layer.

Summary

Methods

Type and modifiers

Method and Description

void

remove()
Removes the layer from the map.

DataSourceLayer

dataSourceLayer()

boolean

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

Methods

remove

void remove()

Removes the layer from the map.

The object becomes invalid after that.


dataSourceLayer

@NonNull
DataSourceLayer dataSourceLayer()


isValid

boolean isValid()

Tells if this Layer is valid or not.

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