Skip to content

Zlib error getting tileJSON using Google Cloud Storage #292

Answered by highway900
highway900 asked this question in Q&A
Discussion options

You must be logged in to vote

Ok I have solved this!

The Buffer object returned by the nodejs google cloud sdk has access to an ArrayBuffer through the .buffer method. But it is an ArrayBuffer of the Buffer object. So in order to get the ArrayBuffer of the data I needed to do a dance that takes a slice of the arraybuffer offset and the length.
This was not obvious to me as I am not a native node / js / typescript user. Interrogation of the arraybuffer showed it was different to the buffer object. I hope to make a PR for a gcp cloud function version of the pmtiles mvt reader soon. Cheers

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@highway900
Comment options

@highway900
Comment options

Comment options

You must be logged in to vote
2 replies
@highway900
Comment options

@bdon
Comment options

bdon Nov 16, 2023
Maintainer

Comment options

You must be logged in to vote
1 reply
@bdon
Comment options

bdon Nov 19, 2023
Maintainer

Answer selected by highway900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #291 on November 14, 2023 06:50.