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

Function writeTileValue

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

Source from the content-addressed store, hash-verified

33 return obj;
34}
35export function writeTileValue(obj, pbf) {
36 if (obj.string_value) pbf.writeStringField(1, obj.string_value);
37 if (obj.float_value) pbf.writeFloatField(2, obj.float_value);
38 if (obj.double_value) pbf.writeDoubleField(3, obj.double_value);
39 if (obj.int_value) pbf.writeVarintField(4, obj.int_value);
40 if (obj.uint_value) pbf.writeVarintField(5, obj.uint_value);
41 if (obj.sint_value) pbf.writeSVarintField(6, obj.sint_value);
42 if (obj.bool_value) pbf.writeBooleanField(7, obj.bool_value);
43}
44
45export function readTileFeature(pbf, end) {
46 const obj = {id: 0, tags: [], type: 0, geometry: []};

Callers

nothing calls this directly

Calls 6

writeStringFieldMethod · 0.80
writeFloatFieldMethod · 0.80
writeDoubleFieldMethod · 0.80
writeVarintFieldMethod · 0.80
writeSVarintFieldMethod · 0.80
writeBooleanFieldMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…