mapbox/carto — Issue #117: handling layer attributes (e.g. "maxzoom")
Author: numenor
Created: 2011-11-06 21:58:58+00:00
State: open

When creating a layer definition using carto, I would expect to be able to use the attributes given in [reference.json](https://github.com/mapbox/carto/blob/master/lib/carto/tree/reference.json) . Specifically, "minzoom", "maxzoom" should be present in the xml of the respective Layer (and "cache-features" is still missing from the reference.json). I have been trying to provide numbers as expected by mapnik (scale denominators), or zoom levels, quoted (string) and unquoted (float) but none of these values appear in the generated XML.

To give an example (should work with a standard osm rendering db):
```{
"Stylesheet": [
"toposm-areas-nooutline.mcs"
],
"Layer": [
{
"Datasource": {"type": "postgis", "user": "osm", "host": "127.0.0.1", "port": "5432", "dbname": "gis", "estimate_extent": "false",
"table": "(SELECT * FROM planet_osm_polygon WHERE sport IS NOT
NULL ORDER BY z_order ASC, way_area DESC) AS sport"
},
"class": "sport",
"maxzoom": "200000",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over",
"id": "sport",
"name": "sport"
}
],
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs -tl -r",
"font_directory": "fonts/"
}
```
an an appropriate style file, then the "maxzoom" is not reflected in the generated xml at all.

Is this intended bahavior (do I misinterpret reference.json or other conventions of carto)?