mapbox / mapbox-gl-leaflet

binding from Mapbox GL JS to the Leaflet API
ISC License
522 stars 155 forks source link

Getting lots of errors along the lines of "X expected, array found" #85

Closed vomc closed 5 years ago

vomc commented 5 years ago

Hi,

First off - great work on this project! Very excited to use this!

I created a new style in Mapbox studio and am trying to integrate it but I am getting tons of errors on nearly every entity. Every time the errors are in the form where it was expecting a single value but got an array... Is there something I missed?

map.js:848 Error: layers[22].paint.text-color: color expected, array found map.js:848 Error: layers[23].layout.text-size: number expected, array found map.js:848 Error: layers[23].layout.text-field: string expected, array found

... list goes on

Any ideas?

jgravois commented 5 years ago

i don't know how, but whatever you're doing in Mapbox Studio is creating invalid style json.

vomc commented 5 years ago

Yeah that's odd because this is just a style I made in mapbox studio. So I am guessing this does not support styles created in Mapbox Studio?

jgravois commented 5 years ago

So I am guessing this does not support styles created in Mapbox Studio?

not at all. this plugin is just a very thin wrapper around mapbox-gl-js. the errors you're reporting are almost certainly bubbling up from its own validator.

vomc commented 5 years ago

Ah ! ok thank you @jgravois - will close this issue then...