terriajs icon indicating copy to clipboard operation
terriajs copied to clipboard

Create sharelink should use `baseUrl` instead of `window.location`

Open nf-s opened this issue 2 years ago • 1 comments

  • https://maps.dea.ga.gov.au/story/DEACoastlines
  • Click Share
  • https://maps.dea.ga.gov.au/story/DEACoastlines#share=s-usNBqERvxnRFzfjgf1G14W0ijSC
  • But should be https://maps.dea.ga.gov.au/#share=s-usNBqERvxnRFzfjgf1G14W0ijSC

nf-s avatar Jul 06 '22 01:07 nf-s

Can confirm I have encountered this one using this workflow:

  1. Load a "pretty" new-style story map link: https://maps.dea.ga.gov.au/story/DEACoastlines
  2. Remove the story by clicking "Story > Remove all".
  3. Zoom into a new location and create a new share link

The new share link will still point to the removed story, not the customised share link: https://maps.dea.ga.gov.au/story/DEACoastlines#share=s-tvmuSTDLg7IyoYs6wzzb0phXlND

Because we always share DEA Coastlines using the "pretty" URL, this bug effectively prevents users from using the share link functionality to share DEA Coastlines data for a specific location or view (unless they learn how to add DEA Coastlines manually from DEA Maps itself (instead of via the story)

robbibt avatar Jul 26 '22 05:07 robbibt

Im not sure how to replace window.location with terria.baseUrl baseUrl just points to "build/TerriaJS/" Seeking clarification

staffordsmith83 avatar Sep 12 '22 03:09 staffordsmith83