Skip to content

Latest commit

 

History

History
113 lines (62 loc) · 3.62 KB

Yandex.md

File metadata and controls

113 lines (62 loc) · 3.62 KB

L.Yandex

A Leaflet basemap provider based on Yandex.Maps JS API 2.1.

L.Yandex extends L.Layer.

API

Usage example

L.yandex('yandex#satellite').addTo(map);

Creation

Factory: L.yandex(<String> type?, <Object> options?)

Instantiates a Yandex layer object given type and options arguments (both optional).

Can be used with single options argument, if it contains type property.

Map types

  • Valid basemap types: yandex#map, yandex#satellite, yandex#hybrid, yandex#map~vector or their short names: map, satellite, hybrid, map~vector.

  • Valid overlay types:

    • overlay - empty transparent map, which can be used for displaying data provided e.g. by controls.
    • skeleton - roads and labels, like in hybrid (but w/o basemap).

Options

Option Type Default Description
type String 'yandex#map' The same as type argument.
mapOptions Object (see in the sources) Options to set on map creation.
overlayOpacity Number 0.8 Opacity used for overlay map types.
opacity Number undefined Force map opacity to given value. Not really useful, but kept for compatibility.

Note, that traffic option removed, as traffic layer can be added using ymaps JSAPI directly. See Examples and Addons sections of this documentation.

Events

load: Fired after Yandex map object is initialized.

Data: Event

Examples

Addons

'Addons' are optional scripts adding some custom functionality to main class.

Should be loaded after Yandex.js.

Addons can add own api (options, methods, etc), that is described in their source files' comments.