Export (0) Print
Expand All

InfoboxType Enumeration


Contains info box styles. To get the latest Bing Maps design, load the Microsoft.Maps.Themes.BingTheme module before creating your info box.


Name Description


A smaller info box with space for a title.


The default info box style. This standard info box makes space for a title, title link, description, and other links if they are specified.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <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;

      function GetMap()

         Microsoft.Maps.loadModule('Microsoft.Maps.Themes.BingTheme', { callback: themesModuleLoaded });


      function themesModuleLoaded()

        var mapCenter = new Microsoft.Maps.Location(47.5, -122.3);

        map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), {credentials: "Bing Maps Key", center: mapCenter, zoom: 9, theme: new Microsoft.Maps.Themes.BingTheme() });

        // Create an info box 
        var infoboxOptions = {width:300, 
                              height: 100, 
                              title: "Mini Info Box", 
                              typeName: Microsoft.Maps.InfoboxType.mini,
                              showPointer: true, 
                              offset: new Microsoft.Maps.Point(-100,0)};

        var myInfobox = new Microsoft.Maps.Infobox(center, infoboxOptions);

        // Add the info box to the map

   <body onload="GetMap();">
      <div id='mapDiv' style="position:relative; width:600px; height:600px;"></div> 
© 2014 Microsoft