1 | | Empty |
| 1 | |
| 2 | = !MapGuide RFC 50 - Hide Legend Styles = |
| 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||(June 27, 2008)|| |
| 12 | ||Last Modified||(Bruce Dechant) [[Timestamp]]|| |
| 13 | ||Author||(Aleck Sun)|| |
| 14 | ||RFC Status||Draft|| |
| 15 | ||Implementation Status||pending|| |
| 16 | ||Proposed Milestone||(e.g. 1.1, 1.3)|| |
| 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 | This section brefly describes the problem set, and the proposed solution in general terms. It should be deliberately short, a couple of sentences or so. |
| 27 | |
| 28 | == Motivation == |
| 29 | Some feature class can contain multiple feature types. For example, in SDF, a feature class can contain point, line, and polygon feature types. |
| 30 | The current MapGuide displays legend for all geometry types regardless whether there are features of that geometry types or not. Currently there is a workaround that the user can delete the styles that he doesn¡¯t want to show in the legend. However, in this way, when the user wants to show them in the legend again, he may forget which one he deleted. |
| 31 | We¡¯d like to make it more flexible for the legend items to be shown. All the styles should be persisted and the user should be able to decide whether a style is going to be shown. |
| 32 | |
| 33 | |
| 34 | == Proposed Solution == |
| 35 | |
| 36 | An additional tag is going to be added to the schema of LayerDefinition. We will add a <ShowInLegend> tag for LineTypeStyleType, AreaTypeStyleType and PointTypeStyleType as following. And the version of the LayerDefinition from 1.2 to 1.3, i.e. LayerDefinition-1.3.0.xsd |
| 37 | LineTypeStyle: |
| 38 | <xs:complexType name="LineTypeStyleType"> |
| 39 | <xs:annotation> |
| 40 | <xs:documentation>Style specification of a line geometry type.</xs:documentation> |
| 41 | </xs:annotation> |
| 42 | <xs:sequence> |
| 43 | <xs:element name="LineRule" type="LineRuleType" maxOccurs="unbounded"> |
| 44 | <xs:annotation> |
| 45 | <xs:documentation>Rules to define a theme.</xs:documentation> |
| 46 | </xs:annotation> |
| 47 | </xs:element> |
| 48 | <xs:element name="ShowInLegend" type="xs:boolean" minOccurs="0"/> |
| 49 | <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0" /> |
| 50 | </xs:sequence> |
| 51 | </xs:complexType> |
| 52 | |
| 53 | |
| 54 | PointTypeStyle: |
| 55 | <xs:complexType name="PointTypeStyleType"> |
| 56 | <xs:annotation> |
| 57 | <xs:documentation>Style specification of a point geometry type.</xs:documentation> |
| 58 | </xs:annotation> |
| 59 | <xs:sequence> |
| 60 | <xs:element name="DisplayAsText" type="xs:boolean"> |
| 61 | <xs:annotation> |
| 62 | <xs:documentation>Create a text layer.</xs:documentation> |
| 63 | </xs:annotation> |
| 64 | </xs:element> |
| 65 | <xs:element name="AllowOverpost" type="xs:boolean"> |
| 66 | <xs:annotation> |
| 67 | <xs:documentation>Allows labels from any map layer (including the current layer) to obscure features on the current layer.</xs:documentation> |
| 68 | </xs:annotation> |
| 69 | </xs:element> |
| 70 | <xs:element name="PointRule" type="PointRuleType" maxOccurs="unbounded"> |
| 71 | <xs:annotation> |
| 72 | <xs:documentation>One or more PointRules defining the PointTypeStyle.</xs:documentation> |
| 73 | </xs:annotation> |
| 74 | </xs:element> |
| 75 | <xs:element name="ShowInLegend" type="xs:boolean" minOccurs="0"/> |
| 76 | <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0" /> |
| 77 | </xs:sequence> |
| 78 | </xs:complexType> |
| 79 | |
| 80 | AreaTypeStyle: |
| 81 | <xs:complexType name="AreaTypeStyleType"> |
| 82 | <xs:annotation> |
| 83 | <xs:documentation>Style specification of a polygon geometry type.</xs:documentation> |
| 84 | </xs:annotation> |
| 85 | <xs:sequence> |
| 86 | <xs:element name="AreaRule" type="AreaRuleType" maxOccurs="unbounded"> |
| 87 | <xs:annotation> |
| 88 | <xs:documentation>Rules to define a theme.</xs:documentation> |
| 89 | </xs:annotation> |
| 90 | </xs:element> |
| 91 | <xs:element name="ShowInLegend" type="xs:boolean" minOccurs="0"/> |
| 92 | <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0" /> |
| 93 | </xs:sequence> |
| 94 | </xs:complexType> |
| 95 | |
| 96 | And the corresponding module will also be modified to reflect in UI the schema change. |
| 97 | |
| 98 | == Implications == |
| 99 | |
| 100 | Existing schema documentation will be updated. |
| 101 | |
| 102 | == Test Plan == |
| 103 | |
| 104 | No new unit tests will be created for this. However, the existing unit tests will be run to ensure that they still pass. |
| 105 | |
| 106 | == Funding/Resources == |
| 107 | |
| 108 | Autodesk |