VEMap.GetImageryMetadata Method

You are not viewing the latest version of the AJAX control. Bing Maps AJAX V7 is the recommended JavaScript control for Bing Maps. If you need this documentation, it is available in as a CHM or PDF download.

Returns information about the requested imagery, including imagery date stamps. This method requires that a valid Bing Maps Key has been set using the VEMap.SetCredentials Method.

VEMap.GetImageryMetadata(callback, options);


Parameter Description


The name of the function to call when results are returned. The function must accept a VEImageryMetadata Class object. Required.


A VEImageryMetadataOptions Class object specifying the imagery for which information is returned. Optional.

Returns a VEImageryMetadata Class to the callback function.

If the options parameter is not specified, then the GetImageryMetadata method returns information about the current map view.

The GetImageryMetadata method is supported for VEMapStyle.Aerial and VEMapStyle.Hybrid.

In order to retrieve imagery metadata, use the VEMap.SetCredentials Method to set a valid token before calling the GetImageryMetadata method.

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

         function GetMap()

            map = new VEMap('myMap');

            //A token is required to retrieve imagery metadata




         // Get imagery meta data of the current map
         function GetMetadata()

            map.GetImageryMetadata(MetadataCallback, null);

         function MetadataCallback(metaData)
            alert("Imagery date range: " + metaData.DateRangeStart + " - " + metaData.DateRangeEnd);

   <body onload="GetMap();">
      <div id='myMap' style="position:relative; width:600px; height:400px;"></div>
      <input type="button" onclick="GetMetadata();" value="Get Imagery Metadata"/>