2

I have a FeatureStyle that draws line and adda an arraow to end point of the line. And I want to see this line and arrow by scale. So I specified a MaxScaleDenominator property. Now line is not appearing at scale but arrow is appearing. How can I solve this issue? Can I specify multiple MaxScaleDenominator?

   <FeatureTypeStyle>
        <Rule>
            <Name>Lines</Name>
            <ogc:Filter>
              <ogc:PropertyIsEqualTo>
                <ogc:PropertyName>line_type</ogc:PropertyName>
                <ogc:Literal>middle</ogc:Literal>
              </ogc:PropertyIsEqualTo>
            </ogc:Filter>
            <MaxScaleDenominator>6000</MaxScaleDenominator>
            <LineSymbolizer>
                <Stroke>
                    <CssParameter name="stroke">#aa0000</CssParameter>
                    <CssParameter name="stroke-width">1</CssParameter>
                </Stroke>
            </LineSymbolizer>                    
            <PointSymbolizer>
                <Geometry>
                    <ogc:Function name="endPoint">
                        <ogc:PropertyName>geom</ogc:PropertyName>
                    </ogc:Function>
                </Geometry>
                <Graphic>
                    <Mark>
                        <WellKnownName>shape://oarrow</WellKnownName>
                        <Fill>
                            <CssParameter name="fill">#fff433</CssParameter>
                            <CssParameter name="fill-opacity">0.5</CssParameter>
                        </Fill>
                        <Stroke>
                            <CssParameter name="stroke">#fff433</CssParameter>
                            <CssParameter name="stroke-width">1</CssParameter>
                        </Stroke>
                    </Mark>
                    <Size>15</Size>
                    <Rotation>
                        <ogc:Function name="endAngle">
                            <ogc:PropertyName>geom</ogc:PropertyName>
                        </ogc:Function>
                    </Rotation>
                </Graphic>
            </PointSymbolizer>
        </Rule>
    </FeatureTypeStyle> 
1
  • 2
    you can have multiple MaxScaleDenominator if you have multiple rules.. So I would define two rules, one for the LineSymbolizer and one for the PointSymbolizer. Not sure though what's the problem with your code..
    – ylka
    Nov 20, 2014 at 8:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.