@globalfishingwatch/pbf
v1.0.11
Published
To use custom decoders for gfw api responses:
Downloads
18
Keywords
Readme
@globalfishingwatch/pbf
To use custom decoders for gfw api responses:
- Import the decoder function
import { vessels } from '@globalfishingwatch/pbf/decoders/vessels'
- Use it in the response
promise
.then((r) => r.arrayBuffer())
.then((buffer) => {
const track = vessels.Track.decode(new Uint8Array(buffer))
return track.data
})