A plugin for leaflet v1^
.
Catches unhandled canvas layer events and re-dispatches them to the next pane in a container.
Example use:
const map = L;// prepare a container to hold our z stackable layer panesconst container = map; const myEventForwarder = // ref to leaflet map map: map // events to forward events: click: true mousemove: true // throttle options for mousemove events (same as underscore.js) throttleMs: 100 throttleOptions: leading: true trailing: false ; // enable event forwardingmyEventForwarder; // disable event forwardingmyEventForwarder;
Shouts outs
- Based largely on this gist by perliedman
License
Apache 2