Solved by not using AJAX in the map page, the destination location is passed through DOM element
jquery-ui-map "Get directions" example loaded through AJAX (with examples)
-
23-03-2022 - |
Question
I implemented the jquery-ui-map "Get directions" example
All is working fine when the map HTML mark-up is inside the multi-page index.htm, so I'm sure the script works
But in my real-world script I have a list of music shows, each with a different location, so I have to load the map mark-up through AJAX (after some server-side processing to retrieve the address of each location), and in this case I run into two problems:
- the geolocation doesn't work anymore: the browser doesn't ask me if I want to commmunicate my current location
- the "back" button doesn't work anymore: the url in the address bar changes, but the page stays the same
Here is my real examples: please navigate to Next Shows > Club (X) > Get directions and see what happens
- NON AJAX example (working): http://www.iwstudio.it/mobile/index2.htm
- AJAX example (not working): http://www.iwstudio.it/mobile/index.htm
- Downloadable script: http://www.iwstudio.it/mobile/mobile.rar
Any help, please? Thank in advance!
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow