overlay.storage

Static object.

Instance of util.AsyncStorage

Storage for overlays. By default, the overlays have not been added to package.full (the standard set of modules). Overlays are loaded on demand when geo objects are added to the map. To get the overlay class, use the require method for this storage. By default, the storage declares the following keys for asynchronous access:

Methods

Example:

ymaps.overlay.storage.require(['hotspot#circle'], function (HotspotOverlayClass) {
    // Creating an instance of the received class.
    var overlay = new HotspotOverlayClass(
        new ymaps.geometry.Circle([30, 50], 10), {}, {}
    );
});

Methods

Name

Returns

Description

add(key, object)

util.Storage

Adds an object to storage.

define(key[, depends, resolveCallback[, context]])

util.AsyncStorage

Defines an asynchronous value in storage.

get(key)

Object

Returns object stored for the specified key, or the primary key, if this is not a string.

isDefined(key)

Boolean

Checking if the key can be accessed in the storage.

remove(key)

util.Storage

Deletes the "key: value" pair from storage.

require(keys[, successCallback[, errorCallback[, context]]])

vow.Promise

Async request to get values from the storage.