Export (0) Print
Expand All

MapTypeId Enumeration

Bing

Contains identifiers for the imagery displayed on the map.

Constants

Enumeration Name Short Name* Description

arial

a

The aerial map type is being used.

auto

auto

The map is set to choose the best imagery for the current view.

birdseye

be

The bird’s eye map type is being used.

collinsBart

Gg427625.note(en-us,MSDN.10).gifNote:
You must also set the mkt parameter to en-gb in the map control reference to see this imagery.

cb

Collin’s Bart (mkt=en-gb) map type is being used.

mercator

m

The Mercator map type is being used. This setting removes the base map tiles.

ordnanceSurvey

Gg427625.note(en-us,MSDN.10).gifNote:
You must also set the mkt parameter to en-gb in the map control reference to see this imagery.

os

Ordnance Survey (mkt=en-gb) map type is being used.

road

r

The road map type is being used.

* The short name string is returned when you request the map type ID using Map.GetMapTypeId.

Example

This code sample sets the map imagery to Collin’s Bart (cb). Since this imagery is only supported for the en-gb culture, the mkt parameter of the control is set to this culture.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
   <head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

      <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-gb"></script>

      <script type="text/javascript">
      function GetMap()
      {   

         var map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), {credentials:"Bing Maps Key", center: new Microsoft.Maps.Location(51.5, -.1), zoom: 10, mapTypeId:Microsoft.Maps.MapTypeId.collinsbart});
      }
      </script>
   </head>
   <body onload="GetMap();">
      <div id='mapDiv' style="position:relative; width:600px; height:600px;"></div>       
   </body>
</html>

See Also

Show:
© 2014 Microsoft