GMap.NET icon indicating copy to clipboard operation
GMap.NET copied to clipboard

Bing API credentials not renewed after expiration

Open Dunge opened this issue 5 years ago • 0 comments

Bing API demands a token when authenticating but it expires after a while (more than 1hour). If you let your application open at one point Bing requests fail for calls like getRoute() and you need to restart your application hosting gmap for it to get a new token.

I managed to work around in BingMapProvider.cs by removing the "if(!init)" in OnInitialized() and calling OnInitialized() inside GetRoute() to force a new token at every call, but I guess someone could come up with a better fix.

Dunge avatar Mar 20 '20 15:03 Dunge