CHAPTER 9 ?– AJAX-STYLE MAPPING USING THE VIRTUAL EARTH SDK 216
Figure 9-5.Map using detailed latitude and longitude
CHAPTER 9 ?– AJAX-STYLE MAPPING USING THE VIRTUAL EARTH SDK 217
Setting the Zoom Level
You can set the zoom level of a map using the zoom parameter of the LoadMap method. This
parameter can take an integer value from 0, which corresponds to the map view from
5,000 miles altitude, to 19, which corresponds to the map view from 30 yards altitude.
Note that not all zoom levels are available for all locations in the world. However, the
maximum zoom level is available for all U.S. mainland locations. Lastly, you can also set
the zoom level of a map by using the SetZoomLevel accessor method of the VEMap control.
Using the following method call for the map, you will see the map of the world as
shown in Figure 9-6:
LoadMap(new VELatLong(47.7512121212, -122.43234), 0 ,'r');
Figure 9-6. Viewing the map at ZoomLevel 0
CHAPTER 9 ?– AJAX-STYLE MAPPING USING THE VIRTUAL EARTH SDK 218
Choosing a Map Type
In addition to setting the location of the map, you can also specify the map type.
Pages:
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309