src/ol/format/MVT.js
function featurePBFReader(tag, feature, pbf) {
  if (tag == 1) {
    feature.id = pbf.readVarint();
  } else if (tag == 2) {
    const end = pbf.readVarint() + pbf.pos;
    while (pbf.pos < end) {
      const key = feature.layer.keys[pbf.readVarint()];
      const value = feature.layer.values[pbf.readVarint()];
      feature.properties[key] = value;
    }
  } else if (tag == 3) {
    feature.type = pbf.readVarint();
  } else if (tag == 4) {
    feature.geometry = pbf.pos;
  }
}
function featurePBFReader(tag, feature, pbf) {
  if (tag == 1) {
    feature.id = pbf.readVarint();
  } else if (tag == 2) {
    const end = pbf.readVarint() + pbf.pos;
    while (pbf.pos < end) {
      const key = feature.layer.keys[pbf.readVarint()];
      const value = feature.layer.values[pbf.readVarint()];
      feature.properties[key] = value;
    }
  } else if (tag == 3) {
    feature.type = pbf.readVarint();
  } else if (tag == 4) {
    feature.geometry = pbf.pos;
  }
}
function featurePBFReader ( tag , feature , pbf ) { if ( tag == 1 ) { feature . id = pbf . readVarint ( ) ; } else if ( tag == 2 ) { const end = pbf . readVarint ( ) + pbf . pos ; while ( pbf . pos < end ) { const key = feature . layer . keys [ pbf . readVarint ( ) ] ; const value = feature . layer . values [ pbf . readVarint ( ) ] ; feature . properties [ key ] = value ; } } else if ( tag == 3 ) { feature . type = pbf . readVarint ( ) ; } else if ( tag == 4 ) { feature . geometry = pbf . pos ; } }
Reader callback for parsing feature.
@param {number} tag The tag.
@param {Object} feature The feature object.
@param {PBF} pbf The PBF.
Reader callback for parsing feature .