@qgustavor/leaflet-hash
v1.1.2
Published
Modern version of leaflet-hash, which adds URL hashes to web pages with Leaflet maps.
Downloads
5
Readme
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:
// Assuming your map instance is in a variable called map
const map = L.map('example')
const hash = createHash(map)
Author
Contributors
License
MIT License. See LICENSE for details.