2

Currently I am rendering over mapbox, various local tiles from a database as a blob. I convert them to base64 and paint them on the map.

The problem comes in that mapbox uses 512 tiles and my images are 256.

Is there a way to make mapbox display at 256?

David
  • 21
  • 1
  • Hi David and welcome to Stackoverflow. It it is really hard for anyone to help you without posting your code and what have you tried to far, we need code to work with. If you want to increase your chances of getting an answer and not result in closure of your question please review: https://stackoverflow.com/help/how-to-ask – Muhand Jumah Oct 24 '20 at 03:27
  • 1
    Thank you! No code is required for this problem. It is a question about MapboxGL. By default in the js version, its tiles are displayed at 512px. My question is if they can be somehow configured to display at 256px. https://docs.mapbox.com/help/glossary/zoom-level/ – David Oct 24 '20 at 10:37
  • Got it! my apologies then I hope some one can help you =) – Muhand Jumah Oct 24 '20 at 16:43

1 Answers1

0

You can request tiles at 256x256. This should work. I have been searching for my own map for a little while.

Some online systems that consume raster map tiles do not support 512x512 pixel tiles, so we have also added support for 256x256 pixel tiles to this API. Now your maps can be integrated seamlessly into online web mapping systems like ArcGIS Online and CartoDB.

A request for a 256x256 pixel tile: https://api.mapbox.com/styles/v1/mapbox/streets-v9/tiles/256/0/0/0?access_token=access_token

See this article: https://blog.mapbox.com/512-map-tiles-cb5bfd6e72ba

william3031
  • 1,653
  • 1
  • 18
  • 39