192 | | ==== !PrintLayout Resource schema ==== |
193 | | |
194 | | This class represents a runtime print layout just as !MgLayerBase represents a runtime !MapLayer. It is the container of all print layout elements. It is constructed using the resource identifier of a print layout resource that has information about the paper size, media name, etc. The diagram below shows a preliminary schema for the print layout. |
195 | | |
196 | | [[BR]] |
197 | | [[Image(PrintLayoutType.PNG)]] |
| 190 | ==== !PrintLayoutDefinition Resource schema ==== |
| 191 | |
| 192 | This class represents a runtime print layout just as !MgLayerBase represents a runtime !MapLayer. It is the container of all print layout elements. It is constructed using the resource identifier of a print layout definition resource that has information about the paper size, media name, etc. The diagram below shows a preliminary schema for the print layout. |
| 193 | |
| 194 | [[BR]] |
| 195 | [[Image(PrintLayoutDefinitionType.png)]] |
218 | | ==== !MapViewport Resource schema ==== |
219 | | |
220 | | The !MapViewport resource represents a viewport displaying a map. It has all the information that is needed to define the extents, scale, rotation, map view characteristics, etc. Here’s the schema: |
221 | | |
222 | | [[BR]] |
223 | | [[Image(MapViewportType.PNG)]] |
224 | | [[BR]] |
225 | | |
226 | | The !MapViewport resource contains !MapName property, which is the name of the map the viewport is displaying. Note that this is only temporary until support for fully integrated Map Definition resources are in place accross all applications (This support will be outlined in a separate RFC to follow). When applications other than !MapGuide truely support Map Definition, we will remove !MapName property as we could add the resource id of Map Definition resource in the References collection. Some of the properties (e.g., !CenterPoint) shown above may not be needed, but those modifications will be made the schema evolves. The !VisibleLayers collection contains the names of Gis layers that need to be visible in the map viewport. The !MapView property contains all the properties related to the view of the map. The Center property of !MapView is the center point of the view in model units. The Height property specifies the height of the view in model units. The !ModelUnits provide information about the units of the model space. The !ViewDirection property fully specifies the direction vector of the view. |
227 | | |
228 | | [[BR]] |
229 | | [[Image(MapViewType.PNG)]] |
| 216 | ==== !MapViewportDefinition Resource schema ==== |
| 217 | |
| 218 | The !MapViewportDefinition resource represents a viewport displaying a map. It has all the information that is needed to define the extents, scale, rotation, map view characteristics, etc. Here’s the schema: |
| 219 | |
| 220 | [[BR]] |
| 221 | [[Image(MapViewportDefinitionType.png)]] |
| 222 | [[BR]] |
| 223 | |
| 224 | The !MapViewportDefinition resource contains a !MapName property, which is the name of the map the viewport is displaying. Note that this is only temporary until support for fully integrated Map Definition resources are in place accross all applications (This support will be outlined in a separate RFC to follow). When applications other than !MapGuide truely support Map Definition, we will remove !MapName property as we could add the resource id of the Map Definition resource in the References collection. Some of the properties (e.g., !CenterPoint) shown above may not be needed, but those modifications will be made as the schema evolves. The !VisibleLayers collection contains the names of Gis layers that need to be visible in the map viewport. The !MapView property contains all the properties related to the view of the map. The Center property of !MapView is the center point of the view in model units. The Height property specifies the height of the view in model units. The !ModelUnits provide information about the units of the model space. The !ViewDirection property fully specifies the direction vector of the view. |
| 225 | |
| 226 | [[BR]] |
| 227 | [[Image(MapViewType2.png)]] |
| 297 | == Migration from !PrintLayout-1.0.0 to !PrintLayoutDefinition-2.0.0 == |
| 298 | |
| 299 | The design of the new schema is intended to provide a clear migration path from the old !MapGuide !PrintLayout format to the new format. The mappings of the various schema elements are defined below: |
| 300 | |
| 301 | ||!PrintLayout-1.0.0||!PrintLayoutDefinition-2.0.0||Comments|| |
| 302 | ||!PageProperties:BackgroundColor||!PrintLayoutDefinition:BackgroundColor||Optional in new schema – not supported in all formats or by all devices|| |
| 303 | ||!LayoutProperties:ShowTitle||!AnnotationElementDefinition referenced by !PrintLayoutDefinition:Elements||A separate resource defining the font, text size, rotation etc. |
| 304 | ||!LayoutProperties:ShowLegend||!LegendElementDefinition referenced by !PrintLayoutDefinition:Elements||A separate resource defining the map viewport for which to generate the legend |
| 305 | ||!LayoutProperties:ShowScaleBar||!ScaleBarElementDefinition referenced by !PrintLayoutDefinition:Elements||A separate resource defining the map viewport for which to generate the scale bar |
| 306 | ||!LayoutProperties:ShowNorthArrow||!NorthArrowElementDefinition referenced by !PrintLayoutDefinition:Elements||A separate resource defining the map viewport for which to generate the north arrow |
| 307 | ||!LayoutProperties:ShowURL||!AnnotationElementDefinition referenced by !PrintLayoutDefinition:Elements||A separate resource defining the font, text size, rotation etc. |
| 308 | ||!LayoutProperties:ShowDateTime||!AnnotationElementDefinition referenced by !PrintLayoutDefinition:Elements||A separate resource defining the font, text size, rotation etc. |
| 309 | ||!LayoutProperties:ShowCustomLogos||See handling of !CustomLogos element|||| |
| 310 | ||!LayoutProperties:ShowCustomText||See handling of !CustomText element|||| |
| 311 | ||!CustomLogos||Zero or more !SymbolElementDefinitions referenced by !PrintLayoutDefinition:Elements||Each !SymbolElementDefinition is a separate resource defining which symbol library and which symbol name to use for the logo, and optionally a rotation value to apply to the symbol.|| |
| 312 | ||!CustomText||Zero or more !AnnotationElementDefinitions referenced by !PrintLayoutDefinition:Elements||Separate resources defining the font, text size, rotation etc. of each text item|| |
| 313 | |
| 314 | |