ZoomTo

(TMap.ZoomTo Method)

Set the zoom level to the given new value.
public ZoomTo(level):Void

Parameters

  • level : Number - Set the zoom level.
  • Example

    The following example creates a map and changes its size from 640 by 400 pixels to 800 by 600 pixels.
    <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.GetResolution();
        level++;
        map0.ZoomTo(level);
        
    </script>
        

    See also

  • ZoomToAni()
  • GetLevel()
  • GetResolution()

    See example

    Zooming() | Displaying animations on a map