gi-nx / fetchVistas
function fetchVistas(projectId?: string): Promise<{
created_at: string;
details: {
_pixelsToMeters?: number;
_viewBox?: {
geometry: {
coordinates: [number, number][][];
type: "Polygon";
};
properties: Record<string, any>;
type: "Feature";
};
activeLayer: string;
camera: Camera & {
latitude?: number;
longitude?: number;
};
description?: string;
dpi?: number;
layerTree: LayerTree;
name: string;
order?: number;
scenarios?: string[];
size?: {
height: number;
width: number;
};
snapShot: string;
solarDate: string;
topView: TopView;
};
id: number | "new";
name: string;
project: string | number;
sort_order?: number;
}[]>;Fetches vistas for a project.
Parameters
| Parameter | Type | Description |
|---|---|---|
projectId? | string | The project ID. Defaults to the active project if not provided. |
Returns
Promise<{ created_at: string; details: { _pixelsToMeters?: number; _viewBox?: { geometry: { coordinates: [number, number][][]; type: "Polygon"; }; properties: Record<string, any>; type: "Feature"; }; activeLayer: string; camera: Camera & { latitude?: number; longitude?: number; }; description?: string; dpi?: number; layerTree: LayerTree; name: string; order?: number; scenarios?: string[]; size?: { height: number; width: number; }; snapShot: string; solarDate: string; topView: TopView; }; id: number | "new"; name: string; project: string | number; sort_order?: number; }[]>
A promise that resolves with the project's vistas data.
Throws
If called from scratchpad or if the user does not have permission to access the project.