Whenever the user makes a change to the map, it would be useful if that change were reflected in the fragment identifier (hash), so that people could bookmark and share zoomed-in views on specific regions/prefectures.
You can use the window.location.hash property from JavaScript to change the fragment identifier (e.g. to #foo,bar without forcing a page reload. To detect hash changes, you can listen for the hashchange event:
function myRestoreFromHash () {
// parse window.location.hash and restore the zoom, etc.
}
window.addEventListener('hashchange', myRestoreFromHash, false);
Whenever the user makes a change to the map, it would be useful if that change were reflected in the fragment identifier (hash), so that people could bookmark and share zoomed-in views on specific regions/prefectures.
You can use the window.location.hash property from JavaScript to change the fragment identifier (e.g. to
#foo,bar
without forcing a page reload. To detect hash changes, you can listen for the hashchange event:For a demo of dynamic hash updating, see http://davidmegginson.github.io/hdx-chooser/hdx-chooser.html