mapbox/mapbox-gl-leaflet

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

vomc opened this issue · 4 comments

vomc commented

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?

  • J

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

vomc commented

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?

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

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