This is going to be another sequel of postings. I will cover how to bring*various types of content*to Virtual Earth. For each part there will be a downloadable sample application which includes the previous parts and the new content until we have at the end a full demo-suite. The content-types I look at are:
- Individual Shapes
- Live Search Maps-Collections
- Static tile-layer
- Dynamic tile-layer from static images
- Dynamic tile-layer from OGC-compliant Web Map Services (WMS)
- Dynamic tile-layer from ESRI Shape-files
- Dynamic shape-layers from a database
- Dynamic shape-layers from SQL Server 2008 (code-name 'Katmai') and then there will be a part to cover
- drawing on the map and storing the results in a database
The Virtual Earth MapControl is an AJAX-control. AJAX stands for Asynchronous Java And XML and the*major advantage*is really that you can do a partial page-updates which allows you to bring a high interactivity to your web application. The VE MapControl allows you for instance to attach mouse- and keyboard events to the map; for example you can*zoom-in and out with the mouse-wheel. A very well hidden feature are the various keyboard-events that we capture. Here are the most important ones:
+ (PLUS SIGN)
Zooms in one level
- (MINUS SIGN)
Zooms out one level
Allows you to draw a rectangle with the mouse in which you want to zoom-in
Scrolls the map in the direction of the arrow
Switches to the road map view
Switches to the aerial map view
Switches to the hybrid map view
o –or– b
Switches to the bird's eye map view, if available, for the visible map area
3 Switches to 3D*mode if Virtual Earth 3D (Beta) is installed 2 Switches to 2D mode
In 3D mode switches to first-person mode
ESC Stops first-person mode SHIFT-B
Show/Hide building in 3D mode
SHIFT-D Show/Hide building details in 3D mode
The control will be loaded as an AJAX component in the client's web browser and it retrieves the tiles directly from one of the Microsoft data centers. Each tile has a size of 256 x 256 pixels and they will be cached for up to 7 days in the client's browsers cache. If you load or navigate the map the control will first try to find the tiles it needs in the client's browser cache and only if they can't be found there it contacts the Microsoft data center.*Various information like Points of Interest (POI) or other vector or raster data can be retrieved from different servers which makes*Virtual Earth*a perfect mashup-component.
Here are the system requirements for Virtual Earth in 2D-mode:
32-bit and 64-bit versions of
- Internet Explorer 6 or
- Internet Explorer 7
- Firefox 1.5
- Firefox 2.0
Well, these are the officially supported browsers but as you know*other browsers use the same Gecko-engine as Firefox does and*thus it will work with the comparable versions of Netscape and Mozilla as well.
In 3D-mode we not only have a browser requirement, we also have a platform*requirement because*the 3D-component*is implemented as a .NET-managed component which installs as a browser plug-in and requires the .NET Framework 2 and the Windows Imaging Component. Here are the*additional system requirements for 3D-mode:
- Windows XP Service Pack 2, Microsoft Windows Server 2003, or Windows Vista
- Microsoft .NET Framework 2.0
- 250 MB or more of hard disk space
- A 1.0 GHz processor (2.8 GHz or faster recommended)
- 256 MB of system memory (1 GB recommended)
- 32 MB video card (256 MB recommended) that supports Microsoft DirectX 9, with 3D hardware acceleration enabled
- A high speed or broadband Internet connection
- Visual Studio 2005 as development environment
- ASP.NET AJAX and the AJAX Control Toolkit which*are available as a free downloads.
To get into the Software Development Kit (SDK) I recommend the:
- Interactive SDK which allows you navigate some frequently used features in a navigation tree on the left-hand side and gives you real implementations of Virtual Earth in the first tabulator. Then you can flip the tabulators to review and copy the complete source code of the site and a 3rd tabulator allows you to browse the reference.
- While this is good to get started you might also want to have access to the traditional reference SDK and I usually use the downloadable version.
- There are many nice features already in Virtual Earth but there is sometimes the need for a 'hack'. You will find many*great tips & tricks as well as a gallery of sample applications and a Wiki on Via Virtual Earth.