src/ol/format/MVT.js
function layersPBFReader(tag, layers, pbf) {
  if (tag === 3) {
    const layer = {
      keys: [],
      values: [],
      features: []
    };
    const end = pbf.readVarint() + pbf.pos;
    pbf.readFields(layerPBFReader, layer, end);
    layer.length = layer.features.length;
    if (layer.length) {
      layers[layer.name] = layer;
    }
  }
}
function layersPBFReader(tag, layers, pbf) {
  if (tag === 3) {
    const layer = {
      keys: [],
      values: [],
      features: []
    };
    const end = pbf.readVarint() + pbf.pos;
    pbf.readFields(layerPBFReader, layer, end);
    layer.length = layer.features.length;
    if (layer.length) {
      layers[layer.name] = layer;
    }
  }
}
function layersPBFReader ( tag , layers , pbf ) { if ( tag === 3 ) { const layer = { keys : [ ] , values : [ ] , features : [ ] } ; const end = pbf . readVarint ( ) + pbf . pos ; pbf . readFields ( layerPBFReader , layer , end ) ; layer . length = layer . features . length ; if ( layer . length ) { layers [ layer . name ] = layer ; } } }
Reader callback for parsing layers.
@param {number} tag The tag.
@param {Object} layers The layers object.
@param {PBF} pbf The PBF.
Reader callback for parsing layers .