MapCruncher for Microsoft Virtual Earth Help

MapCruncher

Advanced Features

This topic describes a number of advanced MapCruncher features.

Editable Bounding Regions

By default, MapCruncher makes everything beyond the bounding box of the original source map transparent. You can trim out more of the source map to cut out insets, legends, or to make better-fitting boundaries between adjacent source maps in a single layer. The round corner points of the blue bounding region can be adjusted by dragging, as shown in Figure 1.

Figure 1. Editable bounding regions

To make more complicated shapes, right-click on a blue edge and choose Add Point, as shown in Figure 2.

Figure 2. Adding a point

Multiple Source Maps in a Single Layer

A layer is a single tile set that is always viewed at once. It may comprise a single source map, or multiple source maps. Figure 3 shows four maps from adjacent counties displayed as one continuous layer.

Figure 3. Four adjacent maps displayed as one continuous layer

To add source maps to a layer, right-click on the layer name in the Map Layers pane and choose Add Source Map, as shown in Figure 4.

Figure 4. Adding a source map

The source maps in a layer overlap in the order they appear in the Map Layers pane. You can drag and drop a source map to reorder it. Selecting the layer name changes the Source Map to a preview of the composite layer. MapCruncher displays a progress bar during preview because composite layers are composed of many pieces, and preview can take a long time to render.

MapCruncher does not contain the functionality to modify the z-order of source maps in a layer. However, you can implicitly set the z-order by editing the YUM file (it is an XML file) to reorder the <SourceMap> sections.

Multiple Layers

Rendering transforms all of the source maps in a layer into a single unit. However, MapCruncher also supports distinct layers that can be individually activated in the browser, as shown in Figure 5.

Figure 5. Two distinct layers

A context menu in the layer tree lets you add additional layers, which MapCruncher renders into separate tile folders. The SamplePage.html file demonstrates how to let your Web visitor turn individual layers on and off, as shown in Figure 6.

Figure 6. Adding layers

Browser performance note: if you do not need to compose maps dynamically, incorporate the maps in one layer rather than in separate layers. Because the browser must download a separate set of images for every layer, viewing several layers simultaneously can hinder performance.

Legends

You can specify where MapCruncher places legends on a source map using the Add Legend command on a layer, as shown in Figure 7.

Figure 7. Adding a legend

Use Editable bounding regions to clip out the legend, as shown in Figure 8.

Figure 8. Clipping a legend

Transparent Areas

MapCruncher creates a transparent area in the following circumstances:

  • Regions beyond the bounds of each source map are transparent.
  • Regions within the source map that are marked transparent, such as in a PNG file, or not drawn, such as in a PDF file, are transparent.
  • Regions excluded using an editable bounding region are transparent.
  • The VirtualEarth SDK provides a method, VEShape.SetFillColor, to make an entire layer transparent.
  • You can define a color set, and either make out all regions of those colors transparent, or all regions not of those colors transparent.

To define a color set and make a region of that color transparent, select a source map, then select the Transparency tab, as shown in Figure 9.

Figure 9. Selecting a transparent color

Use the source map crosshairs to identify colors to add to the color list (just as you would add a correspondence point), and select Add Color Under Crosshairs. The source map will show the effect immediately, as shown in Figures 10 and 11.

Figure 10. Selecting a transparent color

Figure 11. The resulting transparent map

Fuzziness controls how nearly a color must match the selected color to be knocked out; a larger number includes more nearby colors. This can help knock out “almost-white” regions, such as artifacts created by JPG compression. In our sample map, increasing the fuzziness beyond 6 has little benefit.

Halo expands the opaque region by the chosen number of pixels, typically allowing a contrasting neighboring color in the source map to show through. This can help make map features more visible when displayed against various backgrounds. For example, a black source map label may look fine superimposed over a light-colored road map, but be very difficult to read when the background is changed to an aerial photography of a dark forest.

Sharing Options

The Mashup Render Options window lets you select output options for rendering. To have MapCruncher copy the rendered data to a folder, use the Output Folder text box, as shown in Figure 12.

Figure 12. Selecting an output folder

To have MapCruncher also copy your source files to the same folder, select the Copy source maps and crunchup data to the output folder checkbox, as shown in Figure 13.

Figure 13. Selecting the Copy source maps checkbox

This option copies the original source map files plus the YUM file to the rendered output folder. This makes it simple to make your mashup available on the Web. By doing this, any Web visitor that views your mashup can reconstruct it from these original files, and perhaps modify it. If you prefer to only publish the crunched version of your data, but keep the source map files (PDF and JPG input files) private, uncheck this box.

To have MapCruncher tag the MapLayers.crunched.xml file marked it as public domain, select the Permit composition checkbox, as shown in Figure 14.

Figure 14. Selecting the Permit composition checkbox

This option permits others to build mashups that build on your crunched tiles. Note that this option only marks the XML description file as public domain; it does not mark the crunched tiles, YUM file, or the source map images as being in the public domain. To discourage others from building new mashups that compose with your mashup data, uncheck this box, and insert a comment in the MapLayers.crunched.xml file explicitly outlawing their use.