Export (0) Print
Expand All

Metadata Class

Bing

Contains information about a venue map.

Properties

Name Type Description

CenterLatitude

number

The latitude of the center location of the venue map.

CenterLongitude

number

The longitude of the center location of the venue map.

DefaultFloor

string

The ID of the default floor of the venue map.

FloorHeader

string

A string used in the floor bar of the venue map.

Floors

Floor[]

An array containing the floors of the venue map.

Footprint

Footprint

The footprint of the venue map.

MapId

string

The unique ID of the venue map.

MapType

string

A string describing the venue map type (for example, “mall”).

Name

string

The name of the venue map.

YpId

string

The Yellow Pages ID of the venue.

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()
         {
            // Initialize the map and set the view to a specific location
            map = new Microsoft.Maps.Map(document.getElementById("mapDiv"),{credentials:"Bing Maps Key", center: new Microsoft.Maps.Location(47.6,-122.3), zoom:11}); 

            Microsoft.Maps.loadModule('Microsoft.Maps.VenueMaps', { callback: venuemapsModuleLoaded });

         }

         function venuemapsModuleLoaded()
         {
            // Create the venue map
            var vmaps = new Microsoft.Maps.VenueMaps.VenueMapFactory(map); 


            // Search for nearby venues
            vmaps.getNearbyVenues({map: map, location: map.getCenter(), radius:10000, callback:DisplayNearbyVenueCount});

         }


         function DisplayNearbyVenueCount(venues)
         {
            var displayResults = "Nearby venues with available venue maps:\n";

            for (var i=0; i<venues.length; i++)
            {
               displayResults = displayResults + venues[i].metadata.Name + "\t" + venues[i].distance/1000 + " km\n";

            }

            alert(displayResults);
         }


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