我使用带有一个Bing层的Openlayers 2。但我想隐藏标签(城市、街道…)我在MSDN中找到了一些关于的内容:https://msdn.microsoft.com/en-us/library/gg427602.aspx我如何在openlayer中使用此属性。
var road = new OpenLayers.Layer.Bing({
key: apiKey,
type: "Road",
// custom metadata parameter to request the new map style - only useful
// before May 1st, 2011
metadataParams: { mapVersion: "v1" },
});
谢谢Christophe
在OpenLayers中没有这样做的选项。这只能在Bing Maps V8地图控件中完成。以下是在V8:中执行此操作的代码
var map = new Microsoft.Maps.Map(document.getElementById('myMap'), {
credentials: 'Your Bing Maps Key',
allowHidingRoadLabels: true,
labelOverlay: Microsoft.Maps.LabelOverlay.hidden
});