Skip to content

Commit

Permalink
Adding JSON Schemas for UTFGrid and layers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom MacWright committed Jun 23, 2011
1 parent af8229f commit 77c3a3e
Show file tree
Hide file tree
Showing 4 changed files with 1,292 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 2.0/layer.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatter":
[
"function(options, data) { switch (options.format) { case 'full': return '' + data[\"label\"] + ' (' + data[\"woe_id\"] + ')'; break; case 'location': return ''; break; case 'teaser': default: return '' + data[\"label\"] + ''; break; }}",
"function(options, data) { switch (options.format) { case 'full': return '' + data[\"label\"] + ''; break; case 'location': return ''; break; case 'teaser': default: return '' + data[\"label\"] + ''; break; }}"
]
}
20 changes: 20 additions & 0 deletions 2.0/layer.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Layer 2.0",
"type": "object",
"properties": {
"formatter": {
"type": "array",
"items": {
"type": "string"
},
"required": false
},
"legend": {
"type": "array",
"items": {
"type": "string"
},
"required": false
}
}
}
Loading

0 comments on commit 77c3a3e

Please sign in to comment.