-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use zoom parameter if passed #5822
Conversation
Unfortunately it breaks TileLayer's zoomOffset option. #6004 |
Hi, Thank you @lpikora for pointing out that PR!
Sounds to me that the proper place for such a modification / override for that purpose might have been in But in the first place, I think we could have spotted the regression earlier should this PR have been first reported as an issue, with all required information in it (in particular: Leaflet version, bug description and minimal test case reproduction), and this PR had included a test spec. Follow-up of corrective action in issue #6004. |
cf #6004 #6006 Before this change, `coords.z` would not taken into account, and was always overriden by `this._tileZoom`. In the normal flow, `coords.z` is anyway set from `this._tileZoom` before `getTileUrl` is called (in GridLayer._update). But this prevents using `getTileUrl` out of this `_update` method. There are some scenarios where this is needed (see #5822), or (which is the case in uMap) when wanting to display a tile as a tilelayer preview.
cf #6004 #6006 Before this change, `coords.z` would not taken into account, and was always overriden by `this._tileZoom`. In the normal flow, `coords.z` is anyway set from `this._tileZoom` before `getTileUrl` is called (in GridLayer._update). But this prevents using `getTileUrl` out of this `_update` method. There are some scenarios where this is needed (see #5822), or (which is the case in uMap) when wanting to display a tile as a tilelayer preview.
cf #6004 #6006 Before this change, `coords.z` would not taken into account, and was always overriden by `this._tileZoom`. In the normal flow, `coords.z` is anyway set from `this._tileZoom` before `getTileUrl` is called (in GridLayer._update). But this prevents using `getTileUrl` out of this `_update` method. There are some scenarios where this is needed (see #5822), or (which is the case in uMap) when wanting to display a tile as a tilelayer preview.
cf #6004 #6006 Before this change, `coords.z` would not taken into account, and was always overriden by `this._tileZoom`. In the normal flow, `coords.z` is anyway set from `this._tileZoom` before `getTileUrl` is called (in GridLayer._update). But this prevents using `getTileUrl` out of this `_update` method. There are some scenarios where this is needed (see #5822), or (which is the case in uMap) when wanting to display a tile as a tilelayer preview.
We have an offline layer, which caches the tiles and we need to generate URL for various zoom level (https://github.com/mWater/offline-leaflet-map). We did override this method there but I think this should also be supported in leaflet itself!
It only supplies the z parameter from the current zoom level of the map right now