问题
I am using a Bing Maps v7 Ajax Control, but can't see the navigation bar with the zoom tools even when setting showDashboard:true
. It seems to only be the case when the following setting is also set: showMapTypeSelector: false
.
回答1:
This was because the showMapTypeSelector
applies a class called hidden
to the navigation bar div
. Unfortunately I also use Twitter Bootstrap which also has a class named hidden
which of course hides the div
!
Fixed it with a little dirty css hack as follows:
#SDKmap .hidden {
display: block;
visibility: visible;
}
Where SDKmap
is the map element ID.
来源:https://stackoverflow.com/questions/15546192/bing-maps-v7-not-showing-navigation-bar