| 222 | ==== Adding a print layout element ==== |
| 223 | |
| 224 | This use case is part of use cases that realize a particular type of print layout element. |
| 225 | |
| 226 | [[BR]] |
| 227 | [[Image(AddPrintLayoutElementUseCase2.PNG, 1400)]] |
| 228 | [[BR]] |
| 229 | |
| 230 | ''PRECONDITIONS'' |
| 231 | |
| 232 | • Adding required data for map viewport creation use case |
| 233 | |
| 234 | ''STEPS'' |
| 235 | |
| 236 | • Client builds an Xml for a particular type of print layout element. In this Xml, he specifies the Data.!ResourceId property to point to the feature source definition and the Stylization.ResourceId property to point to the layer definition created in the previous steps. He also sets the fully qualified feature class name of the print layout element data in Data.FeatureClass property.[[BR]] |
| 237 | • Client adds this Xml to Resource Service by calling !SetResource(printLayoutElementResId, printLayoutElementXml)[[BR]] |
| 238 | • The Resource Service implementation creates an instance of !PrintLayoutResourcesOwner if not already created and adds it to a named dictionary.[[BR]] |
| 239 | • The Resource Service calls !AddResource on !MapPrintLayoutResourcesOwner object.[[BR]] |
| 240 | • !PrintLayoutResourcesOwner determines the type of the print layout element that is being added and creates an runtime representation object for the resource. In case of !MapViewport resources, this would be !MapViewportResource, inherited from !MapResource class.[[BR]] |
| 241 | • !PrintLayoutResourcesOwner then adds this runtime object to Resource Manager and also subscribes to Resource Manager events, if not already done.[[BR]] |
| 242 | |