From a2ddcd124aa43e5d6fc795019c70a5162c76fae6 Mon Sep 17 00:00:00 2001 From: John Shields Date: Wed, 25 Nov 2020 10:10:36 +0000 Subject: [PATCH] Fix/fis 729 map refresh location search (#159) * FIS-729: Fix map refresh bug from location search. * FIS-729: Fix station page view map button text. Co-authored-by: John Shields --- server/routes/location.js | 9 ++++++++- server/src/js/pages/station.js | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/server/routes/location.js b/server/routes/location.js index 37b5f7057..fb7361466 100644 --- a/server/routes/location.js +++ b/server/routes/location.js @@ -44,7 +44,14 @@ module.exports = { options: { validate: { query: joi.object({ - q: joi.string().trim().max(200).required() + q: joi.string().trim().max(200).required(), + cz: joi.string(), + l: joi.string(), + btn: joi.string(), + ext: joi.string(), + fid: joi.string(), + lyr: joi.string(), + v: joi.string() }), failAction: (request, h, err) => { console.error('Location search error: Invalid or no string input.') diff --git a/server/src/js/pages/station.js b/server/src/js/pages/station.js index c61ecc78e..168cf8a5e 100644 --- a/server/src/js/pages/station.js +++ b/server/src/js/pages/station.js @@ -13,7 +13,7 @@ window.flood.utils.addBrowserBackButton() // Create LiveMap window.flood.maps.createLiveMap('map', { - btnText: 'View on map', + btnText: 'View map', btnClasses: 'defra-button-map-s', layers: 'mv,sh,st', centre: JSON.parse(window.flood.model.station.coordinates).coordinates,