diff --git a/ipyleaflet/leaflet.py b/ipyleaflet/leaflet.py index 8e981f7f0..7b21f8480 100644 --- a/ipyleaflet/leaflet.py +++ b/ipyleaflet/leaflet.py @@ -963,6 +963,8 @@ class VectorTileLayer(Layer): Vector tile service attribution. vector_tile_layer_styles: dict, default {} CSS Styles to apply to the vector data. + fetch_options: dict, default {} + Options passed to `fetch`, e.g. {credentials: 'same-origin'} to send cookie for the current domain. """ _view_name = Unicode('LeafletVectorTileLayerView').tag(sync=True) @@ -973,6 +975,8 @@ class VectorTileLayer(Layer): vector_tile_layer_styles = Dict().tag(sync=True, o=True) + fetch_options = Dict().tag(sync=True, o=True) + def redraw(self): """Force redrawing the tiles. diff --git a/js/src/layers/VectorTileLayer.js b/js/src/layers/VectorTileLayer.js index 1d459cb18..91714c1af 100644 --- a/js/src/layers/VectorTileLayer.js +++ b/js/src/layers/VectorTileLayer.js @@ -11,6 +11,7 @@ export class LeafletVectorTileLayerModel extends layer.LeafletLayerModel { _model_name: 'LeafletVectorTileLayerModel', url: '', vectorTileLayerStyles: {}, + fetchOptions: {}, }; } }