TGetLevelByResolution

This function takes the resolution as the input and returns the zoom level according to the Zoom Level Resolution table. The resolution which increases exponentially in the Zoom Level Resolution table can use any values as input. And returns the nearest corresponding zoom level.
public TGetLevelByResolution(resolution):Number

Parameters

  • resolution : Number - Specify the input resolution to be reversed to the corresponding zoom level.
  • Returns

  • Number -Returns the nearest corresponding zoom level.
  • Example

    The following example takes a resolution and returns the nearest zoom level for that resolution.
    <div id="mapContainer"  style="width: 640px; height: 400px;"></div>
    <script type="text/javascript">
        var resolution=150;
        var level=TGetLevelByResolution(resolution);
    </script>
        

    See also

    TGetResolutionByLevel() Method