I just try to visualize some points using GeoServer to publish them as WMS and bind this WMS to my Openlayers website using the GeoServer internal Heatmap process to visualize it. I don't want to use the Openlayers Heatmap function.

But there seem to be some problems, look here:

enter image description here

I'm using this Openlayers implementation to bind my WMS URL:


Changing the params to:

params: {'LAYERS': 'test:points','TILED': true,'STYLES': 'heatmap'},

And using this as SLD to define the Heatmap:


Any ideas why this happens?


When you make a tiled WMS request each request is a completely separate request, GeoServer has no idea of the others (in fact with a load balancer they could go to different machines). So when you ask for a tiled heat map it takes just the points in the area of the tile and makes a heat map of them. Obviously this doesn't work.

TL;DR; Solution: don't use tiles for heatmaps.

| improve this answer | |
  • While it is possible to load single tiles with Openlayers, by default this is not possible using Leaflet. But I found an implementation to do this: github.com/ptv-logistics/Leaflet.NonTiledLayer . Just in case somebody needs to know. Thanks for clarifying. – Andrej Jun 21 '17 at 9:20

If you can pass Date.now() as a WMS parameter, you can avoid this as none of the tiles will be cached - it will generate a new tile request every time.

Example below is for Leaflet - i'm not sure if it can be done in Openlayers.

var wms = L.tileLayer.wms("http://server:8080/geoserver/wms", 
    layers: layer,
    format: 'image/png',
    transparent: true,
    no_cache_plz: Date.now()

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.