'Decode MVT from the browser
I'm trying to decode MVT data from the browser, to use it in the Google Maps API. In Python, I'm using the following package:
import mapbox_vector_tile
mapbox_vector_tile.decode(mvt_data) # this returns a nice json
But I have not found a way to do this on the client-side (Web browser). I have taken a look to mapbox-gl-js, but I have not seen any way to do it like in Python. Although importing all those things for only a decoder of MVT maybe it's a little bit overkill.
I want to use MVT because right now we have an image tile server but we want to change it to a vector tile server. We are using Google Maps API.
Do you know some package or way to accomplish this?
Solution 1:[1]
https://github.com/mapbox/awesome-vector-tiles is a great resource for tools and libraries related to vector tiles. There are several libraries in there for parsing and rendering vector tiles. https://github.com/mapbox/vector-tile-js is a good option if you just want to read the content of a tile.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | rbrundritt |