Skip to main content

Reference Library

Go Search
Reference Library
  
Reference Library > Wiki Pages > VE Tile Overlays  

VE Tile Overlays

Overview
MapDotNet Server provides support for tile overlays and other integration with Microsoft Virtual Earth. Please see our Virtual Earth Starter Application (project template) installed with MDNS. The following diagram shows a high-level view of MDNS and Virtual Earth integration.
 
 
 
For in-depth documentation of the MDNS Virtual Earth Template II, Download the white paper (available in the "Release Notes" section from the Downloads menu).
 
Hi-Level Architecture:
 
Hi-Level Architecture
 
MapDotNet Server provides the following support for Virtual Earth:
 
1. Visual Studio Starter Application
After installing MDNS a Virtual Earth starter application (project template) is installed into Microsoft Visual Studio (called: "MDNS VE Web Site") The project template includes the page source, code-behind, javascript and custom http handler.
 
Default.aspx - page source
Default.aspx.cs - code-behind
VEMap.js - custom JavaScript
 
The following areas of the template are key  to configuration:
a. the MapFile referenced in the MapControlBridge
 
2. Tile Overlay Custom HTTP Handler (ISC.MapDotNetServer.VETemplate.Handler.dll)
This is a lightweight tile renderer. This custom HTTP handler is provided when you start a new project template. The custom handler provides basic tile rendering, layer visibility integration with the MapTOC and tile caching in Application state.
 
3. Virtual Earth Utilities (ISC.MapDotNetServer.Controls.VirtualEarth namespace)
There are two classes provided in this namespace:
    a. Tiles - static methods for computing tile location, quad-key conversion, decimal-degrees to Mercator transforms, etc.
    b. Shapes - support for converting MDNS shapes (Points, Polylines and Polygons) into Virtual Earth equivalents
 
Integrating your own data
A key element to successfully overlaying your enterprise data on Virtual Earth is to make sure your data is properly projected into the VE (Mercator) projection. A peculiar aspect of the VE spatial model is to treat geographic data as if it is on a spherical datum where the Earth's polar circumference is the same as the equitorial (whereas in reality the Earth is actually flattened a bit.).  Therefore the map must be projected like:

PROJECTION "proj=merc" "lat_ts=0.0" "lon_0=0.0""x_0=0.0" "y_0=0" "k=1.0" "ellps=sphere" "a=6378137" "b=6378137" "units=m" "nadgrids=@null" "no_defs" END

In order for the reprojection to occur, you must specificy the correct projection for your layer in the LAYER object.  See the Working With MapFiles page for details.

Notes:

It is important to note also (see the VE template project) that the VE SDK usually deals in degress lat/lon and not in Mercator meters. So your application must convert back and forth as needed. This can be handled usually by one of the Tiles static methods in ISC.MapDotNetServer.Controls.VirtualEarth.
 
You will also want to use PNG output in your MapFile and make note of the map image background color which will drop out when transparency is ON.
 
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE PC256
EXTENSION "png"
TRANSPARENT ON
END

See also VE5 Tile Overlay Compatibility

Last modified at 11/11/2008 6:13 PM  by WEB\mark