Save and restore view from localStorage
HTML JavaScript
Switch branches/tags
Nothing to show
Clone or download
SBats Merge pull request #6 from makinacorpus/fix.data.access
Check the permission to access localStorage (fix #5)
Latest commit bdbdbae Oct 7, 2016
Permalink
Failed to load latest commit information.
LICENSE Initial commit Mar 6, 2013
README.md add note in the readme.md Oct 7, 2016
index.html Add demo Nov 22, 2013
leaflet.restoreview.js typo Oct 7, 2016
package.json Add initial package.json Aug 10, 2016

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