{"_id":"56e01ad92bd3832000920444","editedParams2":true,"parentDoc":null,"version":{"_id":"55e06495a44fae0d002146ad","project":"55e06494a44fae0d002146aa","__v":54,"createdAt":"2015-08-28T13:39:33.907Z","releaseDate":"2015-08-28T13:39:33.907Z","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"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"project":"55e06494a44fae0d002146aa","__v":1,"user":"55eea68fc93e8c17008a109c","category":{"_id":"56dd9448c117291700015b60","pages":["56e00ece4685db1700d946f6","56e01ad92bd3832000920444"],"__v":2,"version":"55e06495a44fae0d002146ad","project":"55e06494a44fae0d002146aa","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-03-07T14:46:32.881Z","from_sync":false,"order":28,"slug":"endpoint-3","title":"endpoint"},"editedParams":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-09T12:45:13.695Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","results":{"codes":[{"name":"","code":"See image","language":"text","status":200},{"name":"","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>","language":"xml","status":400},{"language":"text","code":""},{"code":"","language":"text"},{"code":"","language":"text"},{"code":"{\n    \"fault\": {\n        \"faultstring\": \"Invalid ApiKey\",\n        \"detail\": {\n            \"errorcode\": \"oauth.v2.InvalidApiKey\"\n        }\n    }\n}","language":"json","status":401},{"code":"{  \n   \"fault\":{  \n      \"faultstring\":\"Invalid ApiKey for given resource\",\n      \"detail\":{  \n         \"errorcode\":\"oauth.v2.InvalidApiKeyForGivenResource\"\n      }\n   }\n}","language":"json","status":404},{"language":"json","status":405,"code":"{  \n   \"fault\":{  \n      \"faultstring\":\"Received 405 Response without Allow Header\",\n      \"detail\":{  \n         \"errorcode\":\"protocol.http.Response405WithoutAllowHeader\"\n      }\n   }\n}"},{"code":"{\n    \"error\": {\n        \"statuscode\": 500,\n        \"message\": \"The provided request resulted in an internal server error.\"\n    }\n}","language":"json","status":500}]},"settings":"55e973568b72bb3700b1d5ac","examples":{"codes":[{"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/AddressBasePremium 3857/{z}/{x}/{y}.png?key=[[app:key]]', {\n    maxZoom: 20,\n    minZoom: 7\n}).addTo(map);\n</script>","language":"html","name":"Leaflet ZXY Web Mercator"},{"name":"OpenLayers 3 ZXY Web Mercator ","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/AddressBasePremium 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 : 15\n\t\t})\n\t});\n</script>","language":"html"}]},"auth":"required","params":[{"_id":"56e01ad92bd383200092044a","ref":"","in":"path","required":true,"desc":"The tile matrix set that will be used for the layer.","default":"EPSG:27700, EPSG:4258, EPSG:4326","type":"string","name":"tilematrixset"},{"_id":"56e01ad92bd3832000920449","ref":"","in":"path","required":true,"desc":"The layer being accessed by the service e.g. AddressBasePremium 27700","default":"AddressBasePremium","type":"string","name":"layer"},{"_id":"56e01ad92bd3832000920448","ref":"","in":"path","required":true,"desc":"The z index of the map layer.","default":"13-20","type":"string","name":"z"},{"_id":"56e01ad92bd3832000920447","ref":"","in":"path","required":true,"desc":"The x index of the map layer.","default":"","type":"string","name":"x"},{"_id":"56e01ad92bd3832000920446","ref":"","in":"path","required":true,"desc":"The y index of the map layer.","default":"","type":"string","name":"y"},{"_id":"56e01ad92bd3832000920445","ref":"","in":"path","required":true,"desc":"The image format that the service will return.","default":"PNG","type":"string","name":"imgformat"}],"url":"/zxy/:tilematrixset/:layer/:z/:x/:y.:imgformat?"},"isReference":true,"order":1,"body":"","excerpt":"","slug":"zxy","type":"endpoint","title":"ZXY"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

tilematrixset:
required
stringEPSG:27700, EPSG:4258, EPSG:4326
The tile matrix set that will be used for the layer.
layer:
required
stringAddressBasePremium
The layer being accessed by the service e.g. AddressBasePremium 27700
z:
required
string13-20
The z index of the map layer.
x:
required
string
The x index of the map layer.
y:
required
string
The y index of the map layer.
imgformat:
required
stringPNG
The image format that the service will return.

Examples


Result Format


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 }}