jupyter-widgets / ipyleaflet

A Jupyter - Leaflet.js bridge
https://ipyleaflet.readthedocs.io
MIT License
1.48k stars 363 forks source link

Add fetch_options for VectorTileLayer #1097

Open clydebw opened 1 year ago

clydebw commented 1 year ago

Related to this issue, this PR adds fetch_options to VectorTileLayer, allowing credentials to be added to vector tile requests.

For example:

lyr = ipyleaflet.VectorTileLayer(
    url=url,
    fetch_options={
        "credentials": "include"
    }
)

...which would allow cookies to be included in vector tile requests.

I've tested these changes manually, and they seem to work.

clydebw commented 1 year ago

Just realising that this failed a bunch of CI Actions. @martinRenou I don't think I changed anything visually here - is this broken? Is there anything I can do to help fix?