Microsoft.Maps.Overlays.Style Reference


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


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.

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

      <script type="text/javascript" src=""></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 );


      <div id='mapDiv' style="position:relative; width:600px; height:600px;"></div>