Export (0) Print
Expand All

LabelOverlay Enumeration

Bing

Defines how map labels are displayed.

Constants

Name Description

hidden

Map labels are not shown on top of imagery.

visible

Map labels are shown on top of imagery.

Methods

Name Definition Return Value Description

isValid

isValid(labelOverlay: LabelOverlay )

boolean

Determines whether the specified labelOverlay is a supported LabelOverlay.

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">
         
         function GetMap()
         {
            // Initialize the map options.  In this case,
            //    turn the label overlay on a bird's eye map off.
            var mapOptions =  
            { 
               credentials:"Your Bing Maps Key", 
               mapTypeId: Microsoft.Maps.MapTypeId.birdseye, 
               center: new Microsoft.Maps.Location(37.794973,-122.393542), 
               zoom: 17, 
               labelOverlay: Microsoft.Maps.LabelOverlay.hidden 
            } 
           
            //Load the map
            var map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), mapOptions );

         }

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