Parse an MVT tile and return layer metadata as a JSON string.
Returns information about all layers in the tile: name, extent, feature count, and geometry type distribution.
bytes
A JSON string with layer info:
[{"name":"layer_name","extent":4096,"version":2,"featureCount":42,"geometryTypes":{"point":10,"linestring":20,"polygon":12}}] Copy
[{"name":"layer_name","extent":4096,"version":2,"featureCount":42,"geometryTypes":{"point":10,"linestring":20,"polygon":12}}]
const info = mvtLayerInfo(new Uint8Array(buffer));// info = '[{"name":"water","extent":4096,"featureCount":23,...}]' Copy
const info = mvtLayerInfo(new Uint8Array(buffer));// info = '[{"name":"water","extent":4096,"featureCount":23,...}]'
Parse an MVT tile and return layer metadata as a JSON string.
Returns information about all layers in the tile: name, extent, feature count, and geometry type distribution.
Parameters
bytes— Raw MVT protobuf bytes.Returns
A JSON string with layer info:
Usage (JS)