Closed reyemtm closed 2 months ago
If you are willing to add this let me know and I'll fix the TS errors.
This could lead to unexpected behavior because transformRequest
is per-request: it could depend on some JS variables outside of the function, or it could be modified after the map is created with setTransformRequest
. This PR would only capture the output of transformRequest at the first load of the pmtiles archive.
FetchSource
is explicitly designed for static headers to add that do not change over the lifetime of the object.
Ok good points. I'll use the fetch source method. Thanks
On Wed, Sep 11, 2024, 12:09 AM Brandon Liu @.***> wrote:
This could lead to unexpected behavior because transformRequest is per-request: it could depend on some JS variables outside of the function, or it could be modified after the map is created with setTransformRequest. This PR would only capture the output of transformRequest at the first load of the pmtiles archive.
FetchSource is explicitly designed for static headers to add that do not change over the lifetime of the object.
— Reply to this email directly, view it on GitHub https://github.com/protomaps/PMTiles/pull/446#issuecomment-2342634906, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ2HUJBEHLH5KYFAZLTIKLZV7F67AVCNFSM6AAAAABN76QAAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBSGYZTIOJQGY . You are receiving this because you authored the thread.Message ID: @.***>