public MultiPolygon toMultiPolygonFromOptions(
            MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM) {

        MultiPolygon multiPolygon = new MultiPolygon(hasZ, hasM);

        for (PolygonOptions mapPolygon : multiPolygonOptions
                .getPolygonOptions()) {
            Polygon polygon = toPolygon(mapPolygon);
            multiPolygon.addPolygon(polygon);
        }

        return multiPolygon;
    }
public MultiPolygon toMultiPolygonFromOptions ( MultiPolygonOptions multiPolygonOptions , boolean hasZ , boolean hasM ) { MultiPolygon multiPolygon = new MultiPolygon ( hasZ , hasM ) ; for ( PolygonOptions mapPolygon : multiPolygonOptions . getPolygonOptions ( ) ) { Polygon polygon = toPolygon ( mapPolygon ) ; multiPolygon . addPolygon ( polygon ) ; } return multiPolygon ; }
Convert a list of {@link PolygonOptions} to a {@link MultiPolygon}

@param multiPolygonOptions multi polygon options
@param hasZ                has z flag
@param hasM                has m flag
@return multi polygon