getLegendUrl(resolution, params) {
    return getLegendUrl(
      {
        url: this.url_,
        params: {
          ...this.params_,
          ...params,
        },
      },
      resolution,
    );
  }
Return the GetLegendGraphic URL, optionally optimized for the passed
resolution and possibly including any passed specific parameters. Returns
`undefined` if the GetLegendGraphic URL cannot be constructed.

@param {number} [resolution] Resolution. If set to undefined, `SCALE`
    will not be calculated and included in URL.
@param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the
    request is generated for this wms layer, else it will try to use the
    configured wms layer. Default `FORMAT` is `image/png`.
    `VERSION` should not be specified here.
@return {string|undefined} GetLegendGraphic URL.
@api