Open ARChilton opened 7 years ago
I believe this is what this plugin already does. It makes an initial request to the Imagery Metadata API with your Bing Maps API Key, which returns a URL for tile requests. This URL does not seem to include your API key and I don't think those tile requests are billable, but I do not know for sure.
I think this is already resolved, closing since it's been quiet for 6 months.
I believe this is what this plugin already does.
No, it does not.
I don't think those tile requests are billable
In fact it is billable. See https://docs.microsoft.com/en-us/bingmaps/getting-started/bing-maps-dev-center-help/understanding-bing-maps-transactions#rest-services
Only RESTImagery-BasicMetadata
is not billable, but it does not contain URI template, which is needed for plugin.
And you can see in that table - RESTImagery
is billable.
So, every Bing layer instance initialization produces billable request. Even if layer is not added to map.
So it makes sense to defer metadata request until layer is actually added to map. Old shramov plugin does so.
BTW, your POINT_METADATA_URL could be made with not billable BasicMetadata
request, you just need to fix url.
Re-opening, open to PRs to fix this.
open to PRs to fix this.
Implemented in other project: https://github.com/shramov/leaflet-plugins/blob/61a19e577fc244e0c00b278bea886e09edbc7d21/layer/tile/Bing.js#L212-L216
Does anyone have any methodology for requesting the bing maps session ID used after the original API key to reduce billable map tile requests.
On the Bing site it says this:
However, I cannot work out how to do this using Leaflet and this plug-in (which is very good!)
If anyone has any ideas that would be brilliant, thanks!