ghybs / Leaflet.TileLayer.Fallback

Replaces missing Tiles by scaled lower zoom Tiles
Apache License 2.0
36 stars 18 forks source link

Add support for leaflet-bing-layer #15

Open znebby opened 5 years ago

znebby commented 5 years ago

Is it possible to support this plugin https://github.com/digidem/leaflet-bing-layer with the fallback?

ghybs commented 5 years ago

Hi,

Sorry I do not know how that Bing plugin works exactly, so I will not be able to provide you with a precise answer.

From what I have seen, the Bing QuadTree URL computation is contained in the getTileUrl method, which is also overridden by the Fallback plugin. Due to such collision, I would say that it would probably require quite some rework to merge both features. At least to an extent that it would require a dedicated version of the Fallback, just for the Bing plugin.

If you really need that feature, I am afraid you would have to code it yourself. Feel free to take inspiration from this plugin obviously.

Good luck!

johnd0e commented 5 years ago

the Bing QuadTree URL computation is contained in the getTileUrl method, which is also overridden by the Fallback plugin.

It can be solved if instead of overriding getTileUrl Fallback plugin override _getZoomForUrl method, adding optional parameter there.

ghybs commented 5 years ago

Hi @johnd0e,

Pull Requests are welcome! :-)

johnd0e commented 5 years ago

17