[Possible repost- I sent this before I had subscribed and was concerned it 
would not make it into the mailing list]

The example SLD below works in 2.0.1 but is having some kml issues in 2.1.1.  
One of the properties associated with each of our PostGIS features is the 
location of a default graphic (minus the http://).  The external graphics are 
standard homeland security icons for emergency management.  All is happy in 
2.0.1 and most is happy in 2.1.1.  In 2.1.1 the normal wms image formats put in 
the external graphic, but the kml comes back blank.  Perhaps we were sneaking 
through an old loophole and we are actually out of spec?

SLD:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor 
xmlns="http://www.opengis.net/sld";<http://www.opengis.net/sld%22> 
xmlns:sld="http://www.opengis.net/sld";<http://www.opengis.net/sld%22> 
xmlns:ogc="http://www.opengis.net/ogc";<http://www.opengis.net/ogc%22> 
xmlns:gml="http://www.opengis.net/gml";<http://www.opengis.net/gml%22> 
version="1.0.0">
  <sld:NamedLayer>
    <sld:Name>example_layer</sld:Name>
    <sld:UserStyle>
      <sld:Name>example_layer</sld:Name>
      <sld:Title>example_layer</sld:Title>
      <sld:Abstract>Default Point Style</sld:Abstract>
      <sld:FeatureTypeStyle>
        <sld:Name>name</sld:Name>
        <sld:Rule>
          <sld:Name>Default Graphic Rule</sld:Name>
          <sld:Title>Default Graphic Rule</sld:Title>
          <sld:ElseFilter/>
          <sld:PointSymbolizer>
            <sld:Graphic>
              <sld:ExternalGraphic>
                <sld:OnlineResource 
xmlns:xlink="http://www.w3.org/1999/xlink";<http://www.w3.org/1999/xlink%22> 
xlink:type="simple" xlink:href="http://$<http://$/>{default_graphic}"/>
                <sld:Format>image/png</sld:Format>
              </sld:ExternalGraphic>
              <sld:Size>
            <ogc:Literal>24</ogc:Literal>
          </sld:Size>
            </sld:Graphic>
          </sld:PointSymbolizer>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:NamedLayer>
</sld:StyledLayerDescriptor>

complete KML Response (layer preview):
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2";<http://www.opengis.net/kml/2.2%22> 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";<http://www.w3.org/2001/XMLSchema-instance%22>
 xsi:schemaLocation="http://www.opengis.net/kml/2.2 
http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd"/><http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd%22/%3E>


Part of WFS GML2 response to show GS is picking up the default_graphic field:
...
<gml:featureMember><xx:example_layer 
fid="example_layer.5"><xx:default_graphic>OUR_SERVER.com/EOC/icons/HSWG/E_Med_Emergency_Medical_Theme_S1.png</xx:default_graphic><xx:the_geom><gml:Point
 
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";><http://www.opengis.net/gml/srs/epsg.xml#4326%22%3E><gml:coordinates
 decimal="." cs="," ts=" 
">-90.0613495,30.031678</gml:coordinates></gml:Point></xx:the_geom><xx:a_sample_field>Emergency
 Med 
edit</xx:a_sample_field><xx:version>0</xx:version></xx:example_layer></gml:featureMember>

P.S.  If you have a fix, I will buy you a beverage at foss4g or anytime you are 
in New Orleans!
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to