Closed gee1k closed 5 years ago
I don't think so, as that's fundamental to how VectorGrid works. Each canvas is rendered with a buffer which is subsequently clipped. But others know better than I.
No. Using one canvas per tile is exactly the point of vectorgrid.
It might be possible to make a crossover between VectorGrid and L.TileLayer.NoGap, but that requires work.
Each canvas is rendered with a buffer which is subsequently clipped.
Not really - there is no buffer in the canvas itself. The coordinates of the vector data might form a buffer around each canvas, but the pixels that fall outside the canvas are not drawn AFAIK.
See the SVG viewbox for comparison, it works in a similar way (there might be stuff outside the viewbox, but that'll be just cropped): https://github.com/Leaflet/Leaflet.VectorGrid/blob/3a336694a82dc45c6c96746c2cd01193cf1ba0f2/src/Leaflet.Renderer.SVG.Tile.js#L13
Each tile generates a canvas separately, and there will be problems like #110 . If you use the entire canvas, this problem will not occur. I think the mapbox seems to be like this.
...and that would mean clipping lines/polygons but not points (circles/images), extending/cropping the canvas on map pan, and a whole new set of problems. I understand what you mean, but I'm afraid your approach is naïve.
Thank you! What you said is very reasonable. However, I am currently plagued by this problem for a long time. I tried to buffer the data of each tile in the Geoserver, and let some edges of each tile have some duplicate data to solve this problem. Also failed to succeed...
Can I use the entire canvas to render instead of generating a canvas for each tile?