2

label/symbol duplication with leaflet/mapserver with wms

As you can see the labels are duplicated and sometimes cutoff. That is because one tile doesn't know about the other tile. How can I prevent?

Disabling Partial labels helps a bit with the cutoff but the duplication is still there:

disabling label partials

Thanks

Octavian
  • 4,519
  • 8
  • 28
  • 39
  • If one of the labels are coming together with the map tiles, then you need to use another map tile server. – Falke Design Mar 14 '21 at 08:57
  • Practically I'm controlling both the server and the viewer. What you're saying is that I should generate the labels on the leaflet side and not on the mapserver side? – Octavian Mar 14 '21 at 09:06
  • I’m voting to close this question because it's a duplicate of https://gis.stackexchange.com/questions/346467/preventing-clipped-labels-from-qgis-server-wms-in-leaflet-js – IvanSanchez Mar 14 '21 at 14:22

1 Answers1

1

Apart from @IvanSanchez's reply here: https://gis.stackexchange.com/questions/346467/preventing-clipped-labels-from-qgis-server-wms-in-leaflet-js.

You can actually set the tileSize to the width/height of your map and you won't have these kind of problems because the whole map would consist of 1 tile (although this solution will put extra strain on the MapServer). tileSize is part of the GridLayer definition: https://leafletjs.com/reference-1.7.1.html#gridlayer.

Param: tileSize
Default: 256
Type: number|Point
Def: Width and height of tiles in the grid. Use a number if width and height are equal, or L.point(width, height) otherwise.
Octavian
  • 4,519
  • 8
  • 28
  • 39