[mapguide-users] Compound line with Cartographic Stylization Engine

J Manafi jonathan.manafi at cctechnol.com
Thu Jul 31 17:05:50 EDT 2008


I am having some issues when trying to create composite features, and I was
hoping someone could point out what I am doing wrong. I just constructed a
new SymbolDefinition, and was trying to test it out by drawing it on the
map. However, currently, I am getting an XML Schema validation error saying
that the xml document is not valid.  I am not quite sure if I read the
LayerDefinition and SymbolDefinition .xsd files correctly, so that is quite
possibly where my error lies. I have included my 2 files.

I have already retrieved and verified that the SymbolDefinition is in the
repository, at the location I am looking. And this is for a dynamically
generated layer, so the resource Id is passed in later.

Any help is appreciated.
Thanks.

LayerDefinition file:

<?xml version="1.0" encoding="UTF-8"?>

<LayerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="LayerDefinition-1.1.0.xsd" version="1.1.0">
 <VectorLayerDefinition>
  <ResourceId>%s</ResourceId>
  <FeatureName>polyline_Schema:tmp_polyline</FeatureName>
  <FeatureNameType>FeatureClass</FeatureNameType>
  <PropertyMapping>
   <Name>NAME</Name>
   <Value>NAME</Value>
  </PropertyMapping>
  <Geometry>GEOM</Geometry>
  <VectorScaleRange>
   <MaxScale>12000000</MaxScale>
   <CompositeTypeStyle>
       <CompositeRule>
           <LegendLabel>Test</LegendLabel>
           <CompositeSymbolization>
             <SymbolInstance>
              
<ResourceId>Library://Path/To/File.SymbolDefinition</ResourceId>
               <ParameterOverrides>
                 <Override>
                   <SymbolName>Fault</SymbolName>
                   <ParameterIdentifier>LINE_WEIGHT</ParameterIdentifier>
                   <ParameterValue>1.0</ParameterValue>
                 </Override>
               </ParameterOverrides>
             </SymbolInstance>
           <CompositeSymbolization>
       </CompositeRule>
   </CompositeTypeStyle>
  </VectorScaleRange>
 </VectorLayerDefinition>
</LayerDefinition>

SymbolDefinition file:

<SimpleSymbolDefinition>
  <Name>Fault</Name>
  <Description>Fault</Description>
  <Graphics>
    <Path>
      <Geometry>
        M 0.0, 0.0 L 5.0, 0.0
        M 2.5, 0.0 L 2.5, 3.0
      </Geometry>
      <LineWeight>%LINE_WEIGHT%</LineWeight>
      <LineCap>'Square'</LineCap>
      <LineJoin>'Round'</LineJoin>
    </Path>
  </Graphics>
  <LineUsage>
    <VertexControl>'OverlapWrap'</VertexControl>
    <Repeat>5</Repeat>
  </LineUsage>
  <ParameterDefinition>
    <Parameter>
      <Identifier>LINE_WEIGHT</Identifier>
      <DefaultValue>1.0</DefaultValue>
      <DisplayName>Line Weight</DisplayName>
      <DataType>Real</DataType>
    </Parameter>
  </ParameterDefinition>
</SimpleSymbolDefinition>



Traian Stanev wrote:
> 
> Try adding setting a RenderingPass tag as follows:
> 
>>    <SymbolInstance>
>> <ResourceId>Library://Symbols/SolidLine.SymbolDefinition</ResourceId>
>>       <ParameterOverrides>
>>          <Override>
>>             <SymbolName>SolidLine</SymbolName>
>>             <ParameterIdentifier>LINE_COLOR</ParameterIdentifier>
>>             <ParameterValue>FF8E6D09</ParameterValue>
>>          </Override>
>>          <Override>
>>             <SymbolName>SolidLine</SymbolName>
>>             <ParameterIdentifier>LINE_WEIGHT</ParameterIdentifier>
>>             <ParameterValue>3.5</ParameterValue>
>>          </Override>
>>       </ParameterOverrides>
>         <RenderingPass>0</RenderingPass>
>>    </SymbolInstance>
>>    <SymbolInstance>
>>
>> <ResourceId>Library://Symbols/SolidLine.SymbolDefinition</ResourceId>
>>       <ParameterOverrides>
>>          <Override>
>>             <SymbolName>SolidLine</SymbolName>
>>             <ParameterIdentifier>LINE_COLOR</ParameterIdentifier>
>>             <ParameterValue>FFFFFA73</ParameterValue>
>>          </Override>
>>          <Override>
>>             <SymbolName>SolidLine</SymbolName>
>>             <ParameterIdentifier>LINE_WEIGHT</ParameterIdentifier>
>>             <ParameterValue>3.0</ParameterValue>
>>          </Override>
>>       </ParameterOverrides>
>         <RenderingPass>1</RenderingPass>
>>    </SymbolInstance>
> 
> 
> Traian
> 
> 
> 
>> -----Original Message-----
>> From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-
>> bounces at lists.osgeo.org] On Behalf Of Gunter Becker
>> Sent: Tuesday, February 19, 2008 9:23 AM
>> To: mapguide-users at lists.osgeo.org
>> Subject: [mapguide-users] Compound line with Cartographic Stylization
>> Engine
>>
>>
>> Hi all,
>>
>> I would like to have a compound line symbol for street stylization like
>> I
>> can do with basic stylization in MapGuide Studio. Now I've created a
>> SimpleSymbolDefinition called SolidLine and use this two times in the
>> CompositeSymbolization of my LayerDefintion. My problem is that the
>> line
>> features were not melting with each other (see image).
>>
>> http://www.nabble.com/file/p15560779/CompoundLine.png
>>
>> Has someone done this with success.
>> Thanks, Gunter
>>
>> The 'SolidLine' SymbolDefinition:
>>
>> <SimpleSymbolDefinition>
>>   <Name>SolidLine</Name>
>>   <Graphics>
>>     <Path>
>>       <Geometry>M 0.0,0.0 L 1.0,0.0</Geometry>
>>       <LineColor>%LINE_COLOR%</LineColor>
>>       <LineWeight>%LINE_WEIGHT%</LineWeight>
>>       <LineCap>'Round'</LineCap>
>>       <LineJoin>'Round'</LineJoin>
>>     </Path>
>>   </Graphics>
>>   <LineUsage>
>>     <Repeat>1</Repeat>
>>   </LineUsage>
>>   <ParameterDefinition>
>>     <Parameter> ... </Parameter>
>>     <Parameter> ... </Parameter>
>>   </ParameterDefinition>
>> </SimpleSymbolDefinition>
>>
>> I use it in my LayerDefinition as follows:
>>
>> <CompositeSymbolization>
>>    <SymbolInstance>
>>
>> <ResourceId>Library://Symbols/SolidLine.SymbolDefinition</ResourceId>
>>       <ParameterOverrides>
>>          <Override>
>>             <SymbolName>SolidLine</SymbolName>
>>             <ParameterIdentifier>LINE_COLOR</ParameterIdentifier>
>>             <ParameterValue>FF8E6D09</ParameterValue>
>>          </Override>
>>          <Override>
>>             <SymbolName>SolidLine</SymbolName>
>>             <ParameterIdentifier>LINE_WEIGHT</ParameterIdentifier>
>>             <ParameterValue>3.5</ParameterValue>
>>          </Override>
>>       </ParameterOverrides>
>>    </SymbolInstance>
>>    <SymbolInstance>
>>
>> <ResourceId>Library://Symbols/SolidLine.SymbolDefinition</ResourceId>
>>       <ParameterOverrides>
>>          <Override>
>>             <SymbolName>SolidLine</SymbolName>
>>             <ParameterIdentifier>LINE_COLOR</ParameterIdentifier>
>>             <ParameterValue>FFFFFA73</ParameterValue>
>>          </Override>
>>          <Override>
>>             <SymbolName>SolidLine</SymbolName>
>>             <ParameterIdentifier>LINE_WEIGHT</ParameterIdentifier>
>>             <ParameterValue>3.0</ParameterValue>
>>          </Override>
>>       </ParameterOverrides>
>>    </SymbolInstance>
>>
>> --
>> View this message in context: http://www.nabble.com/Compound-line-with-
>> Cartographic-Stylization-Engine-tp15560779s16610p15560779.html
>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Compound-line-with-Cartographic-Stylization-Engine-tp15560779p18763517.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list