-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
L.Yandex: fixes, enhancements and refactoring #285
L.Yandex: fixes, enhancements and refactoring #285
Commits on May 23, 2019
-
minor bug: _update didn't expect argument from
move
event listenerjohndoe committedMay 23, 2019 Configuration menu - View commit details
-
Copy full SHA for a638b0f - Browse repository at this point
Copy the full SHA a638b0fView commit details -
reduce flickering caused by excessive tiles reloading after zoom changes
for some reason 2 consequtive yandex api calls produced such effect replacing two calls with one reduces this a lot
johndoe committedMay 23, 2019 Configuration menu - View commit details
-
Copy full SHA for 3d35176 - Browse repository at this point
Copy the full SHA 3d35176View commit details
Commits on May 24, 2019
-
It's that simple. Just wrong function was used) Fix shramov#253, and part of shramov#111. Note: zoom animation still fails (shramov#129)
johndoe committedMay 24, 2019 Configuration menu - View commit details
-
Copy full SHA for b2d4528 - Browse repository at this point
Copy the full SHA b2d4528View commit details
Commits on May 30, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 0f5a413 - Browse repository at this point
Copy the full SHA 0f5a413View commit details
Commits on Jun 10, 2019
-
L.Yandex: factory function
L.yandex
;type
can be omitted if inclu……ded in `options` --- @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. @option type: String = 'yandex#map' The same as `type` argument.
johndoe committedJun 10, 2019 Configuration menu - View commit details
-
Copy full SHA for 47ebb63 - Browse repository at this point
Copy the full SHA 47ebb63View commit details
Commits on Jun 28, 2019
-
L.Yandex: update examples/yandex.html
* enhance sample code * upgrade to use latest leaflet * upgrade to https
johndoe committedJun 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 6dba910 - Browse repository at this point
Copy the full SHA 6dba910View commit details -
* L.Layer is already inherited from L.Evented As for L.Mixin.Events, then we do not support Leaflet 0.x * actual max available zoom level is 19 * _insertAtBottom, _limitedUpdate: was not used * getAttribution is already in L.Layer * _reset contains _initContainer, which already called in onAdd And as we already have container, it makes no sense to check it on 'viewreset' * setOpacity: no need to expose it * setElementSize: is excessive, as css '100%' is to follow map resize. * undefined is same as false in conditions * consistent curly braces usage and other minor style issues
johndoe committedJun 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 92bd641 - Browse repository at this point
Copy the full SHA 92bd641View commit details -
L.Yandex: fix zoom limits not being applied
johndoe committedJun 28, 2019 Configuration menu - View commit details
-
Copy full SHA for cee5093 - Browse repository at this point
Copy the full SHA cee5093View commit details -
L.Yandex: fix exception in
_update
when layer was removed before ym……aps initialized
johndoe committedJun 28, 2019 Configuration menu - View commit details
-
Copy full SHA for d6c1199 - Browse repository at this point
Copy the full SHA d6c1199View commit details -
L.Yandex: use getEvents, which is handled by L.Layer
johndoe committedJun 28, 2019 Configuration menu - View commit details
-
Copy full SHA for bff9e98 - Browse repository at this point
Copy the full SHA bff9e98View commit details -
L.Yandex: refactor; simplify overlay API
* remove overlay option, it's now controlled by 'overlay' map type - opacity for overlay is handled automatically but (for compatibility reasons) `opacity` option is still able to override default value - background is now transparent for all map types, but this can be canceled by `background` option * simplify map type handling Note: 'publicMap' and 'publicMapHybrid' are valid map types, but currently they are identical to 'map' and 'hybrid'
johndoe committedJun 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 41925ad - Browse repository at this point
Copy the full SHA 41925adView commit details -
L.Yandex: upgrade to ymaps JSAPI 2.1
* JSAPI 2.0 is not supported anymore. It would need complex handling to keep it working with both api sets. * Simplify `_initMapObject` as new api is able to auto-load required modules * replace `traffic` option with `trafficControl` * add `mapOptions` option: https://tech.yandex.com/maps/doc/jsapi/2.1/ref/reference/Map-docpage/#Map__param-options Refs: https://tech.yandex.ru/maps/jsapi/doc/2.1/ref/reference/Map-docpage/#Map__param-options.suppressMapOpenBlock https://tech.yandex.com/maps/jsapi/doc/2.1/ref/reference/Map-docpage/#Map__param-options.yandexMapDisablePoiInteractivity https://tech.yandex.com/maps/jsapi/doc/2.1/ref/reference/Balloon-docpage/#Balloon__param-options.autoPan auto pan should be disabled to prevent uncoordinated layers offset (or we may just disable poi interactivity to avoid balloon handling) * add two new map types to cover all existing layer types (see ymaps.layer.storage) --- @Class L.Yandex @inherits L.Layer Used to load and display tile layers on the map using Yandex JSAPI 2.1 https://tech.yandex.com/maps/doc/jsapi/2.1/quick-start/index-docpage/ @example ```js L.yandex('yandex#satellite'}).addTo(map); ``` @section Map type @example Possible basemap types: `yandex#map`, `yandex#satellite`, `yandex#hybrid`, `yandex#map~vector` or their short names: `map`, `satellite`, `hybrid`, `map~vector` Possible 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). @event MapObjectInitialized: Event Fired after Yandex map object is initialized. Event listener receives object containing `mapObject` property. @option mapOptions: Object (see in sources) Options to set on map creation: https://tech.yandex.com/maps/doc/jsapi/2.1/ref/reference/Map-docpage/#Map__param-options @option overlayOpacity: Number = 0.8 Opacity used for map type `overlay`. @option opacity: Number = undefined Force map opacity to given value. Not really useful, but kept for compatibility.
johndoe committedJun 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 5b4c359 - Browse repository at this point
Copy the full SHA 5b4c359View commit details
Commits on Jun 29, 2019
-
L.Yandex: do not try to override controls panel margins
It's bad practice, and may conflict with other leaflet controls, css, and actual developer intentions. And it even do not work in some cases, e.g. when 2 yandex layers added, and then remove 1. Besides, we do not need two attribution controls anyway (and it looks ugly). It'd be better to gather all info in 1 (either Yandex's, either Leaflet's), and there is API for this. Choosing appropriate decision is up on developer now. If he want to change margins - let him do this explicitely. And there are plenty of other options, among them: - move attribution control to other corner - disable attribution control completely - implement dynamic attribution fetching from one control to another
johndoe committedJun 29, 2019 Configuration menu - View commit details
-
Copy full SHA for 7e38817 - Browse repository at this point
Copy the full SHA 7e38817View commit details -
L.Yandex: fix z-order of overlay
Previously overlay was positioned over map pane, and this prevented normal interaction with features (like markers, popups, etc). Correct z-order can be provided only if overlay belongs to same stacking context as the rest of panes, thats why we have to make it descendant of leaflet-map-pane. But as map pane is panning on drag, it's now necessary to update ymaps offset in opposite order to fit into visible window. --- Note, that currently ymaps controls/copyrights belong to the rest of layer: - positioned *behind* leaflet controls / features - moving along with ground (tile) layer on drag (not an issue when updating is fast) It's possible to fix it, if we divide ymaps panes into different containers. That could lead to other issues thought.. So let it as is for now.
johndoe committedJun 29, 2019 Configuration menu - View commit details
-
Copy full SHA for d17ad29 - Browse repository at this point
Copy the full SHA d17ad29View commit details -
L.Yandex: implement zoom animation
johndoe committedJun 29, 2019 Configuration menu - View commit details
-
Copy full SHA for 3d402ac - Browse repository at this point
Copy the full SHA 3d402acView commit details
Commits on Jun 30, 2019
-
L.Yandex: animate movable panes only
ymaps controls and copyrights shouldn't animate Note: we need to ensure that 'leaflet-zoom-animated' class is set, as more panes can be added in runtime
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for ca1991b - Browse repository at this point
Copy the full SHA ca1991bView commit details -
L.Yandex: extra error protection
* prevent container removing in onRemove until api initialized. ymaps API currently expecting DOM element (to support IE). Other browsers also affected when load param mode=debug https://tech.yandex.com/maps/jsapi/doc/2.1/dg/concepts/load-docpage/#load__param * prevent repeated map object initialization when layer removed/added before api is initialized onAdd / _initContainer refactored
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for 3337e01 - Browse repository at this point
Copy the full SHA 3337e01View commit details -
L.Yandex: clean up on map unload
For optimization purposes L.Yandex does not destroy itself onRemove (like simple tile layers do) But it's still better to clean up on map unload
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for 41a0c7e - Browse repository at this point
Copy the full SHA 41a0c7eView commit details -
L.Yandex: refactor: rename event; get rid of unneeded css classes/id
* _container.id is not set anymore * leaflet-map-pane class is not set anymore * `MapObjectInitialized` is renamed to more typical `load` event `mapObject` property is removed, as it's available as `target._yandex` --- @event load: Event Fired after Yandex map object is initialized.
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for 8f0e877 - Browse repository at this point
Copy the full SHA 8f0e877View commit details -
L.Yandex: remove trafficControl support, as traffic layer can be adde…
…d using ymaps JSAPI directly usage sample provided in yandex.html (it's also example of 'load' event usage)
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for d89163e - Browse repository at this point
Copy the full SHA d89163eView commit details -
L.Yandex: add sample for adding some Yandex controls (incl. trafficCo…
…ntrol), via ymaps JSAPI see yandex-controls.html
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for ef02f04 - Browse repository at this point
Copy the full SHA ef02f04View commit details -
L.Yandex: implement Yandex.addon.Controls.js
This addon allows using of Yandex controls just specify them in options, without direct ymaps JSAPI calls. see yandex-addon-controls.html (functionality is the same as in yandex-controls.html)
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for c4dc895 - Browse repository at this point
Copy the full SHA c4dc895View commit details -
L.Yandex: add _resyncView method
It's function is opposite to `_update`: resync center/zoom back from _yandex to map. Intended to use in (upcoming) addons (L.Yandex itself currently does not use it internally)
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for 3d389cf - Browse repository at this point
Copy the full SHA 3d389cfView commit details -
L.Yandex: implement Yandex.addon.Panorama.js
Purpose: to integrate panoramas player with leaflet map, avoiding controls conflicts. It's function is to take player out of map and put it into separate element. see yandex-addon-panorama.html
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for 88e994a - Browse repository at this point
Copy the full SHA 88e994aView commit details -
L.Yandex: implement Yandex.addon.Fullscreen.js
Purpose: enable standard Yandex map controls/behaviors in fullscreen. see yandex-addon-fullscreen.html
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for f2fc908 - Browse repository at this point
Copy the full SHA f2fc908View commit details -
L.Yandex: new sample yandex-kml-gpx.html
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for acc326e - Browse repository at this point
Copy the full SHA acc326eView commit details -
L.Yandex: minor refactoring: all events set only after ymaps api init…
…ialized
johndoe committedJun 30, 2019 Configuration menu - View commit details
-
Copy full SHA for 67c9abb - Browse repository at this point
Copy the full SHA 67c9abbView commit details
Commits on Jul 2, 2019
-
L.Yandex: implement Yandex.addon.LoadApi.js
It's purpose is dynamic/deferred runtime API enabling. Yandex.js: _initApi method for extending in addon See examples/yandex-addon-loadapi-*.html Another sample loader function similar to used in https://gitlab.com/IvanSanchez/Leaflet.GridLayer.GoogleMutant/: ``` function apiLoader() { return new Promise(function (resolve, reject) { var timer = setInterval(function () { if (typeof ymaps !== 'undefined') { resolve(); } else if (counter<10) { counter++; return; } else { reject('API is not available'); } clearInterval(timer); }, 500); }); } ```
johndoe committedJul 2, 2019 Configuration menu - View commit details
-
Copy full SHA for ed47982 - Browse repository at this point
Copy the full SHA ed47982View commit details
Commits on Jul 10, 2019
-
johndoe committed
Jul 10, 2019 Configuration menu - View commit details
-
Copy full SHA for dce2d3d - Browse repository at this point
Copy the full SHA dce2d3dView commit details