Skip to content

Modern version of leaflet-hash, which adds URL hashes to web pages with Leaflet maps.

License

Notifications You must be signed in to change notification settings

qgustavor/modern-leaflet-hash

 
 

Repository files navigation

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

  1. Prepare a basic leaflet map.

  2. 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
  1. Initialize the plugin:
// Assuming your map instance is in a variable called map
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.

About

Modern version of leaflet-hash, which adds URL hashes to web pages with Leaflet maps.

Resources

License

Stars

Watchers

Forks

Languages

  • JavaScript 100.0%