wiki:MapGuideRfc119

Version 5 (modified by samwang, 13 years ago) ( diff )

--

MapGuide RFC 119 - Enhance URL information for features in vector layer definition

This page contains a 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(July 19, 2011)
Last Modified(Sam Wang) (June 19, 2011)
Author(Sam Wang)
RFC Status(Not ready for review)
Implementation Status(pending)
Proposed Milestone(2.4)
Assigned PSC guide(s)Bruce Dechant
Voting History(vote date)
+1
+0
-0
-1
no vote

Overview

This RFC proposes a solution to enhance representation of URL information for features in vector layer definition.

Motivation

Current layer definition schema already defines an element "URL" in "VectorLayerDefinition" complex type to store URL definition. However, we may need further details of the URL, such as description of URL which can be displayed to user. Also, we may assign an FDO expression to URL element which designates a layer level URL setting for features, but at the the same time, we may as well would like to override it for a specific feature. For example: the URL xml element has been assigned Fdo value

Concat('http://www.map.com/fid=', FeatId)

where 'FeatId' property is the property to identify a unique feature of the feature class. The the URL of features should be something like "http://www.map.com/fid=123" for feature with FeatID=123. At the same time, a user may want to change the URL of this feature to something else, e.g a hard coded string "www.google.com". We have to specify where to store this value.

Proposed Solution

We need to change the layer definition a little bit. First we add a XML complex type named "URLDataType" to represent URL information.

 <xs:complexType name="URLDataType">
    <xs:annotation>
      <xs:documentation>URL information for features.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Content" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The real address of the URL. This can be an string FDO expression.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Description" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The description of the URL. This can be an string FDO expression.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ContentOverride" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Specify the property name of the feature class where the override of URL content for a specific feature can be stored.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DescriptionOverride" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Specify the property name of the feature class where the override of URL description for a specific feature can be stored.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

The meaning of child elements this complex type is well explained in its annotation.

Then change the original "URL" element in "VectorLayerDefinition" from simple type "xs:string" to complex type "URLDataType".

 <xs:element name="Url" type="URLDataType" minOccurs="0">
   <xs:annotation>
     <xs:documentation>The optional URL information associated with each feature.</xs:documentation>
   </xs:annotation>
 </xs:element>

Implications

Existing schema documentation will be updated.

Test Plan

The existing unit tests (MdfModel unit test) will be updated adding test of the new complex type added and the new version handling. The MdfModel unit test verifies that the versioning / roundtripping behavior is working correctly.

Funding / Resources

Funding and developer resources to be provided by Autodesk.

Note: See TracWiki for help on using the wiki.