Export (0) Print
Expand All

Microsoft.Maps.Overlays.Style Reference

Bing

This section contains reference documentation for the Microsoft.Maps.Overlays.Style module, which allows you to access Bing Maps overlay styles.

Hh397913.note(en-us,MSDN.10).gifNote:
Before you can access Microsoft.Maps.Overlays.Style styles, you must first load this module using the loadModule method. Information about loading modules is in the Module Loading Methods topic.

Navigation Bar Style

To load the new Bing Maps navigation bar, load the Microsoft.Maps.Overlays.Style module, then set the customizeOverlaysmap option to true.

<!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"></script>

      <script type="text/javascript">

      var map = null;

      Microsoft.Maps.loadModule('Microsoft.Maps.Overlays.Style', { callback: GetMap });

      function GetMap()
      {  

         var options = {credentials: "Bing Maps Key", center: new Microsoft.Maps.Location(47.5, -122.3), zoom: 9, customizeOverlays: true }

         map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), options );
         

      }
     
      </script>
   </head>
   <body>
      <div id='mapDiv' style="position:relative; width:600px; height:600px;"></div> 
   </body>
</html>
Show:
© 2014 Microsoft