Changes between Version 12 and Version 13 of MapGuideRfc16


Ignore:
Timestamp:
Feb 22, 2007, 2:28:22 PM (17 years ago)
Author:
chrisclaydon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc16

    v12 v13  
    105105Additional !ExtendedData elements have been added to allow for future extensions to this part of the schema.
    106106
     107==== Example ===
     108
     109The following XML snippet is taken from the layer definition used to generate the screenshot above:
     110{{{
     111<VectorLayerDefinition>
     112  ...
     113  ... 
     114  <VectorScaleRange>
     115    ...
     116    ...
     117    <ExtendedData1>
     118      <ElevationSettings>
     119        <ZOffset>0</ZOffset>
     120        <ZExtrusion>HEIGHT_AGL</ZExtrusion>
     121        <ZOffsetType>RelativeToGround</ZOffsetType>
     122      </ElevationSettings>
     123    </ExtendedData1> 
     124  </VectorScaleRange>
     125</VectorLayerDefinition>
     126</LayerDefinition>
     127}}}
     128
    107129=== MDF Model and Parser Modifications ===
    108130
     
    113135=== Stylization Modifications ===
    114136
    115 A few changes would be required to the internal stylization interfaces in order to pass the elevation settings through the framework to the Stylize() methods of the affected !GeometryAdapters. Inside these methods, the offset and extrusion expressions would be evaluated for the current feature, and the resulting floating point values would be passed as additional parameters into the Renderer::!StartFeature() command. The method signature chages are as follows:
    116 
    117 '''GeometryAdapter::Stylize()''' would be modified from this:
    118 {{{
    119     virtual void Stylize(Renderer*                      /*renderer*/,
    120                          RS_FeatureReader*              /*features*/,
    121                          RS_FilterExecutor*             /*exec*/,
    122                          LineBuffer*                    /*lb*/,
    123                          MdfModel::FeatureTypeStyle*    /*style*/,
    124                          const MdfModel::MdfString*     /*tooltip = NULL*/,
    125                          const MdfModel::MdfString*     /*url = NULL*/)                         
    126 }}}
    127 to this:
    128 {{{
    129     virtual void Stylize(Renderer*                      /*renderer*/,
    130                          RS_FeatureReader*              /*features*/,
    131                          RS_FilterExecutor*             /*exec*/,
    132                          LineBuffer*                    /*lb*/,
    133                          MdfModel::FeatureTypeStyle*    /*style*/,
    134                          const MdfModel::MdfString*     /*tooltip = NULL*/,
    135                          const MdfModel::MdfString*     /*url = NULL*/,
    136                          RS_ElevationSettings*          /*elevSettings = NULL*/)
    137 }}}
    138 where RS_ElevationSettings is a simple struct-like class that contains the elevation settings.
    139 
    140 '''Renderer::!StartFeature()''' would be modified from this:
    141 {{{
    142     virtual void StartFeature (RS_FeatureReader* feature,
    143                                const RS_String*  tooltip = NULL,
    144                                const RS_String*  url = NULL,
    145                                const RS_String* theme = NULL) = 0;
    146 }}}
    147 to this:
    148 {{{
    149     virtual void StartFeature (RS_FeatureReader* feature,
    150                                const RS_String*  tooltip = NULL,
    151                                const RS_String*  url = NULL,
    152                                const RS_String* theme = NULL,
    153                                double zOffset = 0,
    154                                double zExtrusion = 0,
    155                                RS_ElevationType zOffsetType = RS_ElevationType_RelativeToGround) = 0;
    156 }}}
    157 
    158 All concrete classes that inherit from !GeometryAdapter would need to be updated to use the new Stylize() method signature.
    159 
    160 All concrete classes that implement the Renderer interface would need to be updated to reflect the changes, though only !KmlRenderer would currently make use of the new parameters.
    161 
    162 ==== !KmlRenderer Modifications ====
    163 
    164 The KML Service generates KML using the !KmlRenderer class - a concrete implementation of the Renderer interface. This class would be updated to set the Z coordinate of the generated geometries to be equal to (zOffset + zExtrusion). Also, if zExtrusion > 0, we would write out the KML element <extrude>1</extrude> to indicate that the features should be extruded down to the ground. If zOffset > 0, we will stil extrude the features down to the ground level, since Google Earth does not currently provide a means for rendering floating extruded objects.
     137The Stylization project would be modified to make the necessary elevation settings available to the !KmlRenderer class that generates KML output for the KML Service. This class would be updated to set the Z coordinate of the generated geometries to be equal to (zOffset + zExtrusion). Also, if zExtrusion > 0, we would write out the KML element <extrude>1</extrude> to indicate that the features should be extruded down to the ground. If zOffset > 0, we will stil extrude the features down to the ground level, since Google Earth does not currently provide a means for rendering floating extruded objects.
    165138
    166139== Implications ==
    167140
    168141This RFC does not describe any modifications to the GUI tools used to create layer definitions. The elevation settings would need to be configured by manual modification of the layer definition XML files.
     142Because the changes are contained in an <!ExtendedData1> element, a layer definition can be read, modified, and saved by MapGuide Studio, and the elevation settings will be preserved.
     143There are no changes to the existing public API.
    169144
    170145== Test Plan ==