geostyler / geostyler-mapbox-parser

GeoStyler-Style-Parser implementation for Mapbox
BSD 2-Clause "Simplified" License
14 stars 9 forks source link

background layer type stops conversion #265

Open geographika opened 1 year ago

geographika commented 1 year ago

Bug

Describe the bug Attempting to translate a MapBox style from https://github.com/openmaptiles/osm-bright-gl-style/ throws an unsupported error due to the following block:

  "layers": [
    {
      "id": "background",
      "type": "background",
      "paint": {"background-color": "#f8f4f0"}
    },

https://github.com/openmaptiles/osm-bright-gl-style/blob/8af4769692d0f9219d0936711609d580b34bf365/style.json#L35

To Reproduce

Run the GeoStyler client on the file:

.\geostyler-cli -s "mapbox" -o bright.geostyler /osm-bright-gl-style/style.json

✖ Error during translation of file "/osm-bright-gl-style/style.json": Error: Could not parse mapbox style. Unsupported layer type.
                We support types 'fill', 'line', 'circle' and 'symbol' only.

Expected behavior Ideally the translation would happen, and output a warning about not supported layers, but continue to translate the remainder.

Desktop (please complete the following information):