I have GS 2.6.0. I have an SLD where I am trying to label  bunch of weather
conditions throughout 700 cities. I like how GS does not allow labels to
conflict, but things are not working well. When I first open my OpenLayers 3
Map, the graphic label (icons) show nicely:

<http://osgeo-org.1560.x6.nabble.com/file/n5195263/mapIcons.png> 

You can see all the black dots that don't have the graphic label.
When I zoom in one level, the graphics are still there.
When I zoom in one more level, and all subsequent levels, all the graphic
labels disappear:

<http://osgeo-org.1560.x6.nabble.com/file/n5195263/mapNoIcons.png> 

I am using OpenLayers 3.0 and requesting a single image like this:

                var openWeatherMap = new ol.layer.Image({
                        visible: false,
                        refresh: true,
                        extent: mapExtent,
                        source: new ol.source.ImageWMS({
                                'crossOrigin':'anonymous',
                                url: 
'https://myserver.com/geoserver-2.6.0/myworkspace/wms',
                                params: {'LAYERS': 'feed_open_weather_map'},
                                serverType: 'geoserver'
                        })
                });

I've tried a million combinations of OL3 and SLD options. Some work better
than other, but I can't ever get the graphic labels to appear beyond the
zoom I mentioned.
My SLD looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor version="1.0.0"
  xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
  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";
  xmlns:sld="http://www.opengis.net/sld";>  
  <sld:UserLayer>
    <sld:LayerFeatureConstraints>
      <sld:FeatureTypeConstraint/>
    </sld:LayerFeatureConstraints>
    <sld:UserStyle>
      <sld:Name>OWM Icons</sld:Name>      
      <sld:FeatureTypeStyle>
        <sld:Rule>
          <sld:Name>OWM Icons</sld:Name>
          <sld:Title>OWM Icons</sld:Title>
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:PropertyName>active_internal</ogc:PropertyName>
              <ogc:Literal>true</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>   
                <PointSymbolizer>
                        <Graphic>
                                <Mark>
                                        <WellKnownName>circle</WellKnownName>
                                        <Fill>
                                                <CssParameter 
name="fill">#000000</CssParameter>
                                        </Fill>
                                </Mark>
                                <Opacity>
                                0.1
                                </Opacity>
                                <Size>1</Size>
                        </Graphic>
                </PointSymbolizer>
       <TextSymbolizer>
         <Label>
           
         </Label>
         <LabelPlacement>
           <PointPlacement>
             <AnchorPoint>
               <AnchorPointX>0.5</AnchorPointX>
               <AnchorPointY>0.5</AnchorPointY>
             </AnchorPoint>
             <Displacement>
               <DisplacementX>0</DisplacementX>
               <DisplacementY>0</DisplacementY>
             </Displacement>
           </PointPlacement>
         </LabelPlacement>
         <Fill>
           <CssParameter name="fill">#000000</CssParameter>
         </Fill>
            <sld:Graphic>
              <sld:ExternalGraphic>
                <sld:OnlineResource xlink:type="simple"
                                   
xlink:href="http://openweathermap.org/img/w/${icon}.png"/>
                <sld:Format>image/png</sld:Format>
              </sld:ExternalGraphic>
              <sld:Size>50</sld:Size>
            </sld:Graphic>      
       </TextSymbolizer> 
        </sld:Rule>             
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:UserLayer>
</sld:StyledLayerDescriptor>



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/GeoServer-Single-Image-Graphic-Label-Issues-tp5195263.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to