-
-
Notifications
You must be signed in to change notification settings - Fork 184
How can I make the tile extent smaller? #1213
-
I'm looking at seeing if I can use the MVT standard on smaller, embedded platforms (think ESP32). The size of the vector tiles are optimized for desktop though at 4096x4096 pixels which is a bit large given memory constraints on small devices. This doesn't seem to be a forced standard but is a defacto standard. I tried digging through the code but couldn't find how to make this smaller - can anyone point me where to dig further?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 1 reply
-
Vector tiles have a resolution of 4096 by 4096 pixels, that is correct, however they don't work list raster images. You can think more of them like an SVG or PDF. If a vector tile contains only 1 line for example, it will be 1000 times smaller than a tile that contains 1000 lines.
So to make MVTs smaller, put fewer features in them...
Beta Was this translation helpful? Give feedback.
All reactions
-
How do you suggest I put fewer features in them? I can definitely skip layers and decide not to draw some smaller roads at certain zoom levels. But as I understand it, even if there is just one road/line in a 4096x4096 tile, the client has to figure out which part of the 4096x4096 tile is being shown on the screen, I have to parse the complete protobuf object, keep it around, do filtering to figure out which part to show on the screen, etc. That all gets much much easier if I have less data to deal with.
Beta Was this translation helpful? Give feedback.
All reactions
-
Currently the resolution is hard coded at 4096x4096. I've had requests to increase the resolution at certain zoom levels too, for example to allow the max zoom in a tileset have more details when you over zoom in on it. It would definitely be good to make this configurable but will take a bit of refactoring...
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1