SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 300 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

value, txtY.value);
}

In addition to the DisplayMap function you??™ve seen already, there are two functions
here: PanLatLong and PanXY. PanLatLong pans the map to a specific latitude and longitude
(as provided in two text boxes) by creating a new VELatLong object. Now we have to create
a few HTML input fields in the page and be sure to call the DisplayMap method in the
onload event of the tag as shown here:


Pixels X:
  | 
;  Pixels
Y:
  
name="btnPanXY" onclick="PanXY()" />


Lat:
  |   Long:
  
name="btnPanLatLong" onclick="PanLatLong()" />

CHAPTER 9 ?–  AJAX-STYLE MAPPING USING THE VIRTUAL EARTH SDK 221
With this markup, when the PanLatLong button is clicked, the map will pan to the
specified coordinates as shown in Figure 9-8.


Pages:
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312