wasm-spatial-core
    Preparing search index...

    Function mvtLayerInfo

    • 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 — Raw MVT protobuf bytes.

      A JSON string with layer info:

      [{"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,...}]'

      Parameters

      • bytes: Uint8Array

      Returns string