2
votes

Mapbox-gl-native allows to render vector tiles server side. The API renders a tile by passing a center coordinate of the tile.

It returns a map tile image. To get a larger image it is required to render multiple tiles and stitch them together. To move from one tile to adjacent one it is pretty simple, you have to multiply the resolution of the zoom level with the tiles geographical information width or height (depending on which direction you want the adjacent tile).

So If I have a tile rendered with center point [24.5 56.2] and I want the tile next to it to the right I calculate the center for it like so:

offset = levelResolution * 256

centerPointInWebMercator->x += offset

adjacentTileCenter = toLatLon(centerPointInWebMercator)

This indeed works correct. The problem is when the tiles have a pitch value larger than 0. In this case the above algorithm seems to not be correct as the tiles dont align correctly.

enter image description here

Here is example of two tiles that were requested the first problem is that they contain duplicate information and the second is that some duplicate features seem to have different positioning (rotated differently) see the highlighted region

1
the requested tiles, do they have all the same pitch? Are they all contained in the same plane when you stitch them?LuisTavares
Hi @LuisTavares! Yes, the images both are requested with the identical pitch values (60). The only thing that changes in the requests is the tile center coordinate.VOid

1 Answers

1
votes

Ok, I found the solution, the problem was that I was rendering tiles with the default size of 512x512 that then were scaled to higher resolutions.

But it is possible to increase the maps size by increasing this size to larger values.