4

I am trying to render a mvt (Mapbox Vector Tile) containing OSM data using Mapbox GL js, but I keep getting some ugly polygons like they were simplified (like in the Simplification section of this documentation!). I don't want those polygons to be simplified. At least I would like the best resolution to be as close as possible from reality.

First, I checked if it could come from OSM data. But OSM data is good. So I looked into the tile server and more precisely into the mvt encoder (code). The extent value, which controls how detailed the coordinates are encoded in the vector tile, is 4096. 4096 is a very good value. So I don't understand why I don't get proper polygons.

I suppose that this issue comes from Mapbox GL js which might perform an additional simplification.

What extent value could I use in the encoder? Is there a way to configure a resolution with mapbox gl js ?

I would appreciate some help ! Thanks!

gnos
  • 796
  • 1
  • 6
  • 17

2 Answers2

1

Mapbox GL JS does not do any additional simplification on vector tile sources. If you are seeing simplified geometries, this is most likely done during vector tile generation.

Lucas Wojciechowski
  • 3,695
  • 16
  • 19
0

I was finding the same thing. I got better results when, rather than importing the polygons as a geojson as I had been doing, I converted the file to a shape file, zipped it, and imported that into mapbox. There was then no simplification to the shape.

Aliya
  • 1
  • 1