{"__v":2,"_id":"54db8e3ec6a4d40d0034b962","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":"54db646008ea010d00ab1fe1","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-11T17:15:42.544Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"","language":"text","status":200}]},"settings":"","auth":"never","params":[{"_id":"54db92f39f8ef11900f4df43","ref":"","in":"path","required":true,"desc":"Database name","default":"","type":"string","name":"database_name"},{"_id":"54db92f39f8ef11900f4df42","ref":"","in":"path","required":true,"desc":"Collection name","default":"","type":"string","name":"collection_name"},{"_id":"54db92f39f8ef11900f4df41","ref":"","in":"path","required":true,"desc":"Zoom level","default":"","type":"int","name":"z"},{"_id":"54db92f39f8ef11900f4df40","ref":"","in":"path","required":true,"desc":"X tile coordinate","default":"","type":"int","name":"x"},{"_id":"54db92f39f8ef11900f4df3f","ref":"","in":"path","required":true,"desc":"Y tile coordinate","default":"","type":"int","name":"y"},{"_id":"54db92f39f8ef11900f4df3e","ref":"","in":"query","required":false,"desc":"Spatial filter in GeoJSON format (types supported: Point; Linestring; Polygon)","default":"","type":"string","name":"geom"},{"_id":"54db92f39f8ef11900f4df3d","ref":"","in":"query","required":false,"desc":"Buffer size (in pixels)","default":"","type":"int","name":"buffer"},{"_id":"54db92f39f8ef11900f4df3c","ref":"","in":"query","required":false,"desc":"Style name","default":"","type":"string","name":"stylename"},{"_id":"54db92f39f8ef11900f4df3b","ref":"","in":"query","required":false,"desc":"Relational Query in ElasticSearch format","default":"","type":"string","name":"q"},{"_id":"55ccac5c3ed0e819001a1242","ref":"","in":"query","required":false,"desc":"your map key","default":"","type":"string","name":"mapkey"}],"url":"/map/:database_name/:collection_name/:z/:x/:y/tile.png"},"isReference":false,"order":32,"body":"### Tile png request\n\nTo request a tile of you data by a specific bound, that is a pattern in geo maps app, you must perform a GET request to this endpoint. It is required to replace the parameters referring to your data.\n\n### Sample Request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -k -XGET \\\\\\n\\\"https://api.gogeo.io/1.0/map/my_database/my_collection/6/21/34/tile.png?mapkey=MAP-KEY\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n### Sample Response\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/gjrGQH8QouVpZvGofN1y_tile.png\",\n        \"tile.png\",\n        \"256\",\n        \"256\",\n        \"#0474b4\",\n        \"\"\n      ],\n      \"caption\": \"Markers on tile 6/21/34!\"\n    }\n  ]\n}\n[/block]\n### Restricting the data presentation with GeoJSON\n\nUsing the *geom* parameter in the URL you can restrict what will be rendered in a particular collection. This parameter is a [GeoJSON](http://geojson.org/geojson-spec.html) of type *Point, LineString or Polygon*, below is an example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"type\\\": \\\"Polygon\\\",\\n  \\\"coordinates\\\": [\\n    [\\n      [\\n        -121.86035156249999,\\n        37.125286284966805\\n      ],\\n      [\\n        -121.86035156249999,\\n        41.541477666790286\\n      ],\\n      [\\n        -114.2578125,\\n        41.541477666790286\\n      ],\\n      [\\n        -114.2578125,\\n        37.125286284966805\\n      ],\\n      [\\n        -121.86035156249999,\\n        37.125286284966805\\n      ]\\n    ]\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nIn the above example the restriction is a box that cover part of Nevada and California. You can use *JSON.stringify()* to facilitate this usage. Only JSON Object of types *Point*, *LineString* or *Polygon* must be used as spatial restriction.\n\ngoGeo Map Rendering (or tile.png service) applies a cluster algorithm over data returned on small scale requests (zoom levels from 0 to 14) in order to simplify the information presented to the user. This is done for two reasons: \n\n* On big data scenarios, the heavy amount of data returned from small scale may be confuse, and in some cases does not add value to the analysis; \n* Render all objects must be computational expensive, so the approximation positively influences the performance.\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/map-rendering'>\\n    &laquo; Back \\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":"Render, visualize and analyze your data in a map.","slug":"get-a-tile","type":"get","title":"Map rendering service"}

getMap rendering service

Render, visualize and analyze your data in a map.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

database_name:
required
string
Database name
collection_name:
required
string
Collection name
z:
required
integer
Zoom level
x:
required
integer
X tile coordinate
y:
required
integer
Y tile coordinate

Query Params

geom:
string
Spatial filter in GeoJSON format (types supported: Point; Linestring; Polygon)
buffer:
integer
Buffer size (in pixels)
stylename:
string
Style name
q:
string
Relational Query in ElasticSearch format
mapkey:
string
your map key

Documentation

### Tile png request To request a tile of you data by a specific bound, that is a pattern in geo maps app, you must perform a GET request to this endpoint. It is required to replace the parameters referring to your data. ### Sample Request [block:code] { "codes": [ { "code": "curl -k -XGET \\\n\"https://api.gogeo.io/1.0/map/my_database/my_collection/6/21/34/tile.png?mapkey=MAP-KEY\"", "language": "curl" } ] } [/block] ### Sample Response [block:image] { "images": [ { "image": [ "https://files.readme.io/gjrGQH8QouVpZvGofN1y_tile.png", "tile.png", "256", "256", "#0474b4", "" ], "caption": "Markers on tile 6/21/34!" } ] } [/block] ### Restricting the data presentation with GeoJSON Using the *geom* parameter in the URL you can restrict what will be rendered in a particular collection. This parameter is a [GeoJSON](http://geojson.org/geojson-spec.html) of type *Point, LineString or Polygon*, below is an example: [block:code] { "codes": [ { "code": "{\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -121.86035156249999,\n 37.125286284966805\n ],\n [\n -121.86035156249999,\n 41.541477666790286\n ],\n [\n -114.2578125,\n 41.541477666790286\n ],\n [\n -114.2578125,\n 37.125286284966805\n ],\n [\n -121.86035156249999,\n 37.125286284966805\n ]\n ]\n ]\n}", "language": "json" } ] } [/block] In the above example the restriction is a box that cover part of Nevada and California. You can use *JSON.stringify()* to facilitate this usage. Only JSON Object of types *Point*, *LineString* or *Polygon* must be used as spatial restriction. goGeo Map Rendering (or tile.png service) applies a cluster algorithm over data returned on small scale requests (zoom levels from 0 to 14) in order to simplify the information presented to the user. This is done for two reasons: * On big data scenarios, the heavy amount of data returned from small scale may be confuse, and in some cases does not add value to the analysis; * Render all objects must be computational expensive, so the approximation positively influences the performance. [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/map-rendering'>\n &laquo; Back \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

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