SLD with PointSymbolizer

3270
4
09-02-2010 05:08 AM
by Anonymous User
Not applicable
Original User: pablocabrera

Hello,

Im using the WMS service with an external SLD and it works quite well.
The thing is that I've been trying to get a PointSymbolizer with an OnlineResource to work but with no success so far.

When I use a simple "Mark", it works, but when I change it to an OnlineResouce, it doesn't display a thing.

Here are the SLD with the rules:

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<sld:StyledLayerDescriptor version="1.0.0"
 xmlns:sld="http://www.opengis.net/sld"
 xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">
 
 <sld:NamedLayer>
  <sld:Name>3</sld:Name>
  
  <sld:UserStyle>
   <sld:Name>pontos</sld:Name>
   
   <sld:FeatureTypeStyle>

<sld:Rule>
 <sld:Name>My Point</sld:Name>
 
 <sld:PointSymbolizer>
  <sld:Graphic>
   <sld:ExternalGraphic>
    <sld:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://somehost/someImage.gif" />
    <sld:Format>image/gif</sld:Format>
   </sld:ExternalGraphic>
   <sld:Size>16</sld:Size>
  </sld:Graphic>
 </sld:PointSymbolizer>
</sld:Rule>


   </sld:FeatureTypeStyle>
  </sld:UserStyle>
 </sld:NamedLayer>
</sld:StyledLayerDescriptor>


The image is accessible, (I'm running ArcGISServer on the same machine as the image) and when I try to open the URL on the browser, it shows up nicely.

Any clues? I don't know what to do... =/
0 Kudos
4 Replies
RicoLelina
New Contributor
Did you figure out what's wrong?
0 Kudos
by Anonymous User
Not applicable
Original User: bootbr

I'm having exactly the same problem. Has anyone else had the same issue?
0 Kudos
MarcVandael
New Contributor
Hi, i know this is an old thread, but I had this problem also. In my case was with a proxy setting. Easiest would be to reference to a file on your own server/host. That fixed it in my case. If this doesn't solve it, you might want to verify your proxy settings.
0 Kudos
by Anonymous User
Not applicable
Original User: anakintang

Hi,

Can you try

<sld:UserStyle>
   <sld:Name>pizza</sld:Name>
   <sld:Title>pizza</sld:Title>
   <sld:FeatureTypeStyle>
    <sld:Rule>
     <sld:PointSymbolizer>
      <sld:Graphic>
       <sld:ExternalGraphic>
        <sld:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://sazabi:8082/openlayers/slds/sanfrancisco/images/pizza.gif" /> 
        <sld:Format>GIF</sld:Format> 
       </sld:ExternalGraphic>
       <sld:Opacity>1</sld:Opacity>
       <sld:Size>12</sld:Size>
       <sld:Rotation>0</sld:Rotation>
      </sld:Graphic>
     </sld:PointSymbolizer> 
    </sld:Rule>
   </sld:FeatureTypeStyle>
  </sld:UserStyle>


Be care on the <sld:Format>GIF</sld:Format>, there seems to be a bug if you put image/gif.

Thanks.
0 Kudos