Hi all,

I am trying to create one SLD file for multiple feature tables in Geoserver.
However, it is not working. I don’t want to create a whole series of SLD
files for each feature table but have one. Is it possible or I might doing
something wrong from the code below;

It is assigning the first NamedLayer to all feature tables I apply the SLD
to.

<?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";>
<!--Nurseries--> 
    <NamedLayer>
        <Name>heducation:Nurseries</Name>
          <UserStyle>
            <Name>Custom Style</Name>
            <Title>heducation:Nurseries</Title>
            <Abstract>LBH Education layers</Abstract>
            <FeatureTypeStyle>
                <Rule>
                <Name>heducation:Nurseries</Name>
                  <Title>External graphics</Title>
                    <Abstract>A gray outline and white fill, with a 8 pixel
width</Abstract>
                    <PointSymbolizer>
                        <Graphic>
                            <ExternalGraphic>
                                <OnlineResource
                                xlink:type="simple"
                               
xlink:href="http://www.map.hackney.gov.uk/Icons/google/orange-dot.png"; />
                                <Format>image/png</Format>
                            </ExternalGraphic>
                            <Size>30</Size>
                        </Graphic>
                    </PointSymbolizer>
                </Rule>
            </FeatureTypeStyle>
        </UserStyle>
    </NamedLayer>
    <!--Primary Schools-->
    <NamedLayer>
        <Name>heducation:Primary Schools</Name>
        <UserStyle>
            <Name>Custom Style</Name>
            <Title>Education</Title>
            <Abstract>LBH Education layers</Abstract>
            <FeatureTypeStyle>
                <Rule>
                    <PointSymbolizer>
                        <Graphic>
                            <ExternalGraphic>
                                <OnlineResource
                                xlink:type="simple"
                               
xlink:href="http://www.map.hackney.gov.uk/icons/google/info.png"; />
                                <Format>image/png</Format>
                            </ExternalGraphic>
                            <Size>30</Size>
                        </Graphic>
                    </PointSymbolizer>
                </Rule>
            </FeatureTypeStyle>
        </UserStyle>
    </NamedLayer>
    <!--Libraries-->
    <NamedLayer>
        <Name>heducation:Hackney Libraries</Name>
        <UserStyle>
            <Name>Custom Style</Name>
            <Title>Education</Title>
            <Abstract>LBH Education layers</Abstract>
            <FeatureTypeStyle>
                <Rule>
                <Name>heducation:Libraries</Name>
                  <Title>External graphics</Title>
                    <Abstract>A gray outline and white fill, with a 8 pixel
width</Abstract>
                    <PointSymbolizer>
                        <Graphic>
                            <ExternalGraphic>
                                <OnlineResource
                                xlink:type="simple"
                               
xlink:href="http://www.map.hackney.gov.uk/icons/google/info.png"; />
                                <Format>image/png</Format>
                            </ExternalGraphic>
                            <Size>30</Size>
                        </Graphic>
                    </PointSymbolizer>
                </Rule>
            </FeatureTypeStyle>
        </UserStyle>
    </NamedLayer>
</StyledLayerDescriptor>

Thanks for your help.

-- 
View this message in context: 
http://old.nabble.com/One-SLD-File-for-Multiple-Feature-table-%28Layers%29-in-Geoserver-tp29327149p29327149.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to