Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] generated link to a class is wrong #1157

Closed
vahid18u opened this issue Nov 27, 2021 · 8 comments
Closed

[BUG] generated link to a class is wrong #1157

vahid18u opened this issue Nov 27, 2021 · 8 comments
Assignees
Milestone

Comments

@vahid18u
Copy link

Overview of the issue

generated link to a class is wrong.
when I click on a link to my generated class page, it says:
"Cannot GET /documentation/classess/GridLayer.html"

Operating System, Node.js, npm, compodoc version(s)

macOS Big Sur 11.4, Node.js 16.13.0, npm 8.1.0, compodoc 1.1.16

Angular configuration, a package.json file in the root folder
Compodoc installed globally or locally ?

locally

If possible sourcecode of the file where it breaks
If possible your terminal logs before the error
Motivation for or Use Case
Reproduce the error
Related issues
Suggest a Fix
@vogloblinsky vogloblinsky changed the title [BUG] [BUG] generated link to a class is wrong Nov 27, 2021
@vogloblinsky vogloblinsky added this to the 1.1.17 milestone Nov 27, 2021
@vogloblinsky
Copy link
Contributor

Can i have the source code of GridLayer class ?

1 similar comment
@vogloblinsky
Copy link
Contributor

Can i have the source code of GridLayer class ?

@vahid18u
Copy link
Author

vahid18u commented Nov 29, 2021

this is the class:

import { Graticule } from "ol";
import { IMapCanvasSettings } from "../../IMapCanvasSettings";
import { OlOtherLayerFactory } from "../OlLayer Factories/OlOtherLayerFactory";
import { ImmutableLayer } from "./ImmutableLayer";


export class GridLayer extends ImmutableLayer {
  olLayer: Graticule;
  constructor(canvasSettings: IMapCanvasSettings) {
    super(1, "1", "Grid");
    this.olLayer = OlOtherLayerFactory.createGridLayer(canvasSettings);
  }
}

@vogloblinsky
Copy link
Contributor

I cannot reproduce your bug, can i have a sample code of file using GridLayer class please ?

@vahid18u
Copy link
Author

yes of course:

import { IMapCanvasSettings } from "../domain/IMapCanvasSettings";
import { IProjectDto } from "../domain/IProjectDto";
import { AppBaseLayer } from "../domain/layer/AppBaseLayer";
import { ILayerDto } from "../domain/layer/ILayerDto";
import { GridLayer } from "../domain/layer/ImmutableLayers/GridLayer";
import { OpenStreetLayer } from "../domain/layer/ImmutableLayers/OpenStreetLayer";
import { InteractiveVectorLayerFactory } from "../domain/layer/InteractiveVectorLayers/InteractiveVectorLayerFactory";
import { LayerSourceStrategy } from "../domain/layer/LayerSourceStrategy";
import { LayerType } from "../domain/layer/LayerType";
import { LayerTree } from "../domain/LayerTree";
import { Project } from "../domain/Project";
import { OlVectorLayerFactory } from "./olLayerFactories/OlVectorLayerFactory";
import { BackendProjectService } from "./services/backend-project.service";

export class ProjectFactory {
  static createProject(projectDto: IProjectDto, canvasSettings: IMapCanvasSettings, backendProjectService: BackendProjectService): Project {
    const layerTree = new LayerTree();
    // add open street map layer to layerTree
    layerTree.addToTree(new OpenStreetLayer());
    // add grid layer to layerTree
    layerTree.addToTree(new GridLayer(canvasSettings));
    // add project layers to layerTree
    const layers: AppBaseLayer[] = [];
    projectDto.layers.forEach((layerDto: ILayerDto) => {

      const olLayer = OlVectorLayerFactory.createLayer(
        layerDto.metaDatas.sourceStrategy ?? LayerSourceStrategy.FullVector,
        layerDto.id, layerDto.uuid, projectDto.id, backendProjectService);

      const layer = InteractiveVectorLayerFactory
        .createLayer({
          type: <LayerType>layerDto.type,
          projectId: projectDto.id,
          layerDto,
          olLayer
        });
      layers.push(layer);
    });
    layerTree.addToTree({ id: 2, title: "project Layers", layers });
    const project = new Project({
      id: projectDto.id,
      name: projectDto.name,
      uuid: projectDto.uuid,
      description: projectDto.description,
      revision: projectDto.revision,
      layerTree
    });
    return project;
  }

}

@vogloblinsky
Copy link
Contributor

Sorry i need one class where GridLayer is used as a property. The example you give me doesn't reference GridLayer in the page generated by Compodoc.
Thanks

@vahid18u
Copy link
Author

vahid18u commented Dec 4, 2021

I guess you need this class :

import { AppBaseLayer } from "../AppBaseLayer";

/**
 * Abstract class for a set of layers that are not meant to be modified
 * and are only used as background beneath other layers, like {@link GridLayer} and {@link OpenStreetLayer}
 */
export abstract class ImmutableLayer extends AppBaseLayer {
  constructor(id: number, uuid: string, title: string) {
    super(id, uuid, title);
  }
}

@vogloblinsky
Copy link
Contributor

Ok reproduced, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants