ghybs / Leaflet.TileLayer.Fallback

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

Fix for commonjs/browserify environments #1

Closed noonian closed 8 years ago

noonian commented 8 years ago

Hello. Thanks for writing this library!

TL.Fallback does not get assigned in commonjs/requirejs environments. This change updates the Leaflet constructor so it works in those environments.

ghybs commented 8 years ago

Hi,

Thank you a lot for spotting the issue and for the PR!

I was wondering if we should assign the new Fallback property on L.TileLayer for commonjs as well? Please what is the common / best practice in commonjs world for such plugins?

Not sure exactly how to do it though… (sorry I am not very familiar with commonjs)

ghybs commented 8 years ago

Thank you!