Returning Localized Directions
The Virtual Earth Map Control has the ability to return results in different languages. The default language for the map is set to English-United States (en-US). You can change the map control culture or the language by adding the mkt parameter to the map control reference. (script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&mkt=fr-fr")(/script) The code sets the culture to French.
Changing the Defaults: By default the route is calculated in the order in which the locations are specified and the distances are calculate din the miles. However you ca make changes in this and specify a shortest route by distance or a quickest route by time. And you can also change the units to kms. All this can be done by setting the appropriate VERouteOptions Class properties myOptions.RouteOptimize = VERouteOptimize.MinimizeDistance; for shortest route, myOptions.RouteOptimize = VERouteOptimize.MinimizeTime; for quickest route and myOptions.DistanceUnit = VERouteDistanceUnit.Kilometer; for changing the unit.
Working with Bird’s Eye images: The Bird's eye images are low-angle, very high-resolution aerial images. The bird’s eye images exist only for specific locations and do not provide continuous map coverage. You do not need to add any additional code on your site to enable users to see bird’s eye images. The Virtual earth Map control has in-built support for this.
Determining Whether Bird's Eye Images Are Available: The availability of the bird’s eye images can be determined by calling VEMap.IsBirdseyeAvailable Method. At times, you may want to show a specific bird's eye image or create your own bird's eye navigation control. Here’s the explanation for doing so programmatically. Suppose that you want to let the users know that the map is centered on a location that has bird’s eye images. You need to determine whether images are available at the center of the map whenever the user moves the map to a new location.
To achieve this you need to attach a function to the VEMap.onchangeview Event. Inside the function, call the IsBirdseyeAvailable method. If the IsBirdseyeAvailable method returns a value of True you have to notify the user.
Switching to bird’s eye view: Call the VEMap.SetMapStyle Method to switch from the current map view to use bird’s eye images. How to do this programmatically? Here is the answer- map.SetMapStyle(VEMapStyle.Birdseye) With the change in map style the map navigation control also changes to include the bird’s eye navigation tools.
Using the VEBirdseyeScene Object: When you are working with Bird’s Eye images the VEBirdseyeScene Class object provides additional functionality. Using this object enables you to: Determine whether a point on the globe (a VELatLong Class objects) is within the currently displayed bird's eye image. To do this VEBirdseyeScene.ContainsLatLong Method is called. And to determine the orientation of the current image. This is achieved by calling VEBirdseyeScene.GetOrientation Method.
Technorati Tags: Microsoft, virtual earth, using virtual earth, features of virtual earth,
Tags: Microsoft Virtual Earth
























