Valentin Valentin - 1 year ago 136
Javascript Question

Convert mapbox-style to openlayers 3 vectorTile style

I'm using a vectorTile source in openlayers 3 to display a nice vectorized map (basically this example)

Now I want to use a different style that I created in mapbox studio (basically the mapbox Outdoors Style with minimal adaptations for my use case), which requires me to write a complete new style for openlayers.

I figured out that I can download a .json file which is like a mapbox config file for my style and follows the mapbox style specification. I heard that there is some development by boundless going on to write a converter which converts this json to a openlayers 3 style. (see this comment on SO ).

Do you know if there is a chance to get this converter somewhere? Or is there a different approach to automatically embed a mapbox style in an openlayers vector layer without rewriting a style function by hand?

Answer Source

After some time I found a converter module written by boundless. As it seems it's still in active development, but it already looks promising.

It can be found here: ol-mapbox-gl-style

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download