Interactive interface for browsing global, full-resolution satellite imagery
update parameter docs, change geosearch marker query string param name
Ed Platoacf7625ddf85
diff --git a/doc/url_parameters.md b/doc/url_parameters.mdindex 370bc2ddd..2b71ac0f4 100644--- a/doc/url_parameters.md+++ b/doc/url_parameters.md@@ -20,6 +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._ || `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-test.js b/e2e/features/geosearch/geosearch-test.jsindex 5138bd080..afd117c71 100644--- a/e2e/features/geosearch/geosearch-test.js+++ b/e2e/features/geosearch/geosearch-test.js@@ -43,7 +43,7 @@ module.exports = {c.expect.element(geosearchComponent).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&marker=-77.032,38.8904`);+ c.url(`${c.globals.url}?v=-176.3167432493038,-16.70650759975561,-16.988618249303812,108.30938074294103&gm=-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}?marker=-51.5,5`);+ c.url(`${c.globals.url}?gm=-51.5,5`);c.waitForElementVisible(tooltipCoordinatesContainer, TIME_LIMIT);c.expect.element(testMarkerNoDetailsEncodedID).to.be.present;c.assert.containsText(tooltipCoordinatesTitle, '5.0000°, -51.5000°');@@ -70,7 +70,7 @@ module.exports = {c.assert.not.urlContains('marker');},'Invalid marker query string parameter prevents state update': (c) => {- c.url(`${c.globals.url}?marker=-51.5,invalidtext`);+ c.url(`${c.globals.url}?gm=-51.5,invalidtext`);c.expect.element(coordinatesMapMarker).to.not.be.present;c.assert.not.urlContains('marker');},diff --git a/package-lock.json b/package-lock.jsonindex 5ddc8a0df..85a866066 100644--- a/package-lock.json+++ b/package-lock.json@@ -10516,8 +10516,6 @@"dev": true,"optional": true},-<<<<<<< HEAD-======="ini": {"version": "1.3.5","resolved": false,@@ -10525,7 +10523,6 @@"dev": true,"optional": true},->>>>>>> 1a7dc3bb7 (move geosearch to toolbar, reduce toolbar button size, match zoom and measure buttons, minor style change on map scale and timeline, add different test map pin colors)"is-fullwidth-code-point": {"version": "1.0.0","resolved": false,diff --git a/web/js/location.js b/web/js/location.jsindex 616c75d09..88945411b 100644--- a/web/js/location.js+++ b/web/js/location.js@@ -435,7 +435,7 @@ const getParameters = function(config, parameters) {},},},- marker: {+ gm: {stateKey: 'geosearch.coordinates',initialState: [],type: 'string',diff --git a/web/js/modules/geosearch/util.js b/web/js/modules/geosearch/util.jsindex 01b5ba434..44d87772c 100644--- a/web/js/modules/geosearch/util.js+++ b/web/js/modules/geosearch/util.js@@ -135,9 +135,9 @@ export function mapLocationToGeosearchState(stateFromLocation,state,) {- const { marker } = parameters;- const validCoordinates = marker- ? marker.split(',')+ const { gm } = parameters;+ const validCoordinates = gm+ ? gm.split(',').map((coord) => Number(coord)).filter((coord) => !lodashIsNaN(parseFloat(coord))): [];