-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion & feedback #1
Comments
@pjsier continuing from your comment in maplibre/maputnik#200 (comment) the thought of writing JSON for mapbox-gl-js expressions seemed like pain to me. So I thought I'd have a go at writing a tiny language instead. I would love to know your thoughts. |
@orangemug I think this could be really useful as a standalone project since the Mapbox style spec syntax is really verbose, but I'm hesitant about including it as part of Maputnik. The style spec is already a bit of a moving target and changing really frequently, so keeping this up to date with their changes could be a challenge. I could also see it being confusing for people to use a separate syntax on Maputnik. That said, I can see this being really useful for using a lot properties and expressions in the code because they can get unwieldy, so really well done! |
Thanks for the feedback @pjsier.
A few more details for you, incase you're interested, no worries if not. There is actually not a lot tying it to the expression spec, that was the aim anyway. Basically the only bit that needs to stay constant for it to keep working is that a function is defined in this way
There are also a two other opt in syntax sugar
It's the job of mapbox-gl-js to decide if the JSON is correct or not. The expression JSON can also be decompiled to code (almost there with this). So you can basically toggle between Thanks again for the feedback |
Added source maps, see https://orangemug.github.io/simple-expr/fmt.html |
I would appreciate feedback on this tiny language for mapbox-gl-js expressions (see the main README.md for details).
If you like it or hate it please tell me why. Thanks in advanced! 馃槉
The text was updated successfully, but these errors were encountered: