ol-mapbox-style icon indicating copy to clipboard operation
ol-mapbox-style copied to clipboard

serialized styles output

Open indus opened this issue 8 years ago • 4 comments

It would be nice to be able to generate a regular OL Style descriptor as a string. Could then just be copied into the code and wouldn´t make it necessary to deliver your lib in production (at least for static styles). Do you think that would make sense?

indus avatar Feb 24 '17 07:02 indus

ol-mapbox-style generates style functions, not a style descriptor that can be serialized (because OpenLayers does not support such a style descriptor). It would be possible to generate the JavaScript code for a style function, but that would make debugging a nightmare.

ahocevar avatar Feb 24 '17 15:02 ahocevar

But it would make maps more efficient, and cut out any call to mapbox.

leegee avatar Oct 07 '22 11:10 leegee

There are no calls to mapbox if you don't request any mapbox resources.

ahocevar avatar Oct 07 '22 13:10 ahocevar

That's good news, and makes sense even at this point on a Friday!

leegee avatar Oct 07 '22 16:10 leegee