| 1 | |
| 2 | = !MapGuide RFC 54 - Better Legend Control = |
| 3 | |
| 4 | This page contains an change request (RFC) for the !MapGuide Open Source project. |
| 5 | More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page. |
| 6 | |
| 7 | |
| 8 | == Status == |
| 9 | |
| 10 | ||RFC Template Version||(1.0)|| |
| 11 | ||Submission Date||July 30, 2008|| |
| 12 | ||Last Modified||Kenneth Skovhede [[Timestamp]]|| |
| 13 | ||Author||Kenneth Skovhede|| |
| 14 | ||RFC Status||Draft|| |
| 15 | ||Implementation Status||pending|| |
| 16 | ||Proposed Milestone||2.2|| |
| 17 | ||Assigned PSC guide(s)||Bruce Dechant?|| |
| 18 | ||'''Voting History'''||(vote date)|| |
| 19 | ||+1|| || |
| 20 | ||+0|| || |
| 21 | ||-0|| || |
| 22 | ||-1|| || |
| 23 | |
| 24 | == Overview == |
| 25 | |
| 26 | Change the schema of !MapDefinition and !LayerDefinition to contain properties that allow more control of the functionality and style in the legend. |
| 27 | |
| 28 | == Motivation == |
| 29 | |
| 30 | This RFC is an extension to [wiki:MapGuideRfc50 RFC 50], and allows even more control over the legend. Some layer may not be turned off but might still be required to be visible in the legend. In the case where multiple layers comprise a single logical layer, the user should not be able to turn off the actual layers, but only the top level group. This is not possible with the current schema. |
| 31 | |
| 32 | At times, it may be desireable to provide a custom image for a layer or group. This will allow a user to supply custom images for raster layers, without having to replace the raster layer image for the entire server. Providing a custom image for a group will enable map designers to make a more visually pleasing solution to the mentioned case, where multiple layers comprise a single logical layer. |
| 33 | |
| 34 | The original proposal was submitted by Jason Birch: |
| 35 | http://lists.osgeo.org/pipermail/mapguide-internals/2008-July/002576.html |
| 36 | |
| 37 | |
| 38 | == Proposed Solution == |
| 39 | |
| 40 | Two additional tags are going to be added to the schema of !MapDefinition. We will add an <!EnableVisibilityChange> tag and a <!AlternativeImageURL> for !MapLayerGroupCommonType. An additional tag named <!AlternativeImageURL> is going to be added to !LayerDefiniton. In !LayerDefinition there is no common base, so the tag will be added to <!PointTypeStyleType>, <!LineTypeStyleType>, <!AreaTypeStyleType> and <!CompositeTypeStyleType>. |
| 41 | |
| 42 | The version of the !MapDefinition will change from 1.0 to 1.1, i.e. !MapDefinition-1.1.0.xsd. |
| 43 | The version of the !LayerDefinition will change from 1.3 to 1.4, i.e. !LayerDefiniton-1.4.0.xsd. |
| 44 | |
| 45 | Details of the changes are described below. |
| 46 | |
| 47 | !MapLayerGroupCommonType in !MapDefinition: |
| 48 | {{{ |
| 49 | <xs:complexType name="MapLayerGroupCommonType"> |
| 50 | <xs:annotation> |
| 51 | <xs:documentation>MapLayerGroupCommonType is a common subclass of MapLayerGroupCommonType and BaseMapLayerGroupCommonType</xs:documentation> |
| 52 | </xs:annotation> |
| 53 | <xs:sequence> |
| 54 | <xs:element name="Name" type="xs:string"> |
| 55 | <xs:annotation> |
| 56 | <xs:documentation>The name of this LayerGroup</xs:documentation> |
| 57 | </xs:annotation> |
| 58 | </xs:element> |
| 59 | <xs:element name="Visible" type="xs:boolean"> |
| 60 | <xs:annotation> |
| 61 | <xs:documentation>Whether this group's visiblity should be visible or not when it first comes into range</xs:documentation> |
| 62 | </xs:annotation> |
| 63 | </xs:element> |
| 64 | <xs:element name="ShowInLegend" type="xs:boolean"> |
| 65 | <xs:annotation> |
| 66 | <xs:documentation>Whether or not the LayerGroup should be shown in the legend</xs:documentation> |
| 67 | </xs:annotation> |
| 68 | </xs:element> |
| 69 | <xs:element name="ExpandInLegend" type="xs:boolean"> |
| 70 | <xs:annotation> |
| 71 | <xs:documentation>Whether or not the LayerGroup should be initially expanded in the legend</xs:documentation> |
| 72 | </xs:annotation> |
| 73 | </xs:element> |
| 74 | <xs:element name="LegendLabel" type="xs:string"> |
| 75 | <xs:annotation> |
| 76 | <xs:documentation>Label to be shown for the LayerGroup in the legend</xs:documentation> |
| 77 | </xs:annotation> |
| 78 | </xs:element> |
| 79 | |
| 80 | <xs:element name="EnableVisibilityChange" type="xs:boolean" minOccurs="0" default="true" > |
| 81 | <xs:annotation> |
| 82 | <xs:documentation>Whether or not the user can toggle the visibility of the LayerGroup in the legend</xs:documentation> |
| 83 | </xs:annotation> |
| 84 | </xs:element> |
| 85 | <xs:element name="AlternativeImageURL" type="xs:string" minOccurs="0" > |
| 86 | <xs:annotation> |
| 87 | <xs:documentation>An URL to an alternate image to display in the legend</xs:documentation> |
| 88 | </xs:annotation> |
| 89 | </xs:element> |
| 90 | |
| 91 | </xs:sequence> |
| 92 | </xs:complexType> |
| 93 | }}} |
| 94 | |
| 95 | !LineTypeStyle in !LayerDefinition: |
| 96 | {{{ |
| 97 | <xs:complexType name="LineTypeStyleType"> |
| 98 | <xs:annotation> |
| 99 | <xs:documentation>Style specification of a line geometry type.</xs:documentation> |
| 100 | </xs:annotation> |
| 101 | <xs:sequence> |
| 102 | <xs:element name="LineRule" type="LineRuleType" maxOccurs="unbounded"> |
| 103 | <xs:annotation> |
| 104 | <xs:documentation>Rules to define a theme.</xs:documentation> |
| 105 | </xs:annotation> |
| 106 | </xs:element> |
| 107 | <xs:element name="ShowInLegend" type="xs:boolean" minOccurs="0" default="true" /> |
| 108 | <xs:element name="AlternativeImageURL" type="xs:string" minOccurs="0" /> |
| 109 | <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0" /> |
| 110 | </xs:sequence> |
| 111 | </xs:complexType> |
| 112 | }}} |
| 113 | |
| 114 | !PointTypeStyle in !LayerDefinition: |
| 115 | {{{ |
| 116 | <xs:complexType name="PointTypeStyleType"> |
| 117 | <xs:annotation> |
| 118 | <xs:documentation>Style specification of a point geometry type.</xs:documentation> |
| 119 | </xs:annotation> |
| 120 | <xs:sequence> |
| 121 | <xs:element name="DisplayAsText" type="xs:boolean"> |
| 122 | <xs:annotation> |
| 123 | <xs:documentation>Create a text layer.</xs:documentation> |
| 124 | </xs:annotation> |
| 125 | </xs:element> |
| 126 | <xs:element name="AllowOverpost" type="xs:boolean"> |
| 127 | <xs:annotation> |
| 128 | <xs:documentation>Allows labels from any map layer (including the current layer) to obscure features on the current layer.</xs:documentation> |
| 129 | </xs:annotation> |
| 130 | </xs:element> |
| 131 | <xs:element name="PointRule" type="PointRuleType" maxOccurs="unbounded"> |
| 132 | <xs:annotation> |
| 133 | <xs:documentation>One or more PointRules defining the PointTypeStyle.</xs:documentation> |
| 134 | </xs:annotation> |
| 135 | </xs:element> |
| 136 | <xs:element name="ShowInLegend" type="xs:boolean" minOccurs="0" default="true" /> |
| 137 | <xs:element name="AlternativeImageURL" type="xs:string" minOccurs="0" /> |
| 138 | <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0" /> |
| 139 | </xs:sequence> |
| 140 | </xs:complexType> |
| 141 | }}} |
| 142 | |
| 143 | !AreaTypeStyle in !LayerDefinition: |
| 144 | {{{ |
| 145 | <xs:complexType name="AreaTypeStyleType"> |
| 146 | <xs:annotation> |
| 147 | <xs:documentation>Style specification of a polygon geometry type.</xs:documentation> |
| 148 | </xs:annotation> |
| 149 | <xs:sequence> |
| 150 | <xs:element name="AreaRule" type="AreaRuleType" maxOccurs="unbounded"> |
| 151 | <xs:annotation> |
| 152 | <xs:documentation>Rules to define a theme.</xs:documentation> |
| 153 | </xs:annotation> |
| 154 | </xs:element> |
| 155 | <xs:element name="ShowInLegend" type="xs:boolean" minOccurs="0" default="true"/> |
| 156 | <xs:element name="AlternativeImageURL" type="xs:string" minOccurs="0" /> |
| 157 | <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0" /> |
| 158 | </xs:sequence> |
| 159 | </xs:complexType> |
| 160 | }}} |
| 161 | |
| 162 | !CompositeTypeStyle in !LayerDefinition: |
| 163 | {{{ |
| 164 | <xs:complexType name="CompositeTypeStyle"> |
| 165 | <xs:annotation> |
| 166 | <xs:documentation>A style specification consisting of composite rules.</xs:documentation> |
| 167 | </xs:annotation> |
| 168 | <xs:sequence> |
| 169 | <xs:element name="CompositeRule" type="CompositeRule" maxOccurs="unbounded"> |
| 170 | <xs:annotation> |
| 171 | <xs:documentation>One or more CompositeRules defining the CompositeTypeStyle.</xs:documentation> |
| 172 | </xs:annotation> |
| 173 | </xs:element> |
| 174 | <xs:element name="ShowInLegend" type="xs:boolean" minOccurs="0" default="true"/> |
| 175 | <xs:element name="AlternativeImageURL" type="xs:string" minOccurs="0" /> |
| 176 | <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/> |
| 177 | </xs:sequence> |
| 178 | </xs:complexType> |
| 179 | }}} |
| 180 | |
| 181 | == Implications == |
| 182 | |
| 183 | The existing schema documentation will be updated. |
| 184 | Since these are all extensions to the schema, no existing functionality will be affected. |
| 185 | Before these additions have any effect, they must be handled in the viewers, both the !WebLayout based, as well as the Fusion based viewer has to be updated. The !GetMapLegendImage function will also have to be updated to deal with these new properties as well. |
| 186 | |
| 187 | == Test Plan == |
| 188 | |
| 189 | No new unit tests will be created for this. However, the existing unit tests will be run to ensure that they still pass. |
| 190 | |
| 191 | == Funding/Resources == |
| 192 | |
| 193 | Autodesk |