MCPcopy Create free account
hub / github.com/mapbox/pbf / writeTileFeature

Function writeTileFeature

test/fixtures/vector_tile.js:56–61  ·  view source on GitHub ↗
(obj, pbf)

Source from the content-addressed store, hash-verified

54 return obj;
55}
56export function writeTileFeature(obj, pbf) {
57 if (obj.id) pbf.writeVarintField(1, obj.id);
58 if (obj.tags) pbf.writePackedVarint(2, obj.tags);
59 if (obj.type) pbf.writeVarintField(3, obj.type);
60 if (obj.geometry) pbf.writePackedVarint(4, obj.geometry);
61}
62
63export function readTileLayer(pbf, end) {
64 const obj = {version: 1, name: "", features: [], keys: [], values: [], extent: 4096};

Callers

nothing calls this directly

Calls 2

writeVarintFieldMethod · 0.80
writePackedVarintMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…