Modern Leaflet Hash
This fork of Leaflet-hash, which lets you to add dynamic URL hashes to web pages with Leaflet maps, is made to be used with ES Module imports.
Getting started
-
Prepare a basic leaflet map.
-
Include the plugin:
import { createHash } from '@qgustavor/leaflet-hash'
when using bundle tools (remember to install the library using npm or something else)<script src="https://unpkg.com/@qgustavor/leaflet-hash/dist/leaflet-hash.global.js">
when loading directly on a browser
- Initialize the plugin:
const map = L.map('example')
const hash = createHash(map)
Author
@mlevans
Contributors
@calvinmetcalf
@jfirebaugh
@rsudekum
@tmcw
@yohanboniface
@qgustavor
License
MIT License. See LICENSE for details.