Save and restore view from localStorage
HTML JavaScript
Latest commit bdbdbae Oct 7, 2016 @SBats SBats committed on GitHub Merge pull request #6 from makinacorpus/fix.data.access
Check the permission to access localStorage (fix #5)
Permalink
Failed to load latest commit information.
LICENSE
README.md
index.html
leaflet.restoreview.js
package.json

README.md

Leaflet.RestoreView

Stores and restores map view using localStorage.

First call on restoreView() will setup event listening and view save.

Check out demo.

Note: This plugin uses localStorage to store data, if your browser denies storing local data, this will not work.

Usage

    if (!map.restoreView()) {
        map.setView([50.5, 30.51], 15);
    }

Authors

Makina Corpus