Bing map ajax v7控件不显示infoBox'关闭'按钮(Bing map ajax v7 control does not show infoBox 'close' button)

由于某种原因,此属性被忽略。 下面是我的代码,因为你可以看到我不使用自定义HTML。 知道为什么吗?

编辑:我正在使用BingTheme。 我需要这个按钮的原因是,由于某些原因,有时候在地图上点击另一个地方时,infoBox不会自动关闭

this.map.entities.push(new Microsoft.Maps.Infobox(currentLocation, { title: location.threatType, description: layer.Options.InfoBoxText + "</br>IP: " + location.IP, pushpin: pin, zIndex: 100, showCloseButton: true }));

For some reason this property is ignored. Below is my code, as you can see i don't use a custom html. Any idea why?

edit: i'm using the BingTheme. the reason i need this button is that for some reason sometimes the infoBox does not close automatically when clicking another place on the map

this.map.entities.push(new Microsoft.Maps.Infobox(currentLocation, { title: location.threatType, description: layer.Options.InfoBoxText + "</br>IP: " + location.IP, pushpin: pin, zIndex: 100, showCloseButton: true }));

最满意答案

Bing主题模块会覆盖所有样式,以匹配现在较旧的Bing Maps网站使用的样式。 因为这样的自定义,例如显示关闭按钮被禁用。 我个人从不喜欢这个模块,建议不要使用它。 您可以使用没有此模块的控件创建更多自定义项。

The Bing Theme module overrides all styles to match the styles that are used by, now older, Bing Maps site. As such customizations, such as showing the close button are disabled. I, personally never liked this module and recommend not using it. You can create a lot more customizations using the control without this module.

Bing map ajax v7控件不显示infoBox'关闭'按钮(Bing map ajax v7 control does not show infoBox 'close' button)

由于某种原因,此属性被忽略。 下面是我的代码,因为你可以看到我不使用自定义HTML。 知道为什么吗?

编辑:我正在使用BingTheme。 我需要这个按钮的原因是,由于某些原因,有时候在地图上点击另一个地方时,infoBox不会自动关闭

this.map.entities.push(new Microsoft.Maps.Infobox(currentLocation, { title: location.threatType, description: layer.Options.InfoBoxText + "</br>IP: " + location.IP, pushpin: pin, zIndex: 100, showCloseButton: true }));

For some reason this property is ignored. Below is my code, as you can see i don't use a custom html. Any idea why?

edit: i'm using the BingTheme. the reason i need this button is that for some reason sometimes the infoBox does not close automatically when clicking another place on the map

this.map.entities.push(new Microsoft.Maps.Infobox(currentLocation, { title: location.threatType, description: layer.Options.InfoBoxText + "</br>IP: " + location.IP, pushpin: pin, zIndex: 100, showCloseButton: true }));

最满意答案

Bing主题模块会覆盖所有样式,以匹配现在较旧的Bing Maps网站使用的样式。 因为这样的自定义,例如显示关闭按钮被禁用。 我个人从不喜欢这个模块,建议不要使用它。 您可以使用没有此模块的控件创建更多自定义项。

The Bing Theme module overrides all styles to match the styles that are used by, now older, Bing Maps site. As such customizations, such as showing the close button are disabled. I, personally never liked this module and recommend not using it. You can create a lot more customizations using the control without this module.