kartena / leaflet-tilejson

TileJSON support for Leaflet
BSD 2-Clause "Simplified" License
49 stars 12 forks source link

Missed Lefalet TileLayer option 'pane' #16

Open netstuff opened 7 years ago

netstuff commented 7 years ago

When I pass option objects with 'pane' attribute to TileJSON.createTileLayer, it missing at new tile layer creation. And I can't control it by pane :(

Short example

options.pane = this.map.getPane(options.pane) || this.map.createPane(options.pane, this.map.getPane('tilePane'));
options.bounds = options.bounds || urlData.bounds;
layer = this.L.TileJSON.createTileLayer(urlData, options);

In this case I want create every TileLayer in separate pane (named by unique identifier) and remove it by user action using a same identitfier.

pthorin commented 6 years ago

You are welcome to submit a pull request. As far as I can remember, this library was created before the introduction of panes, so that's probably why it doesn't work as expected.