Export (0) Print
Expand All

Working with Bird's Eye Images

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.

Bird's eye images are low-angle, very high-resolution aerial images. Unlike the other map styles, bird's eye images exist only for specific regions and do not provide continuous map coverage.

The Bing Maps AJAX Control 6.3 has built-in support for the bird's eye image type. You do not need to add any additional code to your Web page to enable your users to see bird's eye images. If users move the map to a region where bird's eye images are available, the map navigation control changes automatically.

However, there may be times when you want to show a specific bird's eye image or create your own bird's eye navigation control. This topic explains how to programmatically use bird's eye images.

Determining Whether Bird's Eye Images Are Available

You can determine whether bird's eye images are available at any point on the map by calling the VEMap.IsBirdseyeAvailable Method.

Example

Suppose you want to let users know when the map is centered on a location that has bird's eye images. You need to determine whether images are available at the center of the map whenever the user moves the map to a new location. To do this, attach a function to the VEMap.onchangeview Event. In the function you attach, call the IsBirdseyeAvailable method. If the IsBirdseyeAvailable method returns a value of True, notify the user. Your code may look like the following.

map = new VEMap('myMap');
map.LoadMap(new VELatLong(33.756, -84.37), 14 ,'r' ,false); 
map.AttachEvent('onchangeview', onChangeView);
//...
function onChangeView(e) 
{
   if (map.IsBirdseyeAvailable())
   {
      alert("Bird's Eye images are available at the center of the map"); 
   } 
}

Switching to Bird's Eye View

To programmatically switch the current map view to use bird's eye images, call the VEMap.SetMapStyle Method as follows.

map.SetMapStyle(VEMapStyle.Birdseye)

When the map style changes to use bird's eye, the map navigation control also changes to include the bird's eye navigation controls.

Using the VEBirdseyeScene Object

The VEBirdseyeScene Class object provides additional functionality when you are working with bird's eye images. By using this object, you can:

Show:
© 2014 Microsoft