var map = $find('Map1');
Navigate the Map
var map = $find('Map1'); map.set_extent(new ESRI.ADF.Geometries.Envelope(-120, 35, -110, 45));
Another example is provided by the Zoom method. Both the server and client side Map classes have a method to zoom to an extent defined by a scale factor. Like setting the extent property, as soon as the method is called, a Web request to update the map is generated.
var map = $find('Map1'); var scaleFactor = 2; var centerPoint = new ESRI.ADF.Geometries.Point(-110, 45); var useAnimation = true; map.zoom(scaleFactor, centerPoint, useAnimation);
To accomplish the same task using the server-side Map control, a Web request which calls the Map.Zoom() method must be initiated. This means the request is sent to the page first, then upon the response the client-side Map class can do what it needs to update its content.
Working with map events
The event argument passed to the mouseMove function is a type of Sys.UI.DomEvent which an additional coordinate property in map units.
See the Map and MapBase classes in the library reference for more information on the event handlers available for use. The following sections will discuss working with event handlers in the context of specific operations.
Track pending tiles during map draw
As a Web ADF developer working in an asynchronous communication environment, it is often beneficial to provide an end user with some indication that a user action is being processed. Since most Web ADF applications are centered on working with a map, the ability of an end user to effectively interact with map contents is essential. The ADF has the ability to asynchronously retrieve map images (dynamic or cached tiles) from multiple sources and consolidate it in a map control. In general, data sources often differ in the time it takes to respond to a request. Since the Web ADF map control is capable of rendering map data as it is returned to the browser, it is possible that some portion of data in the map is visible and accessible before another portion. In this case, it will likely be important to let the end user know when the map control has finished loading map data from any and all sources.
Modifying arguments in Web requests generated by a map