How should I interpret the keys/values of a vector tile? #1659
Replies: 1 comment 1 reply
-
This seems to be a question about the MVT spec, not about openmaptiles. https://github.com/mapbox/vector-tile-spec is the spec |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on a map renderer in JavaScript, and I need to render vector tiles. For this task, I need to know, for example, which kind of transportation layer (road) I am rendering. Is it a highway, a pedestrian path, or a rail? This is necessary to correctly distinguish which ones to render and which not to render and how to render.
I am serving the map with OpenMapTiles, using nothing more than ./quickstart.sh and make start-postserve.
With JavaScript, I receive the PBF data and convert it into an appropriate format that gives me a layer containing several pieces of information about it. However, I cannot understand how to correctly interpret the keys/values information about the layer, particularly for the transportation layer.
Here is what I've done:
These are the details about the layer that I receive:
They seem nonsensical and somewhat redundant to me, and I am unable to use those data. I was assuming that the keys array references each index in the values array, but that appears to be false. For example, if I want to know if the transportation class is rail, I should check the index 0 of the values, but that doesn't seem to be related. I would appreciate any hints on this matter.
Beta Was this translation helpful? Give feedback.
All reactions