SetOnFlyEndListener

(TMap.SetOnMoveEndListener Method)

Registers an event handler for moveEnd event. The argument-OnMoveend is a function which would be called when the change of the map view ends. OnMoveEnd has no parameter.
public SetOnFlyEndListener(OnMoveEnd):Void

Parameters

  • OnMoveEnd : Object - Registers an event handler for move end event. The argument-OnMoveEnd is a function which would be called when the change of the map view ends. OnMoveEnd has no parameter.
  • Returns

  • Void
  • 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, mapLoaded, 1, true, "", "hybrid");
       
        function mapLoaded() {
            map0.SetOnFlyEndListener(MapFlyEnded);
        }
        function MapFlyEnded(lat,lon){
            map0.ShowInfoWindow(lat, lon,"width=240;height=100", "Map flied on:", "Latitude=\t" + lat + "\nLongitude=\t" + lon);
        }
    </script>
        

    See also

  • SetOnMoveEndListener()

    See example

    Adding map event listener