Changes between Version 14 and Version 15 of MapGuideRfc14


Ignore:
Timestamp:
02/02/07 12:35:58 (18 years ago)
Author:
robertbray
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc14

    v14 v15  
    146146'''Example 4:'''  line style with start / end symbols
    147147
     148[[Image(ex4.jpg)]]
    148149
    149150This line style includes text along the centerline, and start / end symbols.  In order to store all three components of the line style together we need to make this a compound symbol definition.
    150151
     152{{{
     153<CompoundSymbolDefinition>
     154  <Name>GasWithStartEndSymbols</Name>
     155  <Symbols>
     156    <SimpleSymbolDefinition>
     157      <Name>GasStyle</Name>
     158      <Graphics>
     159        <Path>
     160          <Geometry>M 0,0 H 5 M 15,0 H 5</Geometry>
     161          <LineWeight>1mm</LineWeight>
     162          <LineCap>Round</LineCap>
     163          <LineJoin>Round</LineJoin>
     164        </Path>
     165        <Text>
     166          <String>GAS</String>
     167          <FontName>Arial</FontName>
     168          <Height>3.5mm</Height>
     169          <PositionX>10</PositionX>
     170          <PositionY>0</PositionY>
     171          <HorizontalAlignment>Center</HorizontalAlignment>
     172          <VerticalAlignment>Middle</VerticalAlignment>
     173        </Text>
     174      </Graphics>
     175      <LineUsage>
     176        <VertexControl>OverlapWrap</VertexControl>
     177        <Repeat>20</Repeat>
     178      </LineUsage>
     179    </SimpleSymbolDefinition>
     180    <SimpleSymbolDefinition>
     181      <Name>BlueSquare</Name>
     182      <Graphics>
     183        <Path>
     184          <Geometry>M -0.5,-0.5 H 1, V 1, H -1, Z</Geometry>
     185          <FillColor>c00000ff</FillColor>
     186        </Path>
     187      </Graphics>
     188      <LineUsage>
     189        <VertexControl>OverlapNoWrap</VertexControl>
     190        <StartOffset>0</StartOffset>
     191        <Repeat>0</Repeat>
     192      </LineUsage>
     193    </SimpleSymbolDefinition>
     194    <SimpleSymbolDefinition>
     195      <Name>RedTriangle</Name>
     196      <Graphics>
     197        <Path>
     198          <Geometry>M -0.5,-0.5 H 1, L 0,1, Z</Geometry>
     199          <FillColor>c0ff0000</FillColor>
     200        </Path>
     201      </Graphics>
     202      <LineUsage>
     203        <VertexControl>OverlapNoWrap</VertexControl>
     204        <EndOffset>0</EndOffset>
     205        <Repeat>0</Repeat>
     206      </LineUsage>
     207    </SimpleSymbolDefinition>
     208  </Symbols>
     209</CompoundSymbolDefinition>
     210}}}
     211
     212In this version of the schema the order of the symbols in the compound determines the draw order.  Here, the start and end symbols are drawn on top of the dashing.  For the start symbol the !StartOffset and Repeat are set to 0.  This ensures the symbol is only drawn once at the start of the feature.  Likewise, for the end symbol we set the !EndOffset and Repeat to 0.  We also want !OverlapNoWrap for the !VertexControl.  The symbol can overlap a vertex, but we simply want to “stamp” it – no bending around vertices.
     213
     214One other note: the default AngleControl behavior is FromGeometry.  This means the angle of the start / end symbol will be computed from the geometry, as shown here.
     215
     216
     217
    151218= Implications =
    152219