ZoomToAni

(TMap.ZoomToAni Method)

Sets the zoom level to the new given value(specified by argument one) , goes to the callbackFunction (specified by argument 2) and does what is being specified in the callbackFunction.
public ZoomToAni(level,callbackFunction):Void

Parameters

  • level : Number - Set the zoom level.
  • callbackFunction : Functor Object - This function will be executed automatically after Zoom To action is done.
  • 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, mapLoad, 1, true, "", "hybrid");
       
        function mapLoad() {
            map0.ZoomToAni(15, panto);
            
        function panto(){
            map0.panTo(25.7590256665386, 80.3738769902151);
        }
    </script>
        

    See also

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

    See Example

  • Animation lesson