{"_id":"586d8f521c014819000ea68f","__v":0,"parentDoc":null,"project":"56d629f02417921500c46716","category":{"_id":"586d8f511c014819000ea661","project":"56d629f02417921500c46716","version":"586d8f511c014819000ea65d","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-24T00:14:02.044Z","from_sync":false,"order":4,"slug":"access-tokens","title":"Map Services"},"user":"56d62986b30acf150053be43","version":{"_id":"586d8f511c014819000ea65d","project":"56d629f02417921500c46716","__v":2,"createdAt":"2017-01-05T00:12:01.865Z","releaseDate":"2017-01-05T00:12:01.865Z","categories":["586d8f511c014819000ea65e","586d8f511c014819000ea65f","586d8f511c014819000ea660","586d8f511c014819000ea661","586d8f511c014819000ea662","586d8f511c014819000ea663","586d8f511c014819000ea664","587977f57a58130f00303d4e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"adams","version_clean":"2.0.0","version":"2.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-24T21:45:30.177Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/w5pTGqLYQCSi5b6fwbLr_header-sydney.png\",\n        \"header-sydney.png\",\n        \"800\",\n        \"90\",\n        \"#9d846d\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n**Size Limits**\nThe **maximum size** for a Maps API [Static Map](doc:overview-static-maps) image is *1280x1280*. This absolute pixel size limit does not change when using the <code>:::at:::2x</code> suffix, making the max size for Static Map [Retina](doc:image-quality-and-retina-1) images *640x640*.\n\n&nbsp;\n**Requests**\nRequest an image of size {width} x {height} (in pixels) for a given [Map ID](doc:map-id). \n`https://api.mapbox.com/v4/Map ID/{lon},{lat},{z}/{width}x{height}.png?access_token=your-access-token`\n* The {lon}, {lat}, {z} parameters define the center of the static map image. \n  * The {lon} and {lat} coordinates range from -180 to 180 and -85 to 85 using a decimal separator.\n  * {z} must be an integer between the minzoom and maxzoom supported by the map. \n\n**[Example Static Map Request](https://api.mapbox.com/v4/digitalglobe.nal0g75k/-120.571,46.65,18/400x400.png?access_token=pk.eyJ1IjoiZGlnaXRhbGdsb2JlIiwiYSI6ImNpc2t0ZG16NzA2Y2QydW53M2s0c2liNncifQ.YzEK6kmdCrtvssUfrncwKQ)** \n\n&nbsp;\n[block:html]\n{\n  \"html\": \"<i>Format</i><br>\\nThe image response defaults to <b>.png</b> but can be replaced by any of the following extensions to adjust image quality for different bandwidth requirements. DigitalGlobe Maps API re-encodes the output image based on the requested format.</p>\\n<p>You can prefix any image quality type with <code>@2x</code> to request a high DPI version.</p>\\n<table style=\\\"width: 100%;\\\" border=\\\"1\\\">\\n<tbody>\\n<tr>\\n<td style=\\\"text-align: left; background-color: #c0c0c0;\\\"><strong>Extension</strong></td>\\n<td style=\\\"text-align: left; background-color: #c0c0c0;\\\"><strong>Descripton</strong></td>\\n</tr>\\n<tr>\\n<td>@2x.png</td>\\n<td>2x scale (retina)</td>\\n</tr>\\n<tr>\\n<td>.png32</td>\\n<td>32 color indexed PNG</td>\\n</tr>\\n<tr>\\n<td>.png64</td>\\n<td>64 color indexed PNG</td>\\n</tr>\\n<tr>\\n<td>.png128</td>\\n<td>128 color indexed PNG</td>\\n</tr>\\n<tr>\\n<td>.png256</td>\\n<td>256 color indexed PNG</td>\\n</tr>\\n<tr>\\n<td>.jpg70</td>\\n<td>70% quality JPG</td>\\n</tr>\\n<tr>\\n<td>.jpg80</td>\\n<td>80% quality JPG</td>\\n</tr>\\n<tr>\\n<td>.jpg90</td>\\n<td>90% quality JPG</td>\\n</tr>\\n</tbody>\\n</table>\"\n}\n[/block]\n&nbsp;\n**Combining Map ID's**\nYou can use more than one [Map ID](doc:map-id) to combine layers into one static map response by comma separating the list of Map ID strings, such as:  `digitalglobe.nal0g75k,digitalglobe.nakolk5j`\n\n**[Example Combined Static Map Request](https://api.mapbox.com/v4/digitalglobe.nal0g75k,digitalglobe.nakolk5j/-120.571,46.65,18/400x400.png?access_token=pk.eyJ1IjoiZGlnaXRhbGdsb2JlIiwiYSI6ImNpc2t0ZG16NzA2Y2QydW53M2s0c2liNncifQ.YzEK6kmdCrtvssUfrncwKQ)** \n\n\n&nbsp;\n**Adding Overlays**\nThe optional {overlay} parameter can include one or more features (points/lines/polygons) to draw in a comma-separated list. Overlay content is defined as a segment of the <a href=\"http://mapsapidocs.digitalglobe.com/docs/overview-static-maps\">Static Map</a> URL. The limit for this section is <strong>4096 characters</strong>: requests containing over 4096 characters of overlay content will be rejected.</p>\n<pre><span style=\"color: #999999;\">marker</span>\n  <span style=\"color: #e87722;\">{name}</span>-<span style=\"color: #e87722;\">{label}</span>+<span style=\"color: #e87722;\">{color}</span>(<span style=\"color: #e87722;\">{lon}</span>,<span style=\"color: #e87722;\">{lat}</span>)\n<span style=\"color: #999999;\">geojson</span>\n  geojson(<span style=\"color: #e87722;\">{geojson}</span>)\n<span style=\"color: #999999;\">path</span>\n  path+<span style=\"color: #e87722;\">strokecolor</span>-<span style=\"color: #e87722;\">strokeopacity</span>+<span style=\"color: #e87722;\">fillcolor</span>-<span style=\"color: #e87722;\">fillopacity</span>(<span style=\"color: #e87722;\">{polyline}</span>)</pre>\n\n<a href=\"https://api.mapbox.com/v4/digitalglobe.pfp5pli3/geojson(%7B%22type%22%3A%22Feature%22%2C%22properties%22%3A%7B%22stroke-width%22%3A4%2C%22stroke%22%3A%22%23ff4444%22%2C%22stroke-opacity%22%3A0.5%7D%2C%22geometry%22%3A%7B%22type%22%3A%22LineString%22%2C%22coordinates%22%3A%5B%5B-73.97994339466094%2C40.75477505414824%5D%2C%5B-73.97949278354645%2C40.75540897325886%5D%2C%5B-73.98272752761841%2C40.756774316967416%5D%2C%5B-73.98041009902954%2C40.759923440317884%5D%2C%5B-73.9771968126297%2C40.75854190779627%5D%5D%7D%7D)/-73.9810,40.7576,16/500x300.png?access_token=pk.eyJ1IjoiZGlnaXRhbGdsb2JlIiwiYSI6ImNpc2t0ZG16NzA2Y2QydW53M2s0c2liNncifQ.YzEK6kmdCrtvssUfrncwKQ\" target=\"_blank\">**Example Static Map Request with geojson Overlay**</a>\n\n&nbsp;\n&nbsp;\nQuestions? [Ask Them](http://mapsapidocs.digitalglobe.com/discuss) on our Q&A forum.","excerpt":"**Static Maps** are standalone images that can be displayed on web and mobile devices without the aid of a mapping library or API. A static map image uses the DigitalGlobe Maps API **[Map ID](doc:map-ids)** and looks like an embedded map without any interactivity or controls.\n\nEach static map image counts as **1 map view**.","slug":"overview-static-maps","type":"basic","title":"Static Maps"}

Static Maps

**Static Maps** are standalone images that can be displayed on web and mobile devices without the aid of a mapping library or API. A static map image uses the DigitalGlobe Maps API **[Map ID](doc:map-ids)** and looks like an embedded map without any interactivity or controls. Each static map image counts as **1 map view**.

[block:image] { "images": [ { "image": [ "https://files.readme.io/w5pTGqLYQCSi5b6fwbLr_header-sydney.png", "header-sydney.png", "800", "90", "#9d846d", "" ] } ] } [/block] **Size Limits** The **maximum size** for a Maps API [Static Map](doc:overview-static-maps) image is *1280x1280*. This absolute pixel size limit does not change when using the <code>@2x</code> suffix, making the max size for Static Map [Retina](doc:image-quality-and-retina-1) images *640x640*. &nbsp; **Requests** Request an image of size {width} x {height} (in pixels) for a given [Map ID](doc:map-id). `https://api.mapbox.com/v4/Map ID/{lon},{lat},{z}/{width}x{height}.png?access_token=your-access-token` * The {lon}, {lat}, {z} parameters define the center of the static map image. * The {lon} and {lat} coordinates range from -180 to 180 and -85 to 85 using a decimal separator. * {z} must be an integer between the minzoom and maxzoom supported by the map. **[Example Static Map Request](https://api.mapbox.com/v4/digitalglobe.nal0g75k/-120.571,46.65,18/400x400.png?access_token=pk.eyJ1IjoiZGlnaXRhbGdsb2JlIiwiYSI6ImNpc2t0ZG16NzA2Y2QydW53M2s0c2liNncifQ.YzEK6kmdCrtvssUfrncwKQ)** &nbsp; [block:html] { "html": "<i>Format</i><br>\nThe image response defaults to <b>.png</b> but can be replaced by any of the following extensions to adjust image quality for different bandwidth requirements. DigitalGlobe Maps API re-encodes the output image based on the requested format.</p>\n<p>You can prefix any image quality type with <code>@2x</code> to request a high DPI version.</p>\n<table style=\"width: 100%;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"text-align: left; background-color: #c0c0c0;\"><strong>Extension</strong></td>\n<td style=\"text-align: left; background-color: #c0c0c0;\"><strong>Descripton</strong></td>\n</tr>\n<tr>\n<td>@2x.png</td>\n<td>2x scale (retina)</td>\n</tr>\n<tr>\n<td>.png32</td>\n<td>32 color indexed PNG</td>\n</tr>\n<tr>\n<td>.png64</td>\n<td>64 color indexed PNG</td>\n</tr>\n<tr>\n<td>.png128</td>\n<td>128 color indexed PNG</td>\n</tr>\n<tr>\n<td>.png256</td>\n<td>256 color indexed PNG</td>\n</tr>\n<tr>\n<td>.jpg70</td>\n<td>70% quality JPG</td>\n</tr>\n<tr>\n<td>.jpg80</td>\n<td>80% quality JPG</td>\n</tr>\n<tr>\n<td>.jpg90</td>\n<td>90% quality JPG</td>\n</tr>\n</tbody>\n</table>" } [/block] &nbsp; **Combining Map ID's** You can use more than one [Map ID](doc:map-id) to combine layers into one static map response by comma separating the list of Map ID strings, such as: `digitalglobe.nal0g75k,digitalglobe.nakolk5j` **[Example Combined Static Map Request](https://api.mapbox.com/v4/digitalglobe.nal0g75k,digitalglobe.nakolk5j/-120.571,46.65,18/400x400.png?access_token=pk.eyJ1IjoiZGlnaXRhbGdsb2JlIiwiYSI6ImNpc2t0ZG16NzA2Y2QydW53M2s0c2liNncifQ.YzEK6kmdCrtvssUfrncwKQ)** &nbsp; **Adding Overlays** The optional {overlay} parameter can include one or more features (points/lines/polygons) to draw in a comma-separated list. Overlay content is defined as a segment of the <a href="http://mapsapidocs.digitalglobe.com/docs/overview-static-maps">Static Map</a> URL. The limit for this section is <strong>4096 characters</strong>: requests containing over 4096 characters of overlay content will be rejected.</p> <pre><span style="color: #999999;">marker</span> <span style="color: #e87722;">{name}</span>-<span style="color: #e87722;">{label}</span>+<span style="color: #e87722;">{color}</span>(<span style="color: #e87722;">{lon}</span>,<span style="color: #e87722;">{lat}</span>) <span style="color: #999999;">geojson</span> geojson(<span style="color: #e87722;">{geojson}</span>) <span style="color: #999999;">path</span> path+<span style="color: #e87722;">strokecolor</span>-<span style="color: #e87722;">strokeopacity</span>+<span style="color: #e87722;">fillcolor</span>-<span style="color: #e87722;">fillopacity</span>(<span style="color: #e87722;">{polyline}</span>)</pre> <a href="https://api.mapbox.com/v4/digitalglobe.pfp5pli3/geojson(%7B%22type%22%3A%22Feature%22%2C%22properties%22%3A%7B%22stroke-width%22%3A4%2C%22stroke%22%3A%22%23ff4444%22%2C%22stroke-opacity%22%3A0.5%7D%2C%22geometry%22%3A%7B%22type%22%3A%22LineString%22%2C%22coordinates%22%3A%5B%5B-73.97994339466094%2C40.75477505414824%5D%2C%5B-73.97949278354645%2C40.75540897325886%5D%2C%5B-73.98272752761841%2C40.756774316967416%5D%2C%5B-73.98041009902954%2C40.759923440317884%5D%2C%5B-73.9771968126297%2C40.75854190779627%5D%5D%7D%7D)/-73.9810,40.7576,16/500x300.png?access_token=pk.eyJ1IjoiZGlnaXRhbGdsb2JlIiwiYSI6ImNpc2t0ZG16NzA2Y2QydW53M2s0c2liNncifQ.YzEK6kmdCrtvssUfrncwKQ" target="_blank">**Example Static Map Request with geojson Overlay**</a> &nbsp; &nbsp; Questions? [Ask Them](http://mapsapidocs.digitalglobe.com/discuss) on our Q&A forum.