Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] add support for CartoCSS 1.x #281

Closed
wants to merge 1 commit into from

Conversation

nebulon42
Copy link
Contributor

CartoCSS 1.0.0 had a breaking change in its JavaScript API. Now it is able to output warnings in addition to errors and errors are no longer emitted on stdout but returned in a special error property alongside the output data.

@yohanboniface I need your help with putting the new error output into the container that pops up at the bottom of the map. Also we need to clarify some other things. I think we would emit warnings to the console instead of to the map display. For some warnings may be too verbose, so we might want to give the user the chance to switch them off. CartoCSS supports that via a API switch, but we would need to put a similar config option into the Kosmtik config file.

if (output.msg) {
output.msg.forEach(function (v) {
if (v.type === 'error') {
console.error(carto.Util.getMessageToPrint(v));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only for illustrational purposes and needs to be reworked.

@yohanboniface
Copy link
Member

I'll have a look at this asap :)

@kocio-pl
Copy link
Contributor

@yohanboniface Hi, could you look at this PR? There's a fresh CartoCSS 1.1.0 release (mapbox/carto#494 (comment)), which adds new functionality (grid placement) and I'd like to use it in OSM Carto eventually (gravitystorm/openstreetmap-carto#1391 (comment)).

@yohanboniface
Copy link
Member

Merged 8bb8cae

Thanks @nebulon42 :)

@yohanboniface
Copy link
Member

@kocio-pl merged, seems good to me (tested locally), please report errors on your side if any

@kocio-pl
Copy link
Contributor

Thanks for the fast reaction. 😄 Great, it works! I will test it a bit more, especially to make sure there are no strange inter-project dependecies.

Do you plan new release + NPM package anytime soon?

@yohanboniface
Copy link
Member

Do you plan new release + NPM package anytime soon?

Yep, cleaning deps and I'll do that.
See #287 also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants