{"__v":5,"_id":"54ddedd345aa9e170051e66f","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"},"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-13T12:28:03.954Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":35,"body":"A thematic map is a map that is focused on a specific theme or area, generally serving three purposes: \n  \n1. provide specific information about particular locations; \n2. provide general information about spatial patterns; \n3. used to compare patterns in maps.\n\nIn **goGeo**'s case, thematic maps are used to stylize data according to an atribute. Then it is possible to paint areas on the map according to the matched range value. For example, the data below represent the tax collected by some cities.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"id:string\\\";\\\"city:string\\\";\\\"tax_collection:int\\\";\\\"the_geom:polygon\\\"\\n\\\"01\\\";\\\"City01\\\";500000;\\\"POLYGON ((-50.2734375 ...\\\"\\n\\\"02\\\";\\\"City02\\\";1000000;\\\"POLYGON ((-54.29443359375 ...\\\"\\n\\\"03\\\";\\\"City03\\\";750000;\\\"POLYGON ((-47.92236328125 ...\\\"\\n\\\"04\\\";\\\"City04\\\";400000;\\\"POLYGON ((-50.537109375 ...\\\"\\n\\\"05\\\";\\\"City05\\\";250000;\\\"POLYGON ((-47.7685546875 ...\\\"\\n\\\"06\\\";\\\"City06\\\";1250000;\\\"POLYGON ((-47.08740234375 ...\\\"\\n\\\"07\\\";\\\"City07\\\";1100000;\\\"POLYGON ((-49.10888671875 ...\\\"\\n\\\"08\\\";\\\"City08\\\";9000000;\\\"POLYGON ((-49.7021484375 ...\\\"\\n\\\"09\\\";\\\"City09\\\";650000;\\\"POLYGON ((-56.49169921875 ...\\\"\\n\\\"10\\\";\\\"City10\\\";850000;\\\"POLYGON ((-42.4951171875 ...\\\"\",\n      \"language\": \"less\"\n    }\n  ]\n}\n[/block]\nSuppose we need to create a thematic map using the *tax_collection* column as theme and to have 6 different interval values of this column. The thematic maps creation service will return the style name created and the legend containing 6 different interval values of *tax_collection* with a color associated to each.\n\nThe thematic map style follows the sintax from the [Carto](https://github.com/mapbox/carto) styling language, that is very similar to the *CSS*. The legend returned in a JSON object format, therefore, it's necessary to insert this information in a structure, a HTML element for example, to show the legend in your map.\n\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\\n<div class='div-forward'> \\n  <a href='/v1.0/docs/thematic-map-creation'>\\n    Next &raquo; </div>\\n  </a>\\n</div>\\n\\n<style>\\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":"","slug":"thematic-map","type":"basic","title":"Thematic Map"}
A thematic map is a map that is focused on a specific theme or area, generally serving three purposes: 1. provide specific information about particular locations; 2. provide general information about spatial patterns; 3. used to compare patterns in maps. In **goGeo**'s case, thematic maps are used to stylize data according to an atribute. Then it is possible to paint areas on the map according to the matched range value. For example, the data below represent the tax collected by some cities. [block:code] { "codes": [ { "code": "\"id:string\";\"city:string\";\"tax_collection:int\";\"the_geom:polygon\"\n\"01\";\"City01\";500000;\"POLYGON ((-50.2734375 ...\"\n\"02\";\"City02\";1000000;\"POLYGON ((-54.29443359375 ...\"\n\"03\";\"City03\";750000;\"POLYGON ((-47.92236328125 ...\"\n\"04\";\"City04\";400000;\"POLYGON ((-50.537109375 ...\"\n\"05\";\"City05\";250000;\"POLYGON ((-47.7685546875 ...\"\n\"06\";\"City06\";1250000;\"POLYGON ((-47.08740234375 ...\"\n\"07\";\"City07\";1100000;\"POLYGON ((-49.10888671875 ...\"\n\"08\";\"City08\";9000000;\"POLYGON ((-49.7021484375 ...\"\n\"09\";\"City09\";650000;\"POLYGON ((-56.49169921875 ...\"\n\"10\";\"City10\";850000;\"POLYGON ((-42.4951171875 ...\"", "language": "less" } ] } [/block] Suppose we need to create a thematic map using the *tax_collection* column as theme and to have 6 different interval values of this column. The thematic maps creation service will return the style name created and the legend containing 6 different interval values of *tax_collection* with a color associated to each. The thematic map style follows the sintax from the [Carto](https://github.com/mapbox/carto) styling language, that is very similar to the *CSS*. The legend returned in a JSON object format, therefore, it's necessary to insert this information in a structure, a HTML element for example, to show the legend in your map. --- [block:html] { "html": "<div class='div-middle'> \n <a href='#'>\n Top page &spades; </div>\n </a>\n</div>\n\n\n<div class='div-forward'> \n <a href='/v1.0/docs/thematic-map-creation'>\n Next &raquo; </div>\n </a>\n</div>\n\n<style>\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]