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:
- 'default#placemark' - Placemark image overlay overlay.Placemark.
- 'default#pin' - Overlay of the circle overlay.Pin placemark
- 'default#circle' - Circle overlay overlay.Circle.
- 'default#rectangle' - Rectangle overlay overlay.Rectangle.
- 'default#polyline' - Polyline overlay overlay.Polyline.
- 'default#polygon' - Polygon overlay overlay.Polygon.
- 'hotspot#placemark' - Hotspot placemark overlay overlay.hotspot.Placemark.
- 'hotspot#circle' - Hotspot circle overlay overlay.hotspot.Circle.
- 'hotspot#rectangle' - Hotspot rectangle overlay overlay.hotspot.Rectangle.
- 'hotspot#polyline' - Hotspot polyline overlay overlay.hotspot.Polyline.
- 'hotspot#polygon' - Hotspot polygon overlay overlay.hotspot.Polygon.
- 'html#balloon' - HTML balloon overlay overlay.html.Balloon.
- 'html#hint' - Basic HTML overlay overlay.html.Hint.
- 'html#placemark' - HTML placemark overlay overlay.html.Placemark.
- 'html#rectangle' - HTML rectangle overlay overlay.html.Rectangle.
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 |
Adds an object to storage. |
||
define(key[, depends, resolveCallback[, context]]) |
Defines an asynchronous value in storage. |
|
Object |
Returns object stored for the specified key, or the primary key, if this is not a string. |
|
Boolean |
Checking if the key can be accessed in the storage. |
|
Deletes the "key: value" pair from storage. |
||
require(keys[, successCallback[, errorCallback[, context]]]) |
Async request to get values from the storage. |
Mandatory parameter/option.