digidem / leaflet-bing-layer

Bing Maps Layer for Leaflet v1.0.0
http://digidem.github.io/leaflet-bing-layer/
87 stars 53 forks source link

Set min/max Native Zoom for Tile Layers #24

Closed ChrisGrohHS closed 7 years ago

ChrisGrohHS commented 7 years ago

This PR defaults the min/max native zoom levels to the levels provided by Bing's API. It also removes code that overwrites the minZoom option when it is less than 1 since that shouldn't be necessary now that minNativeZoom is specified.

gmaclennan commented 7 years ago

Thanks for this @ChrisGrohHS. I think we should override options.[min|max]NativeZoom in initialize() rather than pass them as default options, we don't want to allow users to override these options, since it would break things.

ChrisGrohHS commented 7 years ago

I could see applications for overwriting them. For example, most of the ocean only has images up to zoom 13. So someone might choose to set the maxNativeZoom to 13 if their circumstances warranted it. While rare, I suspect that people inadvertently modifying these settings without knowing what they're doing would be rare as well.

gmaclennan commented 7 years ago

Good point @ChrisGrohHS, let's go ahead and merge. If you have time to add a note in the README, great, my days are full for the next week.