Open exotfboy opened 2 weeks ago
I would consider this as an issue with the limitation of accuracy for geojson source. Geojson source only build tiles to zoom 15 or something similar, so the accuracy at zoom 21 is very low, which I would assume what's causing this calculation issues. But you are more than welcome to check my theory. You can also try out making vector tiles with higher resolution to see if it helps.
1 I will have a try if possible.
2 Any fallback instead of vector tiles at the moment?
Maybe addProtocol
where you could return the relevant tiles you create "on the fly", just maybe...
@HarelM
Since I do not have the environment to create vector tiles from the server side. So I tried to generate vector tiles on the fly as you said, it does not change anything. Have a look at this.
Thanks! But this still users geijson-vt which I think is where the bug is. Try to use vt-pbf or something that can serialize a geojson object to a vector tile. No sure it will help but world be interesting to see if it changes anything...
Indeed the vt-pbf
is used:
const tile = tileIndex.getTile(z, x, y); //use geojson-vt create vector tile with json format
if (tile == null) return { data: null };
const buff = vtpbf.fromGeojsonVt({ json: tile }); //use vt-pbf to generate pbf format.
I would advise to try and create a tile using a different method and then try to read it and see if you still have a problem.
Finally I tried to upload my data to mapbox studio to generate vector tiles. And things does not change.
Ok, thanks for taking the time to try this out, this rules that the problem is with the geojson conversation to MVT, and leaves text location precision I guess...
I also tried to publish the geojson to vector tiles with geoserver locally, and got the same result. Also I do not notice any precision lose for the geometry. So I guess if this is caused by the symbol algorithm.
This is my gut feeling as well. Feel free to drive into it...
Hi:
When adding symbols to polygons with
symbol-placement
set topoint
, it is expected that the symbol will be placed at the center of the polygon.However, in some situations, this is not the case. Live Example.
As shown in the example, the symbol for
A
is correctly centered, while the symbol forB
is not.What's going on?