@vertigis/viewer-spec
Version:
VertiGIS Viewer Specification
95 lines (94 loc) • 3.4 kB
TypeScript
import type LineSymbol3D from "@arcgis/core/symbols/LineSymbol3D";
import type PictureFillSymbol from "@arcgis/core/symbols/PictureFillSymbol";
import type PictureMarkerSymbol from "@arcgis/core/symbols/PictureMarkerSymbol";
import type PointSymbol3D from "@arcgis/core/symbols/PointSymbol3D";
import type PolygonSymbol3D from "@arcgis/core/symbols/PolygonSymbol3D";
import type SimpleFillSymbol from "@arcgis/core/symbols/SimpleFillSymbol";
import type SimpleLineSymbol from "@arcgis/core/symbols/SimpleLineSymbol";
import type SimpleMarkerSymbol from "@arcgis/core/symbols/SimpleMarkerSymbol";
import type TextSymbol from "@arcgis/core/symbols/TextSymbol";
import type { LineSymbol3DJson, PictureFillSymbolJson, PictureMarkerSymbolJson, PointSymbol3DJson, PolygonSymbol3DJson, SimpleFillSymbolJson, SimpleLineSymbolJson, SimpleMarkerSymbolJson, TextSymbolJson } from "@vertigis/arcgis-extensions/json/SymbolJson.js";
import type { SymbolLike } from "../../messaging/common.js";
import type { ModelProperties } from "../common/ModelProperties.js";
/**
* Base configuration shared by the draw and measurement services.
*/
export interface DrawModelBaseProperties extends ModelProperties {
/**
* The symbol used to draw point markup.
*/
pointSymbol?: SimpleMarkerSymbol | SimpleMarkerSymbolJson | PictureMarkerSymbol | PictureMarkerSymbolJson;
/**
* The symbol used to draw 3D point markup.
*/
pointSymbol3D?: PointSymbol3D | PointSymbol3DJson;
/**
* The symbol used to draw line markup.
*/
lineSymbol?: SimpleLineSymbol | SimpleLineSymbolJson;
/**
* The symbol used to draw 3D line markup.
*/
lineSymbol3D?: LineSymbol3D | LineSymbol3DJson;
/**
* The symbol used to draw polygon markup.
*/
polygonSymbol?: PictureFillSymbol | PictureFillSymbolJson | SimpleFillSymbol | SimpleFillSymbolJson;
/**
* The symbol used to draw 3D polygon markup.
*/
polygonSymbol3D?: PolygonSymbol3D | PolygonSymbol3DJson;
/**
* The symbol used to draw text markup.
*/
textSymbol?: TextSymbol | TextSymbolJson;
/**
* A list of SymbolPresets that can be assigned to graphics.
*/
symbolPresets?: SymbolPresetProperties[];
/**
* Shows only symbol presets and no fine-grain controls when a symbol is
* being edited. If no symbol presets are configured, this property is
* ignored.
*/
showOnlySymbolPresets?: boolean;
}
/**
* Configuration for the draw service.
*/
export interface DrawModelProperties extends DrawModelBaseProperties {
/**
* Whether draw syncing is enabled. If enabled, draw syncing will propagate
* all graphics drawn on any map to all other maps in the layout.
*/
synced?: boolean;
}
/**
* The type of geometry that a given symbol can symbolize.
*/
export type SymbolGeometryType = "point" | "polyline" | "polygon" | "unknown";
/**
* Configuration properties for a SymbolPreset.
*/
export interface SymbolPresetProperties {
/**
* The unique ID.
*/
id?: string;
/**
* The geometry type associated with the symbol.
*/
geometryType?: SymbolGeometryType;
/**
* A description of the SymbolPreset.
*/
description?: string;
/**
* The title of the the SymbolPreset.
*/
title: string;
/**
* The Symbol.
*/
symbol: SymbolLike;
}