This transformer generates an HTML file, which is used for loading Microsoft Virtual Earth Environment, as well as produces tiles from the incoming raster(s) so that they can be written to PNG format and after that loaded into the map window of Virtual Earth:

User-added image

The incoming rasters should be reprojected to Lat/Long in FME 2008 and to SPERICAL_MERCATOR projection in FME 2009. The also should have NODATA set for areas without content.

The transformer parameters control several things - HTML page title, Virtual Earth map window size, raster opacity, display zoom level, minimum and maximum zoom levels as well as raster layer name.

The transformer generates an HTML file from a set of string attributes containing HTML code, and parameters inserted between those attributes. The HTML file itself is created with AttributeFileWriter transformer.

Two buttons below the map show a very simple example of interaction between a user and Virtual Earth - hiding and showing the raster again.

Note that you should place your tiles into ./tiles/ folder relative to your html file as this path is hard coded. Of course, you can change the fmx file in order to use another place for your tiles.

Note also that there was a small bug in published parameter of 'FILE_OR_ATTR' type, so your HTML output will be placed with the workspaces despite your setting in the parameters (PR 14049 - fixed in builds after 5136).

This custom transformer also demonstrates use of RasterCheckPointer, which in some situations can significantly improve the workspace performance. The workspace below works 10 times faster with RasterCheckPointer than without it (check the transformer description before using it).

Follow this link to see how it works in Virtual Earth.

The attached zip file contains the source rasters as well as the the transformer and the demo workspace for FME2008. FME2009 requires another version of the workspace and attached custom transformer - VirtualEarthHTMLCreator2009.fmx