WMS heatmap tiling

I want to display heatmap wms layer, but there is a problem with tiling. I know that for leaflet.js there is plugin nontiled wms layer which works for me. How to do this in CesiumJs?

my example code:

const imageryLayer = new Cesium.ImageryLayer(new Cesium.WebMapServiceImageryProvider({
          url: "http://localhost:8084/geoserver/test/wms/",
          layers: "points2",
          parameters: {
            CQL_FILTER: "project_uu = '1'",
            service: 'WMS',
            version: '1.1.1',
            transparent: true,
            format: "image/png",
            srs: 'EPSG:4326',
            STYLES: 'heatmap',
            "exceptions": 'application/vnd.ogc.se_inimage',
          }
        }
    ));
    this.viewer.imageryLayers.add(imageryLayer);

I’m looking for something similar like geoserver client:


Should I use Cesium.SingleTileImageryProvider

Hi @papciopawcio,

Thanks for reaching out to the community! To the best of my understanding, viewer.imageryLayers is the correct object for this use case. I recommend that you check out the following two sandcastle examples for more information on how to add WMS layers to CesiumJS:

Best,
Sam

Hello @sam.rothstein Thank you for your response. I went through this examples. I record movie which present the problem in Cesium and other js client. But still it doesn’t resolve the problem. I need something like “single tile wms”
cesium-heatmap.zip (5.0 MB)

Hi @papciopawcio,

the most customizable class for imagery layers is the UrlTemplateImageryProvider. Maybe you can get it to work with that. But if there are different zoom levels in your imagery, you will ever see some “artifacts”, because Cesium requests different zoom levels depending on the distance to the camera. (The “problem” of 3D views, but normaly it’s not that extreme, though)

There is also the class SingleTileImageryProvider, which is fine for just a single image you want to show, regardless the position of the camea. But concerning your screenshots etc. that’s not the case here.

Best, Lennart

1 Like

Hi @papciopawcio

I have the exact same problem. Did you manage to fix it? I have tried using “UrlTemplateImageryProvider” as @lennart.imberg suggested but it doesn’t work for me.

Thanks