Skip to content
Add URL hashes to web pages with Leaflet maps.
Branch: master
Clone or download
Latest commit d73fc84 Oct 5, 2013
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
screenshots Adding first screenshot Sep 21, 2012
test Add removeFrom to make map.removeControl work Oct 5, 2013
.gitignore Adding gitignore Sep 21, 2012
LICENSE.md Update LICENSE.md Feb 25, 2013
README.md
leaflet-hash.js Add removeFrom to make map.removeControl work Oct 5, 2013
package.json

README.md

Leaflet-hash

Leaflet-hash lets you to add dynamic URL hashes to web pages with Leaflet maps. You can easily link users to specific map views.

Leaflet-hash

Demo

You can view a demo of leaflet-hash at mlevans.github.io/leaflet-hash/map.html.

Getting started

  1. Prepare a basic leaflet map. You can find instructions on Leaflet's quick-start guide.

  2. Include leaflet-hash.js.

  3. Once you have initialized the map (an instance of L.Map), add the following code:

        // Assuming your map instance is in a variable called map
        var hash = new L.Hash(map);

Author

@mlevans

Contributors

@calvinmetcalf

@jfirebaugh

@rsudekum

@tmcw

@yohanboniface

License

MIT License. See LICENSE for details.

You can’t perform that action at this time.