Using Microsoft Virtual Earth


 

AspMap allows you to add a street or satellite map from Microsoft Virtual Earth as a background layer of your Map control. 

 

Your use of the Microsoft Virtual Earth API is subject to the terms of a legal agreement between you and Microsoft, corp.
Please read the MICROSOFT VIRTUAL EARTH PLATFORM API TERMS OF USE for more information.

 

The following conditions take place when a VirtualEarthLayer object is added as a background layer:

  1. The coordinate system of the Map control will be set to PCS_PopularVisualisationMercator (this is a native coordinate system of Virtual Earth);

  2. 19 zoom levels from Virtual Earth will be added to the ZoomLevels collection of the Map control;

  3. The FullExtent property of the Map control will be set to the full extent of Virtual Earth;

  4. You have to explicitly or implicitly (via a .prj file for your shapefiles) specify the coordinate system for each layer added to the Map control.

 

It is highly recommended to place the Map control inside an ASP.NET AJAX UpdatePanel to avoid initializing the Virtual Earth engine on each postback.

 

The following sample code demonstrates how to add a satellite map from Virtual Earth:
 

Imports AspMap
Imports AspMap.Web
Imports AspMap.Web.Extensions

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

Dim ve As VirtualEarthLayer = New VirtualEarthLayer(VirtualEarthMapType.Aerial)

map.BackgroundLayer = ve

' set the transparency of the main map image to display other layers over the satellite map
map.ImageFormat = ImageFormat.Png
map.ImageOpacity = 0.4

End Sub

See the VirtualEarthApp.aspx sample in the AJAX samples.

 

 

 

 

© 2018 VDS Technologies
Converted from CHM to HTML with chm2web Standard 2.85 (unicode)