Export (0) Print
Expand All

InfoboxType Enumeration

Bing

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

Constants

Name Description

mini

A smaller info box with space for a title.

standard

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

Example

<!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;

      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
        map.entities.push(myInfobox);

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