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

Function writeTileLayer

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

Source from the content-addressed store, hash-verified

74 return obj;
75}
76export function writeTileLayer(obj, pbf) {
77 if (obj.version != null && obj.version !== 1) pbf.writeVarintField(15, obj.version);
78 if (obj.name) pbf.writeStringField(1, obj.name);
79 if (obj.features) for (const item of obj.features) pbf.writeMessage(2, writeTileFeature, item);
80 if (obj.keys) for (const item of obj.keys) pbf.writeStringField(3, item);
81 if (obj.values) for (const item of obj.values) pbf.writeMessage(4, writeTileValue, item);
82 if (obj.extent != null && obj.extent !== 4096) pbf.writeVarintField(5, obj.extent);
83}

Callers

nothing calls this directly

Calls 3

writeVarintFieldMethod · 0.80
writeStringFieldMethod · 0.80
writeMessageMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…