【发布时间】:2020-08-17 13:40:38
【问题描述】:
我正在尝试调用带有位置的 api,以在 bing 地图上显示 GeoJson 对象。我在下面编写了代码,但地图上没有显示任何内容,也没有错误。
您能看看这段代码有什么问题吗?
var api = 'https://api/locations';
Microsoft.Maps.loadModule('Microsoft.Maps.GeoJson', function () {
Microsoft.Maps.GeoJson.readFromUrl(api,
function (shapes) {
//Add the shape(s) to the map.
map.entities.push(shapes);
}, 'callback');
});
谢谢
【问题讨论】: