Robin Pars, Laurence Moroney, and John Grieb
"Foundations of ASP.NET AJAX"
CHAPTER 9 ?– AJAX-STYLE MAPPING USING THE VIRTUAL EARTH SDK 219
Figure 9-7. An aerial map of the location from Figure 9-2
Specific or Relative Panning
You can programmatically pan the map to a specific location as specified by longitude
and latitude or relative panning by using X and Y pixels. Let??™s first look at how you can use
the VE API to map a specific location. You can use the PanToLatLong method of the VEMap
control to pan the map to a specified latitude and longitude. This information is passed
in via a VELatLong object as you saw in the earlier example in this chapter. You cannot set
the zoom level with this method, so you will be panning across the current zoom level.
Consider the following