PanToAni

(TMap.PanToAni Method)

Pans to the location specified by the latitude and longitude values (specified by arguments 1 and 2 of the function) at a speed specified by argument 3 of the function. The fourth argument is the callbackFunction whose body specifies what is to be done next after moving to the specified location.
public PanToAni(latitude, longitude, speed , callbackFunction):Void

Parameters

  • legendStr : String - Set the latitude of the position to be paned to.
  • Longitude : Number - Set the the longitude of the position to be paned to.
  • speed : Number - Set the speed of pan to the specified location.
  • callbackFuntion : Functor Object - This function will be executed automatically after Zoom To action is done.
  • Example

    The following example shows how to pan to the location specified by latitude and longitude values,the callbackFunction will be done after moving to the specify location.
    <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.PanToAni(25.7590256665386, 80.3738769902151, zoom);
            
        function zoom(){
            map0.ZoomTo(20);
        }
    </script>
        

    See also

  • PanTo()

    See example

  • Panning