diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/sass/_base.scss | 55 | ||||
-rw-r--r-- | web/cobrands/zurich/admin-faux-columns.gif | bin | 0 -> 107 bytes | |||
-rw-r--r-- | web/cobrands/zurich/base.scss | 181 | ||||
-rw-r--r-- | web/cobrands/zurich/layout.scss | 79 | ||||
-rw-r--r-- | web/js/map-wmts-zurich.js | 171 |
5 files changed, 456 insertions, 30 deletions
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index 7bb6a96cb..0df8ad01b 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -945,8 +945,8 @@ input.final-submit { // fancybox gallery images have a magnifying glass in the corner .update-img { a { - @include inline-block; - position:relative; + display: block; + position: relative; span { position:absolute; top:0; @@ -1003,6 +1003,13 @@ input.final-submit { } } +// The map's static image fallback is visible by default. +// Hide it if javascript has loaded. (We show it again when +// the page is printed.) +html.js #map .noscript { + display: none; +} + // OpenLayers fix for navigation being top right // Left and right so that zoom can be left, pan right. #fms_pan_zoom { @@ -1729,5 +1736,49 @@ table.nicetable { } +@media screen { + .print-only { + display: none !important; + } +} + +@media print { + @page { + margin: 3em; + } + + #main-nav, + #nav-link, + .admin-nav, + .olControlAttribution, + .olControlPanZoom, + #sub_map_links, + #fms_pan_zoom, + .screen-only, + .olMapViewport { + display: none !important; + } + + #map_box { + position: static !important; + height: 256px !important; + width: auto !important; + background: #f1eee9 !important; // cream colour to match OSM image + } + + #map { + -webkit-transform: scale(0.5); + -ms-transform: scale(0.5); + transform: scale(0.5); + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + } + + html.js #map .noscript { + display: block; + } +} + @import "_admin"; @import "_fixedthead"; diff --git a/web/cobrands/zurich/admin-faux-columns.gif b/web/cobrands/zurich/admin-faux-columns.gif Binary files differnew file mode 100644 index 000000000..077fea2e5 --- /dev/null +++ b/web/cobrands/zurich/admin-faux-columns.gif diff --git a/web/cobrands/zurich/base.scss b/web/cobrands/zurich/base.scss index 559d97a27..8f6cca96f 100644 --- a/web/cobrands/zurich/base.scss +++ b/web/cobrands/zurich/base.scss @@ -42,11 +42,11 @@ } &#closed { color: #1a1a1a; - background: #e25436; + background: #e25436; // red } &#progress { color: #1a1a1a; - background: #f3d74b; + background: #f3d74b; //purple } } } @@ -178,3 +178,180 @@ h4.static-with-rule { } } } + +.admin-note__text { + background-color: #eee; + padding: 0.5em 1em; + border-radius: 4px; + position: relative; + margin-bottom: 0.5em; + + // add a little speech bubble triangle to the bottom left corner + &:after { + content: ""; + display: block; + position: absolute; + bottom: -10px; + left: 10px; + border-top: 10px solid #eee; + border-left: 10px solid transparent; + } + + .admininternal & { + background-color: #eef; + + &:after { + border-top-color: #eef; + } + } +} + +.admin-note__creator { + padding-left: 30px; +} + +.admin-official-answer, .admin-external-message { + background-color: #1F52A3; // official Zurich blue colour + color: #fff; + padding: 0.8em 1em; + border-radius: 4px; + + p { + margin-bottom: 0.5em; + + &:last-child { + margin-bottom: 0; + } + } +} + +.admin { + label.inline { + padding: 0; + } + + input[type="checkbox"] + label.inline { + margin-right: 0.2em; + } +} + +.admin-label--inline { + display: inline; // rather than block + margin-right: 0.333em; // bit of space between this and the following input +} + +.ui-spinner input { + // stop jQuery UI spinner inputs from inheriting FMS input styles + padding: 1px; + border: none; + border-radius: 0; +} + +.square-map__outer { + width: 100%; + height: 0; + padding-bottom: 100%; // 100% of parent WIDTH!! Makes a square element. + position: relative; +} + +.square-map__inner { + position: absolute; // Parent must keep its 0 height, so we need to create a new container for tiles. + top: 0; + left: 0; + right: 0; + bottom: 0; + + #drag .square-map__tile { + position: static; // override position:absolute + } +} + +#map_box { + top: 0em; // the default, 3em, overlaps the content below +} + +@media screen { + dd.screen-no-space-after { + margin-bottom: 0; + } + + .admin-report-edit--interact dl.with-message { + margin-top: 1.5em; + } +} + +@media print { + #site-header .container { + position: relative; + } + #site-logo { + top: 0; + } + + .mappage.admin { + .container { + padding: 0; + position: relative; + } + + .content { + overflow: auto; + font-size: 0.8em; + background: transparent url(/cobrands/zurich/admin-print-columns.gif) top center repeat-y; + min-height: 0 !important; // override hard-coded inline min-height style + + form { + @include clearfix; // because .admin-report-edit children are floated + } + } + + #map_box { + display: none; // Zurich has its own clone of the map, inside admin-report-edit--interact + } + } + + .admin-report-edit { + margin-top: 1em; + width: 47%; + + input[type=text], + textarea { + border: none; + padding: 0; + } + + dd { + padding-left: 1em; + } + + h2 { + font-family: inherit; + font-size: inherit; + font-weight: bold; + } + } + + .admin-report-edit--details { + float: left; + border-right: 1px solid #ddd; + padding-right: 3%; + } + + .admin-report-edit--interact { + float: right; + } + + .map_clone { + -webkit-transform: none; + -ms-transform: none; + transform: none; + } + + dd.print-no-space-after { + margin-bottom: 0; + } + + #print_report_map { + page-break-before: always; + } +} diff --git a/web/cobrands/zurich/layout.scss b/web/cobrands/zurich/layout.scss index d22d753ca..3a20d05c5 100644 --- a/web/cobrands/zurich/layout.scss +++ b/web/cobrands/zurich/layout.scss @@ -111,9 +111,6 @@ body.mappage { padding-top: 18px; background: #fff url(logo_portal.x.jpg) top left repeat-x; } - #site-logo { - margin-left: 10px; - } .content { margin-top: 1em; } @@ -242,10 +239,52 @@ body.fullwidthpage.admin .content { width: 100%; } -body.mappage.admin .content { - margin-top: 6em; - margin-left: 0.5em; +body.mappage.admin { + .content { + margin-top: 5em; + margin-left: 0; + padding: 0px; + width: 40em; + background: #fff url(/cobrands/zurich/admin-faux-columns.gif) top center repeat-y; + @include box-shadow(0 0 5px rgba(0,0,0,0.5)); + } +} + +.admin-report-edit { + padding: 1em; + width: 50%; + float: right; + font-size: 0.8em; + box-sizing: border-box; + + button, input[type="submit"], .btn { + padding: 0.5em 0.5em 0.3em 0.5em; + text-transform: none; + } + + h2 { + font-family: inherit; + font-size: inherit; + font-weight: bold; + } +} + +.admin-report-edit--details { + label[for="title"], + label[for="detail"] { + display: none; + } + + #title { + margin-top: 1em; + font-weight: bold; + } + + #detail { + margin-bottom: 1em; + } } + .admin { .content { margin: 2em 0 1em; @@ -263,22 +302,48 @@ body.mappage.admin .content { font-weight: bold; padding-right: 0.333em; } + :first-child > label { + // avoid empty space above first label in a container + margin-top: 0; + } + textarea { + min-height: 0; + } + } + + button, input[type=submit], .btn { + &.delete { + font-size: 0.75em; + color: #933; + margin: 2em 0; + + &:hover { + @include background(linear-gradient(#fcc, #daa 50%)); + }; + } } #zurich-footer { margin: 2em auto 3em auto; } + + .message-updated { + color: #060; + font-weight: bold; + position: absolute; + } } .admin-nav-wrapper { background-color: white; padding: 1.5em 0 1em; } + body.mappage .admin-nav-wrapper { box-sizing: border-box; padding-left: 10px; padding-right: 10px; position: fixed; width: 100%; - @include box-shadow(0 0 6px 1px #000); + @include box-shadow(0 0 5px rgba(0,0,0,0.5)); } 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) ]; |