tilelayer data from private GitHub repo using authorization token #5499
-
Hi, would it be possible to have TileLayer's getTileData retrieve data from a private GitHub repo by passing an Authorization token? I got the moon image example working on ObservableHQ (link), but I would like to read the JPEG pyramid images from a private repo using something like this (below I'm loading a JSON from a private repo by passing the token using ObservableHQ's secrets).
Would I be able to pass in the token using the existing loader or would I need to make a custom loader? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 21 replies
-
If you need per-tile handling or post processing of the data, you can also provide your own getTileData prop. |
Beta Was this translation helpful? Give feedback.
-
You should be able to pass loadOptions: {fetch: {headers}} |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick help @Pessimistress and @kylebarron. I'll try that out and update here. |
Beta Was this translation helpful? Give feedback.
-
I tried adding
|
Beta Was this translation helpful? Give feedback.
I tried adding
loadOptions
to the TileLayet, but I am getting a 404 error on the GET request (from the console). Am I setting the loadOptions correctly?