You are not logged in.

1

Tuesday, November 19th 2019, 5:59pm

Issue with Deeplinking

Hello,

Correct me if am wrong but the Deeplinking feature of KRpano is supposed to update the url in address bar according to the current scene right?
I enabled the same in xml but there was no effect at all.
Can anyone help me with this?

Thanks

2

Sunday, November 24th 2019, 9:46pm

Hi,

Do you have passQueryParameters set to true in the embed script? passQueryParameters:true

Source code

1
2
3
<script type="text/javascript" lang="en-us">
embedpano({xml:"tour.xml", target:"pano", html5:"only", focus:true, mobilescale:1.0, passQueryParameters:true});
</script>

I think that needs to be set for the deep-linking to be enabled.

Hope this helps.


Rich

3

Monday, November 25th 2019, 11:00am

Hi Rich,

Thanks for the response, actually the issue was from Panotour as I was using it for making the tour.
To confirm I created a separate tour using KrPano's droplet and the deeplinking was working fine.
I found that it was appending additional info to the address bar as well which I didn't want at all.
I was just looking for current scene's name to be displayed.
On thorough search I found a piece of code, modified it a bit as per my requirement and my issue was resolved.
Attaching the same down below, hope this might help someone who's into the similar situation.

Source code

1
copy(adr, browser.location);indexoftxt(qi, get(adr), '?');if(qi GT 0, subtxt(adr, adr, 0, get(qi)));copy(si, scene[get(xml.scene)].name);set(adr, calc(adr + '?s=' + si + ''));js( history.replaceState(null, document.title, get(adr)); );



Thanks,
Rahul