首页 / 浏览问题 / 三维GIS / 问题详情
在vue中加载三维场景泛白且BingMaps加载不了
16EXP 2020年07月14日
在vue中加载三维场景泛白,而且BingMapsImageryProvider地图加载不了,跟代码是请求成功了但是就是没有

    viewer.imageryLayers.addImageryProvider(new Cesium.BingMapsImageryProvider({
                    url : 'https://dev.virtualearth.net',
                    mapStyle : Cesium.BingMapsStyle.AERIAL,
                    key : URL_CONFIG.BING_MAP_KEY
         }));

这个代码跟踪是请求成功了,但是没有显示也没有报错

1个回答

您好,response里面返回的信息是什么,您这边是否方便给我一个能重现的测试代码?
康鑫
1
6,077EXP 2020年07月14日
loadJsonp699080({"authenticationResultCode":"InvalidCredentials","brandLogoUri":"http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png","copyright":"Copyright © 2020 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","errorDetails":["Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation."],"resourceSets":[],"statusCode":401,"statusDescription":"Unauthorized","traceId":"19e6f703d78645688162469d1541cdaf|HK00000C08|0.0.0.1"})
我再本地用html返回的值一样,放到iserver可以显示出来,但是用vue不行
您这个返回的信息是错误的啊Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation,

statusCode":401,"statusDescription":"Unauthorized您这边再检查一下您的秘钥是否正确(key),在config.js里面

crying是我写错了,谢谢

...