1

I posted this on the OSGEO GeoServer Mailing List but received no love, so I'll try here.

I have GS 2.6.0. connected to a PostgreSQL 9.2 DB (PostGIS 2.1). I have an SLD where I am trying use graphic label options to label a 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:

Label Images appear here

All the tiny black dots are cities I am try to overlay weather conditions. As I zoom in, I would expect different areas to be labeled, and when I zoom in ONE level, the graphics are still there.

But, when I zoom in one more level, and all subsequent levels, all the graphic labels disappear: Label Images disappear here

I am using OpenLayers 3.0 and am 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: SLD Sorry for the pastebin. Does anyone know why GeoServer is not labeling with graphic properly?

Update: added getMap request samples. The getMap request that shows the graphic labels is:

https://myserver.com/geoserver-2.6.0/myworkspace/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=feed_open_weather_map&CRS=EPSG%3A3857&STYLES=&WIDTH=1536&HEIGHT=1005&BBOX=-30056262.514183864%2C-19108413.37993557%2C30056262.514183864%2C20223023.89448472

When I put this in the browser, it shows the graphic labels.

The getMap request that does not show the graphic labels is:

https://myserver.com/geoserver-2.6.0/myworkspace/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=feed_open_weather_map&CRS=EPSG%3A3857&STYLES=&WIDTH=2880&HEIGHT=1005&BBOX=-12019026.271586256%2C102352.06492121238%2C16158719.83546112%2C9935211.383526284

When I put this in the browser, I only get the features (tiny dots) but no graphic labels:

NoLabels

  • is there anything in the log file? – Ian Turton Mar 26 '15 at 9:02
  • Nope, nothing in the log file but the getMap requests. Looks clean. Could it have anything to do with the Native JAI I installed? – maw269 Mar 26 '15 at 16:31
  • what do you see if you open just the map from the request? – Ian Turton Mar 26 '15 at 16:55
  • I updated the question to show the getMap requests and what happens when I isolate them in browser. I hope this is what you meant. – maw269 Mar 26 '15 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.