Skip to content

Commit

Permalink
L.BingLayer: add comment about metadata request billing
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoe committed Jun 10, 2019
1 parent 4ca6598 commit 4f92e22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions layer/tile/Bing.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ L.BingLayer = L.TileLayer.extend({
},

onAdd: function (map) {
// Note: Metadata could be loaded earlier, on layer initialize,
// but according to docs even such request is billable:
// https://docs.microsoft.com/en-us/bingmaps/getting-started/bing-maps-dev-center-help/understanding-bing-maps-transactions#rest-services
// That's why it's important to defer it till BingLayer is actually added to map
this.loadMetadata();
L.GridLayer.prototype.onAdd.call(this, map);
},
Expand Down

0 comments on commit 4f92e22

Please sign in to comment.