MCPcopy Create free account
hub / github.com/protomaps/PMTiles / getBytes

Method getBytes

js/test/v3.test.ts:180–184  ·  view source on GitHub ↗
(offset: number, length: number)

Source from the content-addressed store, hash-verified

178 }
179
180 async getBytes(offset: number, length: number): Promise<RangeResponse> {
181 const slice = new Uint8Array(this.buffer.slice(offset, offset + length))
182 .buffer;
183 return { data: slice, etag: this.etag };
184 }
185 }
186
187 // echo '{"type":"Polygon","coordinates":[[[0,0],[0,1],[1,1],[1,0],[0,0]]]}' | ./tippecanoe -zg -o test_fixture_1.pmtiles

Callers 1

v3.test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected