4

I have issue setting up an Openlayers map with vector tiles served from Geoserver. The lines gets screwed up along the edges of the tiles. It looks like the lines are first clipped and then styled instead of the opposite. This makes wide lines look ugly.

Changing the renderBuffer in the OL client doesnt make any difference. I have similar issues with labels and perhaps the solution is pretty much the same in both cases.

The way it looks

EDIT: The geojson in QGIS shows that there is a buffer around the tiles:

geojson output in QGIS

EDIT 2: I have been doing som more research on the phenomenom and I think both Geoserver and Openlayers are to blame for the artifacts. As seen below, Geoserver does render with a buffer (the pink polygons(1 and 2) contains the black bordered tile extent) but does not include features that lies outside of the tile but inside of the buffer, like the green line(3) in the circle. Tiles That makes the tile rendered with a jack as in the left circle below. enter image description here However, even when you have a line in a tile that goes close to the tile border, styled with quite a thick stroke, Openlayers wont render enough of the line outside the tile to make it styled without a jack. Like the right circle below. I have mote obvious examples of that bahviour. This could probably easily be fixed by setting a higher buffer/tolerance value for the tilerendering.

Community
  • 1
  • 1
  • that looks like a local renderer issue rather than a GeoServer issue, can you add an image of the simple vectors rather than the rendered ones. – Ian Turton Nov 08 '16 at 08:44
  • I have edited the question after looking at the .geojson output in QGIS showing that there is a buffer around the tiles that comes from Geoserver. So it seems like a OpenLayers issue. – JohnnyBrattom Nov 09 '16 at 08:04
  • you may get a better response for questions like this in future on gis.stackexchange.com – Ian Turton Nov 09 '16 at 09:37
  • Thanks, I have now posted (http://gis.stackexchange.com/questions/217141/cropped-vector-tiles-in-openlayers) there as well. – JohnnyBrattom Nov 09 '16 at 10:40
  • I'd like to investigate this. Can you please provide your OpenLayers code and the tiles shown in the screenshot above? – ahocevar Jan 11 '17 at 20:45

0 Answers0