Disabling Birdseye


If you need to disable bird's eye functionality in Bing Maps AJAX Control 6.3, version 6.0 or lower, then follow the instructions below. If you are using Bing Maps AJAX Control 6.3, version 6.1 or higher, use the VEMapOptions.EnableBirdseye property instead.

To disable Birdseye you must trap the keyboard shortcuts that normally invoke Birdseye map style, 'b' and 'o'. The key code values for these are 66 and 79, respectively. The following function traps those two key code values.

function keydownCB(e)
   if(e.keyCode == 66 || e.keyCode == 79)
      return true;

You must attach the onkeydown event to this function so as each key is pressed, the keydown function receives the key press, as shown in the following statement.

map.AttachEvent("onkeydown", keydownCB);

In addition to trapping keyboard events, your code could create a custom map navigation control that avoid Birdseye in HTML, and then add the control to the map by calling the VEMap.AddControl method.