Skip to content

Instantly share code, notes, and snippets.

@springmeyer
Created October 21, 2015 21:31
Show Gist options
  • Save springmeyer/ea13ed3f3c8a59018a4c to your computer and use it in GitHub Desktop.
Save springmeyer/ea13ed3f3c8a59018a4c to your computer and use it in GitHub Desktop.
group-by in cartocss
{
"bounds": [
13.2644,
52.4914,
13.2994,
52.5071
],
"center": [
13.2811,
52.4992,
15
],
"format": "png8",
"interactivity": {
"layer": "avusroad",
"template_teaser": "fid: {{{fid}}} <br>\ntype: {{{type}}} <br>\ntunnel: {{{tunnel}}} <br>\nbridge: {{{bridge}}} <br>\noneway: {{{oneway}}} <br>\nclass: {{{class}}} <br>\nz_order: {{{z_order}}} <br>\nz: {{{z}}} <br>",
"fields": [
"fid",
"type",
"tunnel",
"bridge",
"oneway",
"class",
"z_order",
"z"
]
},
"minzoom": 0,
"maxzoom": 22,
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Stylesheet": [
"style.mss"
],
"Layer": [
{
"id": "countries",
"name": "countries",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"geometry": "polygon",
"Datasource": {
"file": "http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.4.0/cultural/10m-admin-0-countries.zip",
"type": "shape"
}
},
{
"geometry": "linestring",
"extent": [
13.253320370821777,
52.47756086705049,
13.320082039843436,
52.52463336915364
],
"Datasource": {
"type": "sqlite",
"file": "avus.sqlite",
"table": "(SELECT fid, geometry, type, tunnel, bridge, oneway, class, z_order, CAST((z_order / 10.0) AS INTEGER) AS z FROM roads ORDER BY z_order) AS road",
"attachdb": "",
"extent": "",
"id": "avusroad",
"project": "avus",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over"
},
"properties": {
"group-by": "z"
},
"id": "avusroad",
"class": "",
"srs-name": "900913",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"name": "avusroad"
}
],
"scale": 1,
"metatile": 2,
"name": "",
"description": "",
"legend": "",
"attribution": ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment