GisLayer
Type alias in @bimworks/viewer3d.
API catalogue · @bimworks/viewer3d · Type alias
type GisLayer = {
assetId?: number | string;
authorization?: string;
colors?: Record<string, [number, number, number, number]>;
concurrency?: number;
contentRevision?: string | number;
coordinateMode?: "GEOGRAPHIC" | "LOCAL";
description?: string;
faceColor?: string | (number)[];
fetchContent?: (viewRegion: unknown) => Promise<unknown>;
heightDatum?: "orthometric" | "ellipsoid";
heightOffsetMeters?: number;
humanUrl?: string;
icon?: string;
id?: string;
layerJsonUrl?: string;
lod?: string | number;
maxTiles?: number;
maxZoomLevel?: number;
name: string;
opacity?: number;
params?: { format?: string; layers?: string; styles?: string; transparent?: boolean | string; version?: string; [name: string]: unknown };
regions?: (string)[];
regionZoom?: number;
renderTileBorder?: boolean;
snapToZero?: boolean;
source?: string;
terrain?: string;
tileSizePixels?: number;
translationMm?: vec3;
type: "3DTILES" | "WMS" | "TMS" | "TERRAIN" | "WMTS" | "UPLOADED_GIS";
url?: URL | string;
urlBuilder?: (settings: unknown, zoom: number, x: number, y: number) => string;
version?: string;
visible?: boolean;
visibleInMenu?: boolean;
zoomOffset?: number;
};A GIS layer definition for Viewer3d.addGisLayer
Members#
| Member | Kind | Description |
|---|---|---|
| assetId | Property | 3DTILES from Cesium ion: the asset id, used with authorization |
| authorization | Property | 3DTILES from Cesium ion: the ion access token. The viewer exchanges it at api.cesium.com for the asset's token and sends that as a Bearer token with every ti… |
| colors | Property | 3DTILES: colour per glTF mesh name, RGBA in 0..1, instead of the material's base colour |
| concurrency | Property | TERRAIN: parallel tile requests (default 8) |
| contentRevision | Property | UPLOADED_GIS: changes when the content changes, so cached content is refetched |
| coordinateMode | Property | UPLOADED_GIS: "GEOGRAPHIC" (WGS84 content placed by the georeference) or "LOCAL" (model coordinates) |
| description | Property | |
| faceColor | Property | TERRAIN loaded on its own: face colour as "#RRGGBB" or [r, g, b] in 0..1 (default light blue, #ADD8E6) |
| fetchContent | Property | UPLOADED_GIS: fetches the content for a view region |
| heightDatum | Property | TERRAIN and 3DTILES: what the service's heights are measured from. "ellipsoid" (the Cesium convention, e.g. 3D BAG) makes the viewer subtract the geoid heigh… |
| heightOffsetMeters | Property | TERRAIN and 3DTILES: constant added to the service's heights before the placement (e.g. minus the geoid undulation of an ellipsoidal service); a terrain's sn… |
| humanUrl | Property | |
| icon | Property | |
| id | Property | Default the id addGisLayer is given |
| layerJsonUrl | Property | TERRAIN: explicit URL of the layer metadata; default url + "layer.json", then url?f=json (OGC API services) |
| lod | Property | UPLOADED_GIS (CityJSON): the level of detail to show |
| maxTiles | Property | TERRAIN: cap on tiles fetched per load (default 400) |
| maxZoomLevel | Property | Imagery: the Web Mercator zoom of the tiles. TERRAIN: the preferred quantized-mesh level (default 17); it is lowered until maxTiles fits |
| name | Property | |
| opacity | Property | 0..1, default 1 (opaque); applied to every (re)build of the layer, change it with Viewer3d.setGisLayerOpacity |
| params | Property | WMS: the GetMap parameters: layers, styles, version ("1.1.1" default, or "1.3.0"), format (default "image/png"), transparent (default true); any other key is… |
| regions | Property | Region codes shown as flags in the GIS panel, e.g. "NL", "EE", "WORLD" |
| regionZoom | Property | TERRAIN loaded on its own: Web Mercator zoom whose 23x23-tile footprint the mesh covers (default 18, the same area as the national orthophotos) |
| renderTileBorder | Property | |
| snapToZero | Property | Flat layers: put the plane at the model's lowest point (default true without terrain). With terrain: lift the terrain under the origin to the model's lowest … |
| source | Property | |
| terrain | Property | Imagery (TMS, WMS, WMTS): id of a TERRAIN layer to drape over. Switching the imagery on switches that terrain on; while the terrain is on the imagery drapes … |
| tileSizePixels | Property | |
| translationMm | Property | |
| type | Property | TERRAIN layers carry no imagery: on their own they are drawn flat-shaded in faceColor; as the terrain companion of a TMS layer they drape that layer's ti… |
| url | Property | |
| urlBuilder | Property | |
| version | Property | |
| visible | Property | |
| visibleInMenu | Property | false hides the layer from the legacy GIS window |
| zoomOffset | Property |
assetId#
assetId?: number | string3DTILES from Cesium ion: the asset id, used with authorization
authorization#
authorization?: string3DTILES from Cesium ion: the ion access token. The viewer exchanges it at api.cesium.com for the asset's token and sends that as a Bearer token with every tile request
colors#
colors?: Record<string, [number, number, number, number]>3DTILES: colour per glTF mesh name, RGBA in 0..1, instead of the material's base colour
concurrency#
concurrency?: numberTERRAIN: parallel tile requests (default 8)
contentRevision#
contentRevision?: string | numberUPLOADED_GIS: changes when the content changes, so cached content is refetched
coordinateMode#
coordinateMode?: "GEOGRAPHIC" | "LOCAL"UPLOADED_GIS: "GEOGRAPHIC" (WGS84 content placed by the georeference) or "LOCAL" (model coordinates)
description#
description?: stringfaceColor#
faceColor?: string | (number)[]TERRAIN loaded on its own: face colour as "#RRGGBB" or [r, g, b] in 0..1 (default light blue, #ADD8E6)
fetchContent#
fetchContent?: (viewRegion: unknown) => Promise<unknown>UPLOADED_GIS: fetches the content for a view region
heightDatum#
heightDatum?: "orthometric" | "ellipsoid"TERRAIN and 3DTILES: what the service's heights are measured from. "ellipsoid" (the Cesium convention, e.g. 3D BAG) makes the viewer subtract the geoid height of its embedded tables (the Netherlands today) before the placement; outside the tables a terrain snaps to the model instead and a tile set keeps its heights (with a warning), unless heightOffsetMeters is given. Default "orthometric": national-datum heights, no shift (EHR)
heightOffsetMeters#
heightOffsetMeters?: numberTERRAIN and 3DTILES: constant added to the service's heights before the placement (e.g. minus the geoid undulation of an ellipsoidal service); a terrain's snap placement ignores it, a tile set applies it under both policies
humanUrl#
humanUrl?: stringicon#
icon?: stringid#
id?: stringDefault the id addGisLayer is given
layerJsonUrl#
layerJsonUrl?: stringTERRAIN: explicit URL of the layer metadata; default url + "layer.json", then url?f=json (OGC API services)
lod#
lod?: string | numberUPLOADED_GIS (CityJSON): the level of detail to show
maxTiles#
maxTiles?: numberTERRAIN: cap on tiles fetched per load (default 400)
maxZoomLevel#
maxZoomLevel?: numberImagery: the Web Mercator zoom of the tiles. TERRAIN: the preferred quantized-mesh level (default 17); it is lowered until maxTiles fits
name#
name: stringopacity#
opacity?: number0..1, default 1 (opaque); applied to every (re)build of the layer, change it with Viewer3d.setGisLayerOpacity
params#
params?: { format?: string; layers?: string; styles?: string; transparent?: boolean | string; version?: string; [name: string]: unknown }WMS: the GetMap parameters: layers, styles, version ("1.1.1" default, or "1.3.0"), format (default "image/png"), transparent (default true); any other key is passed on as a query parameter. The loader sets service, request, the CRS, bbox, width and height itself
regions#
regions?: (string)[]Region codes shown as flags in the GIS panel, e.g. "NL", "EE", "WORLD"
regionZoom#
regionZoom?: numberTERRAIN loaded on its own: Web Mercator zoom whose 23x23-tile footprint the mesh covers (default 18, the same area as the national orthophotos)
renderTileBorder#
renderTileBorder?: booleansnapToZero#
snapToZero?: booleanFlat layers: put the plane at the model's lowest point (default true without terrain). With terrain: lift the terrain under the origin to the model's lowest point instead of using the georeference elevation. 3DTILES: put the set's height 0 at the model's lowest point (default true) instead of placing the tiles by the georeference elevation
source#
source?: stringterrain#
terrain?: stringImagery (TMS, WMS, WMTS): id of a TERRAIN layer to drape over. Switching the imagery on switches that terrain on; while the terrain is on the imagery drapes over it, switching the terrain off flattens the imagery. Without a reference the layer drapes over whichever TERRAIN layer is visible. A terrain that imagery drapes over is not drawn on its own (terrain fusion)
tileSizePixels#
tileSizePixels?: numbertranslationMm#
type#
type: "3DTILES" | "WMS" | "TMS" | "TERRAIN" | "WMTS" | "UPLOADED_GIS"TERRAIN layers carry no imagery: on their own they are drawn flat-shaded in faceColor; as the terrain companion of a TMS layer they drape that layer's tiles.
UPLOADED_GIS: vector content the server prepared (GeoJSON, CityJSON, KLIC files, OGC API features), fetched with fetchContent
url#
url?: URL | stringurlBuilder#
urlBuilder?: (settings: unknown, zoom: number, x: number, y: number) => stringversion#
version?: stringvisible#
visible?: booleanvisibleInMenu#
visibleInMenu?: booleanfalse hides the layer from the legacy GIS window
zoomOffset#
zoomOffset?: number