From 0e471bade054a069967ad35938c73bb22be06eb3 Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Wed, 21 Sep 2016 19:53:38 +0200 Subject: [PATCH] Replace custom Bing.js with current Now provides file:// support and init on layer add instead of page load --- bower.json | 2 +- js/Map.js | 1 - js/plugin/Bing.js | 8 +------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/bower.json b/bower.json index 834cc74..beabf88 100644 --- a/bower.json +++ b/bower.json @@ -8,7 +8,7 @@ ], "dependencies": { "leaflet": "~0.7.3", - "leaflet-plugins": "nrenner/leaflet-plugins#https-only", + "leaflet-plugins": "~2.0.0", "leaflet-routing": "Turistforeningen/leaflet-routing#gh-pages", "async": "~0.9.2", "d3": "~3.5.5", diff --git a/js/Map.js b/js/Map.js index ad4afc9..5915ce1 100644 --- a/js/Map.js +++ b/js/Map.js @@ -64,7 +64,6 @@ BR.Map = { } bing._key = key; - bing.loadMetadata(); }); map = new L.Map('map', { diff --git a/js/plugin/Bing.js b/js/plugin/Bing.js index 69eaee5..981820f 100644 --- a/js/plugin/Bing.js +++ b/js/plugin/Bing.js @@ -6,13 +6,7 @@ BR.BingLayer = L.BingLayer.extend({ }, initialize: function(key, options) { - // override super to disable loadMetadata until async key load (called explicitly then) - L.Util.setOptions(this, options); - - this._key = key; - this._url = null; - this.meta = {}; - //this.loadMetadata(); + L.BingLayer.prototype.initialize.call(this, key, options); this._logo = L.control({position: 'bottomleft'}); this._logo.onAdd = function (map) {