This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
Validate attribute selectors #76
Comments
Also see #460 |
expressions are exposed in node-mapnik now, making this possible: mapnik/node-mapnik#58 |
@springmeyer: Is this still a valid issue? |
Current behavior is that TileMill/Mapbox Studio Classic will throw a modal error on an invalid expression at the time the XML is passed to Mapnik. This ticket is about trying to validate things at the MML -> XML stage. But doing that would require Carto have node-mapnik as a dependency, which is not ideal so this never moved and is not really actionable. Closing. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Surprised we did not already have an issue for this, but ideally we can start validating the presence of
FOO
clientside for:This would be awesome to be kinder to folks like: https://github.com/mapbox/tilemill/issues/446
Now, Mapnik is designed to throw if
FOO
does not exist: http://trac.mapnik.org/ticket/792. A bigger (and interesting issue) is being able to set mapnik to 'graceful' mode so nothing actually throws at render time and instead the render functions could return an array of warnings/errors, like carto.But, until that blue sky day, we should validate this in Carto. I figure the proper way to do it - so validation could work clientside would be to pre-populate an array of valid attribute names once a layer is added (which would be easy to grab via the node-mapnik bindings, once, serverside maybe with a tilemill api call?)
Thoughts?
The text was updated successfully, but these errors were encountered: