diff options
author | Dave Arter <davea@mysociety.org> | 2015-02-13 12:43:25 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-10-06 09:09:22 +0100 |
commit | e572afecd7fcd294cb56ce44015ef9112ca8e870 (patch) | |
tree | da1ad238dd796fc4c6100ca46dcd1a1099f6180d /web | |
parent | 1c4f12860c2aee9e9fa3063969c3d995dda1871f (diff) |
[Zurich] Use new map tiles up to 1:250
- Refactor map tile size into a constant
- Update map tiles to use new Zurich WMTS server directly instead of Apache proxy
Diffstat (limited to 'web')
-rw-r--r-- | web/js/map-wmts-zurich.js | 171 |
1 files changed, 152 insertions, 19 deletions
diff --git a/web/js/map-wmts-zurich.js b/web/js/map-wmts-zurich.js index 54b932168..dc81c967f 100644 --- a/web/js/map-wmts-zurich.js +++ b/web/js/map-wmts-zurich.js @@ -81,37 +81,170 @@ $(function(){ OpenLayers.DOTS_PER_INCH = 96; fixmystreet.map_options = { - maxExtent: new OpenLayers.Bounds(676000, 241000, 690000, 255000), + maxExtent: new OpenLayers.Bounds(676000, 241402, 689896, 254596), units: 'm', - scales: [ '64000', '32000', '16000', '8000', '4000', '2000', '1000', '500' ] + scales: [ '64000', '32000', '16000', '8000', '4000', '2000', '1000', '500', '250' ] }; var layer_options = { projection: new OpenLayers.Projection("EPSG:21781"), - name: "Hybrid", - layer: "Hybrid", - matrixSet: "nativeTileMatrixSet", + name: "tiled_LuftbildHybrid", + layer: "tiled_LuftbildHybrid", + matrixSet: "default028mm", requestEncoding: "REST", - url: "/maps/Hybrid/", + url: "http://www.gis.stadt-zuerich.ch/maps/rest/services/tiled/LuftbildHybrid/MapServer/WMTS/tile/", style: "default", matrixIds: [ - //{ identifier: "0", matrixHeight: 2, matrixWidth: 2, scaleDenominator: 250000, supportedCRS: "urn:ogc:def:crs:EPSG::21781", tileHeight: 256, tileWidth: 256, topLeftCorner: { lat: 30814423, lon: -29386322 } }, - //{ identifier: "1", matrixHeight: 3, matrixWidth: 3, scaleDenominator: 125000, supportedCRS: "urn:ogc:def:crs:EPSG::21781", tileHeight: 256, tileWidth: 256, topLeftCorner: { lat: 30814423, lon: -29386322 } }, - { identifier: "2", matrixHeight: 4, matrixWidth: 5, scaleDenominator: 64000, supportedCRS: "urn:ogc:def:crs:EPSG::21781", tileHeight: 256, tileWidth: 256, topLeftCorner: { lat: 30814423, lon: -29386322 } }, - { identifier: "3", matrixHeight: 7, matrixWidth: 8, scaleDenominator: 32000, supportedCRS: "urn:ogc:def:crs:EPSG::21781", tileHeight: 256, tileWidth: 256, topLeftCorner: { lat: 30814423, lon: -29386322 } }, - { identifier: "4", matrixHeight: 14, matrixWidth: 14, scaleDenominator: 16000, supportedCRS: "urn:ogc:def:crs:EPSG::21781", tileHeight: 256, tileWidth: 256, topLeftCorner: { lat: 30814423, lon: -29386322 } }, - { identifier: "5", matrixHeight: 27, matrixWidth: 27, scaleDenominator: 8000, supportedCRS: "urn:ogc:def:crs:EPSG::21781", tileHeight: 256, tileWidth: 256, topLeftCorner: { lat: 30814423, lon: -29386322 } }, - { identifier: "6", matrixHeight: 52, matrixWidth: 53, scaleDenominator: 4000, supportedCRS: "urn:ogc:def:crs:EPSG::21781", tileHeight: 256, tileWidth: 256, topLeftCorner: { lat: 30814423, lon: -29386322 } }, - { identifier: "7", matrixHeight: 104, matrixWidth: 105, scaleDenominator: 2000, supportedCRS: "urn:ogc:def:crs:EPSG::21781", tileHeight: 256, tileWidth: 256, topLeftCorner: { lat: 30814423, lon: -29386322 } }, - { identifier: "8", matrixHeight: 208, matrixWidth: 208, scaleDenominator: 1000, supportedCRS: "urn:ogc:def:crs:EPSG::21781", tileHeight: 256, tileWidth: 256, topLeftCorner: { lat: 30814423, lon: -29386322 } }, - { identifier: "9", matrixHeight: 415, matrixWidth: 414, scaleDenominator: 500, supportedCRS: "urn:ogc:def:crs:EPSG::21781", tileHeight: 256, tileWidth: 256, topLeftCorner: { lat: 30814423, lon: -29386322 } } + // { + // "identifier": "0", + // "matrixHeight": 903, + // "matrixWidth": 889, + // "scaleDenominator": 236235.59151877242, + // "supportedCRS": "urn:ogc:def:crs:EPSG::21781", + // "tileHeight": 512, + // "tileWidth": 512, + // "topLeftCorner": { + // "lat": 30814423, + // "lon": -29386322 + // } + // }, + // { + // "identifier": "1", + // "matrixHeight": 1806, + // "matrixWidth": 1777, + // "scaleDenominator": 118117.79575938621, + // "supportedCRS": "urn:ogc:def:crs:EPSG::21781", + // "tileHeight": 512, + // "tileWidth": 512, + // "topLeftCorner": { + // "lat": 30814423, + // "lon": -29386322 + // } + // }, + { + "identifier": "2", + "matrixHeight": 3527, + "matrixWidth": 3470, + "scaleDenominator": 60476.31142880573, + "supportedCRS": "urn:ogc:def:crs:EPSG::21781", + "tileHeight": 512, + "tileWidth": 512, + "topLeftCorner": { + "lat": 30814423, + "lon": -29386322 + } + }, + { + "identifier": "3", + "matrixHeight": 7053, + "matrixWidth": 6939, + "scaleDenominator": 30238.155714402867, + "supportedCRS": "urn:ogc:def:crs:EPSG::21781", + "tileHeight": 512, + "tileWidth": 512, + "topLeftCorner": { + "lat": 30814423, + "lon": -29386322 + } + }, + { + "identifier": "4", + "matrixHeight": 14106, + "matrixWidth": 13877, + "scaleDenominator": 15119.077857201433, + "supportedCRS": "urn:ogc:def:crs:EPSG::21781", + "tileHeight": 512, + "tileWidth": 512, + "topLeftCorner": { + "lat": 30814423, + "lon": -29386322 + } + }, + { + "identifier": "5", + "matrixHeight": 28211, + "matrixWidth": 27753, + "scaleDenominator": 7559.538928600717, + "supportedCRS": "urn:ogc:def:crs:EPSG::21781", + "tileHeight": 512, + "tileWidth": 512, + "topLeftCorner": { + "lat": 30814423, + "lon": -29386322 + } + }, + { + "identifier": "6", + "matrixHeight": 56422, + "matrixWidth": 55505, + "scaleDenominator": 3779.7694643003583, + "supportedCRS": "urn:ogc:def:crs:EPSG::21781", + "tileHeight": 512, + "tileWidth": 512, + "topLeftCorner": { + "lat": 30814423, + "lon": -29386322 + } + }, + { + "identifier": "7", + "matrixHeight": 112844, + "matrixWidth": 111010, + "scaleDenominator": 1889.8847321501792, + "supportedCRS": "urn:ogc:def:crs:EPSG::21781", + "tileHeight": 512, + "tileWidth": 512, + "topLeftCorner": { + "lat": 30814423, + "lon": -29386322 + } + }, + { + "identifier": "8", + "matrixHeight": 225687, + "matrixWidth": 222020, + "scaleDenominator": 944.9423660750896, + "supportedCRS": "urn:ogc:def:crs:EPSG::21781", + "tileHeight": 512, + "tileWidth": 512, + "topLeftCorner": { + "lat": 30814423, + "lon": -29386322 + } + }, + { + "identifier": "9", + "matrixHeight": 451374, + "matrixWidth": 444039, + "scaleDenominator": 472.4711830375448, + "supportedCRS": "urn:ogc:def:crs:EPSG::21781", + "tileHeight": 512, + "tileWidth": 512, + "topLeftCorner": { + "lat": 30814423, + "lon": -29386322 + } + }, + { + "identifier": "10", + "matrixHeight": 902748, + "matrixWidth": 888078, + "scaleDenominator": 236.2355915187724, + "supportedCRS": "urn:ogc:def:crs:EPSG::21781", + "tileHeight": 512, + "tileWidth": 512, + "topLeftCorner": { + "lat": 30814423, + "lon": -29386322 + } + } ] }; fixmystreet.layer_options = [ layer_options, OpenLayers.Util.applyDefaults({ - name: "Stadtplan", - layer: "Stadtplan", - url: "/maps/Stadtplan/" + name: "Stadtplan3D", + layer: "Stadtplan3D", + url: "http://www.gis.stadt-zuerich.ch/maps/rest/services/tiled/Stadtplan3D/MapServer/WMTS/tile/" }, layer_options) ]; |