0

I am able to only display point type on the map when it is opened a layer in GeoServer layer preview. I want to display other shapes such as LineString.

How can I add this to Style Editor to show different shapes on one layer?

Below is my style script which I have copied from Style Editor in GeoServer.

Is it possible to show more than one shapes style in a layer?

If I ask in a different way, is Symbolizer able to added in the script of XML to display when a layer is opened by OpenLayers in GeoServer?

<?xml version="1.0" encoding="UTF-8"?>
    <StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
                           xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                           xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
        <NamedLayer>
            <Name>M_DIZAYN_VANA</Name>
            <UserStyle>
                <Name>SERVIS_NOKTASI</Name>
                <Title>SERVIS_NOKTASI</Title>
                <Abstract>SERVIS_NOKTASI</Abstract>
                <FeatureTypeStyle>
                    <Rule>

                        <PointSymbolizer>
                            <Graphic>
                                <Mark>
                                    <WellKnownName>square</WellKnownName>
                                    <Fill>
                                        <CssParameter name="fill">#a43eb4</CssParameter>
                                        <CssParameter name="stroke">#000000</CssParameter>
                                        <CssParameter name="stroke-width">1</CssParameter>
                                    </Fill>
                                </Mark>
                                <Size>7</Size>                            
                            </Graphic>
                        </PointSymbolizer>                   
                    </Rule>
                </FeatureTypeStyle>
            </UserStyle>
        </NamedLayer>
    </StyledLayerDescriptor>
  • does your layer have other types of geometry in it? – Ian Turton Dec 7 '17 at 8:53
  • yes Ian, layer contains line, point and other types. I will try that link. Thanks – vahitdurmus Dec 7 '17 at 9:20