nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

Bing.js (736B)


      1 import L from 'leaflet';
      2 import {BingLayer} from '~/lib/leaflet.layer.bing';
      3 
      4 BingLayer.include({
      5         waitTilesReadyToGrab: function() {
      6             if (this._url) {
      7                 return Promise.resolve();
      8             }
      9             return new Promise((resolve) => {
     10                     let i = setInterval(() => {
     11                             if (this._url) {
     12                                 clearInterval(i);
     13                                 resolve();
     14                             }
     15                         }, 50
     16                     );
     17                 }
     18             );
     19         },
     20 
     21         cloneForPrint: function(options) {
     22             return new BingLayer(this._key, L.Util.extend({}, this.options, options));
     23         },
     24     }
     25 );