{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/zxy/:tilematrixset/:layer/:z/:x/:y.:imgformat?","auth":"required","method":"get","params":[{"name":"tilematrixset","type":"string","default":"EPSG:3857, EPSG:27700","desc":"The tile matrix set that will be used for the layer.","required":true,"in":"path","ref":"","_id":"5621115b9288c00d00bb1e3b"},{"name":"layer","type":"string","default":"Outdoor 3857","desc":"The layer that will be used.","required":true,"in":"path","ref":"","_id":"5621115b9288c00d00bb1e3a"},{"name":"z","type":"int","default":"7-20","desc":"The z index of the map layer.","required":true,"in":"path","ref":"","_id":"5621115b9288c00d00bb1e39"},{"name":"x","type":"int","default":"","desc":"The x index of the map layer.","required":true,"in":"path","ref":"","_id":"5621115b9288c00d00bb1e38"},{"name":"y","type":"int","default":"","desc":"The y index of the map layer.","required":true,"in":"path","ref":"","_id":"5621115b9288c00d00bb1e37"},{"name":"imgformat","type":"string","default":"PNG","desc":"The image format that the service will return.","required":true,"in":"path","ref":"","_id":"5621115b9288c00d00bb1e36"}],"results":{"codes":[{"name":"","status":200,"language":"text","code":"See image"},{"status":400,"language":"xml","code":"// Example: Missing mandatory parameter\n\n<ExceptionReport xmlns=\"http://www.opengis.net/ows/1.1\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" version=\"1.1.0\" xsi:schemaLocation=\"http://www.opengis.net/ows/1.1 http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd\">\n\t<Exception exceptionCode=\"IncorrectURLPath\" locator=\"request\">\n\t\t<ExceptionText>\nFormat is /zxy/{tilematrixSet}/{layer}/{z}/{x}/{y}.{imgFormat} Length was 6\n\t\t</ExceptionText>\n\t</Exception>\n</ExceptionReport>\n\n// Example: Parameter entry of wrong type\n\nIn progress\n\n// Example: Wrong parameter name\n\n<ExceptionReport xmlns=\"http://www.opengis.net/ows/1.1\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" version=\"1.1.0\" xsi:schemaLocation=\"http://www.opengis.net/ows/1.1 http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd\">\n\t<Exception exceptionCode=\"InvalidParameterValue\" locator=\"TILEMATRIXSET\">\n\t\t<ExceptionText>\nUnable to match requested TILEMATRIXSET x to those supported by layer\n\t\t</ExceptionText>\n\t</Exception>\n</ExceptionReport>","name":""},{"status":401,"language":"json","code":"{\n \"fault\": {\n \"faultstring\": \"Invalid ApiKey\",\n \"detail\": {\n \"errorcode\": \"oauth.v2.InvalidApiKey\"\n }\n }\n}"},{"status":404,"language":"json","code":"{ \n \"fault\":{ \n \"faultstring\":\"Invalid ApiKey for given resource\",\n \"detail\":{ \n \"errorcode\":\"oauth.v2.InvalidApiKeyForGivenResource\"\n }\n }\n}"},{"status":405,"language":"json","code":"{ \n \"fault\":{ \n \"faultstring\":\"Received 405 Response without Allow Header\",\n \"detail\":{ \n \"errorcode\":\"protocol.http.Response405WithoutAllowHeader\"\n }\n }\n}"},{"status":500,"language":"text","code":"{\n \"error\": {\n \"statuscode\": 500,\n \"message\": \"The provided request resulted in an internal server error.\"\n }\n}"}]},"settings":"55e973568b72bb3700b1d5ac","examples":{"codes":[{"name":"Leaflet ZXY Web Mercator","code":"<link rel=\"stylesheet\" href=\"http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css\" />\n<script src=\"http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js\"></script>\n\n<div id=\"map\" style='height: 500px; width: 500px;'></div>\n<script type='text/javascript'>\nvar map = L.map('map').setView([51.505, -0.09], 15);\n\nL.tileLayer('https://api2.ordnancesurvey.co.uk/mapping_api/v1/service/zxy/EPSG%3A3857/Outdoor 3857/{z}/{x}/{y}.png?key=[[app:key]]', {\n maxZoom: 20,\n minZoom: 7\n}).addTo(map);\n</script>","language":"html"},{"code":"<script src=\"http://openlayers.org/en/v3.12.0/build/ol.js\" type=\"text/javascript\"></script>\n\n<div id=\"map\" style='height: 500px; width:500px;'></div>\n<script type='text/javascript'>\n\tvar map = new ol.Map({\n\t\ttarget : 'map',\n\t\tlayers : [ new ol.layer.Tile({\n\t\t\tsource : new ol.source.XYZ({\n\t\t\t\turl: 'https://api2.ordnancesurvey.co.uk/mapping_api/v1/service/zxy/EPSG%3A3857/Outdoor 3857/{z}/{x}/{y}.png?key=[[app:key]]'\n\t\t\t\t})\n\t\t\t})\n\t\t ],\n\t\tview : new ol.View({\n\t\t\tcenter : ol.proj.transform([ -1.470625, 50.93788 ], 'EPSG:4326', 'EPSG:3857'),\n\t\t\tzoom : 9\n\t\t})\n\t});\n</script>","language":"html","name":"OpenLayers 3 ZXY Web Mercator"},{"name":"Sample Coordinates","language":"text","code":"Sample ZXY coordinates showing the OS HQ in Southampton.\nEPSG: 3857\n\nZ X\t Y\n7 63 42\n8 126 85\n9 253 171\n10 507 343\n11 1015 686\n12 2031 1372"}]}},"next":{"description":"","pages":[]},"title":"ZXY","type":"endpoint","slug":"os-maps-zxy","excerpt":"OS Maps ZXY","body":"##Resulting Image\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://files.readme.io/VSIpIIrSQSieumto1Ri6_zxy_200.png\",\n \"zxy_200.png\",\n \"256\",\n \"256\",\n \"#f3f3eb\",\n \"\"\n ],\n \"caption\": \"The tile produced by the sample request above.\"\n }\n ]\n}\n[/block]\n##Try it out requests\n\nPlease note that any requests made to the OS Maps API via the Try it out form will result in two separate calls being made against the API key used.","updates":[],"order":1,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5621115b9288c00d00bb1e35","parentDoc":null,"version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["55e06496a44fae0d002146ae","55e06997a44fae0d002146c2","55e06a6958c5460d0076aa0c","55e06ae66bad670d0081f25c","55e06cc1a44fae0d002146cb","55e06ddda44fae0d002146cd","55e95f261fd7e82300ef359f","55e95fe47fc27b2d00d32cfa","55e96eef358d923700be984d","55e96ef6358d923700be984e","55e96efda7ca823900ad547e","55e96f04a7ca823900ad547f","55e970cc358d923700be9853","55e973f4358d923700be9858","55e973f9a7ca823900ad548c","55e977bf358d923700be985d","55e9780f8b72bb3700b1d5bd","55e97815a7ca823900ad5493","55e9781c358d923700be985f","55e97821461e2a390050f23b","55f963c23bb4bb0d0022d18c","5624c67406e8040d005ed6b2","5624dcf25a86b423009462e8","5625f229d0f87e190014c4ed","5627819fe2ce610d004e3ec8","562781b23a4c6b0d00c4556b","5627837166c62617009d17e2","5627851efcbbc621004ebff1","5627860044c87f0d00fe6491","562e3c6d54a5be0d00070c3e","564c955aae6cb82100dc137a","5652e22abbe7110d00dba748","5652f25523d4262d00b21c58","5652fdad51e4e81900bf2452","5652fdcbb60abb1700bafadc","5654494f65bec717007e0293","565da11a77f0090d005818ff","565f063f413e06170093de18","565f06fb413e06170093de21","56dd6773efaca42900e5f58e","56dd68630c3bb41700b0b037","56dd7d24d5419f170075dfb3","56dd9448c117291700015b60","56dd9454c117291700015b61","577a6f8b9748b80e00ef3f45","577a6f969748b80e00ef3f46","577bba7f6e5f301900fada99","57a9cc8e5b1ace0e00de743f","58aab134c50c33250046b8f8","58aab146aecc3e2500573d4c","58aab1628f862f250076f92e","58aab1938f862f250076f92f","58aab3e5aecc3e2500573d56","58aab3f2aecc3e2500573d57"],"_id":"55e06495a44fae0d002146ad","releaseDate":"2015-08-28T13:39:33.907Z","createdAt":"2015-08-28T13:39:33.907Z","project":"55e06494a44fae0d002146aa","__v":54},"editedParams":true,"project":"55e06494a44fae0d002146aa","user":"55eea68fc93e8c17008a109c","editedParams2":true,"createdAt":"2015-10-16T15:01:47.080Z","category":{"sync":{"isSync":false,"url":""},"pages":["5621115b9288c00d00bb1e35"],"title":"endpoint","slug":"endpoint-2","order":3,"from_sync":false,"reference":true,"_id":"55e973f4358d923700be9858","__v":1,"version":"55e06495a44fae0d002146ad","createdAt":"2015-09-04T10:35:32.112Z","project":"55e06494a44fae0d002146aa"},"githubsync":"","__v":3}
getZXY
OS Maps ZXY
Definition
{{ api_url }}{{ page_api_url }}
Parameters
Path Params
tilematrixset:
required
stringEPSG:3857, EPSG:27700
The tile matrix set that will be used for the layer.
layer:
required
stringOutdoor 3857
The layer that will be used.
z:
required
integer7-20
The z index of the map layer.
x:
required
integer
The x index of the map layer.
y:
required
integer
The y index of the map layer.
imgformat:
required
stringPNG
The image format that the service will return.