From 21c8fded9bfd34c456f5202bc812408152f3b6cf Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 16 Jan 2015 17:20:30 +0000 Subject: Fix tiny display bug in map sub links navigation. --- web/cobrands/sass/_layout.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/cobrands/sass/_layout.scss b/web/cobrands/sass/_layout.scss index 607734c41..d1cfb6be7 100644 --- a/web/cobrands/sass/_layout.scss +++ b/web/cobrands/sass/_layout.scss @@ -631,8 +631,8 @@ body.twothirdswidthpage { display:block; cursor: pointer; position:absolute; - left:-1em; - width:1em; + left: -0.97em; /* 1em leaves a tiny gap, font issue */ + width: 1em; height:100%; background:#000 url($image-sprite) right -4119px no-repeat; @include border-radius(0.25em 0 0 0.25em); -- cgit v1.2.3 From ec470c609e438892c28c69ba07cf81ea17c74f17 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 16 Jan 2015 17:19:17 +0000 Subject: Add Hybrid map toggle option to Google Maps view. --- templates/web/base/around/display_location.html | 6 ++---- templates/web/base/js/translation_strings.html | 3 +++ templates/web/base/maps/google-ol.html | 10 +++++++++- templates/web/fixmystreet/report/display.html | 7 ------- templates/web/zurich/admin/report_edit-sdm.html | 3 --- templates/web/zurich/admin/report_edit.html | 3 --- templates/web/zurich/maps/zurich.html | 9 +++++++++ templates/web/zurich/reports/index.html | 3 --- web/js/map-google-ol.js | 14 ++++++++++++++ 9 files changed, 37 insertions(+), 21 deletions(-) diff --git a/templates/web/base/around/display_location.html b/templates/web/base/around/display_location.html index dbe7d9ffd..804be9603 100755 --- a/templates/web/base/around/display_location.html +++ b/templates/web/base/around/display_location.html @@ -27,7 +27,7 @@ } ); - PROCESS "maps/${map.type}.html"; + PROCESS "maps/${map.type}.html" around_page = 1; SET bodyclass = 'mappage'; SET rss = [ loc('Recent local problems, FixMyStreet'), rss_url ] IF c.cobrand.moniker != 'emptyhomes'; @@ -53,9 +53,7 @@ [% IF c.cobrand.moniker != 'emptyhomes' %] +[% END %] [% END %] - diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html index 3534572c6..4f4e7a2a6 100644 --- a/templates/web/fixmystreet/report/display.html +++ b/templates/web/fixmystreet/report/display.html @@ -11,13 +11,6 @@ %] [% map_html %] - - [% IF c.cobrand.moniker == 'zurich' %] - - [% END %] - [% IF login_success %] diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html index 5ff031ce2..82bbeba23 100644 --- a/templates/web/zurich/admin/report_edit-sdm.html +++ b/templates/web/zurich/admin/report_edit-sdm.html @@ -7,9 +7,6 @@ -%] [% map_html %] - [% status_message %] diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html index 66a51f162..5376d77f4 100644 --- a/templates/web/zurich/admin/report_edit.html +++ b/templates/web/zurich/admin/report_edit.html @@ -8,9 +8,6 @@ -%] [% map_html %] - [% status_message %] diff --git a/templates/web/zurich/maps/zurich.html b/templates/web/zurich/maps/zurich.html index 492ccc556..46b003530 100644 --- a/templates/web/zurich/maps/zurich.html +++ b/templates/web/zurich/maps/zurich.html @@ -9,6 +9,15 @@ [% END %] +[% map_sub_links = BLOCK %] + Stadtplan +[% END %] + [% map_html = BLOCK %] [% INCLUDE maps/openlayers.html %] +[% UNLESS around_page %] + +[% END %] [% END %] diff --git a/templates/web/zurich/reports/index.html b/templates/web/zurich/reports/index.html index 670746753..0ece1ca2c 100755 --- a/templates/web/zurich/reports/index.html +++ b/templates/web/zurich/reports/index.html @@ -5,9 +5,6 @@ bodyclass = 'mappage'; %] [% map_html %] -
diff --git a/web/js/map-google-ol.js b/web/js/map-google-ol.js index 953765068..5d128a7bd 100644 --- a/web/js/map-google-ol.js +++ b/web/js/map-google-ol.js @@ -1,3 +1,13 @@ +$(function(){ + $('#map_layer_toggle').toggle(function(){ + $(this).text(translation_strings.map_map); + fixmystreet.map.setBaseLayer(fixmystreet.map.layers[1]); + }, function(){ + $(this).text(translation_strings.map_satellite); + fixmystreet.map.setBaseLayer(fixmystreet.map.layers[0]); + }); +}); + function set_map_config(perm) { var permalink_id; if ($('#map_permalink').length) { @@ -15,5 +25,9 @@ function set_map_config(perm) { fixmystreet.map_options = { zoomDuration: 10 }; + fixmystreet.layer_options = [ + {}, + { type: google.maps.MapTypeId.HYBRID } + ]; } -- cgit v1.2.3