Skip to content

Commit 4cab4b7

Browse files
committed
Add zoom_offset param to TileLayer
1 parent 7f83f27 commit 4cab4b7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ipyleaflet/leaflet.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@ class TileLayer(RasterLayer):
577577
Whether the layer is wrapped around the antimeridian.
578578
tms: boolean, default False
579579
If true, inverses Y axis numbering for tiles (turn this on for TMS services).
580+
zoom_offset: int, default 0
581+
The zoom number used in tile URLs will be offset with this value.
580582
show_loading: boolean, default False
581583
Whether to show a spinner when tiles are loading.
582584
loading: boolean, default False (dynamically updated)
@@ -601,6 +603,7 @@ class TileLayer(RasterLayer):
601603
detect_retina = Bool(False).tag(sync=True, o=True)
602604
no_wrap = Bool(False).tag(sync=True, o=True)
603605
tms = Bool(False).tag(sync=True, o=True)
606+
zoom_offset = Int(0).tag(sync=True, o=True)
604607
show_loading = Bool(False).tag(sync=True)
605608
loading = Bool(False, read_only=True).tag(sync=True)
606609

js/src/layers/TileLayer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export class LeafletTileLayerModel extends rasterlayer.LeafletRasterLayerModel {
2424
no_wrap: false,
2525
tms: false,
2626
show_loading: false,
27-
loading: false
27+
loading: false,
28+
zoom_offset: 0
2829
};
2930
}
3031
}

0 commit comments

Comments
 (0)