getPointForPositionIndexes()

in modules/layers/src/mode-handlers/extrude-handler.ts [227:244]


  getPointForPositionIndexes(positionIndexes: number[], featureIndex: number) {
    let p1;
    const feature = this.getImmutableFeatureCollection().getObject().features[featureIndex];
    const coordinates: any = feature.geometry.coordinates;
    // for Multi polygons, length will be 3
    if (positionIndexes.length === 3) {
      const [a, b, c] = positionIndexes;
      if (coordinates.length && coordinates[a].length) {
        p1 = coordinates[a][b][c];
      }
    } else {
      const [b, c] = positionIndexes;
      if (coordinates.length && coordinates[b].length) {
        p1 = coordinates[b][c];
      }
    }
    return p1;
  }