registerListeners_(map) {
    this.listenerKeys_.push(
      listen(map, MapEventType.MOVEEND, this.updateUrl_, this),
      listen(map.getLayerGroup(), EventType.CHANGE, this.updateUrl_, this),
      listen(map, 'change:layergroup', this.handleChangeLayerGroup_, this),
    );

    if (!this.replace_) {
      addEventListener('popstate', this.updateState_);
    }
  }
@param {import("../Map.js").default} map Map.
@private