Skip to content
Snippets Groups Projects
Commit cfc800e6 authored by Vink, S.A. (Sjoerd)'s avatar Vink, S.A. (Sjoerd)
Browse files

feat(map_nodelink): cleanup

parent f08e7d3f
No related branches found
No related tags found
1 merge request!151feat(map_nodelink)
Pipeline #137603 passed
......@@ -171,7 +171,7 @@ export class ChoroplethLayer extends CompositeLayer<LayerProps> {
}
renderLayers() {
const { graph, config, visible, hoverObject, isSelecting, getNodeLocation } = this.props;
const { graph, config, hoverObject, isSelecting, getNodeLocation } = this.props;
const { data, selected } = this.state;
const layers: any = [];
......
......@@ -69,10 +69,8 @@ export const MapVis = ({ data, settings, handleSelect, graphMetadata }: Visualiz
const newLayerId = `layer-${Date.now()}`;
setLayer({
id: newLayerId,
type: layerType,
config: settings,
visible: true,
});
setLayerIds((prevIds) => [...prevIds, newLayerId]);
......@@ -96,9 +94,7 @@ export const MapVis = ({ data, settings, handleSelect, graphMetadata }: Visualiz
);
return new layer.type({
id: `${layer.id}`,
graph: data,
visible: layer.visible,
metaData: graphMetadata,
config: settings,
selected: selected,
......
......@@ -4,40 +4,9 @@ export interface LayerProps {
[key: string]: any;
}
export interface GeoJSONData {
type: string;
features: any[];
}
export type Layer = {
id: string;
type: any;
config: any;
visible: boolean;
};
export type GraphType = {
getNode(id: string): Node | null;
getNodes(): Node[];
getNodeLocation(id: string): Coordinate | null;
getEdge(id: string): Edge | null;
getEdges(): Edge[];
consumeMessageFromBackend(queryResult: { nodes: Node[]; edges: Edge[] }): void;
getGraphInfo(): {
nodeAttributes: { [attribute: string]: any };
edgeAttributes: { [attribute: string]: any };
};
};
export type GeoNode = {
id: string;
attributes: {
long: number;
lat: number;
[key: string]: any;
};
connectedEdges: string[];
[key: string]: any;
};
export type Node = {
......@@ -51,16 +20,6 @@ export type Node = {
[key: string]: any;
};
export type GeoEdge = {
id: string;
from: string;
to: string;
attributes: {
[key: string]: any;
};
[key: string]: any;
};
export type Edge = {
id: string;
from: string;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment