code: function encodeStyles_(styles, geometryType, encodedStyles) {
    const styleType = StyleTypes_[geometryType];
    console.assert(styleType !== undefined);
    for (let i = 0; i < styles.length; ++i) {
      const style = styles[i];
      const fillStyle = style.getFill();
      const imageStyle = style.getImage();
      const strokeStyle = style.getStroke();
      const textStyle = style.getText();
      if (styleType == ngeoFormatFeatureHashStyleType.POLYGON) {
        if (fillStyle !== null) {
          encodeStylePolygon_(
            fillStyle, strokeStyle, encodedStyles);
        }
      } else if (styleType == ngeoFormatFeatureHashStyleType.LINE_STRING) {
        if (strokeStyle !== null) {
          encodeStyleLine_(strokeStyle, encodedStyles);
        }
      } else if (styleType == ngeoFormatFeatureHashStyleType.POINT) {
        if (imageStyle !== null) {
          encodeStylePoint_(imageStyle, encodedStyles);
        }
      }
      if (textStyle !== null) {
        encodeStyleText_(textStyle, encodedStyles);
      }
    }
  }
docs: For a type of geometry, transforms an array of {@link import("ol/style/Style.js").default} into
  a logical sequence of characters and put the result into the given encoded
  styles's array.
  @param {Array<import("ol/style/Style.js").default>} styles Styles.
  @param {import("ol/geom/GeometryType.js").default} geometryType Geometry type.
  @param {Array<string>} encodedStyles Encoded styles array.
  @private
  @hidden