Currently the loading of the root directory is in the constructor.
This is not desirable when the layer is not the default one, eg when switching between several layers with leaflet Layers Controls, the useless queries may be costly on backend side.
I guess we can start with PMTiles().root ===undefined and load it on first access (at the cost of initial load time)?
Currently the loading of the root directory is in the constructor.
This is not desirable when the layer is not the default one, eg when switching between several layers with leaflet Layers Controls, the useless queries may be costly on backend side.
I guess we can start with
PMTiles().root ===undefined
and load it on first access (at the cost of initial load time)?(There are also leaflet layer control event if needed)