확장 최소화
이 항목은 아직 평가되지 않았습니다.- 이 항목 평가

VEMap.GetZoomLevel Method

Returns the current zoom level of the map.


VEMap.GetZoomLevel();

A string of the current zoom level.

<html>
   <head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5"></script>
      <script>
         var map = null;
         
         function GetMap()
         {
            map = new VEMap('myMap');
            map.LoadMap();
         }   

         function GetInfo()
         {  
            // VEMap.GetTop returns the position of the top edge of the map control, in pixels.
            // VEMap.GetLeft returns the position of the left edge of the map control, in pixels.
            // These units are defined using standard DHTML markup.
            // See the style attribute for the <div> element 'myMap'.
            var info = 'The top edge of the map on the Web page is at pixel: '+ map.GetTop() + "\n";
            info += 'The left edge of the map on the Web page is at pixel: '+ map.GetLeft() + "\n";
            info += 'The latitude,longitude at the center of the map is: '+ map.GetCenter() + "\n";
            info += 'The current zoom level of the map is: '+ map.GetZoomLevel() + "\n";
            info += 'The map control version is: '+ VEMap.GetVersion() + "\n";            
            alert(info);
         }
      </script>
   </head>
   <body onload="GetMap();">
      <div id='myMap' style="position:relative; width:400px; height:400px; top:25px; left:25px"></div>
      <INPUT id="getinfo" style="position:relative" type="button" value="Get Info" onclick="GetInfo();">
   </body>
</html>

이 정보가 도움이 되었습니까?
(1500자 남음)
Microsoft는 MSDN 웹 사이트에 대한 귀하의 의견을 이해하기 위해 온라인 설문 조사를 진행하고 있습니다. 참여하도록 선택하시면 MSDN 웹 사이트에서 나가실 때 온라인 설문 조사가 표시됩니다.

참여하시겠습니까?
© 2013 Microsoft. All rights reserved.