makinacorpus/Leaflet.RestoreView

Name: Leaflet.RestoreView

Owner: Makina Corpus

Description: Save and restore view from localStorage

Created: 2013-03-06 10:42:13.0

Updated: 2017-12-11 04:46:10.0

Pushed: 2016-12-21 15:55:17.0

Homepage: http://makinacorpus.github.io/Leaflet.RestoreView/

Size: 7

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.