Are non-tiled WMS layers possible in GeoServer? I passed tiled:False option in Leaflet but I still get tiled layer.

const prew = L.tileLayer.betterWms("http://localhost:8080/geoserver/wms", {
    layers: 'wp:layer',
    format: 'image/png',
    transparent: true,

I need single image because of heatmap rendering.


1 Answer 1


Leaflet "tileLayer.betterWms" creates always tiled requests, typically 256x256 pixels. The TILED=YES|FALSE parameter is a vendor option that is specific to GeoServer https://docs.geoserver.org/main/en/user/services/wms/vendor.html#tiled.

Meta-tiling prevents issues with duplicated labels when using a tiled client such as OpenLayers. When meta-tiling is used, images are rendered and then split into smaller tiles (by default in a 3x3 pattern) before being served. In order for meta-tiling to work, the tile size must be set to 256x256 pixels, and the tiled and tilesorigin parameters must be specified.

So tiled=true alone does nothing if tilesorigin is not set (see also https://gis.stackexchange.com/a/283437/30184), and when tilesorigin is set, then Leaflet is still making tiled requests.

Use for example NonTiledLayer instead of tileLayer for making Leaflet to set single-tile requests https://codesandbox.io/examples/package/leaflet.nontiledlayer. There are also other plugins that support single tile request like https://github.com/heigeo/leaflet.wms.

  • 1
    Leaflet.wms plugin also supports single-tile WMS layers.
    – TomazicM
    Commented May 19 at 19:47
  • Thanks, answer edited.
    – user30184
    Commented May 19 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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