code: function writeMultiPolygonGeometry_(geometry) {
    if (geometry instanceof olGeomMultiPolygon) {
      const flatCoordinates = geometry.getFlatCoordinates();
      const stride = geometry.getStride();
      const endss = geometry.getEndss();
      const polygonCount = endss.length;
      let offset = 0;
      const textArray = ['A'];
      for (let i = 0; i < polygonCount; ++i) {
        const ends = endss[i];
        textArray.push('(');
        offset = encodeRings_.call(this,
          flatCoordinates, stride, offset, ends, textArray);
        textArray.push(')');
      }
      return textArray.join('');
    } else {
      throw new Error('Wrong geometry type');
    }
  }
docs: Encode an {@link import("ol/geom/MultiPoligon.js").default} geometry into a logical sequence of
  characters.
  @param {Geometry} geometry Geometry.
  @return {string} Encoded geometry.
  @private
  @hidden
  @this {FeatureHash}