Export (0) Print
Expand All

VEMap.Hide3DNavigationControl 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.

Bb412557.Important(en-us,MSDN.10).gifImportant:
On November 2, 2010, the end-of-life was announced for the 3D control. Effective December 1, 2011, the 3D control will no longer function. The full announcement is found at: http://www.bing.com/community/site_blogs/b/maps/archive/2010/11/02/changes-to-bird-s-eye-and-3d-maps.aspx

In 3D mode, hides the default user interface for controlling the map in 3D mode. By default, this control is shown.


VEMap.Hide3DNavigationControl();

By default, the 3D Navigation control is displayed on the map when the map is set to 3D mode. If you want to hide this control, you can call this method. To show the control, call the VEMap.Show3DNavigationControl Method.

<!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=6.3"></script>

      <script type="text/javascript">
         var map = null;
         var clickEvent = null;

         function GetMap()
         {  
            map = new VEMap('myMap');
            
            // SetDashboardSize must be called before calling LoadMap
            map.SetDashboardSize(VEDashboardSize.Normal);
            
            map.LoadMap();

            map.SetMapMode(VEMapMode.Mode3D);

         }
         
         // Dashboard hide & show calls
         function HideDashboard()
         {
            map.HideDashboard();
         }
         
         function ShowDashboard()
         {
            map.ShowDashboard();
         }
         
         // 3D Navigation hide & show calls
         function Hide3DNav()
         {
            map.Hide3DNavigationControl();
         }
         
         function Show3DNav()
         {
            if (map.GetMapMode() == VEMapMode.Mode2D)
            {
               map.SetMapMode(VEMapMode.Mode3D);
            }

            map.Show3DNavigationControl();
         }
         
                 
         // Mini Map hide & show calls
         function HideMiniMap()
         {
            map.HideMiniMap();
         }
         
         function ShowMiniMap()
         {
            if (map.GetMapMode() == VEMapMode.Mode3D)
            {
               map.SetMapMode(VEMapMode.Mode2D);
            }

            map.ShowMiniMap(200, 100);            
         }
         
         function SetScaleBar(distanceUnit)
         {
            map.SetScaleBarDistanceUnit(distanceUnit);
         }
      </script>
   </head>
   <body onload="GetMap();" style="font-family: Arial">
      <div id='myMap' style="position: relative; width: 800px; height: 400px;">
      </div>
      <div id="links">
         <a href="#" onclick="HideDashboard()">Hide Dashboard</a> | <a href="#" onclick="ShowDashboard()">
            Show Dashboard</a><br />
         <a href="#" onclick="Hide3DNav()">Hide 3D Navigation Control</a> | <a href="#" onclick="Show3DNav()">
            Show 3D Navigation Control</a><br />
         <a href="#" onclick="HideMiniMap()">Hide Mini Map</a> | <a href="#" onclick="ShowMiniMap()">
            Show Mini Map(2D view only)</a><br />
         <a href="#" onclick="SetScaleBar(VEDistanceUnit.Miles)">Set Scale Bar Distance Unit to Miles</a> | 
         <a href="#" onclick="SetScaleBar(VEDistanceUnit.Kilometers)">Set Scale Bar Distance Unit to Kilometers</a>
      </div>
   </body>
</html>

Show:
© 2014 Microsoft