mapType.storage
Static object.
Instance of util.Storage
Storage for map types.
Example:
// Adding a custom map type
// Let's say we have our own map layer
var myLayer = function () {
return new ymaps.Layer('http://some.server/?%c');
}
// Adding it to the layer storage
ymaps.layer.storage.add('my#layer', myLayer);
// Creating our own map type, consisting of a single layer
var myType = new ymaps.MapType('My map type', ['my#layer']);
// Adding it to the map type storage
ymaps.mapType.storage.add('my#mapType', myType);
// Now we can assign our map type to a map
map.setType('my#type');
Methods
Name |
Returns |
Description |
Adds an object to storage. |
||
Object |
Returns object stored for the specified key, or the primary key, if this is not a string. |
|
Deletes the "key: value" pair from storage. |