ComponentOne FlexReport for WinForms
Map Custom Field Properties
Working with FlexReportDesigner > Adding FlexReport Custom Fields > Map Custom Field > Map Custom Field Properties

The important properties of the Map custom field are discussed in the following sections.

Layers

The main part of a map is the tile layer which provides raster graphics representing the Earth surface or part of it, and zero or more layers representing spatial data.

The tile layer is specified by the TileSource property. It may be set to a VirtualEarth tile source (road, aerial, or hybrid). The tile source may be set to "none" in which case no tiles will be drawn on the map. This may be useful especially when other layers such as KML provide enough data for the map visualization.

Note that unless the tile source is "none", the tiles are loaded from a network location when the report runs, which may slow things down considerably.

Except for the tile layer, all other layers are contained in the Layers collection. Currently, three layer types are supported as described below:

Tracking

The map shown by a Map field can automatically center and zoom in on the data shown on the map. This behavior is determined by two factors:

Styles

Visual attributes of map elements are mostly defined by styles. There are several types of styles (point marker styles, line styles and KML item styles); the applicable type is determined by the context, such as points layers use point marker styles, lines layers use line styles, and so on. Usually a style may be specified as a data driven expression (so that the actual style depends on run time data), with a fallback style used by default. How style expressions are specified and evaluated is described next.

The Map custom field contains 3 style collections:

These styles are available to all layers defined on the Map, and also to other Map fields in the current report. The styles in each collection are addressable either by index or - preferably - by name (using the Name property). When a style expression evaluates to a string, that string is used to search for a matching style, first in the current map and if that fails, in all other maps on the current report (only matching type styles are searched; for example, only MarkerStyles collections are searched for a point marker style, and so on).

Spatial Locations

Points and lines layers provide two different ways to specify spatial locations for the data:

Legends

A map can have several associated legends, rendered within its bounds. To facilitate placing a legend outside the map's bounds, the legend can be associated with any map field in the report, so you can add an empty map field just to hold a legend describing another map.

Legends are contained within the Legends collection of the Map field. To add a legend, add an item to that collection. The location of a legend within its map's bounds is determined by the LegendAlignment property. Orientation determines whether items within the legend are placed vertically (default) or horizontally. Several other properties allow to fine-tune the way the legend looks.

Items within the legend are represented by the Items collection. That collection may be populated automatically with data from non-KML layers of the current map, if the Automatic property of the legend is set to True. In that case the Items collection cannot be edited. Otherwise, the legend items must be added manually.

The following types of legend items are supported: