Interactive interface for browsing global, full-resolution satellite imagery
change geosearch to location search
Ed Platoabf6ccccd8c6
diff --git a/config/default/common/features.json b/config/default/common/features.jsonindex e83962a07..ae9e50850 100644--- a/config/default/common/features.json+++ b/config/default/common/features.json@@ -22,7 +22,7 @@"naturalEvents": {"host": "https://eonet.sci.gsfc.nasa.gov/api/v3"},- "geocodeSearch": {+ "locationSearch": {"url": "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/"}},diff --git a/doc/features.md b/doc/features.mdindex a171c9de8..877c56b0b 100644--- a/doc/features.md+++ b/doc/features.md@@ -26,10 +26,10 @@ to disable, set:This feature allows directing users to [Earthdata Search](https://search.earthdata.nasa.gov/) to download the underlying data for layers. For more information see the [Smart Handoffs docs](./smart_handoffs.md). To enable,edit `config/default/common/features.json` and set `"smartHandoffs": true`.-## GeocodeSearch+## Location SearchThis feature uses the [ArcGIS World Geocoding Service](https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm) to find addresses based on input text, coordinates, and by clicking a spot on the map. To enable,-edit `config/default/common/features.json` and set `"geocodeSearch"` object `"url"` to use the ArcGIS request URL used by the [ArcGIS World Geocoding Service](https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm).+edit `config/default/common/features.json` and set `"locationSearch"` object `"url"` to use the ArcGIS request URL used by the [ArcGIS World Geocoding Service](https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm).## URL Shorteningdiff --git a/doc/url_parameters.md b/doc/url_parameters.mdindex b4519b03d..138c84567 100644--- a/doc/url_parameters.md+++ b/doc/url_parameters.md@@ -20,7 +20,7 @@| `ici` | number | **`1`** to **`5`** | The `custom interval` value from 1 to 5* identifies which time unit is changed by the date change arrows and optionally animation. _\*Only active and saved in url if `custom selected` is true._ || `icd` | number | **`1`** to **`999`** | The `custom delta` value for how many `custom interval` time units are added or subtracted when using the date change arrows and optionally animation. _\*Only active and saved in url if `custom selected` is true._ || `e` | string,date | _`event_id,yyyy-mm-dd`_ | If any value is present, the events tab will be activated. If the value is a valid event_id, the corresponding event will be highlighted in the event list. If a date (YYYY-MM-DD) is added to the event_id, then the selected event for the specified date will be shown. |-| `gm` | string | _`coordinates`_ | A pair of coordinates using Decimal Degrees format (`DDD.DDDD,DDD.DDDD`) to add a Geosearch marker onto the map. _\*Only one marker pair of coordinates can be included in the permalink._ |+| `s` | string | _`coordinates`_ | A pair of coordinates using Decimal Degrees format (`DDD.DDDD,DDD.DDDD`) to add a Location Search marker onto the map. _\*Only one marker pair of coordinates can be included in the permalink._ || `ab` | boolean | **`on`** | If set to "on", the animation widget will be shown. || `as` | date | _`YYYY-MM-DDThh:mm:ssZ`_ | The animation start day & time.** || `ae` | date | _`YYYY-MM-DDThh:mm:ssZ`_ | The animation end day & time.** |diff --git a/e2e/features/geosearch/geosearch-mobile-test.js b/e2e/features/geosearch/geosearch-mobile-test.jsdeleted file mode 100644index bea897622..000000000--- a/e2e/features/geosearch/geosearch-mobile-test.js+++ /dev/null@@ -1,30 +0,0 @@-const reuseables = require('../../reuseables/skip-tour.js');-const localSelectors = require('../../reuseables/selectors.js');--const TIME_LIMIT = 10000;--const {- geosearchToolbarButton,- geosearchMobileDialog,-} = localSelectors;--module.exports = {- before(c) {- reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.resizeWindow(375, 667); // iPhone 6/7/8 dimensions- c.pause(300);- },- 'Geosearch mobile dialog is not visible by default': (c) => {- c.waitForElementVisible(geosearchToolbarButton, TIME_LIMIT);- c.expect.element(geosearchMobileDialog).to.not.be.present;- },- 'Clicking geosearch toolbar button opens the geosearch mobile dialog': (c) => {- c.waitForElementVisible(geosearchToolbarButton, TIME_LIMIT);- c.click(geosearchToolbarButton);- c.pause(500);- c.expect.element(geosearchMobileDialog).to.be.present;- },- after(c) {- c.end();- },-};diff --git a/e2e/features/location-search/location-search-mobile-test.js b/e2e/features/location-search/location-search-mobile-test.jsnew file mode 100644index 000000000..589b90a26--- /dev/null+++ b/e2e/features/location-search/location-search-mobile-test.js@@ -0,0 +1,30 @@+const reuseables = require('../../reuseables/skip-tour.js');+const localSelectors = require('../../reuseables/selectors.js');++const TIME_LIMIT = 10000;++const {+ locationSearchToolbarButton,+ locationSearchMobileDialog,+} = localSelectors;++module.exports = {+ before(c) {+ reuseables.loadAndSkipTour(c, TIME_LIMIT);+ c.resizeWindow(375, 667); // iPhone 6/7/8 dimensions+ c.pause(300);+ },+ 'Location Search mobile dialog is not visible by default': (c) => {+ c.waitForElementVisible(locationSearchToolbarButton, TIME_LIMIT);+ c.expect.element(locationSearchMobileDialog).to.not.be.present;+ },+ 'Clicking Location Search toolbar button opens the Location Search mobile dialog': (c) => {+ c.waitForElementVisible(locationSearchToolbarButton, TIME_LIMIT);+ c.click(locationSearchToolbarButton);+ c.pause(500);+ c.expect.element(locationSearchMobileDialog).to.be.present;+ },+ after(c) {+ c.end();+ },+};diff --git a/e2e/features/geosearch/geosearch-test.js b/e2e/features/location-search/location-search-test.jssimilarity index 65%rename from e2e/features/geosearch/geosearch-test.jsrename to e2e/features/location-search/location-search-test.jsindex e9a99717c..03bfc49f8 100644--- a/e2e/features/geosearch/geosearch-test.js+++ b/e2e/features/location-search/location-search-test.js@@ -7,9 +7,9 @@ const testMarkerNoDetailsEncodedID = '.coordinates-map-marker_5__2C__-51__2E__5'const TIME_LIMIT = 10000;const {- geosearchToolbarButton,- geosearchComponent,- geosearchMinimizeButton,+ locationSearchToolbarButton,+ locationSearchComponent,+ locationSearchMinimizeButton,tooltipCoordinatesContainer,tooltipCoordinatesTitle,tooltipCoordinates,@@ -22,28 +22,28 @@ module.exports = {before(c) {reuseables.loadAndSkipTour(c, TIME_LIMIT);},- 'Geosearch component is visible by default': (c) => {- c.waitForElementVisible(geosearchComponent, TIME_LIMIT);- c.expect.element(geosearchComponent).to.be.present;+ 'Location Search component is visible by default': (c) => {+ c.waitForElementVisible(locationSearchComponent, TIME_LIMIT);+ c.expect.element(locationSearchComponent).to.be.present;},- 'Clicking the minimize button minimizes the geosearch component': (c) => {- c.waitForElementVisible(geosearchComponent, TIME_LIMIT);- c.click(geosearchMinimizeButton);+ 'Clicking the minimize button minimizes the Location Search component': (c) => {+ c.waitForElementVisible(locationSearchComponent, TIME_LIMIT);+ c.click(locationSearchMinimizeButton);c.pause(500);- c.expect.element(geosearchComponent).to.not.be.present;+ c.expect.element(locationSearchComponent).to.not.be.present;},- 'Geosearch component remains hidden on subsequent page loads per user preference': (c) => {+ 'Location Search component remains hidden on subsequent page loads per user preference': (c) => {reuseables.loadAndSkipTour(c, TIME_LIMIT);- c.waitForElementVisible(geosearchToolbarButton, TIME_LIMIT);- c.expect.element(geosearchComponent).to.not.be.present;+ c.waitForElementVisible(locationSearchToolbarButton, TIME_LIMIT);+ c.expect.element(locationSearchComponent).to.not.be.present;},- 'Clicking geosearch toolbar button expands the geosearch component': (c) => {- c.click(geosearchToolbarButton);+ 'Clicking Location Search toolbar button expands the Location Search component': (c) => {+ c.click(locationSearchToolbarButton);c.pause(500);- c.expect.element(geosearchComponent).to.be.present;+ c.expect.element(locationSearchComponent).to.be.present;},'Coordinates dialog for permalink marker is visible by default on page load': (c) => {- c.url(`${c.globals.url}?v=-176.3167432493038,-16.70650759975561,-16.988618249303812,108.30938074294103&gm=-77.032,38.8904`);+ c.url(`${c.globals.url}?v=-176.3167432493038,-16.70650759975561,-16.988618249303812,108.30938074294103&s=-77.032,38.8904`);c.waitForElementVisible(tooltipCoordinatesContainer, TIME_LIMIT);c.expect.element(testMarkerEncodedID).to.be.present;},@@ -57,7 +57,7 @@ module.exports = {c.expect.element(tooltipCoordinatesContainer).to.not.be.present;},'Coordinate title for no suggested place results displays correct coordinates instead': (c) => {- c.url(`${c.globals.url}?v=-141.32806305066077,-56.35574752202643,18.000061949339212,60.01695346916299&gm=-51.5,5`);+ c.url(`${c.globals.url}?v=-141.32806305066077,-56.35574752202643,18.000061949339212,60.01695346916299&s=-51.5,5`);c.waitForElementVisible(tooltipCoordinatesContainer, TIME_LIMIT);c.expect.element(testMarkerNoDetailsEncodedID).to.be.present;c.assert.containsText(tooltipCoordinatesTitle, '5.0000°, -51.5000°');@@ -67,12 +67,12 @@ module.exports = {c.click(tooltipCoordinatesCloseButton);c.pause(500);c.expect.element(coordinatesMapMarker).to.not.be.present;- c.assert.not.urlContains('gm');+ c.assert.not.urlContains('s=');},'Invalid marker query string parameter prevents state update': (c) => {- c.url(`${c.globals.url}?gm=-51.5,invalidtext`);+ c.url(`${c.globals.url}?s=-51.5,invalidtext`);c.expect.element(coordinatesMapMarker).to.not.be.present;- c.assert.not.urlContains('gm');+ c.assert.not.urlContains('s=');},after(c) {c.end();diff --git a/e2e/features/ui/distraction-free-mode-test.js b/e2e/features/ui/distraction-free-mode-test.jsindex 2c481c017..607f25d30 100644--- a/e2e/features/ui/distraction-free-mode-test.js+++ b/e2e/features/ui/distraction-free-mode-test.js@@ -2,8 +2,8 @@ const reuseables = require('../../reuseables/skip-tour.js');const localSelectors = require('../../reuseables/selectors.js');const {- geosearchMinimizeButton,- geosearchToolbarButton,+ locationSearchMinimizeButton,+ locationSearchToolbarButton,mapScaleImperial,mapScaleMetric,measureBtn,@@ -21,8 +21,8 @@ module.exports = {before: (c) => {reuseables.loadAndSkipTour(c, TIME_LIMIT);c.url(`${c.globals.url}?p=arctic`);- // ensure geosearch is minimized- c.click(geosearchMinimizeButton);+ // ensure Location Search is minimized+ c.click(locationSearchMinimizeButton);},// verify distraction free mode shortcut hides ui elements@@ -35,7 +35,7 @@ module.exports = {c.waitForElementNotVisible(timelineContainer, TIME_LIMIT);c.waitForElementNotVisible(sidebarContainer, TIME_LIMIT);- c.waitForElementNotVisible(geosearchToolbarButton, TIME_LIMIT);+ c.waitForElementNotVisible(locationSearchToolbarButton, TIME_LIMIT);c.waitForElementNotPresent(shareToolbarButton, TIME_LIMIT);c.waitForElementNotPresent(projToolbarButton, TIME_LIMIT);c.waitForElementNotPresent(snapshotToolbarButton, TIME_LIMIT);@@ -56,7 +56,7 @@ module.exports = {c.waitForElementVisible(timelineContainer, TIME_LIMIT);c.waitForElementVisible(sidebarContainer, TIME_LIMIT);- c.waitForElementVisible(geosearchToolbarButton, TIME_LIMIT);+ c.waitForElementVisible(locationSearchToolbarButton, TIME_LIMIT);c.waitForElementVisible(shareToolbarButton, TIME_LIMIT);c.waitForElementPresent(projToolbarButton, TIME_LIMIT);c.waitForElementPresent(snapshotToolbarButton, TIME_LIMIT);diff --git a/e2e/features/ui/toolbar-test.js b/e2e/features/ui/toolbar-test.jsindex 1acb1cc78..412236902 100644--- a/e2e/features/ui/toolbar-test.js+++ b/e2e/features/ui/toolbar-test.js@@ -2,8 +2,8 @@ const reuseables = require('../../reuseables/skip-tour.js');const localSelectors = require('../../reuseables/selectors.js');const {- geosearchComponent,- geosearchToolbarButton,+ locationSearchComponent,+ locationSearchToolbarButton,measureBtn,projToolbarButton,shareToolbarButton,@@ -17,9 +17,9 @@ module.exports = {reuseables.loadAndSkipTour(c, TIME_LIMIT);},- 'Verify toolbar buttons are visible by default - excluding geosearch': (c) => {- c.expect.element(geosearchComponent).to.be.visible;- c.expect.element(geosearchToolbarButton).to.not.be.visible;+ 'Verify toolbar buttons are visible by default - excluding Location Search': (c) => {+ c.expect.element(locationSearchComponent).to.be.visible;+ c.expect.element(locationSearchToolbarButton).to.not.be.visible;c.expect.element(shareToolbarButton).to.be.visible;c.expect.element(projToolbarButton).to.be.visible;c.expect.element(snapshotToolbarButton).to.be.visible;diff --git a/e2e/reuseables/selectors.js b/e2e/reuseables/selectors.jsindex 3b83e5e8a..59c78f5f2 100644--- a/e2e/reuseables/selectors.js+++ b/e2e/reuseables/selectors.js@@ -144,7 +144,7 @@ module.exports = {mapScaleImperial: '.wv-map-scale-imperial',// ui toolbar- geosearchToolbarButton: '#wv-geosearch-button',+ locationSearchToolbarButton: '#wv-location-search-button',shareToolbarButton: '#wv-link-button',projToolbarButton: '#wv-proj-button',snapshotToolbarButton: '#wv-image-button',@@ -155,10 +155,10 @@ module.exports = {socialCopyLinkButton: '#wv-link-button',socialLinkInput: '#permalink_content',- // geosearch- geosearchComponent: '.geosearch-component',- geosearchMobileDialog: '#toolbar_geosearch_mobile',- geosearchMinimizeButton: '.geosearch-search-minimize-button',+ // Location Search+ locationSearchComponent: '.location-search-component',+ locationSearchMobileDialog: '#toolbar_location_search_mobile',+ locationSearchMinimizeButton: '.location-search-minimize-button',tooltipCoordinatesContainer: '.tooltip-coordinates-container',tooltipCoordinatesTitle: '.tooltip-coordinates-title',tooltipCoordinates: '.tooltip-coordinates',diff --git a/package-lock.json b/package-lock.jsonindex a8042d1f0..3a0e0820d 100644--- a/package-lock.json+++ b/package-lock.json@@ -10327,28 +10327,28 @@"dependencies": {"abbrev": {"version": "1.1.1",- "resolved": "",+ "resolved": false,"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==","dev": true,"optional": true},"ansi-regex": {"version": "2.1.1",- "resolved": "",+ "resolved": false,"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=","dev": true,"optional": true},"aproba": {"version": "1.2.0",- "resolved": "",+ "resolved": false,"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==","dev": true,"optional": true},"are-we-there-yet": {"version": "1.1.5",- "resolved": "",+ "resolved": false,"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==","dev": true,"optional": true,@@ -10359,14 +10359,14 @@},"balanced-match": {"version": "1.0.0",- "resolved": "",+ "resolved": false,"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=","dev": true,"optional": true},"brace-expansion": {"version": "1.1.11",- "resolved": "",+ "resolved": false,"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==","dev": true,"optional": true,@@ -10377,28 +10377,28 @@},"code-point-at": {"version": "1.1.0",- "resolved": "",+ "resolved": false,"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=","dev": true,"optional": true},"concat-map": {"version": "0.0.1",- "resolved": "",+ "resolved": false,"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=","dev": true,"optional": true},"console-control-strings": {"version": "1.1.0",- "resolved": "",+ "resolved": false,"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=","dev": true,"optional": true},"core-util-is": {"version": "1.0.2",- "resolved": "",+ "resolved": false,"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=","dev": true,"optional": true@@ -10415,35 +10415,35 @@},"deep-extend": {"version": "0.6.0",- "resolved": "",+ "resolved": false,"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==","dev": true,"optional": true},"delegates": {"version": "1.0.0",- "resolved": "",+ "resolved": false,"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=","dev": true,"optional": true},"detect-libc": {"version": "1.0.3",- "resolved": "",+ "resolved": false,"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=","dev": true,"optional": true},"fs.realpath": {"version": "1.0.0",- "resolved": "",+ "resolved": false,"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=","dev": true,"optional": true},"gauge": {"version": "2.7.4",- "resolved": "",+ "resolved": false,"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=","dev": true,"optional": true,@@ -10475,14 +10475,14 @@},"has-unicode": {"version": "2.0.1",- "resolved": "",+ "resolved": false,"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=","dev": true,"optional": true},"iconv-lite": {"version": "0.4.24",- "resolved": "",+ "resolved": false,"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==","dev": true,"optional": true,@@ -10502,7 +10502,7 @@},"inflight": {"version": "1.0.6",- "resolved": "",+ "resolved": false,"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=","dev": true,"optional": true,@@ -10520,14 +10520,14 @@},"ini": {"version": "1.3.5",- "resolved": "",+ "resolved": false,"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==","dev": true,"optional": true},"is-fullwidth-code-point": {"version": "1.0.0",- "resolved": "",+ "resolved": false,"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=","dev": true,"optional": true,@@ -10537,14 +10537,14 @@},"isarray": {"version": "1.0.0",- "resolved": "",+ "resolved": false,"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=","dev": true,"optional": true},"minimatch": {"version": "3.0.4",- "resolved": "",+ "resolved": false,"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==","dev": true,"optional": true,@@ -10638,7 +10638,7 @@},"npmlog": {"version": "4.1.2",- "resolved": "",+ "resolved": false,"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==","dev": true,"optional": true,@@ -10651,21 +10651,21 @@},"number-is-nan": {"version": "1.0.1",- "resolved": "",+ "resolved": false,"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=","dev": true,"optional": true},"object-assign": {"version": "4.1.1",- "resolved": "",+ "resolved": false,"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=","dev": true,"optional": true},"once": {"version": "1.4.0",- "resolved": "",+ "resolved": false,"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=","dev": true,"optional": true,@@ -10675,21 +10675,21 @@},"os-homedir": {"version": "1.0.2",- "resolved": "",+ "resolved": false,"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=","dev": true,"optional": true},"os-tmpdir": {"version": "1.0.2",- "resolved": "",+ "resolved": false,"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=","dev": true,"optional": true},"osenv": {"version": "0.1.5",- "resolved": "",+ "resolved": false,"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==","dev": true,"optional": true,@@ -10700,7 +10700,7 @@},"path-is-absolute": {"version": "1.0.1",- "resolved": "",+ "resolved": false,"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=","dev": true,"optional": true@@ -10714,7 +10714,7 @@},"rc": {"version": "1.2.8",- "resolved": "",+ "resolved": false,"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==","dev": true,"optional": true,@@ -10762,21 +10762,21 @@},"safe-buffer": {"version": "5.1.2",- "resolved": "",+ "resolved": false,"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==","dev": true,"optional": true},"safer-buffer": {"version": "2.1.2",- "resolved": "",+ "resolved": false,"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==","dev": true,"optional": true},"sax": {"version": "1.2.4",- "resolved": "",+ "resolved": false,"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==","dev": true,"optional": true@@ -10790,21 +10790,21 @@},"set-blocking": {"version": "2.0.0",- "resolved": "",+ "resolved": false,"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=","dev": true,"optional": true},"signal-exit": {"version": "3.0.2",- "resolved": "",+ "resolved": false,"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=","dev": true,"optional": true},"string-width": {"version": "1.0.2",- "resolved": "",+ "resolved": false,"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=","dev": true,"optional": true,@@ -10816,7 +10816,7 @@},"string_decoder": {"version": "1.1.1",- "resolved": "",+ "resolved": false,"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==","dev": true,"optional": true,@@ -10826,7 +10826,7 @@},"strip-ansi": {"version": "3.0.1",- "resolved": "",+ "resolved": false,"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=","dev": true,"optional": true,@@ -10836,7 +10836,7 @@},"strip-json-comments": {"version": "2.0.1",- "resolved": "",+ "resolved": false,"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=","dev": true,"optional": true@@ -10859,14 +10859,14 @@},"util-deprecate": {"version": "1.0.2",- "resolved": "",+ "resolved": false,"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=","dev": true,"optional": true},"wide-align": {"version": "1.1.3",- "resolved": "",+ "resolved": false,"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==","dev": true,"optional": true,@@ -10876,7 +10876,7 @@},"wrappy": {"version": "1.0.2",- "resolved": "",+ "resolved": false,"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=","dev": true,"optional": truediff --git a/web/css/geosearch.css b/web/css/location-search.csssimilarity index 73%rename from web/css/geosearch.cssrename to web/css/location-search.cssindex 553347922..e37d04811 100644--- a/web/css/geosearch.css+++ b/web/css/location-search.css@@ -1,9 +1,9 @@/* Autocomplete Input */-.geosearch-search-input-group {+.location-search-input-group {flex-wrap: nowrap;}-.geosearch-autocomplete {+.location-search-autocomplete {height: 38px;padding: 0 5px;border-radius: 0;@@ -13,19 +13,19 @@}}-.geosearch-autocomplete,-.geosearch-autocomplete:focus {+.location-search-autocomplete,+.location-search-autocomplete:focus {background: none;color: #fff;box-shadow: none;}-.geosearch-results-menu {+.location-search-results-menu {position: absolute;width: 85%;}-.geosearch-item {+.location-search-item {word-wrap: break-word;padding: 5px 0 5px 7px;color: #333;@@ -35,15 +35,15 @@}/* Autocomplete Input Submit Button */-.geosearch-input-group-addon {+.location-search-input-group-addon {height: 38px;position: absolute;top: 0;right: 62px;margin-right: 0;background: none;- & .geosearch-search-submit-button,- & .geosearch-search-clear-button {+ & .location-search-submit-button,+ & .location-search-clear-button {background: none;border: none;color: #999;@@ -66,7 +66,7 @@&.submit-group {right: 31px;}- & .geosearch-search-clear-button {+ & .location-search-clear-button {cursor: pointer;color: #fff;position: absolute;@@ -87,8 +87,8 @@}}-/* Geosearch Component */-.geosearch-component {+/* Location Search Component */+.location-search-component {position: absolute;right: 182px;top: 10px;@@ -99,8 +99,8 @@z-index: 1;}-/* Geosearch Component Coordinate Buttons */-.geosearch-add-coordinate-button {+/* Location Search Component Coordinate Buttons */+.location-search-add-coordinate-button {border-radius: 0;border-top-right-radius: 5px;border-bottom-right-radius: 5px;@@ -115,8 +115,8 @@}}-/* Geosearch Component Minimize Button */-.geosearch-search-minimize-button {+/* Location Search Component Minimize Button */+.location-search-minimize-button {background: rgba(40, 40, 40, 0.15);width: 21px;margin-right: 2px;@@ -138,7 +138,7 @@}}-.geosearch-search-minimize-button-chevron {+.location-search-minimize-button-chevron {position: absolute;background: url('../images/icon-sprite.svg') -201px -5px no-repeat;-webkit-box-sizing: border-box;@@ -158,50 +158,50 @@z-index: 1;}-.geosearch-input-alert-icon {+.location-search-input-alert-icon {right: 120px;}-.geosearch-input-clear-container {+.location-search-input-clear-container {right: 62px;}/* Mobile Styling */@media only screen and (max-width: 768px) {- .geosearch-component {+ .location-search-component {position: static;width: 100%;}- .geosearch-input-container {+ .location-search-input-container {width: 100%;}- .geosearch-input-clear-container {+ .location-search-input-clear-container {right: 70px;}- .geosearch-input-alert-icon {+ .location-search-input-alert-icon {right: 135px;}- .geosearch-autocomplete {+ .location-search-autocomplete {font-size: 16px;&::placeholder {font-size: 14px;}}- .geosearch-results-menu {+ .location-search-results-menu {width: 100%;}- .geosearch-item {+ .location-search-item {padding: 8px 0 8px 7px;line-height: 16px;font-size: 16px;}- .geosearch-input-group-addon {+ .location-search-input-group-addon {margin-right: 6px;background: none;- & .geosearch-search-submit-button {+ & .location-search-submit-button {border-left: none;}- & .geosearch-search-clear-button {+ & .location-search-clear-button {background: #3b3b3b;}}diff --git a/web/css/toolbar.css b/web/css/toolbar.cssindex 992cdb743..662ea2551 100644--- a/web/css/toolbar.css+++ b/web/css/toolbar.css@@ -130,8 +130,8 @@width: 100%;}-/* Geosearch Mobile Modal */-.toolbar-geosearch-modal {+/* Location Search Mobile Modal */+.toolbar-location-search-modal {top: 100px;left: 0;right: 0;@@ -139,8 +139,8 @@margin-right: auto;}-.toolbar-geosearch-modal,-.toolbar-geosearch-modal .modal-content {+.toolbar-location-search-modal,+.toolbar-location-search-modal .modal-content {width: 100%;}@@ -149,7 +149,7 @@top: 33px;}- .toolbar-geosearch-modal {+ .toolbar-location-search-modal {top: 84px;}diff --git a/web/css/tooltip.css b/web/css/tooltip.cssindex 24ba907b6..a2a9127d7 100644--- a/web/css/tooltip.css+++ b/web/css/tooltip.css@@ -88,7 +88,7 @@font-weight: 300;}-/* Tooltip Custom - Measurement Tool, Geosearch Coordinates */+/* Tooltip Custom - Measurement Tool, Location Search Coordinates */.tooltip-custom-black {position: relative;font-weight: 500;diff --git a/web/js/app.js b/web/js/app.jsindex 0e22f8d6b..060b62596 100644--- a/web/js/app.js+++ b/web/js/app.js@@ -15,8 +15,8 @@ import Toolbar from './containers/toolbar';import Sidebar from './containers/sidebar/sidebar';// Modalimport Modal from './containers/modal';-// Geosearch-import Geosearch from './components/geosearch/geosearch';+// Location Search+import LocationSearch from './components/location-search/location-search';// Other/MISCimport Brand from './brand';@@ -83,7 +83,7 @@ import '../css/geostationary-modal.css';import '../css/orbitTracks.css';import '../css/facets.css';import '../css/recent-layers.css';-import '../css/geosearch.css';+import '../css/location-search.css';import '../pages/css/document.css';require('@elastic/react-search-ui-views/lib/styles/styles.css');@@ -172,7 +172,7 @@ class App extends React.Component {} = this.props;return (<div className="wv-content" id="wv-content" data-role="content">- {!isMobile && <Geosearch />}+ {!isMobile && <LocationSearch />}<Toolbar /><MapInteractions /><div id="wv-alert-container" className="wv-alert-container">diff --git a/web/js/components/geosearch/coordinates-dialog.js b/web/js/components/location-search/coordinates-dialog.jssimilarity index 100%rename from web/js/components/geosearch/coordinates-dialog.jsrename to web/js/components/location-search/coordinates-dialog.jsdiff --git a/web/js/components/geosearch/copy-tooltip.js b/web/js/components/location-search/copy-tooltip.jssimilarity index 100%rename from web/js/components/geosearch/copy-tooltip.jsrename to web/js/components/location-search/copy-tooltip.jsdiff --git a/web/js/components/geosearch/geosearch-input.js b/web/js/components/location-search/location-search-input.jssimilarity index 86%rename from web/js/components/geosearch/geosearch-input.jsrename to web/js/components/location-search/location-search-input.jsindex 0290f3cd2..f8af9c2b1 100644--- a/web/js/components/geosearch/geosearch-input.js+++ b/web/js/components/location-search/location-search-input.js@@ -9,23 +9,23 @@ class SearchBox extends Component {constructor(props) {super(props);this.highlightedItem = null;- this.geosearchInput = null;+ this.locationSearchInput = null;}componentDidMount() {const {- geosearchMobileModalOpen,+ locationSearchMobileModalOpen,preventInputFocus,suggestions,} = this.props;// timeout necessary to trigger input focus- if (!preventInputFocus || geosearchMobileModalOpen) {+ if (!preventInputFocus || locationSearchMobileModalOpen) {setTimeout(() => {- if (this.geosearchInput) {- this.geosearchInput.focus();+ if (this.locationSearchInput) {+ this.locationSearchInput.focus();// handle hide results menu when expanding with pending suggestionsif (suggestions.length > 0) {- this.geosearchInput.setState({ isOpen: false });+ this.locationSearchInput.setState({ isOpen: false });}}}, 1);@@ -73,7 +73,7 @@ class SearchBox extends Component {// render search result menu item containerrenderMenu = (children) => (- <div className="geosearch-results-menu">+ <div className="location-search-results-menu">{children}</div>)@@ -85,7 +85,7 @@ class SearchBox extends Component {}return (<div- className="geosearch-item highlighted-render-item"+ className="location-search-item highlighted-render-item"style={{background: isHighlighted ? '#0070c8' : '#fff',color: isHighlighted ? '#fff' : '#000',@@ -102,7 +102,7 @@ class SearchBox extends Component {const {inputValue, isMobile,} = this.props;- const buttonId = 'geosearch-search-submit-button';+ const buttonId = 'location-search-submit-button';const labelText = 'Submit and navigate to location';const buttonStyle = inputValue? { background: isMobile ? '#d54e21' : 'none', color: isMobile ? '#fff' : '#d54e21', cursor: 'pointer' }@@ -111,7 +111,7 @@ class SearchBox extends Component {return (<InputGroupAddon- className="geosearch-input-group-addon submit-group"+ className="location-search-input-group-addon submit-group"addonType="prepend"><Button@@ -146,7 +146,7 @@ class SearchBox extends Component {return (activeAlert && (<InputGroupAddon- className="geosearch-input-group-addon geosearch-input-alert-icon"+ className="location-search-input-group-addon location-search-input-alert-icon"addonType="append"title="The entered location is not available.">@@ -161,14 +161,14 @@ class SearchBox extends Component {const {inputValue, isMobile, clearInput,} = this.props;- const buttonId = 'geosearch-search-clear-button';+ const buttonId = 'location-search-clear-button';const labelText = 'Clear search text';const tooltipVisibilityCondition = inputValue && !isMobile;return (inputValue && (<InputGroupAddon- className="geosearch-input-group-addon geosearch-input-clear-container"+ className="location-search-input-group-addon location-search-input-clear-container"addonType="append"><Button@@ -228,14 +228,14 @@ class SearchBox extends Component {: 'Search for places or enter coordinates';return (<div- className="geosearch-input-container"+ className="location-search-input-container"onKeyPress={this.handleKeyPress}><Autocomplete- ref={(el) => { this.geosearchInput = el; }}+ ref={(el) => { this.locationSearchInput = el; }}inputProps={{- className: 'form-control geosearch-autocomplete',- id: 'geosearch-autocomplete',+ className: 'form-control location-search-autocomplete',+ id: 'location-search-autocomplete',placeholder: placeHolderText,}}wrapperStyle={this.getWrapperStyle()}@@ -259,7 +259,7 @@ SearchBox.propTypes = {activeAlert: PropTypes.bool,clearInput: PropTypes.func,coordinatesPending: PropTypes.array,- geosearchMobileModalOpen: PropTypes.bool,+ locationSearchMobileModalOpen: PropTypes.bool,inputValue: PropTypes.string,isMobile: PropTypes.bool,preventInputFocus: PropTypes.bool,diff --git a/web/js/components/geosearch/geosearch-modal.js b/web/js/components/location-search/location-search-modal.jssimilarity index 89%rename from web/js/components/geosearch/geosearch-modal.jsrename to web/js/components/location-search/location-search-modal.jsindex 0ae623c36..2b29a4387 100644--- a/web/js/components/geosearch/geosearch-modal.js+++ b/web/js/components/location-search/location-search-modal.js@@ -10,7 +10,7 @@ import {} from 'lodash';import googleTagManager from 'googleTagManager';import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';-import SearchBox from './geosearch-input';+import SearchBox from './location-search-input';import Alert from '../util/alert';import { getCoordinateFixedPrecision, isValidCoordinates } from './util';import {@@ -19,17 +19,17 @@ import {setPlaceMarker,setSuggestion,toggleReverseGeocodeActive,- toggleShowGeosearch,-} from '../../modules/geosearch/actions';+ toggleShowLocationSearch,+} from '../../modules/location-search/actions';import {areCoordinatesWithinExtent,-} from '../../modules/geosearch/util';+} from '../../modules/location-search/util';import {processMagicKey,reverseGeocode,-} from '../../modules/geosearch/util-api';+} from '../../modules/location-search/util-api';-class GeosearchModal extends Component {+class LocationSearchModal extends Component {constructor(props) {super(props);this.state = {@@ -150,7 +150,7 @@ class GeosearchModal extends Component {} = item;googleTagManager.pushEvent({- event: 'geosearch_selected_suggested_menu_item',+ event: 'location_search_selected_suggested_menu_item',});processMagicKey(magicKey).then((result) => {if (lodashGet(result, 'candidates[0]')) {@@ -227,7 +227,7 @@ class GeosearchModal extends Component {});updateValue('');googleTagManager.pushEvent({- event: 'geosearch_reverse_geocode',+ event: 'location_search_reverse_geocode',});}@@ -256,10 +256,10 @@ class GeosearchModal extends Component {return showReverseGeocodeAlert && (<Alert- id="geosearch-select-coordinates-alert"+ id="location-search-select-coordinates-alert"isOpenicon="map-marker-alt"- title="Geosearch Select Coordinates"+ title="Location Search Select Coordinates"timeout={6000}message={message}onDismiss={this.dismissReverseGeocodeAlert}@@ -276,7 +276,7 @@ class GeosearchModal extends Component {return showExtentAlert && (<Alert- id="geosearch-select-coordinates-extent-alert"+ id="location-search-select-coordinates-extent-alert"isOpentitle="Selected Coordinates Outside Current Map Projection"timeout={12000}@@ -295,7 +295,7 @@ class GeosearchModal extends Component {return showNoSuggestionsAlert && (<Alert- id="geosearch-no-suggestions-available-alert"+ id="location-search-no-suggestions-available-alert"isOpentitle="No suggested places are available"timeout={12000}@@ -305,17 +305,17 @@ class GeosearchModal extends Component {);}- // render geosearch component minimize button (not visible in mobile)+ // render Location Search component minimize button (not visible in mobile)renderMinimizeButton = () => {- const { toggleShowGeosearch } = this.props;- const buttonId = 'geosearch-search-minimize-button';- const labelText = 'Hide Geosearch';+ const { toggleShowLocationSearch } = this.props;+ const buttonId = 'location-search-minimize-button';+ const labelText = 'Hide Location Search';return (<InputGroupAddon addonType="prepend"><Buttonid={buttonId}className={buttonId}- onClick={toggleShowGeosearch}+ onClick={toggleShowLocationSearch}>{this.renderTooltip(buttonId, labelText)}<div className={`${buttonId}-chevron`} />@@ -326,7 +326,7 @@ class GeosearchModal extends Component {// render add coordinate marker button for reverse geocoderenderAddCoordinateButton = () => {- const buttonId = 'geosearch-add-coordinate-button';+ const buttonId = 'location-search-add-coordinate-button';const labelText = 'Add marker on map';return (@@ -347,7 +347,7 @@ class GeosearchModal extends Component {render() {const {coordinatesPending,- geosearchMobileModalOpen,+ locationSearchMobileModalOpen,inputValue,isMobile,preventInputFocus,@@ -363,14 +363,14 @@ class GeosearchModal extends Component {{this.renderReverseGeocodeAlert()}{this.renderNoSuggestionsAlert()}{this.renderExtentAlert()}- <div className="geosearch-component">- <InputGroup className="geosearch-search-input-group">+ <div className="location-search-component">+ <InputGroup className="location-search-input-group">{/* Minimize button not visible in mobile */}{!isMobile && this.renderMinimizeButton()}<SearchBoxclearInput={this.clearInput}coordinatesPending={coordinatesPending}- geosearchMobileModalOpen={geosearchMobileModalOpen}+ locationSearchMobileModalOpen={locationSearchMobileModalOpen}inputValue={inputValue}isMobile={isMobile}preventInputFocus={preventInputFocus}@@ -396,16 +396,16 @@ const mapStateToProps = (state) => {lastAction,map,modal,- geosearch,+ locationSearch,} = state;const {coordinates,isCoordinateSearchActive,suggestions,suggestedPlace,- } = geosearch;+ } = locationSearch;const isMobile = browser.lessThan.medium;- const geosearchMobileModalOpen = modal.isOpen && modal.id === 'TOOLBAR_GEOSEARCH_MOBILE';+ const locationSearchMobileModalOpen = modal.isOpen && modal.id === 'TOOLBAR_LOCATION_SEARCH_MOBILE';// Collapse when image download, GIF, measure tool, or distraction free mode is activeconst measureToggledOff = lastAction.type === 'MEASURE/TOGGLE_MEASURE_ACTIVE' && lastAction.value === false;const distractionFreeModeToggledOff = lastAction.type === 'UI/TOGGLE_DISTRACTION_FREE_MODE';@@ -414,7 +414,7 @@ const mapStateToProps = (state) => {return {preventInputFocus,coordinates,- geosearchMobileModalOpen,+ locationSearchMobileModalOpen,isCoordinatePairWithinExtent: (targetCoordinates) => areCoordinatesWithinExtent(map, config, targetCoordinates),isCoordinateSearchActive,isMobile,@@ -432,8 +432,8 @@ const mapDispatchToProps = (dispatch) => ({toggleReverseGeocodeActive: (isActive) => {dispatch(toggleReverseGeocodeActive(isActive));},- toggleShowGeosearch: () => {- dispatch(toggleShowGeosearch());+ toggleShowLocationSearch: () => {+ dispatch(toggleShowLocationSearch());},getSuggestions: (val) => {dispatch(getSuggestions(val));@@ -446,11 +446,11 @@ const mapDispatchToProps = (dispatch) => ({},});-GeosearchModal.propTypes = {+LocationSearchModal.propTypes = {clearSuggestions: PropTypes.func,coordinates: PropTypes.array,coordinatesPending: PropTypes.array,- geosearchMobileModalOpen: PropTypes.bool,+ locationSearchMobileModalOpen: PropTypes.bool,getSuggestions: PropTypes.func,inputValue: PropTypes.string,isCoordinatePairWithinExtent: PropTypes.func,@@ -464,7 +464,7 @@ GeosearchModal.propTypes = {suggestions: PropTypes.array,suggestedPlace: PropTypes.array,toggleReverseGeocodeActive: PropTypes.func,- toggleShowGeosearch: PropTypes.func,+ toggleShowLocationSearch: PropTypes.func,updatePendingCoordinates: PropTypes.func,updateValue: PropTypes.func,};@@ -472,4 +472,4 @@ GeosearchModal.propTypes = {export default connect(mapStateToProps,mapDispatchToProps,-)(GeosearchModal);+)(LocationSearchModal);diff --git a/web/js/components/geosearch/geosearch.js b/web/js/components/location-search/location-search.jssimilarity index 76%rename from web/js/components/geosearch/geosearch.jsrename to web/js/components/location-search/location-search.jsindex 8013e232e..35aa81964 100644--- a/web/js/components/geosearch/geosearch.js+++ b/web/js/components/location-search/location-search.js@@ -1,13 +1,13 @@import React, { Component } from 'react';import PropTypes from 'prop-types';import { connect } from 'react-redux';-import GeosearchModal from './geosearch-modal';+import LocationSearchModal from './location-search-modal';import {- toggleShowGeosearch,-} from '../../modules/geosearch/actions';-import { isGeosearchFeatureEnabled } from '../../modules/geosearch/util';+ toggleShowLocationSearch,+} from '../../modules/location-search/actions';+import { isLocationSearchFeatureEnabled } from '../../modules/location-search/util';-class Geosearch extends Component {+class LocationSearch extends Component {constructor(props) {super(props);this.state = {@@ -17,9 +17,9 @@ class Geosearch extends Component {}componentDidUpdate(prevProps) {- const { isExpanded, isMobile, toggleShowGeosearch } = this.props;+ const { isExpanded, isMobile, toggleShowLocationSearch } = this.props;if (isExpanded && prevProps.isMobile !== isMobile) {- toggleShowGeosearch();+ toggleShowLocationSearch();}}@@ -36,7 +36,7 @@ class Geosearch extends Component {} = this.state;return (- <GeosearchModal+ <LocationSearchModalcoordinatesPending={coordinatesPending}inputValue={inputValue}updatePendingCoordinates={this.updatePendingCoordinates}@@ -72,14 +72,14 @@ const mapStateToProps = (state) => {modal,measure,animation,- geosearch,+ locationSearch,ui,} = state;- const isFeatureEnabled = isGeosearchFeatureEnabled(config);+ const isFeatureEnabled = isLocationSearchFeatureEnabled(config);const { gifActive } = animation;const {isExpanded,- } = geosearch;+ } = locationSearch;const { isDistractionFreeModeActive } = ui;const isMobile = browser.lessThan.medium;const snapshotModalOpen = modal.isOpen && modal.id === 'TOOLBAR_SNAPSHOT';@@ -95,20 +95,20 @@ const mapStateToProps = (state) => {};const mapDispatchToProps = (dispatch) => ({- toggleShowGeosearch: () => {- dispatch(toggleShowGeosearch());+ toggleShowLocationSearch: () => {+ dispatch(toggleShowLocationSearch());},});-Geosearch.propTypes = {+LocationSearch.propTypes = {isExpanded: PropTypes.bool,isFeatureEnabled: PropTypes.bool,isMobile: PropTypes.bool,shouldCollapseFromOtherUI: PropTypes.bool,- toggleShowGeosearch: PropTypes.func,+ toggleShowLocationSearch: PropTypes.func,};export default connect(mapStateToProps,mapDispatchToProps,-)(Geosearch);+)(LocationSearch);diff --git a/web/js/components/geosearch/ol-coordinates-marker-util.js b/web/js/components/location-search/ol-coordinates-marker-util.jssimilarity index 100%rename from web/js/components/geosearch/ol-coordinates-marker-util.jsrename to web/js/components/location-search/ol-coordinates-marker-util.jsdiff --git a/web/js/components/geosearch/ol-coordinates-marker.js b/web/js/components/location-search/ol-coordinates-marker.jssimilarity index 92%rename from web/js/components/geosearch/ol-coordinates-marker.jsrename to web/js/components/location-search/ol-coordinates-marker.jsindex 8498e7b11..3a876fc64 100644--- a/web/js/components/geosearch/ol-coordinates-marker.js+++ b/web/js/components/location-search/ol-coordinates-marker.js@@ -10,9 +10,9 @@ import { changeCursor as changeCursorActionCreator } from '../../modules/map/actimport { isCoordinatesDialogAvailableAtPixel } from './ol-coordinates-marker-util';import {setPlaceMarker, toggleDialogVisible, toggleReverseGeocodeActive,-} from '../../modules/geosearch/actions';-import { areCoordinatesWithinExtent } from '../../modules/geosearch/util';-import { reverseGeocode } from '../../modules/geosearch/util-api';+} from '../../modules/location-search/actions';+import { areCoordinatesWithinExtent } from '../../modules/location-search/util';+import { reverseGeocode } from '../../modules/location-search/util-api';import { getCoordinateFixedPrecision } from './util';import util from '../../util/util';@@ -133,12 +133,12 @@ export class CoordinatesMarker extends Component {}}- // render geosearch extent alert for selecting points outside of the current map extent+ // render Location Search extent alert for selecting points outside of the current map extentrenderExtentAlert = () => {const message = 'The selected coordinates are outside of the current map extent. Select a new point or try a different projection.';return (<Alert- id="ol-coordinates-geosearch-select-coordinates-extent-alert"+ id="ol-coordinates-location-search-select-coordinates-extent-alert"isOpentitle="Selected Coordinates Outside Current Map Projection"timeout={15000}@@ -160,9 +160,9 @@ function mapStateToProps(state) {config,map,measure,- geosearch,+ locationSearch,} = state;- const { coordinates, isCoordinateSearchActive } = geosearch;+ const { coordinates, isCoordinateSearchActive } = locationSearch;const isMobile = browser.lessThan.medium;return {diff --git a/web/js/components/geosearch/util.js b/web/js/components/location-search/util.jssimilarity index 100%rename from web/js/components/geosearch/util.jsrename to web/js/components/location-search/util.jsdiff --git a/web/js/containers/image-download.js b/web/js/containers/image-download.jsindex bcfc0f153..9d5f19612 100644--- a/web/js/containers/image-download.js+++ b/web/js/containers/image-download.js@@ -157,7 +157,7 @@ function mapStateToProps(state) {config,proj,browser,- geosearch,+ locationSearch,map,imageDownload,} = state;@@ -165,7 +165,7 @@ function mapStateToProps(state) {isWorldfile, fileType, resolution, boundaries,} = imageDownload;const { screenWidth, screenHeight } = browser;- const markerCoordinates = geosearch.coordinates;+ const markerCoordinates = locationSearch.coordinates;const activeLayers = getActiveLayers(state);const hasSubdailyLayers = hasSubDailySelector(activeLayers);let url = DEFAULT_URL;diff --git a/web/js/containers/map-interactions/map-interactions.js b/web/js/containers/map-interactions/map-interactions.jsindex a1aeeb8e7..097bd8a47 100644--- a/web/js/containers/map-interactions/map-interactions.js+++ b/web/js/containers/map-interactions/map-interactions.js@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';import OlCoordinates from '../../components/map/ol-coordinates';import OlVectorInteractions from './ol-vector-interactions';import OlMeasureTool from '../../components/map/ol-measure-tool';-import OlCoordinatesMarker from '../../components/geosearch/ol-coordinates-marker';+import OlCoordinatesMarker from '../../components/location-search/ol-coordinates-marker';import OlRotationButtons from '../../components/map/rotation';import OlZoomButtons from '../../components/map/zoom';@@ -40,10 +40,10 @@ class MapInteractions extends PureComponent {}function mapStateToProps(state) {const {- config, geosearch, map, ui,+ config, locationSearch, map, ui,} = state;const { isDistractionFreeModeActive } = ui;- const { isCoordinateSearchActive } = geosearch;+ const { isCoordinateSearchActive } = locationSearch;return {config,isShowingClick: map.isClickable,diff --git a/web/js/containers/toolbar.js b/web/js/containers/toolbar.jsindex 34309b1b2..cfbc32b6a 100644--- a/web/js/containers/toolbar.js+++ b/web/js/containers/toolbar.js@@ -29,9 +29,9 @@ import { clearGraticule, refreshGraticule } from '../modules/layers/actions';import { notificationWarnings } from '../modules/image-download/constants';import Notify from '../components/image-download/notify';import { hasCustomPaletteInActiveProjection } from '../modules/palettes/util';-import Geosearch from '../components/geosearch/geosearch';-import { toggleShowGeosearch, toggleDialogVisible } from '../modules/geosearch/actions';-import { isGeosearchFeatureEnabled } from '../modules/geosearch/util';+import LocationSearch from '../components/location-search/location-search';+import { toggleShowLocationSearch, toggleDialogVisible } from '../modules/location-search/actions';+import { isLocationSearchFeatureEnabled } from '../modules/location-search/util';import { getAllActiveLayers } from '../modules/layers/selectors';@@ -73,13 +73,13 @@ const CUSTOM_MODAL_PROPS = {desktopOnly: true,clickableBehindModal: true,},- TOOLBAR_GEOSEARCH_MOBILE: {+ TOOLBAR_LOCATION_SEARCH_MOBILE: {backdrop: false,- bodyComponent: Geosearch,+ bodyComponent: LocationSearch,clickableBehindModal: true,headerText: 'Search for places',mobileOnly: true,- modalClassName: 'toolbar-geosearch-modal toolbar-modal toolbar-medium-modal',+ modalClassName: 'toolbar-location-search-modal toolbar-modal toolbar-medium-modal',type: 'toolbar',wrapClassName: 'toolbar_modal_outer',},@@ -210,33 +210,33 @@ class toolbarContainer extends Component {);}- // handle rendering of geosearch button 1) visibility and 2) control of click (mobile vs desktop)- renderGeosearchButtonComponent = () => {+ // handle rendering of Location Search button 1) visibility and 2) control of click (mobile vs desktop)+ renderLocationSearchButtonComponent = () => {const {config,faSize,isDistractionFreeModeActive,- isGeosearchExpanded,+ isLocationSearchExpanded,isMobile,openModal,shouldBeCollapsed,- toggleShowGeosearch,+ toggleShowLocationSearch,} = this.props;- const isFeatureEnabled = isGeosearchFeatureEnabled(config);- // do not render if geosearch feature isn't enabled+ const isFeatureEnabled = isLocationSearchFeatureEnabled(config);+ // do not render if Location Search feature isn't enabledif (!isFeatureEnabled) {return null;}- const buttonId = 'wv-geosearch-button';+ const buttonId = 'wv-location-search-button';const labelText = 'Search places by location';const handleButtonClick = isMobile? () => openModal(- 'TOOLBAR_GEOSEARCH_MOBILE',- CUSTOM_MODAL_PROPS.TOOLBAR_GEOSEARCH_MOBILE,+ 'TOOLBAR_LOCATION_SEARCH_MOBILE',+ CUSTOM_MODAL_PROPS.TOOLBAR_LOCATION_SEARCH_MOBILE,)- : () => toggleShowGeosearch();+ : () => toggleShowLocationSearch();- const buttonDisplayConditions = isMobile || (!isMobile && !isGeosearchExpanded) || shouldBeCollapsed;+ const buttonDisplayConditions = isMobile || (!isMobile && !isLocationSearchExpanded) || shouldBeCollapsed;return (<Buttonstyle={{@@ -326,7 +326,7 @@ class toolbarContainer extends Component {id="wv-toolbar"className="wv-toolbar">- {this.renderGeosearchButtonComponent()}+ {this.renderLocationSearchButtonComponent()}{this.renderShareButton()}{this.renderProjectionButton()}{this.renderSnapshotsButton()}@@ -339,7 +339,7 @@ class toolbarContainer extends Component {const mapStateToProps = (state) => {const {- animation, browser, notifications, palettes, compare, map, measure, modal, ui, geosearch,+ animation, browser, notifications, palettes, compare, map, measure, modal, ui, locationSearch,} = state;const { isDistractionFreeModeActive } = ui;const { number, type } = notifications;@@ -348,7 +348,7 @@ const mapStateToProps = (state) => {const isMobile = browser.lessThan.medium;const faSize = isMobile ? '2x' : '1x';const isCompareActive = compare.active;- const isGeosearchExpanded = geosearch.isExpanded;+ const isLocationSearchExpanded = locationSearch.isExpanded;const activePalettes = palettes[activeString];// Collapse when Image download / GIF / is open or measure tool active@@ -368,7 +368,7 @@ const mapStateToProps = (state) => {&& !isCompareActive,),isCompareActive,- isGeosearchExpanded,+ isLocationSearchExpanded,isMobile,shouldBeCollapsed,hasCustomPalette: hasCustomPaletteInActiveProjection(@@ -393,8 +393,8 @@ const mapDispatchToProps = (dispatch) => ({toggleDialogVisible: (isVisible) => {dispatch(toggleDialogVisible(isVisible));},- toggleShowGeosearch: () => {- dispatch(toggleShowGeosearch());+ toggleShowLocationSearch: () => {+ dispatch(toggleShowLocationSearch());},refreshStateAfterImageDownload: (activePalettes, rotation, isGraticule) => {if (activePalettes) {@@ -460,7 +460,7 @@ toolbarContainer.propTypes = {hasGraticule: PropTypes.bool,isCompareActive: PropTypes.bool,isDistractionFreeModeActive: PropTypes.bool,- isGeosearchExpanded: PropTypes.bool,+ isLocationSearchExpanded: PropTypes.bool,isImageDownloadActive: PropTypes.bool,isMobile: PropTypes.bool,isRotated: PropTypes.bool,@@ -473,5 +473,5 @@ toolbarContainer.propTypes = {rotation: PropTypes.number,shouldBeCollapsed: PropTypes.bool,toggleDialogVisible: PropTypes.func,- toggleShowGeosearch: PropTypes.func,+ toggleShowLocationSearch: PropTypes.func,};diff --git a/web/js/location.js b/web/js/location.jsindex 410fca38a..4d3ffdefb 100644--- a/web/js/location.js+++ b/web/js/location.js@@ -30,7 +30,7 @@ import { resetLayers, hasSubDaily, getActiveLayers } from './modules/layers/seleimport { eventsReducerState } from './modules/natural-events/reducers';import { mapLocationToPaletteState } from './modules/palettes/util';import { mapLocationToAnimationState } from './modules/animation/util';-import { areCoordinatesWithinExtent, mapLocationToGeosearchState } from './modules/geosearch/util';+import { areCoordinatesWithinExtent, mapLocationToLocationSearchState } from './modules/location-search/util';import mapLocationToSidebarState from './modules/sidebar/util';import util from './util/util';@@ -63,7 +63,7 @@ export const mapLocationToState = (state, location) => {state,config,);- stateFromLocation = mapLocationToGeosearchState(+ stateFromLocation = mapLocationToLocationSearchState(parameters,stateFromLocation,state,@@ -408,8 +408,8 @@ const getParameters = function(config, parameters) {// },// },// },- gm: {- stateKey: 'geosearch.coordinates',+ s: {+ stateKey: 'locationSearch.coordinates',initialState: [],type: 'string',options: {diff --git a/web/js/map/ui.js b/web/js/map/ui.jsindex 27a78ae5e..0e6d7216e 100644--- a/web/js/map/ui.js+++ b/web/js/map/ui.js@@ -39,7 +39,7 @@ import {SET_MARKER,SET_REVERSE_GEOCODE_RESULTS,TOGGLE_DIALOG_VISIBLE,-} from '../modules/geosearch/constants';+} from '../modules/location-search/constants';import { SELECT_DATE } from '../modules/date/constants';import util from '../util/util';import * as layerConstants from '../modules/layers/constants';@@ -62,9 +62,9 @@ import {import { getLeadingExtent } from '../modules/map/util';import { updateVectorSelection } from '../modules/vector-styles/util';import { hasVectorLayers } from '../modules/layers/util';-import { animateCoordinates, getCoordinatesMarker } from '../modules/geosearch/util';-import { reverseGeocode } from '../modules/geosearch/util-api';-import { getCoordinatesMetadata, renderCoordinatesDialog } from '../components/geosearch/ol-coordinates-marker-util';+import { animateCoordinates, getCoordinatesMarker } from '../modules/location-search/util';+import { reverseGeocode } from '../modules/location-search/util-api';+import { getCoordinatesMetadata, renderCoordinatesDialog } from '../components/location-search/ol-coordinates-marker-util';const { events } = util;@@ -245,8 +245,8 @@ export default function mapui(models, config, store, ui) {*/const handleActiveMapMarker = (start) => {const state = store.getState();- const { geosearch } = state;- const { coordinates, reverseGeocodeResults } = geosearch;+ const { locationSearch } = state;+ const { coordinates, reverseGeocodeResults } = locationSearch;if (coordinates && coordinates.length > 0) {if (start) {reverseGeocode(coordinates, config).then((results) => {@@ -310,9 +310,9 @@ export default function mapui(models, config, store, ui) {const addCoordinatesTooltip = (geocodeResults) => {const state = store.getState();const {- browser, geosearch,+ browser, locationSearch,} = state;- const { coordinates, reverseGeocodeResults } = geosearch;+ const { coordinates, reverseGeocodeResults } = locationSearch;const results = geocodeResults || reverseGeocodeResults;const isMobile = browser.lessThan.medium;const [longitude, latitude] = coordinates;@@ -354,10 +354,10 @@ export default function mapui(models, config, store, ui) {*/const addMarkerAndUpdateStore = (geocodeResults, shouldFlyToCoordinates) => {const state = store.getState();- const { geosearch, proj } = state;+ const { locationSearch, proj } = state;const {coordinates, isCoordinatesDialogOpen, reverseGeocodeResults,- } = geosearch;+ } = locationSearch;const results = geocodeResults || reverseGeocodeResults;const { sources } = config;diff --git a/web/js/modules/animation/selectors.js b/web/js/modules/animation/selectors.jsindex cfa0f6aae..abcbd8d1c 100644--- a/web/js/modules/animation/selectors.js+++ b/web/js/modules/animation/selectors.js@@ -24,7 +24,7 @@ export default function getImageArray(state,) {const {- animation, proj, map, date, geosearch,+ animation, proj, map, date, locationSearch,} = state;const { startDate, endDate, url } = gifComponentProps;const { boundaries, showDates } = gifComponentState;@@ -34,7 +34,7 @@ export default function getImageArray(const a = [];const fromDate = new Date(startDate);const toDate = new Date(endDate);- const markerCoordinates = geosearch.coordinates;+ const markerCoordinates = locationSearch.coordinates;const isSubDaily = hasSubDaily(getActiveLayers(state));let current = fromDate;let j = 0;diff --git a/web/js/modules/combine-reducers.js b/web/js/modules/combine-reducers.jsindex e8146f939..c9139f474 100644--- a/web/js/modules/combine-reducers.js+++ b/web/js/modules/combine-reducers.js@@ -4,7 +4,7 @@ import { get as lodashGet, assign as lodashAssign } from 'lodash';import { modalReducer, modalAboutPage } from './modal/reducers';import feedbackReducer from './feedback/reducers';import projectionReducer from './projection/reducer';-import { geosearchReducer } from './geosearch/reducers';+import { locationSearchReducer } from './location-search/reducers';import { shortLink } from './link/reducers';import {requestedEvents,@@ -105,7 +105,7 @@ const reducers = {modal: modalReducer,date: dateReducer,feedback: feedbackReducer,- geosearch: geosearchReducer,+ locationSearch: locationSearchReducer,notifications: notificationsReducer,config: defaultReducer,models: defaultReducer,diff --git a/web/js/modules/geosearch/constants.js b/web/js/modules/geosearch/constants.jsdeleted file mode 100644index 292adcaed..000000000--- a/web/js/modules/geosearch/constants.js+++ /dev/null@@ -1,10 +0,0 @@-export const CLEAR_MARKER = 'GEOSEARCH/CLEAR_MARKER';-export const CLEAR_SUGGESTIONS = 'GEOSEARCH/CLEAR_SUGGESTIONS';-export const REQUEST_SUGGEST_PLACE_FAILURE = 'GEOSEARCH/REQUEST_SUGGEST_PLACE_FAILURE';-export const REQUEST_SUGGEST_PLACE_SUCCESS = 'GEOSEARCH/REQUEST_SUGGEST_PLACE_SUCCESS';-export const SET_REVERSE_GEOCODE_RESULTS = 'GEOSEARCH/SET_REVERSE_GEOCODE_RESULTS';-export const SET_MARKER = 'GEOSEARCH/SET_MARKER';-export const SET_SUGGESTION = 'GEOSEARCH/SET_SUGGESTION';-export const TOGGLE_DIALOG_VISIBLE = 'GEOSEARCH/TOGGLE_DIALOG_VISIBLE';-export const TOGGLE_REVERSE_GEOCODE = 'GEOSEARCH/TOGGLE_REVERSE_GEOCODE';-export const TOGGLE_SHOW_GEOSEARCH = 'GEOSEARCH/TOGGLE_SHOW_GEOSEARCH';diff --git a/web/js/modules/image-download/util.test.js b/web/js/modules/image-download/util.test.jsindex e6a40dbfe..481dbcd33 100644--- a/web/js/modules/image-download/util.test.js+++ b/web/js/modules/image-download/util.test.js@@ -214,8 +214,8 @@ test('Download URL', () => {height: 300,};const dateTime = new Date('2019-06-24T19:04:00Z');- const geosearchCoordinates = [-19.1609, 2.7117];- const dlURL = getDownloadUrl(url, proj, mockLayerDefs, lonlats, dimensions, dateTime, false, false, geosearchCoordinates);+ const locationSearchCoordinates = [-19.1609, 2.7117];+ const dlURL = getDownloadUrl(url, proj, mockLayerDefs, lonlats, dimensions, dateTime, false, false, locationSearchCoordinates);const expectedURL = 'http://localhost:3002/api/v1/snapshot'+ '?REQUEST=GetSnapshot'+ '&TIME=2019-06-24T00:00:00Z'diff --git a/web/js/modules/geosearch/actions.js b/web/js/modules/location-search/actions.jssimilarity index 87%rename from web/js/modules/geosearch/actions.jsrename to web/js/modules/location-search/actions.jsindex 02901f231..8782c8b38 100644--- a/web/js/modules/geosearch/actions.js+++ b/web/js/modules/location-search/actions.js@@ -5,7 +5,7 @@ import {SET_SUGGESTION,TOGGLE_DIALOG_VISIBLE,TOGGLE_REVERSE_GEOCODE,- TOGGLE_SHOW_GEOSEARCH,+ TOGGLE_SHOW_LOCATION_SEARCH,} from './constants';import { requestAction } from '../core/actions';import {@@ -13,30 +13,30 @@ import {setLocalStorageCollapseState,} from './util';import {- GEOSEARCH_REQUEST_OPTIONS,+ LOCATION_SEARCH_REQUEST_OPTIONS,} from './util-api';const {REQUEST_OPTIONS,GEOCODE_SUGGEST_CATEGORIES,CONSTANT_REQUEST_PARAMETERS,-} = GEOSEARCH_REQUEST_OPTIONS;+} = LOCATION_SEARCH_REQUEST_OPTIONS;/**- * Toggle show geosearch component+ * Toggle show Location Search component*/-export function toggleShowGeosearch() {+export function toggleShowLocationSearch() {return (dispatch, getState) => {const state = getState();- const { geosearch } = state;- const { isExpanded } = geosearch;+ const { locationSearch } = state;+ const { isExpanded } = locationSearch;// handle localStorage user browser preference of expanded/collapsedconst storageValue = isExpanded ? 'collapsed' : 'expanded';setLocalStorageCollapseState(storageValue);dispatch({- type: TOGGLE_SHOW_GEOSEARCH,+ type: TOGGLE_SHOW_LOCATION_SEARCH,value: !isExpanded,});};@@ -146,7 +146,7 @@ export function setSuggestion(suggestion) {export function getSuggestions(val) {return (dispatch, getState) => {const { config } = getState();- const { features: { geocodeSearch: { url: requestUrl } } } = config;+ const { features: { locationSearch: { url: requestUrl } } } = config;const encodedValue = encodeURIComponent(val);const encodedCategories = encodeURIComponent(GEOCODE_SUGGEST_CATEGORIES.join(','));@@ -154,10 +154,10 @@ export function getSuggestions(val) {return requestAction(dispatch,- 'GEOSEARCH/REQUEST_SUGGEST_PLACE',+ 'LOCATION_SEARCH/REQUEST_SUGGEST_PLACE',request,'',- 'geosearch-suggest-place',+ 'location-search-suggest-place',REQUEST_OPTIONS,);};diff --git a/web/js/modules/geosearch/actions.test.js b/web/js/modules/location-search/actions.test.jssimilarity index 85%rename from web/js/modules/geosearch/actions.test.jsrename to web/js/modules/location-search/actions.test.jsindex dc4859d33..c1c45a925 100644--- a/web/js/modules/geosearch/actions.test.js+++ b/web/js/modules/location-search/actions.test.js@@ -3,14 +3,14 @@ import thunk from 'redux-thunk';import {clearSuggestions,toggleDialogVisible,- toggleShowGeosearch,+ toggleShowLocationSearch,toggleReverseGeocodeActive,setSuggestion,} from './actions';import {TOGGLE_REVERSE_GEOCODE,TOGGLE_DIALOG_VISIBLE,- TOGGLE_SHOW_GEOSEARCH,+ TOGGLE_SHOW_LOCATION_SEARCH,CLEAR_SUGGESTIONS,SET_SUGGESTION,} from './constants';@@ -26,19 +26,19 @@ const suggestion = [{text: 'New York, NY, USA',}];-describe('Geosearch actions', () => {- test(`toggleShowGeosearch action returns ${TOGGLE_SHOW_GEOSEARCH} as type and ${+describe('Location Search actions', () => {+ test(`toggleShowLocationSearch action returns ${TOGGLE_SHOW_LOCATION_SEARCH} as type and ${!isExpanded} as value`, () => {const expectedAction = {- type: TOGGLE_SHOW_GEOSEARCH,+ type: TOGGLE_SHOW_LOCATION_SEARCH,value: false,};const store = mockStore({- geosearch: {+ locationSearch: {isExpanded: true,},});- store.dispatch(toggleShowGeosearch());+ store.dispatch(toggleShowLocationSearch());expect(store.getActions()[0]).toEqual(expectedAction);});test(`toggleReverseGeocodeActive action returns ${TOGGLE_REVERSE_GEOCODE} as type and ${@@ -56,7 +56,7 @@ describe('Geosearch actions', () => {value: true,};const store = mockStore({- geosearch: {+ locationSearch: {isCoordinatesDialogOpen: false,},});@@ -69,7 +69,7 @@ describe('Geosearch actions', () => {value: suggestion,};const store = mockStore({- geosearch: {+ locationSearch: {suggestions: [],},});@@ -82,7 +82,7 @@ describe('Geosearch actions', () => {value: [],};const store = mockStore({- geosearch: {+ locationSearch: {suggestions: [{}, {}],},});diff --git a/web/js/modules/location-search/constants.js b/web/js/modules/location-search/constants.jsnew file mode 100644index 000000000..322249869--- /dev/null+++ b/web/js/modules/location-search/constants.js@@ -0,0 +1,10 @@+export const CLEAR_MARKER = 'LOCATION_SEARCH/CLEAR_MARKER';+export const CLEAR_SUGGESTIONS = 'LOCATION_SEARCH/CLEAR_SUGGESTIONS';+export const REQUEST_SUGGEST_PLACE_FAILURE = 'LOCATION_SEARCH/REQUEST_SUGGEST_PLACE_FAILURE';+export const REQUEST_SUGGEST_PLACE_SUCCESS = 'LOCATION_SEARCH/REQUEST_SUGGEST_PLACE_SUCCESS';+export const SET_REVERSE_GEOCODE_RESULTS = 'LOCATION_SEARCH/SET_REVERSE_GEOCODE_RESULTS';+export const SET_MARKER = 'LOCATION_SEARCH/SET_MARKER';+export const SET_SUGGESTION = 'LOCATION_SEARCH/SET_SUGGESTION';+export const TOGGLE_DIALOG_VISIBLE = 'LOCATION_SEARCH/TOGGLE_DIALOG_VISIBLE';+export const TOGGLE_REVERSE_GEOCODE = 'LOCATION_SEARCH/TOGGLE_REVERSE_GEOCODE';+export const TOGGLE_SHOW_LOCATION_SEARCH = 'LOCATION_SEARCH/TOGGLE_SHOW_LOCATION_SEARCH';diff --git a/web/js/modules/geosearch/reducers.js b/web/js/modules/location-search/reducers.jssimilarity index 91%rename from web/js/modules/geosearch/reducers.jsrename to web/js/modules/location-search/reducers.jsindex 705478fdf..79dd2fc93 100644--- a/web/js/modules/geosearch/reducers.js+++ b/web/js/modules/location-search/reducers.js@@ -8,12 +8,12 @@ import {SET_SUGGESTION,TOGGLE_DIALOG_VISIBLE,TOGGLE_REVERSE_GEOCODE,- TOGGLE_SHOW_GEOSEARCH,+ TOGGLE_SHOW_LOCATION_SEARCH,} from './constants';import { getLocalStorageCollapseState } from './util';const localStorageCollapseState = getLocalStorageCollapseState();-export const geosearchState = {+export const locationSearchState = {coordinates: [],isCoordinateSearchActive: false,isCoordinatesDialogOpen: false,@@ -23,14 +23,14 @@ export const geosearchState = {suggestedPlace: [],};-export function geosearchReducer(state = geosearchState, action) {+export function locationSearchReducer(state = locationSearchState, action) {switch (action.type) {case TOGGLE_DIALOG_VISIBLE:return {...state,isCoordinatesDialogOpen: action.value,};- case TOGGLE_SHOW_GEOSEARCH:+ case TOGGLE_SHOW_LOCATION_SEARCH:return {...state,isExpanded: action.value,diff --git a/web/js/modules/geosearch/reducers.test.js b/web/js/modules/location-search/reducers.test.jssimilarity index 72%rename from web/js/modules/geosearch/reducers.test.jsrename to web/js/modules/location-search/reducers.test.jsindex 6314db3a4..c0ecd81ec 100644--- a/web/js/modules/geosearch/reducers.test.js+++ b/web/js/modules/location-search/reducers.test.js@@ -1,6 +1,6 @@import {- geosearchReducer,- geosearchState,+ locationSearchReducer,+ locationSearchState,} from './reducers';import {CLEAR_MARKER,@@ -9,7 +9,7 @@ import {SET_SUGGESTION,TOGGLE_DIALOG_VISIBLE,TOGGLE_REVERSE_GEOCODE,- TOGGLE_SHOW_GEOSEARCH,+ TOGGLE_SHOW_LOCATION_SEARCH,} from './constants';// test variables@@ -24,24 +24,24 @@ const suggestion = [{}];const coordinates = [72, 40];-describe('geosearchReducer', () => {- test('geosearchReducer should return the initial state', () => {- expect(geosearchReducer(undefined, {})).toEqual(- geosearchState,+describe('locationSearch', () => {+ test('locationSearch should return the initial state', () => {+ expect(locationSearchReducer(undefined, {})).toEqual(+ locationSearchState,);});test(- `${TOGGLE_SHOW_GEOSEARCH- } shows geosearch isExpanded and `+ `${TOGGLE_SHOW_LOCATION_SEARCH+ } shows Location Search isExpanded and `+ 'should return new state',() => {expect(- geosearchReducer(geosearchState, {- type: TOGGLE_SHOW_GEOSEARCH,+ locationSearchReducer(locationSearchState, {+ type: TOGGLE_SHOW_LOCATION_SEARCH,value: true,}),).toEqual({- ...geosearchState,+ ...locationSearchState,isExpanded: true,});},@@ -52,12 +52,12 @@ describe('geosearchReducer', () => {+ 'should return new state',() => {expect(- geosearchReducer(geosearchState, {+ locationSearchReducer(locationSearchState, {type: TOGGLE_REVERSE_GEOCODE,value: true,}),).toEqual({- ...geosearchState,+ ...locationSearchState,isCoordinateSearchActive: true,});},@@ -68,12 +68,12 @@ describe('geosearchReducer', () => {+ 'should return new state',() => {expect(- geosearchReducer(geosearchState, {+ locationSearchReducer(locationSearchState, {type: TOGGLE_DIALOG_VISIBLE,value: true,}),).toEqual({- ...geosearchState,+ ...locationSearchState,isCoordinatesDialogOpen: true,});},@@ -84,14 +84,14 @@ describe('geosearchReducer', () => {+ 'and sets isCoordinateSearchActive to false and should return new state',() => {expect(- geosearchReducer(geosearchState, {+ locationSearchReducer(locationSearchState, {type: SET_MARKER,coordinates,reverseGeocodeResults,isCoordinatesDialogOpen: true,}),).toEqual({- ...geosearchState,+ ...locationSearchState,isCoordinateSearchActive: false,coordinates,reverseGeocodeResults,@@ -105,11 +105,11 @@ describe('geosearchReducer', () => {+ 'should return new state',() => {expect(- geosearchReducer(geosearchState, {+ locationSearchReducer(locationSearchState, {type: CLEAR_MARKER,}),).toEqual({- ...geosearchState,+ ...locationSearchState,coordinates: [],reverseGeocodeResults: null,isCoordinatesDialogOpen: false,@@ -122,12 +122,12 @@ describe('geosearchReducer', () => {+ 'should return new state',() => {expect(- geosearchReducer(geosearchState, {+ locationSearchReducer(locationSearchState, {type: SET_SUGGESTION,value: suggestion,}),).toEqual({- ...geosearchState,+ ...locationSearchState,suggestedPlace: suggestion,});},@@ -138,12 +138,12 @@ describe('geosearchReducer', () => {+ 'should return new state',() => {expect(- geosearchReducer(geosearchState, {+ locationSearchReducer(locationSearchState, {type: CLEAR_SUGGESTIONS,value: [],}),).toEqual({- ...geosearchState,+ ...locationSearchState,suggestions: [],suggestedPlace: [],});diff --git a/web/js/modules/geosearch/util-api.js b/web/js/modules/location-search/util-api.jssimilarity index 88%rename from web/js/modules/geosearch/util-api.jsrename to web/js/modules/location-search/util-api.jsindex d3bc6c4d0..334e77517 100644--- a/web/js/modules/geosearch/util-api.js+++ b/web/js/modules/location-search/util-api.js@@ -1,5 +1,5 @@// ArcGIS World Geocoding Service API Request Options-export const GEOSEARCH_REQUEST_OPTIONS = {+export const LOCATION_SEARCH_REQUEST_OPTIONS = {REQUEST_OPTIONS: {method: 'GET',redirect: 'follow',@@ -28,14 +28,14 @@ export const GEOSEARCH_REQUEST_OPTIONS = {const {REQUEST_OPTIONS,CONSTANT_REQUEST_PARAMETERS,-} = GEOSEARCH_REQUEST_OPTIONS;+} = LOCATION_SEARCH_REQUEST_OPTIONS;/*** @param {String} magicKey* @param {Object} config*/export async function processMagicKey(magicKey, config) {- const { features: { geocodeSearch: { url: requestUrl } } } = config;+ const { features: { locationSearch: { url: requestUrl } } } = config;const request = `${requestUrl}findAddressCandidates?${CONSTANT_REQUEST_PARAMETERS}&outFields=*&magicKey=${magicKey}=`;try {@@ -52,7 +52,7 @@ export async function processMagicKey(magicKey, config) {* @param {Object} config*/export async function reverseGeocode(coordinates, config) {- const { features: { geocodeSearch: { url: requestUrl } } } = config;+ const { features: { locationSearch: { url: requestUrl } } } = config;const request = `${requestUrl}reverseGeocode?${CONSTANT_REQUEST_PARAMETERS}&location=${coordinates}`;try {diff --git a/web/js/modules/geosearch/util.js b/web/js/modules/location-search/util.jssimilarity index 88%rename from web/js/modules/geosearch/util.jsrename to web/js/modules/location-search/util.jsindex 671c779e4..360493386 100644--- a/web/js/modules/geosearch/util.js+++ b/web/js/modules/location-search/util.js@@ -12,7 +12,7 @@ import { containsXY } from 'ol/extent';import { coordinatesCRSTransform } from '../projection/util';import safeLocalStorage from '../../util/local-storage';-const { GEOSEARCH_COLLAPSED } = safeLocalStorage.keys;+const { LOCATION_SEARCH_COLLAPSED } = safeLocalStorage.keys;/*** Animate coordinates marker@@ -130,14 +130,14 @@ const createPin = function(coordinates, transformedCoordinates = false, reverseG* @param {Object} stateFromLocation* @param {Object} state*/-export function mapLocationToGeosearchState(+export function mapLocationToLocationSearchState(parameters,stateFromLocation,state,) {- const { gm } = parameters;- const validCoordinates = gm- ? gm.split(',')+ const { s } = parameters;+ const validCoordinates = s+ ? s.split(',').map((coord) => Number(coord)).filter((coord) => !lodashIsNaN(parseFloat(coord))): [];@@ -151,7 +151,7 @@ export function mapLocationToGeosearchState(const isExpanded = !isMobile && !localStorageCollapseState;stateFromLocation = update(stateFromLocation, {- geosearch: {+ locationSearch: {coordinates: { $set: coordinates },isExpanded: { $set: isExpanded },isCoordinatesDialogOpen: { $set: isValid },@@ -162,10 +162,10 @@ export function mapLocationToGeosearchState(}/**- * @return {Boolean} is geosearch local storage set to 'collapsed'+ * @return {Boolean} is Location Search local storage set to 'collapsed'*/export function getLocalStorageCollapseState() {- return safeLocalStorage.getItem(GEOSEARCH_COLLAPSED) === 'collapsed';+ return safeLocalStorage.getItem(LOCATION_SEARCH_COLLAPSED) === 'collapsed';}/**@@ -173,11 +173,11 @@ export function getLocalStorageCollapseState() {* @return {Void}*/export function setLocalStorageCollapseState(storageValue) {- safeLocalStorage.setItem(GEOSEARCH_COLLAPSED, storageValue);+ safeLocalStorage.setItem(LOCATION_SEARCH_COLLAPSED, storageValue);}/*** @param {Object} config- * @return {Boolean} is geosearch feature enabled+ * @return {Boolean} is Location Search feature enabled*/-export const isGeosearchFeatureEnabled = ({ features }) => !!(features.geocodeSearch && features.geocodeSearch.url);+export const isLocationSearchFeatureEnabled = ({ features }) => !!(features.locationSearch && features.locationSearch.url);diff --git a/web/js/util/local-storage.js b/web/js/util/local-storage.jsindex f92ffd2df..7adfaa543 100644--- a/web/js/util/local-storage.js+++ b/web/js/util/local-storage.js@@ -19,7 +19,7 @@ export default {enabled,keys: {RECENT_LAYERS: 'recentLayers',- GEOSEARCH_COLLAPSED: 'geosearchState',+ LOCATION_SEARCH_COLLAPSED: 'locationSearchState',DISMISSED_EVENT_VIS_ALERT: 'dismissedEventVisibilityAlert',DISMISSED_COMPARE_ALERT: 'dismissedCompareAlert',HIDE_TOUR: 'hideTour',