{"__v":0,"_id":"54db894ac6a4d40d0034b947","category":{"__v":7,"_id":"54fdad6e660db63700c23b82","pages":["55fbef82af72eb0d0007df93","55fbf623e013770d008fcba8","5617bd3a26e3db230054fba4","5617c4a6f8c9632100ac74f5","561ed6fd0a04340d00d8a0b0","562156adf4e0352100cbf268","562a5c846049f20d0032520b"],"project":"54d0fd1d095c470d00d1646d","version":"54d0fd1e095c470d00d16470","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-03-09T14:25:50.133Z","from_sync":false,"order":2,"slug":"api-reference","title":"API Reference"},"editedParams":true,"editedParams2":true,"project":"54d0fd1d095c470d00d1646d","user":"54db5301eb78f13900cf108b","version":{"__v":20,"_id":"54d0fd1e095c470d00d16470","project":"54d0fd1d095c470d00d1646d","createdAt":"2015-02-03T16:53:50.090Z","releaseDate":"2015-02-03T16:53:50.090Z","categories":["54d0fd1e095c470d00d16471","54d8b5e68934140d00496544","54db6361c6a4d40d0034b8f7","54db638208ea010d00ab1fdd","54db639008ea010d00ab1fde","54db6547c6a4d40d0034b8fd","54db83482092743700ea6ee1","54db84afc6a4d40d0034b93c","54db8805c6a4d40d0034b93f","54db8de9c6a4d40d0034b961","54db931ac6a4d40d0034b96d","54e49219e4365521006fd9ee","54e74fcc652d7c1900cbe737","54e74ffd3c1e111700d05762","54e77e0a523b1b2f00e6f313","54e784affdabe62500fcddcf","54e784fa523b1b2f00e6f319","54e785de8ae8911900cd42c5","54fdad6e660db63700c23b82","54fdff31f7b1202100a25e06"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-02-11T16:54:34.819Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n  \"id\":\"d9e90701-aaa6-486c-893a-041e6f7e6866\",\n  \"name\":\"thematic_map_1\",\n  \"description\":\"My first thematic map\",\n  \"database\":\"my_database\",\n  \"column\":\"latitude\",\n  \"legend\":{\n    \"3\":{\n      \"color\":\"#FDDBC7\",\n      \"min\":\"-16.67\",\n      \"max\":\"-16.67\"\n    },\n    \"2\":{\n      \"color\":\"#D1E5F0\",\n      \"min\":\"-23.47\",\n      \"max\":\"-23.47\"\n    },\n    \"1\":{\n      \"color\":\"#67A9CF\",\n      \"min\":\"-23.58\",\n      \"max\":\"-23.58\"\n    },\n    \"0\":{\n      \"color\":\"#2166AC\",\n      \"min\":\"-30.03\",\n      \"max\":\"-30.03\"\n    },\n    \"4\":{\n      \"color\":\"#EF8A62\",\n      \"min\":\"-15.8\",\n      \"max\":\"-15.8\"\n    }\n  },\n  \"carto\":\"#my_collection[latitude \\u003e= -16.67][latitude \\u003c= -16.67] {\\n  marker-width: 15;\\n  marker-fill: #FDDBC7;\\n  marker-line-color: #FDDBC7;\\n  marker-allow-overlap: false;\\n  \\n}\\n#my_collection[latitude \\u003e= -23.47][latitude \\u003c= -23.47] {\\n  marker-width: 15;\\n  marker-fill: #D1E5F0;\\n  marker-line-color: #D1E5F0;\\n  marker-allow-overlap: false;\\n  \\n}\\n#my_collection[latitude \\u003e= -23.58][latitude \\u003c= -23.58] {\\n  marker-width: 15;\\n  marker-fill: #67A9CF;\\n  marker-line-color: #67A9CF;\\n  marker-allow-overlap: false;\\n  \\n}\\n#my_collection[latitude \\u003e= -30.03][latitude \\u003c= -30.03] {\\n  marker-width: 15;\\n  marker-fill: #2166AC;\\n  marker-line-color: #2166AC;\\n  marker-allow-overlap: false;\\n  \\n}\\n#my_collection[latitude \\u003e= -15.8][latitude \\u003c= -15.8] {\\n  marker-width: 15;\\n  marker-fill: #EF8A62;\\n  marker-line-color: #EF8A62;\\n  marker-allow-overlap: false;\\n  \\n}\\n\",\n  \"stylename\":\"thematic_map_1\",\n  \"query\":null,\n  \"intervals\":6,\n  \"collection\":\"my_collection\"\n}","language":"json","status":200}]},"settings":"","auth":"never","params":[{"_id":"54db894ac6a4d40d0034b951","ref":"","in":"path","required":true,"desc":"Database name.","default":"","type":"string","name":"database_name"},{"_id":"54db894ac6a4d40d0034b950","ref":"","in":"path","required":true,"desc":"Collection name.","default":"","type":"string","name":"collection_name"},{"_id":"54db894ac6a4d40d0034b94f","ref":"","in":"body","required":true,"desc":"Your mapkey.","default":"","type":"string","name":"mapkey"},{"_id":"54db894ac6a4d40d0034b94e","ref":"","in":"body","required":true,"desc":"Thematic map name.","default":"","type":"string","name":"name"},{"_id":"54db894ac6a4d40d0034b94d","ref":"","in":"body","required":true,"desc":"Column to create a thematic map.","default":"","type":"string","name":"column"},{"_id":"54db894ac6a4d40d0034b94c","ref":"","in":"body","required":false,"desc":"The number of intervals size the thematic map (min_size: 3, max_size: 11).","default":"5","type":"int","name":"intervals"},{"_id":"54db894ac6a4d40d0034b94b","ref":"","in":"body","required":false,"desc":"Description to your thematic map.","default":"","type":"string","name":"description"},{"_id":"54db894ac6a4d40d0034b94a","ref":"","in":"body","required":false,"desc":"Relational restriction in ElasticSearch query-string format.","default":"","type":"object","name":"q"},{"_id":"54db894ac6a4d40d0034b949","ref":"","in":"body","required":false,"desc":"List of colors to create a legend and style.","default":"","type":"array_string","name":"colors"}],"url":"/thematic/:database_name/:collection_name"},"isReference":false,"order":36,"body":"Create a thematic style for a collection by passing a name and the data column. If any interval are informed the service adopt the default value 5 to define the thematic ranges.\n\n### Sample Request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -k -H \\\"Content-Type: application/json\\\" -XPOST \\\\\\n\\\"https://api.gogeo.io/1.0/thematic/my_database/my_collection?mapkey=MAP-KEY\\\" -d '\\n{\\n  \\\"name\\\": \\\"thematic_map_1\\\",\\n  \\\"column\\\": \\\"latitude\\\",\\n  \\\"intervals\\\": 6,\\n  \\\"description\\\": \\\"My first thematic map\\\"\\n}'\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n### Sample Response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\":\\\"d9e90701-aaa6-486c-893a-041e6f7e6866\\\",\\n  \\\"name\\\":\\\"thematic_map_1\\\",\\n  \\\"description\\\":\\\"My first thematic map\\\",\\n  \\\"database\\\":\\\"my_database\\\",\\n  \\\"column\\\":\\\"latitude\\\",\\n  \\\"legend\\\":{\\n    \\\"3\\\":{\\n      \\\"color\\\":\\\"#FDDBC7\\\",\\n      \\\"min\\\":\\\"-16.67\\\",\\n      \\\"max\\\":\\\"-16.67\\\"\\n    },\\n    \\\"2\\\":{\\n      \\\"color\\\":\\\"#D1E5F0\\\",\\n      \\\"min\\\":\\\"-23.47\\\",\\n      \\\"max\\\":\\\"-23.47\\\"\\n    },\\n    \\\"1\\\":{\\n      \\\"color\\\":\\\"#67A9CF\\\",\\n      \\\"min\\\":\\\"-23.58\\\",\\n      \\\"max\\\":\\\"-23.58\\\"\\n    },\\n    \\\"0\\\":{\\n      \\\"color\\\":\\\"#2166AC\\\",\\n      \\\"min\\\":\\\"-30.03\\\",\\n      \\\"max\\\":\\\"-30.03\\\"\\n    },\\n    \\\"4\\\":{\\n      \\\"color\\\":\\\"#EF8A62\\\",\\n      \\\"min\\\":\\\"-15.8\\\",\\n      \\\"max\\\":\\\"-15.8\\\"\\n    }\\n  },\\n  \\\"carto\\\":\\\"#my_collection[latitude \\\\u003e= -16.67][latitude \\\\u003c= -16.67] {\\\\n  marker-width: 15;\\\\n  marker-fill: #FDDBC7;\\\\n  marker-line-color: #FDDBC7;\\\\n  marker-allow-overlap: false;\\\\n  \\\\n}\\\\n#my_collection[latitude \\\\u003e= -23.47][latitude \\\\u003c= -23.47] {\\\\n  marker-width: 15;\\\\n  marker-fill: #D1E5F0;\\\\n  marker-line-color: #D1E5F0;\\\\n  marker-allow-overlap: false;\\\\n  \\\\n}\\\\n#my_collection[latitude \\\\u003e= -23.58][latitude \\\\u003c= -23.58] {\\\\n  marker-width: 15;\\\\n  marker-fill: #67A9CF;\\\\n  marker-line-color: #67A9CF;\\\\n  marker-allow-overlap: false;\\\\n  \\\\n}\\\\n#my_collection[latitude \\\\u003e= -30.03][latitude \\\\u003c= -30.03] {\\\\n  marker-width: 15;\\\\n  marker-fill: #2166AC;\\\\n  marker-line-color: #2166AC;\\\\n  marker-allow-overlap: false;\\\\n  \\\\n}\\\\n#my_collection[latitude \\\\u003e= -15.8][latitude \\\\u003c= -15.8] {\\\\n  marker-width: 15;\\\\n  marker-fill: #EF8A62;\\\\n  marker-line-color: #EF8A62;\\\\n  marker-allow-overlap: false;\\\\n  \\\\n}\\\\n\\\",\\n  \\\"stylename\\\":\\\"thematic_map_1\\\",\\n  \\\"query\\\":null,\\n  \\\"intervals\\\":6,\\n  \\\"collection\\\":\\\"my_collection\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div class=\\\"panel panel-info teste\\\" >\\n  <div class=\\\"panel-body\\\">\\n    This endpoint requires a MAP key. See <a href=\\\"basic-auth\\\">Basic Authentication</a> for more information about the goGeo authentication system.\\n    <br><br>\\n    If you don't have an access key yet, <a href=\\\"https://console.gogeo.io/signup\\\">sign up</a> and grab yours!\\n  </div>\\n</div>\\n\"\n}\n[/block]\n---\n[block:html]\n{\n  \"html\": \"<div class='div-middle'> \\n  <a href='#'>\\n    Top page &spades; </div>\\n  </a>\\n</div>\\n\\n<div class='div-back'> \\n  <a href='/v1.0/docs/thematic-map'>\\n    &laquo; Back \\n  </a>\\n</div>\\n\\n<div class='div-forward'> \\n  <a href='/v1.0/docs/thematic-map-published-list'>\\n    Next &raquo; </div>\\n  </a>\\n</div>\\n\\n<style>\\n\\t.div-back {\\n  \\tpadding-left: 15px;\\n\\t\\tmargin-top: -20px;\\n  }\\n  \\n  .div-middle {\\n  \\ttext-align: center;\\n\\t\\tmargin-top: -15px;\\n  }\\n  \\n  .div-forward {\\n  \\tfloat: right;\\n    padding-right: 15px;\\n\\t\\tmargin-top: -20px;\\n  }\\n</style>\"\n}\n[/block]","excerpt":"Create a thematic map style for a collection.","slug":"thematic-map-creation","type":"post","title":"Create a thematic map"}

postCreate a thematic map

Create a thematic map style for a collection.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

database_name:
required
string
Database name.
collection_name:
required
string
Collection name.

Body Params

mapkey:
required
string
Your mapkey.
name:
required
string
Thematic map name.
column:
required
string
Column to create a thematic map.
intervals:
integer5
The number of intervals size the thematic map (min_size: 3, max_size: 11).
description:
string
Description to your thematic map.
q:
object
Relational restriction in ElasticSearch query-string format.
colors:
array of strings
List of colors to create a legend and style.

Result Format


Documentation

Create a thematic style for a collection by passing a name and the data column. If any interval are informed the service adopt the default value 5 to define the thematic ranges. ### Sample Request [block:code] { "codes": [ { "code": "curl -k -H \"Content-Type: application/json\" -XPOST \\\n\"https://api.gogeo.io/1.0/thematic/my_database/my_collection?mapkey=MAP-KEY\" -d '\n{\n \"name\": \"thematic_map_1\",\n \"column\": \"latitude\",\n \"intervals\": 6,\n \"description\": \"My first thematic map\"\n}'", "language": "curl" } ] } [/block] ### Sample Response [block:code] { "codes": [ { "code": "{\n \"id\":\"d9e90701-aaa6-486c-893a-041e6f7e6866\",\n \"name\":\"thematic_map_1\",\n \"description\":\"My first thematic map\",\n \"database\":\"my_database\",\n \"column\":\"latitude\",\n \"legend\":{\n \"3\":{\n \"color\":\"#FDDBC7\",\n \"min\":\"-16.67\",\n \"max\":\"-16.67\"\n },\n \"2\":{\n \"color\":\"#D1E5F0\",\n \"min\":\"-23.47\",\n \"max\":\"-23.47\"\n },\n \"1\":{\n \"color\":\"#67A9CF\",\n \"min\":\"-23.58\",\n \"max\":\"-23.58\"\n },\n \"0\":{\n \"color\":\"#2166AC\",\n \"min\":\"-30.03\",\n \"max\":\"-30.03\"\n },\n \"4\":{\n \"color\":\"#EF8A62\",\n \"min\":\"-15.8\",\n \"max\":\"-15.8\"\n }\n },\n \"carto\":\"#my_collection[latitude \\u003e= -16.67][latitude \\u003c= -16.67] {\\n marker-width: 15;\\n marker-fill: #FDDBC7;\\n marker-line-color: #FDDBC7;\\n marker-allow-overlap: false;\\n \\n}\\n#my_collection[latitude \\u003e= -23.47][latitude \\u003c= -23.47] {\\n marker-width: 15;\\n marker-fill: #D1E5F0;\\n marker-line-color: #D1E5F0;\\n marker-allow-overlap: false;\\n \\n}\\n#my_collection[latitude \\u003e= -23.58][latitude \\u003c= -23.58] {\\n marker-width: 15;\\n marker-fill: #67A9CF;\\n marker-line-color: #67A9CF;\\n marker-allow-overlap: false;\\n \\n}\\n#my_collection[latitude \\u003e= -30.03][latitude \\u003c= -30.03] {\\n marker-width: 15;\\n marker-fill: #2166AC;\\n marker-line-color: #2166AC;\\n marker-allow-overlap: false;\\n \\n}\\n#my_collection[latitude \\u003e= -15.8][latitude \\u003c= -15.8] {\\n marker-width: 15;\\n marker-fill: #EF8A62;\\n marker-line-color: #EF8A62;\\n marker-allow-overlap: false;\\n \\n}\\n\",\n \"stylename\":\"thematic_map_1\",\n \"query\":null,\n \"intervals\":6,\n \"collection\":\"my_collection\"\n}", "language": "json" } ] } [/block] [block:html] { "html": "<div class=\"panel panel-info teste\" >\n <div class=\"panel-body\">\n This endpoint requires a MAP key. See <a href=\"basic-auth\">Basic Authentication</a> for more information about the goGeo authentication system.\n <br><br>\n If you don't have an access key yet, <a href=\"https://console.gogeo.io/signup\">sign up</a> and grab yours!\n </div>\n</div>\n" } [/block] --- [block:html] { "html": "<div class='div-middle'> \n <a href='#'>\n Top page &spades; </div>\n </a>\n</div>\n\n<div class='div-back'> \n <a href='/v1.0/docs/thematic-map'>\n &laquo; Back \n </a>\n</div>\n\n<div class='div-forward'> \n <a href='/v1.0/docs/thematic-map-published-list'>\n Next &raquo; </div>\n </a>\n</div>\n\n<style>\n\t.div-back {\n \tpadding-left: 15px;\n\t\tmargin-top: -20px;\n }\n \n .div-middle {\n \ttext-align: center;\n\t\tmargin-top: -15px;\n }\n \n .div-forward {\n \tfloat: right;\n padding-right: 15px;\n\t\tmargin-top: -20px;\n }\n</style>" } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}