Added torque type in the backend.

pull/12851/head
nobuti 7 years ago
parent 842d31bd77
commit 9a4aa35cfd

@ -10,9 +10,9 @@ module Carto
belongs_to :layer, class_name: Carto::Layer
VALID_LEGEND_TYPES = %w(category bubble choropleth custom custom_choropleth).freeze
VALID_LEGEND_TYPES = %w(category bubble choropleth custom custom_choropleth torque).freeze
LEGEND_TYPES_PER_ATTRIBUTE = {
color: %w(category choropleth custom custom_choropleth),
color: %w(category choropleth custom custom_choropleth torque),
size: %(bubble)
}.freeze

@ -0,0 +1,37 @@
{
"type": "object",
"additionalProperties": false,
"anyOf": [
{ "required": ["categories"] },
{ "required": ["html"] }
],
"properties": {
"categories": {
"type": "array",
"required": [
"title"
],
"additionalProperties": false,
"items": {
"type": "object",
"required": [
"title"
],
"additionalProperties": false,
"properties": {
"title": {
"type": "string"
},
"color": {
"type": "string",
"pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$"
},
"icon": {
"type": "string"
}
}
}
},
"html": { "type": "string" }
}
}
Loading…
Cancel
Save