1
votes

For a client I need to show a static Bing map, in Bird's Eye view, with the street labels turned off. I can accomplish Bird's Eye view with no labels for dynamic view by just clicking the toolbar buttons for Bird's Eye view and labels off. But my goal is to show this for a static map, on load, without the need to click any buttons.

Thank you!

2

2 Answers

5
votes

I'm putting everything in the <body> for demonstration purposes. You'd probably put the loading of the external mapcontrol library and your GetMap() function in the <head>. You might even want to put your own script in an external file.

<body onload="GetMap();">
<div id='myMap' style="position:relative; width:400px; height:400px;"></div>
<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>
<script type="text/javascript">
var map = null;

function GetMap() {
    map = new VEMap('myMap');
    map.LoadMap(new VELatLong(47.6, -122.33), 10, VEMapStyle.Birdseye, false);
}   
</script>
</body>

The parameters for VEMap.LoadMap(VELatLong, zoom, style, fixed, mode, showSwitch, tileBuffer, mapOptions) are:

VELatLong A VELatLong Class object that represents the center of the map. Optional.

zoom The zoom level to display. Valid values range from 1 through 19. Optional. Default is 4. Note that VEMapStyle.Birdseye seems to only support two zoom levels: 1 gives you the wide view, anything else gives you the close-up view.

style A VEMapStyle Enumeration value specifying the map style. Optional. Default is VEMapStyle.Road. I changed this to VEMapStyle.Birdseye as documented at VEMapStyle.

fixed A Boolean value that specifies whether the map view is displayed as a fixed map that the user cannot change. Optional. Default is false.

mode A VEMapMode Enumeration value that specifies whether to load the map in 2D or 3D mode. Optional. Default is VEMapMode.Mode2D.

showSwitch A Boolean value that specifies whether to show the map mode switch on the dashboard control. Optional. Default is true (the switch is displayed).

tileBuffer How much tile buffer to use when loading map. Default is 0 (do not load an extra boundary of tiles). This parameter is ignored in 3D mode.

mapOptions A VEMapOptions Class that specifies other map options to set.


Lastly, the Bing Maps Interactive SDK is a great resource for playing around and trying to figure out how things work and the Bing Map Control Class Reference documents the entire API.

-3
votes

The drop down menu that you pick either Birds Eye or Aerial from has a tick box under it saying "Show labels"

Simply untick it