TerriaJS / nationalmap

Australia's NationalMap
https://nationalmap.gov.au
122 stars 45 forks source link

NationalMap - embedding doesn't work with new sharelinks #1099

Closed AnaBelgun closed 2 years ago

AnaBelgun commented 2 years ago

I'm trying to embed the 'Weighbridge Map' but whenever I copy the code the map shows up as empty with no dataset applied even though I am using the Share code.

Even when I try to copy just the location URL from the Share tool the map is blank when opened in a new tab or another browser

E.g. https://nationalmap.gov.au/#start=%7B%22version%22%3A%228.0.0%22%2C%22initSources%22%3A%5B%7B%22stratum%22%3A%22user%22%2C%22models%22%3A%7B%22data.gov.au-postMessage-dist-dga-9bba55fa-1d12-42f3-9eaa-2c5f32f7bfb6%22%3A%7B%22knownContainerUniqueIds%22%3A%5B%22%2F%22%5D%2C%22type%22%3A%22magda%22%7D%2C%22%2F%22%3A%7B%22type%22%3A%22group%22%7D%7D%2C%22workbench%22%3A%5B%22data.gov.au-postMessage-dist-dga-9bba55fa-1d12-42f3-9eaa-2c5f32f7bfb6%22%5D%2C%22timeline%22%3A%5B%5D%2C%22initialCamera%22%3A%7B%22west%22%3A99.34490017697783%2C%22south%22%3A-38.215951565147506%2C%22east%22%3A167.65509979364552%2C%22north%22%3A-8.317169256069247%2C%22position%22%3A%7B%22x%22%3A-7430867.337576044%2C%22y%22%3A7830500.313937096%2C%22z%22%3A-5368619.004415568%7D%2C%22direction%22%3A%7B%22x%22%3A0.6155177699530678%2C%22y%22%3A-0.6486203927338021%2C%22z%22%3A0.44769349001504455%7D%2C%22up%22%3A%7B%22x%22%3A-0.308171862360162%2C%22y%22%3A0.32474538372595874%2C%22z%22%3A0.8941870827730343%7D%7D%2C%22homeCamera%22%3A%7B%22west%22%3A109%2C%22south%22%3A-45%2C%22east%22%3A158%2C%22north%22%3A-8%7D%2C%22baseMaps%22%3A%7B%22defaultBaseMapId%22%3A%22basemap-bing-aerial-with-labels%22%7D%2C%22viewerMode%22%3A%223d%22%2C%22currentTime%22%3A%7B%22dayNumber%22%3A2459509%2C%22secondsOfDay%22%3A38016.878%7D%2C%22showSplitter%22%3Afalse%2C%22splitPosition%22%3A0.5%2C%22stories%22%3A%5B%5D%7D%5D%7D

Not sure how to get the new map embed to work on our website or to even link to it.

Any help would be greatly appreciated.

nf-s commented 2 years ago

I believe this issue is because they went through data.gov.au

Steps to recreate:

Where as, if they search for "Public Weighbridge List" in National Map and then share - it works

https://nationalmap.gov.au/#share=s-qzF8K4xaFw1PzNmMh01GL20VpiP

nf-s commented 2 years ago

I don't think we should support sharing if datasets have been "injected" into NationalMap like this.

But, if we decide not to support it, we need a clear warning to users that sharing will not work

nf-s commented 2 years ago

If we do want those data.gov.au items to be shareable, then DGA as to either match IDs with an existing model, or it has to put the model in the user stratum

t83714 commented 2 years ago

deployed to DGA on 17th Dec 2021 and works