Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oliverheilig/leaflet-d3layer
Use D3 with Leaflet
https://github.com/oliverheilig/leaflet-d3layer
d3 leaflet
Last synced: 3 days ago
JSON representation
Use D3 with Leaflet
- Host: GitHub
- URL: https://github.com/oliverheilig/leaflet-d3layer
- Owner: oliverheilig
- Created: 2015-05-16T19:01:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-01-05T18:15:37.000Z (almost 3 years ago)
- Last Synced: 2023-03-30T22:04:06.351Z (over 1 year ago)
- Topics: d3, leaflet
- Language: HTML
- Homepage: https://oliverheilig.github.io/leaflet-d3layer/
- Size: 101 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
leaflet-d3layer
===============I've started this project to add D3/SVG content to a Leaflet map. There are some amazing samples by
[Mike Bostock](http://bost.ocks.org/mike/leaflet/) and [Zev Ross](http://zevross.com/blog/2014/09/30/use-the-amazing-d3-library-to-animate-a-path-on-a-leaflet-map/).
But i had trouble transferring them to my code, as they either have to turn off the zoom-animation or
somehow hijack the leaflet internal SVG _pathRoot object.
I made a layer class that contains its own _pathRoot that is independant from the Leflet SVG-content.
So i can better control initialization, events an z-Ordering.I've added both samples to one common demo
https://oliverheilig.github.io/leaflet-d3layer/
Projects where i use this layer:
https://ptv-logistics.github.io/fl-labs/ and https://oliverheilig.github.io/voronoi-territories/
The supported options
* *attribution* - the attribution text for the layer data
* *opacity* - the opacity value between 0.0 and 1.0; default = 1.0
* *zIndex* - z-index of the svg root
* *pane* - the name of the pane where the child div is inserted; default: 'overlayPane'
* *pointerEvents* - the pointer-events style for the overlayer, default: null