decodeProperties method

Map<String, VectorTileValue> decodeProperties()

Decode properties from feature tags and key/value pairs got from parent layer

Return key/value pairs

Implementation

Map<String, VectorTileValue> decodeProperties() {
  if (this.properties != null) {
    return this.properties!;
  }
  int length = this.tags.length;
  Map<String, VectorTileValue> properties = {};

  for (int i = 0; i < length; i += 2) {
    int keyIndex = this.tags[i];
    int valueIndex = this.tags[i + 1];

    properties[this.keys![keyIndex]] = this.values![valueIndex];
  }

  this.properties = properties;
  return properties;
}