Figure 9-2.Map of the Seattle,Washington area hosted in an ASP.NET page
CHAPTER 9 ?– AJAX-STYLE MAPPING USING THE VIRTUAL EARTH SDK 211
Property Name Description
The VEMap control contains all the code necessary to handle mouse interaction. If you
hold the mouse button down on the map, you can drag the map in any direction with the
map being updated in a completely AJAX manner. This is an excellent showcase of AJAX
and its importance in web applications, namely that asynchronous updates can significantly
improve the user experience. In this case, the map you are viewing consists of a
number of tiles. As you are viewing the map surface, the tiles for the surrounding areas
are downloaded and cached. If you drag the map around, another download for these
tiles isn??™t necessary. However, if you drag really fast to see areas that are far away, you??™ll
see that VE is working to catch up, caching the tiles as it goes. During this time, you often
notice blank tiles or sometimes tiles with an icon. See Figure 9-3 for an example of this.
Figure 9-3. Caching map tiles asynchronously
CHAPTER 9 ?– AJAX-STYLE MAPPING USING THE VIRTUAL EARTH SDK 212
If you look at an HTTP trace (using any HTTP tracing utility) of what is happening as
you run this application, you??™ll see the following.
Pages:
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304