Map Scrolling Using DWR
The last sample in this chapter is a map scrolling sample using DWR. Browser-based, mouse-controlled scrolling maps have become popular since Google Maps was launched.
The principle idea, in the implementation of this sample, is to take a sufficiently large map and divide it to small squares of equal size. Then, based on the location, a certain number of the small squares are inserted into the visible map window, and when the user scrolls the map, by pressing the left mouse button, and dragging the mouse in the map window, new map squares are retrieved from the server (other implementations may also download map squares around the visible map window).
In this sample, we use a geological map of the Tempe-Mareotis region of Mars, provided by the U.S. Geological Survey Astrogeology Research Program (http://astrogeology.usgs.gov/). For a direct link to the map and additional information, refer to http://astrogeology.usgs.gov/Projects/MapBook/fulllisting.jsp?mapNumber...