MapGuide RFC 50 - Hide Legend Styles
This page contains an change request (RFC) for the MapGuide Open Source project. More MapGuide RFCs can be found on the RFCs page.
Status
RFC Template Version | (1.0) |
Submission Date | June 27, 2008 |
Last Modified | Bruce Dechant Timestamp |
Author | Aleck Sun |
RFC Status | adopted |
Implementation Status | done |
Proposed Milestone | 2.1 |
Assigned PSC guide(s) | Bruce Dechant |
Voting History | (vote date) |
+1 | Andy, Bruce, Haris, Jason, Paul, Tom |
+0 | |
-0 | |
-1 | |
Abstain | Bob |
Overview
Change the schema of LayerDefinition so that users can hide the styles that they don’t want to be displayed in the legend.
Motivation
Some feature classes can contain multiple feature types. For example, in SDF, a feature class can contain point, line, and polygon feature types. The current MapGuide legend displays all the geometry types regardless of whether there are features of that geometry type or not. Currently, there is a workaround that the user can delete the styles that they don't want to show in the legend. However, in this way, when the user wants to show them in the legend again, they may have forgetten which one was deleted. We would 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 or not.
Proposed Solution
An additional tag is going to be added to the schema of LayerDefinition. We will add a <ShowInLegend> tag for LineTypeStyleType, AreaTypeStyleType, PointTypeStyleType and CompositeTypeStyleType as following. The version of the LayerDefinition will change from 1.2 to 1.3, i.e. LayerDefinition-1.3.0.xsd.
LineTypeStyle:
<xs:complexType name="LineTypeStyleType"> <xs:annotation> <xs:documentation>Style specification of a line geometry type.</xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="LineRule" type="LineRuleType" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>Rules to define a theme.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="ShowInLegend" type="xs:boolean" minOccurs="0" default="true" /> <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0" /> </xs:sequence> </xs:complexType>
PointTypeStyle:
<xs:complexType name="PointTypeStyleType"> <xs:annotation> <xs:documentation>Style specification of a point geometry type.</xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="DisplayAsText" type="xs:boolean"> <xs:annotation> <xs:documentation>Create a text layer.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="AllowOverpost" type="xs:boolean"> <xs:annotation> <xs:documentation>Allows labels from any map layer (including the current layer) to obscure features on the current layer.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="PointRule" type="PointRuleType" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>One or more PointRules defining the PointTypeStyle.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="ShowInLegend" type="xs:boolean" minOccurs="0" default="true" /> <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0" /> </xs:sequence> </xs:complexType>
AreaTypeStyle:
<xs:complexType name="AreaTypeStyleType"> <xs:annotation> <xs:documentation>Style specification of a polygon geometry type.</xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="AreaRule" type="AreaRuleType" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>Rules to define a theme.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="ShowInLegend" type="xs:boolean" minOccurs="0" default="true"/> <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0" /> </xs:sequence> </xs:complexType>
CompositeTypeStyle:
<xs:complexType name="CompositeTypeStyle"> <xs:annotation> <xs:documentation>A style specification consisting of composite rules.</xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="CompositeRule" type="CompositeRule" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>One or more CompositeRules defining the CompositeTypeStyle.</xs:documentation> </xs:annotation> </xs:element> <xs:element name="ShowInLegend" type="xs:boolean" minOccurs="0" default="true"/> <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/> </xs:sequence> </xs:complexType>
Implications
The existing schema documentation will be updated.
Test Plan
No new unit tests will be created for this. However, the existing unit tests will be run to ensure that they still pass.
Funding/Resources
Autodesk