in public/js/components/map.js [180:191]
setTmsLayer(source, callback) {
// The setStyle method removes all layers and sources from the map including the overlays.
// We must persist the overlay layers and overlay source by creating a new style from
// the incoming source and the overlay layers.
const newStyle = this._persistOverlayLayers(source);
this._maplibreMap.setStyle(newStyle, { diff: false });
if (callback) {
this.waitForStyleLoaded(callback);
}
}