componentDidMount()

in public/js/components/app.js [184:206]


  componentDidMount() {

    document.title = this.props.serviceName;

    if (!Map.isSupported()) {
      return;
    }

    const baseLayerStyle = colorMode === 'light' ? 'road_map_desaturated' : 'dark_map';
    const baseLayer = this.props.layers.tms.find((service) => {
      return service.getId() === baseLayerStyle;
    });
    this._toc.selectItem(`tms/${baseLayer.getId()}`, baseLayer);

    const vectorLayerSelection = this._readFileRoute();
    if (vectorLayerSelection) {

      this._map.waitForStyleLoaded(() => {
        this._selectFileLayer(vectorLayerSelection.config);
        this._toc.selectItem(vectorLayerSelection.path, vectorLayerSelection.config);
      });
    }
  }