Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Endless redirects #12

stevevance opened this Issue · 1 comment

1 participant


I referenced leaflet-hash.js and added var hash = new L.Hash(map); after initializing the map. Upon the first loading of the page, the page loads the UI, loads the map, and then goes blank as the browser gets in an endless loop.

I think this may have something to do with jQueryMobile (I get a jQueryMobile-provided "error loading" on-screen message). Let me know if you need me to go into more details or provide a screencast of the loop.


Update: jQueryMobile is messing this up because it is listening to hash changes and trying to do something about the changing hash. It can be disabled with

$(document).bind("mobileinit", function(){
    $.mobile.hashListeningEnabled = false;

But, a problem isn't gone completely.

Here's what happens:

  1. The map loads: http://localhost/map.html
  2. The URL immediately changes to http://localhost/14/41.8821/-87.6278
  3. I move the map and then the page reloads and the URL is now http://localhost/map.html#14/41.8883/-87.6488
  4. I move the map again and the URL changes to http://localhost/14/41.8968/-87.6736
  5. I move the map a third time and the page reloads and the URL is now http://localhost/map.html#14/41.9086/-87.6832

I was able to use the Permalink plugin which I believe provides an identical function. It worked properly in my webpage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.