Using MVT Style specification to style MVT layer in deck.gl

653 Views Asked by At

I'm working on implementing an MVT/PBF server on a deck.gl map and trying to find a way to implement the accompanying style JSON, i.e. Mapbox GL JS Style Specification file for this MVT/PBF server.

I notice there is no style prop for the deck.gl MVT layer. I could proceed with use the renderSubLayers prop to manually parse the style layer and match up the feature types and styles, but it would be tricky to implement the entire specification including max/min zoom visibility, filtering, text-halos etc.

Hoping someone has a way of doing this?

2

There are 2 best solutions below

0
On

After some searching, I found MapLibreGL, this is the fork of MapBoxGL before the repository was made private and it does accommodate Mapbox Vector Tile style format for vector tiles.

MapLibreGL is a WebGL based library for creating map visualisations. A cool feature of these WebGL based libraries is that it's possible use layers from other WebGL based libraries. For example, a deck.gl or mapbox layer can be used on a MapLibreGl map.

0
On

deck.gl does not implement the Mapbox style spec. In their words (from the git discussion intiated by @Edwin):

There have been discussions around this feature, but we don't have a timeline. There will need to be new layers written. Committing to support an evolving spec like this is also a lot of future maintenance work.