TMap

(TMap.GetBoundsZoomLevel Method)

Returns the zoom level at which the rectangular region (given by the first two arguments, which are TlatLng points) fits in the map view. The zoom level is computed for the currently selected map view size using all the four arguments. The arguments three and four are the width and height of the map.
GetBoundsZoomLevel(pointNW, pointSE, _width, _height):Number

Parameters

  • pointNW : Number - Specify the rectangular region's northwest point position on the map.
  • pointSE : Number - Specify the rectangular region's southeast point position on the map.
  • _width : Number - Specify the width of the map.
  • _height : Number - Specify the height of the map.
  • Returns

  • instance : Number - Returns the zoom level of current map view.
  • Example

    The following example set the position of the legend panel on the map.
    <div id="mapContainer"  style="width: 640px; height: 400px;"></div>
    <script type="text/javascript">
        var map0 = new TMap(mapContainer, 25.7590256665386, -80.3738769902151, 15, mapInit, 1, true, "", "hybrid");
        var level=map0.GetBoundsZoomLevel()
        
    </script>
        

    See also

  • GetBounds() Method