By Daniel Du
In this part, we will discuss displaying and plotting maps. After this class, you will have a better understanding layers, layer groups and map, and learn how to plot maps to plain images or DWF files.
A layer in MapGuide is an overlay on a drawing composed of a logical group of data with the same geometric type. A layer references a feature source or a drawing source. it contains styling and theming information, and a collection of scale ranges. layers are visual representation of feature source. The styles of features, theming information, scale range information are defined in layer definition.
To create a layer, a convenient way is to generate the layer definition from an exiting layer definition xml as template. You get this template layer definition xml from Infrastructure Studio with “save as xml” menu, or use resource service to get the resource content of a layer. We discussed resource service in part 3.
A map contains one or more layers/layer groups. To list the layers in a map, use theMgMap::GetLayers() method. This returns an MgLayerCollection object. To modify maps and layers, please read this part in developer’s guide as well.
Finally you can plot your map into plain image or DWF with mapping service.
OK, please find the attached PDF of training material chapter 4.