gpt4 book ai didi

javascript - 必应 map : how to get rid of names and borders

转载 作者:行者123 更新时间:2023-12-02 16:59:25 27 4
gpt4 key购买 nike

我想嵌入没有国家/城市信息且没有边界的卫星 Bing map ,基本上我只想要卫星照片并添加我的自定义图钉。有办法做到这一点吗?

现在,我使用以下方法创建 map :

var map = new Microsoft.Maps.Map(document.getElementById("bMap"),
{
credentials:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
center: new Microsoft.Maps.Location(35.173808, 90.402344),
mapTypeId: Microsoft.Maps.MapTypeId.birdseye,
zoom: 3,
disableZooming: true,
showCopyright: false,
showDashboard: false,
enableSearchLogo: false
}
);

最佳答案

当然,您可以使用 mapOption 中的 mapTypeId 属性并替换您的行:

mapTypeId: Microsoft.Maps.MapTypeId.birdseye,

通过这一行:

mapTypeId: Microsoft.Maps.MapTypeId.aerial,

请参阅 MSDN 以供引用:http://msdn.microsoft.com/en-us/library/gg427625.aspx

另外,结合起来,还需要使用labelOverlay属性来配置标签信息:

var mapOptions =  
{
credentials:"Your Bing Maps Key",
mapTypeId: Microsoft.Maps.MapTypeId.aerial,
center: new Microsoft.Maps.Location(37.794973,-122.393542),
zoom: 17,
labelOverlay: Microsoft.Maps.LabelOverlay.hidden
}

//Load the map
var map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), mapOptions );

这是 MSDN 引用:

关于javascript - 必应 map : how to get rid of names and borders,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25893740/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com