在大约20分钟的不活动之后,我无法在必应地图中显示路线。以下几个方面似乎存在问题:
routeLoadModule=function routeLoadModule(){
Microsoft.Maps.loadModule('Microsoft.Maps.Directions', function() {
//Create an instance of the directions manager.
directionsManager = new Microsoft.Maps.Directions.DirectionsManager(map);
directionsManager.setRenderOptions({
itineraryContainer: '#directionsItinerary'
});
//Specify the where to display the input panel
directionsManager.showInputPanel('directionsPanel');
});我从浏览器中得到一条错误消息:
Microsoft.Maps.NetworkCallbacks.f7628e ({"authenticationResultCode": "CredentialsExpired", "brandLogoUri": "http:\/\/dev.virtualearth.net\/Branding… “我试图在"authenticationResultCode ":“CredentialsExpired”(触发刷新凭据)上创建一个侦听器,但没有成功。
我将感谢你帮助解决我的问题。
发布于 2022-10-26 17:56:57
必应地图Web在加载时创建会话密钥。向Bing地图发出的所有服务请求都使用此会话键进行,并将这些请求标记为不可计费。此会话密钥在大约20分钟后过期(最有可能防止滥用不可计费的使用)。我认为在键过期时恢复的唯一方法是重新加载地图脚本和地图(或者在应用程序中释放/重新加载,或者刷新页面)。
https://stackoverflow.com/questions/74202996
复制相似问题