HandsOnDataViz/leaflet-storymaps-with-google-sheets

Browser navigation and new page trigger

zoran-cuckovic opened this issue · 2 comments

Your story-map template is excellent ! However, I've noticed that it tends to register every move that the user makes as a new web page. Eventually, I'm unable to use my browser to navigate back from the demo (Figure). Same thing in Chrome and Mozilla. Do you have an idea how to prevent this behaviour ?
Thanks !
image

Hi @zoran-cuckovic

Thank you for sharing this interesting observation - this is something that never came up before. We are using URL hash to navigate between chapters; this is done to enable users to share links to specific chapters (eg this link will automatically scroll to chapter 6). While in principle it may be possible to use some other URL elements (eg ? instead of # to pass chapters as arguments), logically our current hashing/anchoring makes sense and I'm inclined to keep it, at least for now.

Thanks @ilyankou !
I've suspended this behaviour by commenting out the line 293 of the javascipt file:


Not elegant, but simple enough.