@geolibre/core 3.6.1 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ellipsoids-BdHOMRmm.d.mts +448 -0
- package/dist/ellipsoids-BdHOMRmm.d.mts.map +1 -0
- package/dist/ellipsoids-DlTLddDu.mjs +496 -0
- package/dist/ellipsoids-DlTLddDu.mjs.map +1 -0
- package/dist/geodesic.d.mts +70 -0
- package/dist/geodesic.d.mts.map +1 -0
- package/dist/geodesic.mjs +155 -0
- package/dist/geodesic.mjs.map +1 -0
- package/dist/index.d.mts +520 -14
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1481 -1942
- package/dist/index.mjs.map +1 -1
- package/dist/{project-diff-BJDslj2U.d.mts → project-diff-B6AfZk8o.d.mts} +95 -449
- package/dist/project-diff-B6AfZk8o.d.mts.map +1 -0
- package/dist/{project-diff-RBRpSza4.mjs → project-diff-DPGO-zCS.mjs} +1575 -498
- package/dist/project-diff-DPGO-zCS.mjs.map +1 -0
- package/dist/worker-safe.d.mts +2 -1
- package/dist/worker-safe.mjs +3 -1
- package/package.json +9 -4
- package/dist/project-diff-BJDslj2U.d.mts.map +0 -1
- package/dist/project-diff-RBRpSza4.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { $ as collectTransitiveJoinSourceIds, $n as
|
|
1
|
+
import { $ as collectTransitiveJoinSourceIds, $n as ModelPortKind, $r as isDuckDBQueryLayer, $t as EditorTrackingConfig, A as normalizeMapViewState, An as LegendConfig, Ar as QuickFilterTextOperator, At as CollaborationPresence, B as normalizeWidgets, Bn as MAX_PROCESSING_HISTORY, Br as StoryChapterLocation, Bt as DEFAULT_LEGEND_CONFIG, C as isSessionOnlyLayer, Ci as basemapToCesiumImagery, Cn as LayerMetadataLink, Cr as ProjectInteraction, Ct as BLANK_BASEMAP, D as normalizeDashboardColumns, Dn as LayerStyle, Dr as ProjectTemplateEntry, Dt as CollaborationChatMessage, E as normalizeBookmarks, En as LayerQuickFilter, Er as ProjectPreferences, Et as CollabInvite, F as normalizeProcessingHistory, Fn as LegendPanelPosition, Fr as SecondaryMapView, Ft as CommentReply, G as serializeProject, Gn as MapRendererKind, Gr as StrokeDashPreset, Gt as DUCKDB_VECTOR_FEATURE_WARN_COUNT, H as portableWmsTileUrl, Hn as MapGridLayout, Hr as StoryLayerOpacityChange, Ht as DEFAULT_PRIMARY_RENDERER, I as normalizeProjectComments, In as LevelFilterMode, Ir as StoryActiveSlideMode, It as DEFAULT_BASEMAP, J as storyMapHasContent, Jn as MarkerShape, Jr as StyleLibraryEntryKind, Jt as DashboardWidgetAggregation, K as serializeProjectWithLayerCache, Kn as MapScaleUnit, Kr as StrokeWidthUnit, Kt as DUCKDB_VECTOR_ROUTE_BYTES, L as normalizeProjectInteraction, Ln as LineDecoration, Lr as StoryChapter, Lt as DEFAULT_BLEND_MODE, M as normalizeModels, Mn as LegendCustomItem, Mr as RuntimeEnvironmentVariable, Mt as CollaborationState, N as normalizeObiaWorkbench, Nn as LegendCustomShape, Nr as SQL_QUERY_SOURCE_KIND, Nt as CommentAnchor, O as normalizeLegendConfig, On as LayerType, Or as QuickFilterDateKind, Ot as CollaborationMode, P as normalizePrimaryRenderer, Pn as LegendItemOverride, Pr as STROKE_DASH_PRESETS, Pt as CommentAuthor, Q as cascadeLayerJoinRefresh, Qn as ModelGraphPort, Qr as detectNonGeographicCoordinates, Qt as DiagramType, R as normalizeSecondaryMapViews, Rn as MAX_DASHBOARD_COLUMNS, Rr as StoryChapterAlignment, Rt as DEFAULT_DASHBOARD_COLUMNS, S as isAllowedPluginManifestUrl, Si as availableCesiumBasemap, Sn as LayerMetadataContact, Sr as ProjectControlSetting, St as AttributeFormWidget, T as normalizeBookmarkGroups, Ti as sameCesiumImagery, Tn as LayerPopupConfig, Tr as ProjectPluginState, Tt as BlendMode, U as projectFromStore, Un as MapPreferences, Ur as StoryMap, Ut as DEFAULT_PROJECT_PREFERENCES, V as parseProject, Vn as MIN_DASHBOARD_COLUMNS, Vr as StoryInsetPosition, Vt as DEFAULT_MAP_GRID_LAYOUT, W as resolveMapGrid, Wn as MapProjection, Wr as StorySlideMode, Wt as DEFAULT_STORY_MAP, X as applyJoinsToLayer, Xn as ModelGraphNode, Xr as VectorStyleMode, Xt as DiagramField, Y as ApplyLayerJoinsResult, Yn as ModelGraphEdge, Yr as VectorRule, Yt as DashboardWidgetType, Z as applyLayerJoins, Zn as ModelGraphNodeKind, Zr as VectorStyleStop, Zt as DiagramSizeMode, _ as createEmptyProject, _i as geoArrowToFeatureCollection, _n as LayerGroup, _r as ProcessingRunKind, _t as AppPrivilege, a as ProjectDiffOptions, ai as PrintLayoutLegendEntry, an as GeocodingPreferences, ar as PROTOMAPS_BASEMAPS, at as batchDecodePolylines, b as detachProjectCopy, bi as CesiumBasemapId, bn as LayerLevelFilter, br as ProjectBookmarkGroup, bt as AttributeFormFieldConfig, c as diffProjects, ci as isDefaultPrintLayout, cn as LARGE_VECTOR_FEATURE_THRESHOLD, cr as PopupDateFormat, ct as encodePolyline, d as CreateProjectOptions, di as scrubPrintLayoutForLayers, dn as LabelDedupe, dr as PopupFieldKind, dt as unescapePolyline, ei as shouldUseTiledRendering, en as FieldVisibility, er as ModelToolProvider, et as layerJoinKey, f as DEFAULT_PROJECT_NAME, fi as scrubPrintLayoutForRemovedLayers, fn as LabelStyle, fr as ProcessingModel, ft as geojsonHasZCoordinates, g as createDefaultMapView, gi as featureCollectionToGeoArrow, gn as LayerDescriptiveMetadata, gr as ProcessingRun, gt as AppCapabilities, h as applyProjectToStore, hi as computeGeoArrowBBox, hn as LayerConnection, hr as ProcessingRerunRequest, ht as AddTileLayerOptions, i as ProjectDiff, ii as PrintLayoutCorner, in as GeocodingLocator, ir as PROJECT_VERSION, it as PolylineDecodeResult, j as normalizeModelGraph, jn as LegendCustomEntry, jr as RecentProjectEntry, jt as CollaborationRole, k as normalizeMapLayout, kn as LayerVirtualField, kr as QuickFilterKind, kt as CollaborationParticipant, l as jsonValuesEqual, li as normalizePrintLayoutConfig, ln as LAYER_TYPES, lr as PopupFieldConfig, lt as geoJSONToPolylineStr, m as ProjectLayerSerializationCache, mi as GeoArrowGeometryType, mn as LayerCapabilities, mr as ProcessingModelStep, mt as transformGeojsonElevation, n as LayerDiff, ni as DEFAULT_PRINT_LAYOUT, nn as GeoLibreLayer, nr as NonGeographicCoordinates, nt as stripJoinFields, o as ProjectValueChange, oi as PrintLayoutPageFilter, on as GeometryGeneratorType, or as ParticipantIdentity, ot as decodePolyline, p as MAX_PROJECT_BOOKMARKS, pi as GeoArrowBatch, pn as LabelTransform, pr as ProcessingModelGraph, pt as horizontalBbox, q as serializeProjectWithLayerCacheAsync, qn as MapViewState, qr as StyleLibraryEntry, qt as DashboardWidget, r as PluginDiff, ri as PrintLayoutConfig, rn as GeoLibreProject, rr as OPENFREEMAP_BASEMAPS, rt as PolylineBatchOptions, s as diffFeatureCollections, si as createDefaultPrintLayout, sn as IndicatorAggregation, sr as PointRenderer, st as decodePolylineDetailed, t as FeatureChangeSummary, ti as styleValue, tn as FillPattern, tr as NETCDF_IMAGE_SOURCE_KIND, tt as reapplyLayerJoins, u as previewValue, ui as printLayoutConfigsEqual, un as LabelAnchor, ur as PopupFieldFormat, ut as polylineStrToGeoJSON, v as createProjectLayerSerializationCache, vi as isGeoArrowBatch, vn as LayerJoin, vr as ProcessingRunStatus, vt as AppRole, w as normalizeBlankBackgroundColor, wi as normalizeCesiumBasemap, wn as LayerMetadataTemporalExtent, wr as ProjectPluginControlPosition, wt as BLEND_MODES, x as hydrateProjectLayer, xi as CesiumBasemapImagery, xn as LayerLibraryEntry, xr as ProjectComment, xt as AttributeFormValueMapEntry, y as createProjectTemplate, yi as CESIUM_BASEMAPS, yn as LayerJoinStats, yr as ProjectBookmark, yt as AttributeFormConfig, z as normalizeStoryMap, zn as MAX_MAP_GRID_DIM, zr as StoryChapterAnimation, zt as DEFAULT_LAYER_STYLE } from "./project-diff-B6AfZk8o.mjs";
|
|
2
|
+
import { A as LineString, C as meanRadiusMeters, E as FeatureCollection, M as MultiPolygon, N as Point, P as Polygon, S as getPlanetaryBasemapByStyleUrl, T as Feature, _ as getActiveEllipsoid, a as EllipsoidId, b as getEllipsoid, c as PLANETARY_BASEMAP_SENTINEL_PREFIX, d as PlanetaryBasemapGroup, f as PlanetaryBasemapSectionId, g as getActiveBodyRadiusRatio, h as earthLengthToBody, i as Ellipsoid, k as Geometry, l as PLANET_SWITCHER_OPTIONS, m as earthAreaToBody, n as EARTH_MEAN_RADIUS_METERS, o as PLANETARY_BASEMAPS, p as bodyLengthToEarth, r as ELLIPSOIDS, s as PLANETARY_BASEMAP_GROUPS, t as DEFAULT_ELLIPSOID_ID, u as PlanetaryBasemap, v as getActiveMeanRadiusMeters, w as setActiveEllipsoidId, x as getPlanetaryBasemapById, y as getActiveSemiMajorAxisMeters } from "./ellipsoids-BdHOMRmm.mjs";
|
|
3
|
+
import { centralAngle, geodesicDistance, geodesicLength, geodesicRadiusBounds, geodesicRingArea, isLonLat, latLonBoxArea, withinGeodesicDistance } from "./geodesic.mjs";
|
|
2
4
|
import "zustand";
|
|
3
5
|
import "zundo";
|
|
4
6
|
export type TileScheme = "xyz" | "tms";
|
|
@@ -256,6 +258,12 @@ export interface RegionalBasemap {
|
|
|
256
258
|
* are not translated the way UI strings are.
|
|
257
259
|
*/
|
|
258
260
|
name: string;
|
|
261
|
+
/**
|
|
262
|
+
* The tile provider's brand name in Latin script ("Amap", "Tencent Maps"),
|
|
263
|
+
* for messages read outside the region, such as the confirmation shown when
|
|
264
|
+
* an opened project names this basemap. A proper noun, so not translated.
|
|
265
|
+
*/
|
|
266
|
+
provider: string;
|
|
259
267
|
/** Sentinel stored as the basemap style URL. */
|
|
260
268
|
styleUrl: string;
|
|
261
269
|
/** XYZ (or TMS, see {@link scheme}) tile template. */
|
|
@@ -313,6 +321,50 @@ export declare function getRegionalBasemapByStyleUrl(styleUrl: string | undefine
|
|
|
313
321
|
export declare function getRegionalBasemapById(id: string | undefined): RegionalBasemap | undefined;
|
|
314
322
|
/** Whether a style URL is a regional-basemap sentinel, resolvable or not. */
|
|
315
323
|
export declare function isRegionalBasemapSentinel(styleUrl: string | undefined): boolean;
|
|
324
|
+
/**
|
|
325
|
+
* How the store treats a regional basemap that arrives without the user picking
|
|
326
|
+
* it (a project file, share link, or startup restore naming one by its
|
|
327
|
+
* `styleUrl`). The tiles come from servers in mainland China, so loading them
|
|
328
|
+
* unasked sends the user's map requests there.
|
|
329
|
+
*
|
|
330
|
+
* - `"allow"`: apply it as is. This is the store default, so library consumers
|
|
331
|
+
* keep their behaviour; the desktop and web app switch to `"prompt"`.
|
|
332
|
+
* - `"prompt"`: apply the default basemap and hold the regional one for the
|
|
333
|
+
* user to confirm (see {@link RegionalBasemapHold}).
|
|
334
|
+
* - `"block"`: the deployment disabled regional basemaps. Always fall back to
|
|
335
|
+
* the default basemap, including when code sets one directly.
|
|
336
|
+
*/
|
|
337
|
+
export type RegionalBasemapPolicy = "allow" | "prompt" | "block";
|
|
338
|
+
/**
|
|
339
|
+
* A regional basemap the store set aside when a project was loaded. The default
|
|
340
|
+
* basemap renders in its place until the user answers (`"prompt"`), or for good
|
|
341
|
+
* (`"blocked"`, which the app shows as a notice only).
|
|
342
|
+
*/
|
|
343
|
+
export interface RegionalBasemapHold {
|
|
344
|
+
/** The regional sentinel the project asked for. */
|
|
345
|
+
styleUrl: string;
|
|
346
|
+
/** Why the default basemap is showing instead. */
|
|
347
|
+
reason: "prompt" | "blocked";
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Decides which basemap a project load actually applies.
|
|
351
|
+
*
|
|
352
|
+
* Only a resolvable regional sentinel is gated. Every other style URL (and an
|
|
353
|
+
* unknown regional id, which the map controller already replaces with the
|
|
354
|
+
* default basemap) passes through untouched.
|
|
355
|
+
*
|
|
356
|
+
* @param styleUrl - The basemap style URL the project requests.
|
|
357
|
+
* @param policy - The store's current {@link RegionalBasemapPolicy}.
|
|
358
|
+
* @param fallbackStyleUrl - The basemap to apply instead (the default basemap).
|
|
359
|
+
* @param trusted - True when the user already chose this basemap in this
|
|
360
|
+
* session (a template, an undo step, a duplicate), so `"prompt"` does not
|
|
361
|
+
* apply. `"block"` still does.
|
|
362
|
+
* @returns The style URL to apply and, when it was replaced, why.
|
|
363
|
+
*/
|
|
364
|
+
export declare function gateRegionalBasemap(styleUrl: string, policy: RegionalBasemapPolicy, fallbackStyleUrl: string, trusted?: boolean): {
|
|
365
|
+
styleUrl: string;
|
|
366
|
+
held?: RegionalBasemapHold["reason"];
|
|
367
|
+
};
|
|
316
368
|
/**
|
|
317
369
|
* Projections the ArcGIS renderer can draw its flat map in (issue #2708).
|
|
318
370
|
*
|
|
@@ -967,6 +1019,28 @@ export declare function mapZoomStepOutputs(value: unknown, transform: (output: u
|
|
|
967
1019
|
* @returns A `to-number` expression, or `base` when disabled.
|
|
968
1020
|
*/
|
|
969
1021
|
export declare function simpleStyleNumberValue(style: LayerStyle, property: (typeof SIMPLE_STYLE_NUMBER_KEYS)[number], base: number): number | unknown[];
|
|
1022
|
+
/**
|
|
1023
|
+
* Read back the per-feature number lookup {@link simpleStyleNumberValue}
|
|
1024
|
+
* writes, `["to-number", ["coalesce", ["get", key], base], base]` with a
|
|
1025
|
+
* simplestyle number key and a numeric base.
|
|
1026
|
+
*
|
|
1027
|
+
* @param node - A paint value or a node inside one.
|
|
1028
|
+
* @returns The simplestyle key and the layer-level base, or `null` when the
|
|
1029
|
+
* node is not that lookup.
|
|
1030
|
+
*/
|
|
1031
|
+
export declare function readSimpleStyleNumberLookup(node: unknown): {
|
|
1032
|
+
property: (typeof SIMPLE_STYLE_NUMBER_KEYS)[number];
|
|
1033
|
+
base: number;
|
|
1034
|
+
} | null;
|
|
1035
|
+
/**
|
|
1036
|
+
* Whether a paint value reads per-feature simplestyle properties the way the
|
|
1037
|
+
* GeoLibre exporter writes them, anywhere inside it (a lookup can sit inside a
|
|
1038
|
+
* zoom step, a per-rule `case` or an opacity multiplication).
|
|
1039
|
+
*
|
|
1040
|
+
* @param value - A paint value.
|
|
1041
|
+
* @returns `true` when a color or number lookup is found.
|
|
1042
|
+
*/
|
|
1043
|
+
export declare function readsSimpleStyleProperties(value: unknown): boolean;
|
|
970
1044
|
/**
|
|
971
1045
|
* Ground resolution (meters per pixel) at MapLibre zoom 0 on the equator, for
|
|
972
1046
|
* the Web Mercator projection: earth circumference (2*pi*6378137) over the
|
|
@@ -1022,6 +1096,57 @@ export declare function metersWidthExpression(meters: number): unknown[];
|
|
|
1022
1096
|
* @returns A number (constant pixels) or a MapLibre expression array.
|
|
1023
1097
|
*/
|
|
1024
1098
|
export declare function lineWidthValue(style: LayerStyle): number | unknown[];
|
|
1099
|
+
/**
|
|
1100
|
+
* The layer's stroke opacity, clamped to [0, 1]. A missing or non-finite value
|
|
1101
|
+
* (an older project, a hand-edited file) reads as fully opaque.
|
|
1102
|
+
*
|
|
1103
|
+
* @param style - The layer style.
|
|
1104
|
+
* @returns The stroke opacity.
|
|
1105
|
+
*/
|
|
1106
|
+
export declare function strokeOpacityValue(style: LayerStyle): number;
|
|
1107
|
+
/**
|
|
1108
|
+
* A stroke opacity paint value: the layer's {@link LayerStyle.strokeOpacity},
|
|
1109
|
+
* which a per-feature simplestyle `stroke-opacity` replaces when
|
|
1110
|
+
* {@link LayerStyle.simpleStyleEnabled} is set.
|
|
1111
|
+
*
|
|
1112
|
+
* @param style - The layer style.
|
|
1113
|
+
* @returns A number, or the simplestyle lookup expression.
|
|
1114
|
+
*/
|
|
1115
|
+
export declare function strokeOpacityPaintValue(style: LayerStyle): number | unknown[];
|
|
1116
|
+
/**
|
|
1117
|
+
* Whether a value is a usable dash pattern: finite, non-negative lengths with
|
|
1118
|
+
* at least one dash longer than zero. Exported so the style sanitizer and the
|
|
1119
|
+
* importers apply the same rule the renderer does.
|
|
1120
|
+
*
|
|
1121
|
+
* @param value - The candidate pattern.
|
|
1122
|
+
* @returns True when the value can be drawn as a dash pattern.
|
|
1123
|
+
*/
|
|
1124
|
+
export declare function isStrokeDashPattern(value: unknown): value is number[];
|
|
1125
|
+
/**
|
|
1126
|
+
* The `line-dasharray` for the layer, or `null` for a solid line. `null` is
|
|
1127
|
+
* what MapLibre's `setPaintProperty` takes to reset a property, so returning it
|
|
1128
|
+
* (rather than leaving the key out) clears a dash when the user goes back to
|
|
1129
|
+
* solid.
|
|
1130
|
+
*
|
|
1131
|
+
* @param style - The layer style.
|
|
1132
|
+
* @returns The dash pattern, or `null` when the line is solid.
|
|
1133
|
+
*/
|
|
1134
|
+
export declare function strokeDashValue(style: LayerStyle): number[] | null;
|
|
1135
|
+
/**
|
|
1136
|
+
* The {@link STROKE_DASH_PRESETS} name matching a pattern, or `"custom"` when
|
|
1137
|
+
* none does. An empty or unusable pattern is `"solid"`.
|
|
1138
|
+
*
|
|
1139
|
+
* @param dash - A dash pattern.
|
|
1140
|
+
* @returns The preset name, or `"custom"`.
|
|
1141
|
+
*/
|
|
1142
|
+
export declare function strokeDashPresetName(dash: readonly number[] | undefined): StrokeDashPreset | "custom";
|
|
1143
|
+
/**
|
|
1144
|
+
* The layer's line blur in pixels; a missing, negative or non-finite value is 0.
|
|
1145
|
+
*
|
|
1146
|
+
* @param style - The layer style.
|
|
1147
|
+
* @returns The blur in pixels.
|
|
1148
|
+
*/
|
|
1149
|
+
export declare function strokeBlurValue(style: LayerStyle): number;
|
|
1025
1150
|
/**
|
|
1026
1151
|
* Whether a FeatureCollection carries per-feature simplestyle-spec properties
|
|
1027
1152
|
* worth honoring: at least one feature with a valid hex color in a color key
|
|
@@ -1257,18 +1382,44 @@ export declare function vectorCircleColorValue(style: LayerStyle): VectorColorVa
|
|
|
1257
1382
|
*/
|
|
1258
1383
|
export declare function vectorLineColorValue(style: LayerStyle): VectorColorValue;
|
|
1259
1384
|
/**
|
|
1260
|
-
* Resolves the 3D-extrusion height for a layer style
|
|
1261
|
-
* plain meters number, or a data-driven expression.
|
|
1262
|
-
* `
|
|
1263
|
-
*
|
|
1264
|
-
*
|
|
1265
|
-
*
|
|
1266
|
-
*
|
|
1385
|
+
* Resolves the 3D-extrusion height (the roof's altitude) for a layer style
|
|
1386
|
+
* into a MapLibre value: a plain meters number, or a data-driven expression.
|
|
1387
|
+
* With a positive `extrusionFloorHeight` the roof sits that far above the
|
|
1388
|
+
* base (`extrusionBaseValue`, clamped to the ground as MapLibre clamps
|
|
1389
|
+
* `fill-extrusion-base`), whatever the height settings say. Otherwise, in
|
|
1390
|
+
* advanced mode a valid `extrusionHeightExpression` wins; else the height is
|
|
1391
|
+
* the chosen property scaled by `extrusionHeightScale` (`["*", ["to-number",
|
|
1392
|
+
* ["get", prop], 0], scale]`), or a flat `0` when no property is set (so the
|
|
1393
|
+
* layer renders flat rather than erroring). Shared by the map's
|
|
1394
|
+
* fill-extrusion paint and the Add Vector Layer control's extrusion mapping
|
|
1395
|
+
* so both extrude identically.
|
|
1267
1396
|
*
|
|
1268
1397
|
* @param style - The layer style.
|
|
1269
1398
|
* @returns The extrusion height as a number or a MapLibre expression array.
|
|
1270
1399
|
*/
|
|
1271
1400
|
export declare function extrusionHeightValue(style: LayerStyle): number | unknown[];
|
|
1401
|
+
/**
|
|
1402
|
+
* The layer's floor height in metres: a finite `extrusionFloorHeight` above
|
|
1403
|
+
* 0, else 0 (the height is then the roof's altitude). Also 0 for a project
|
|
1404
|
+
* saved before the field existed.
|
|
1405
|
+
*
|
|
1406
|
+
* @param style - The layer style.
|
|
1407
|
+
* @returns The floor height, or 0 when it is off.
|
|
1408
|
+
*/
|
|
1409
|
+
export declare function extrusionFloorHeightValue(style: LayerStyle): number;
|
|
1410
|
+
/**
|
|
1411
|
+
* Resolves the 3D-extrusion base for a layer style into a MapLibre value: a
|
|
1412
|
+
* plain meters number, or a data-driven expression. In advanced mode a valid
|
|
1413
|
+
* `extrusionBaseExpression` wins; otherwise, with `extrusionBaseProperty` set,
|
|
1414
|
+
* the base is `extrusionBase` plus the property scaled by `extrusionBaseScale`
|
|
1415
|
+
* (so floors stack from a `level` field), else the flat `extrusionBase`. Like
|
|
1416
|
+
* {@link extrusionHeightValue} it is an altitude: MapLibre draws a feature
|
|
1417
|
+
* only where its height is above its base.
|
|
1418
|
+
*
|
|
1419
|
+
* @param style - The layer style.
|
|
1420
|
+
* @returns The extrusion base as a number or a MapLibre expression array.
|
|
1421
|
+
*/
|
|
1422
|
+
export declare function extrusionBaseValue(style: LayerStyle): number | unknown[];
|
|
1272
1423
|
/**
|
|
1273
1424
|
* Resolves the 3D-extrusion color for a layer style: a data-driven expression
|
|
1274
1425
|
* when the layer's symbology mode produces one (categorized/graduated/rule/
|
|
@@ -2255,7 +2406,7 @@ export declare function hasActiveQuickFilter(layer: GeoLibreLayer): boolean;
|
|
|
2255
2406
|
*/
|
|
2256
2407
|
export declare function clearQuickFilterValues(filters: readonly LayerQuickFilter[] | undefined): LayerQuickFilter[];
|
|
2257
2408
|
/** The layer fields needed to inspect project-authored feature filters. */
|
|
2258
|
-
type LayerFilterSource = Pick<GeoLibreLayer, "filterExpression" | "quickFilters"
|
|
2409
|
+
type LayerFilterSource = Pick<GeoLibreLayer, "filterExpression" | "quickFilters"> & Partial<Pick<GeoLibreLayer, "levelFilter">>;
|
|
2259
2410
|
/**
|
|
2260
2411
|
* Return a layer's persisted expression filter when it has a usable array
|
|
2261
2412
|
* shape, otherwise return null.
|
|
@@ -2266,8 +2417,8 @@ type LayerFilterSource = Pick<GeoLibreLayer, "filterExpression" | "quickFilters"
|
|
|
2266
2417
|
export declare function activeLayerFilterExpression(layer: LayerFilterSource): unknown[] | null;
|
|
2267
2418
|
/**
|
|
2268
2419
|
* Compile all project-authored filters for a layer into one MapLibre boolean
|
|
2269
|
-
* expression. An explicit expression
|
|
2270
|
-
* layer together.
|
|
2420
|
+
* expression. An explicit expression, Quick Filter controls and the floor
|
|
2421
|
+
* picker's choice narrow the layer together.
|
|
2271
2422
|
*
|
|
2272
2423
|
* @param layer - The layer whose authored filters should be composed.
|
|
2273
2424
|
* @returns A MapLibre filter expression, or null when no authored filter is active.
|
|
@@ -2277,10 +2428,292 @@ export declare function compileLayerFilters(layer: LayerFilterSource): unknown[]
|
|
|
2277
2428
|
* Whether a project-authored expression or Quick Filter currently narrows a
|
|
2278
2429
|
* layer. This drives the filtered indicator and clear action in the layer UI.
|
|
2279
2430
|
*
|
|
2431
|
+
* The floor picker's choice is left out on purpose: the picker is its own
|
|
2432
|
+
* on-map control that shows and resets the choice for every linked layer at
|
|
2433
|
+
* once, so a per-layer "clear filters" action must not desynchronize it.
|
|
2434
|
+
* Renderers still apply it through {@link compileLayerFilters}.
|
|
2435
|
+
*
|
|
2280
2436
|
* @param layer - The layer to inspect.
|
|
2281
|
-
* @returns True when at least one persisted
|
|
2437
|
+
* @returns True when at least one persisted expression or Quick Filter is active.
|
|
2282
2438
|
*/
|
|
2283
2439
|
export declare function hasActiveLayerFilter(layer: LayerFilterSource): boolean;
|
|
2440
|
+
/**
|
|
2441
|
+
* A layer's features narrowed by its authored filters (an expression, Quick
|
|
2442
|
+
* Filters, the floor picker), for a renderer that draws GeoJSON itself rather
|
|
2443
|
+
* than through a MapLibre layer filter, such as the deck.gl 3D Z-value path.
|
|
2444
|
+
*
|
|
2445
|
+
* The same collection comes back while no filter is active, and the same
|
|
2446
|
+
* filtered collection while the filter is unchanged, so caches keyed on the
|
|
2447
|
+
* collection keep hitting. A filter that does not compile leaves every
|
|
2448
|
+
* feature in, as MapLibre would refuse it rather than hide the layer.
|
|
2449
|
+
*
|
|
2450
|
+
* @param layer - The layer whose filters apply.
|
|
2451
|
+
* @param geojson - The features to filter.
|
|
2452
|
+
* @param zoom - The zoom a `["zoom"]` expression sees.
|
|
2453
|
+
* @returns The matching features.
|
|
2454
|
+
*/
|
|
2455
|
+
export declare function applyLayerFilters(layer: LayerFilterSource, geojson: FeatureCollection, zoom?: number): FeatureCollection;
|
|
2456
|
+
/**
|
|
2457
|
+
* Floor picker (issue #3341): the levels a multi-floor layer holds, and the
|
|
2458
|
+
* filter that draws one floor (or one floor and those below it).
|
|
2459
|
+
*
|
|
2460
|
+
* Indoor data stores the floor in many shapes. OpenStreetMap's `level` tag is
|
|
2461
|
+
* text and may name several floors (`"0;1"`) or a span (`"-1-2"`); IMDF stores
|
|
2462
|
+
* a numeric `ordinal`; other exports use a plain number. Rather than compile a
|
|
2463
|
+
* MapLibre expression that tries to parse all of these (string splitting has
|
|
2464
|
+
* no expression operator, and `to-number` throws on `"0;1"`), the picker
|
|
2465
|
+
* resolves the choice against the layer's features once and stores the raw
|
|
2466
|
+
* values that match. The compiled filter is then a plain `in` test, which
|
|
2467
|
+
* MapLibre, Mapbox, Cesium and ArcGIS all evaluate with the same style-spec
|
|
2468
|
+
* code.
|
|
2469
|
+
*/
|
|
2470
|
+
/** One floor as the picker lists it. */
|
|
2471
|
+
export interface LevelEntry {
|
|
2472
|
+
/** Canonical label: a number's shortest form (`"1"` for `"01"`), or the trimmed text. */
|
|
2473
|
+
label: string;
|
|
2474
|
+
/** The floor's number, or `null` for a named floor such as `"G"`. */
|
|
2475
|
+
ordinal: number | null;
|
|
2476
|
+
/** How many features sit on this floor (a multi-level feature counts once per floor). */
|
|
2477
|
+
count: number;
|
|
2478
|
+
}
|
|
2479
|
+
/** A feature as far as level parsing needs it. */
|
|
2480
|
+
interface LevelFeature {
|
|
2481
|
+
properties?: Record<string, unknown> | null;
|
|
2482
|
+
}
|
|
2483
|
+
/** A parsed floor token: its canonical label and number. */
|
|
2484
|
+
interface LevelToken {
|
|
2485
|
+
label: string;
|
|
2486
|
+
ordinal: number | null;
|
|
2487
|
+
}
|
|
2488
|
+
/**
|
|
2489
|
+
* Parse one attribute value into the floors it names.
|
|
2490
|
+
*
|
|
2491
|
+
* Numbers are taken as they are. Text is split on `;` (OSM's list separator),
|
|
2492
|
+
* each part read as a number, an integer span such as `0-2` or `-2--1`
|
|
2493
|
+
* (expanded to every floor it covers), or kept as a named floor.
|
|
2494
|
+
*
|
|
2495
|
+
* @param raw - The attribute value.
|
|
2496
|
+
* @returns The floors it names, possibly empty (for `null`, booleans, blanks).
|
|
2497
|
+
*/
|
|
2498
|
+
export declare function parseLevelValue(raw: unknown): LevelToken[];
|
|
2499
|
+
/**
|
|
2500
|
+
* Whether a feature's level value falls on the chosen floor.
|
|
2501
|
+
*
|
|
2502
|
+
* @param raw - The feature's level attribute.
|
|
2503
|
+
* @param level - The chosen floor's label.
|
|
2504
|
+
* @param mode - `only` matches that floor; `below` also matches every
|
|
2505
|
+
* numbered floor under it (a named floor matches only itself). `all`
|
|
2506
|
+
* matches everything.
|
|
2507
|
+
* @returns True when the feature should be drawn.
|
|
2508
|
+
*/
|
|
2509
|
+
export declare function levelValueMatches(raw: unknown, level: string, mode: LevelFilterMode): boolean;
|
|
2510
|
+
/**
|
|
2511
|
+
* The distinct floors a set of features holds in one field, top floor first.
|
|
2512
|
+
*
|
|
2513
|
+
* @param features - The layer's features.
|
|
2514
|
+
* @param field - The property holding the floor.
|
|
2515
|
+
* @returns One entry per floor with its feature count.
|
|
2516
|
+
*/
|
|
2517
|
+
export declare function collectLevels(features: readonly LevelFeature[] | null | undefined, field: string): LevelEntry[];
|
|
2518
|
+
/**
|
|
2519
|
+
* Merge the floor lists of several layers into one, top floor first, summing
|
|
2520
|
+
* the counts of a floor that appears in more than one layer.
|
|
2521
|
+
*
|
|
2522
|
+
* @param lists - One {@link collectLevels} result per linked layer.
|
|
2523
|
+
* @returns The combined floor list.
|
|
2524
|
+
*/
|
|
2525
|
+
export declare function mergeLevels(lists: readonly (readonly LevelEntry[])[]): LevelEntry[];
|
|
2526
|
+
/**
|
|
2527
|
+
* The distinct raw values of `field` that match a floor choice, in first-seen
|
|
2528
|
+
* order. These are what {@link compileLevelFilter} tests with `in`.
|
|
2529
|
+
*
|
|
2530
|
+
* @param features - The layer's features.
|
|
2531
|
+
* @param field - The property holding the floor.
|
|
2532
|
+
* @param level - The chosen floor's label.
|
|
2533
|
+
* @param mode - The floor picker mode.
|
|
2534
|
+
* @returns The matching values (strings and numbers kept as stored).
|
|
2535
|
+
*/
|
|
2536
|
+
export declare function matchingLevelValues(features: readonly LevelFeature[] | null | undefined, field: string, level: string, mode: LevelFilterMode): (string | number)[];
|
|
2537
|
+
/**
|
|
2538
|
+
* Apply a floor choice to a layer's link, resolving the matching values from
|
|
2539
|
+
* the layer's features.
|
|
2540
|
+
*
|
|
2541
|
+
* Without features (a tile-backed layer, or data not loaded yet) the values
|
|
2542
|
+
* stay unresolved, which draws every floor, rather than resolving to an empty
|
|
2543
|
+
* list that would hide the layer once its data arrives.
|
|
2544
|
+
*
|
|
2545
|
+
* @param filter - The layer's current link.
|
|
2546
|
+
* @param features - The layer's features, or `null`/`undefined` when none are loaded.
|
|
2547
|
+
* @param level - The chosen floor's label, or `null` for every floor.
|
|
2548
|
+
* @param mode - The floor picker mode.
|
|
2549
|
+
* @returns The updated link.
|
|
2550
|
+
*/
|
|
2551
|
+
export declare function selectLevel(filter: LayerLevelFilter, features: readonly LevelFeature[] | null | undefined, level: string | null, mode: LevelFilterMode): LayerLevelFilter;
|
|
2552
|
+
/** The floor shown by the picker: a level (`null` for every floor) and a mode. */
|
|
2553
|
+
export interface LevelChoice {
|
|
2554
|
+
level: string | null;
|
|
2555
|
+
mode: LevelFilterMode;
|
|
2556
|
+
}
|
|
2557
|
+
/** A layer as far as the floor picker reads it. */
|
|
2558
|
+
interface LevelLinkedLayer {
|
|
2559
|
+
id: string;
|
|
2560
|
+
levelFilter?: LayerLevelFilter;
|
|
2561
|
+
geojson?: {
|
|
2562
|
+
features: readonly LevelFeature[];
|
|
2563
|
+
} | null;
|
|
2564
|
+
}
|
|
2565
|
+
/**
|
|
2566
|
+
* The floor choice the picker shows: the first linked layer that has a floor
|
|
2567
|
+
* chosen, so a layer linked later (still on `all`) does not reset the display.
|
|
2568
|
+
*
|
|
2569
|
+
* @param linked - The linked layers.
|
|
2570
|
+
* @returns The chosen level and mode, or every floor.
|
|
2571
|
+
*/
|
|
2572
|
+
export declare function currentLevelChoice(linked: readonly LevelLinkedLayer[]): LevelChoice;
|
|
2573
|
+
/**
|
|
2574
|
+
* Whether two links store the same choice, independent of key order (a
|
|
2575
|
+
* project written by the Python API may order the keys differently).
|
|
2576
|
+
*
|
|
2577
|
+
* @param a - One link.
|
|
2578
|
+
* @param b - The other.
|
|
2579
|
+
* @returns True when they draw the same features.
|
|
2580
|
+
*/
|
|
2581
|
+
export declare function sameLevelLink(a: LayerLevelFilter, b: LayerLevelFilter): boolean;
|
|
2582
|
+
/**
|
|
2583
|
+
* The link updates that put every linked layer on one floor choice, with the
|
|
2584
|
+
* matching values resolved from each layer's own features: a layer linked
|
|
2585
|
+
* after a floor was chosen, a project written without the values (the Python
|
|
2586
|
+
* API without inline data), or data that changed since the choice was made.
|
|
2587
|
+
*
|
|
2588
|
+
* @param linked - The linked layers.
|
|
2589
|
+
* @param choice - The floor to apply; defaults to {@link currentLevelChoice}.
|
|
2590
|
+
* @returns One update per layer whose stored link differs.
|
|
2591
|
+
*/
|
|
2592
|
+
export declare function resolveLevelLinks(linked: readonly LevelLinkedLayer[], choice?: LevelChoice): {
|
|
2593
|
+
id: string;
|
|
2594
|
+
levelFilter: LayerLevelFilter;
|
|
2595
|
+
}[];
|
|
2596
|
+
/**
|
|
2597
|
+
* Whether a link narrows the layer: a floor is chosen and its values resolved.
|
|
2598
|
+
*
|
|
2599
|
+
* @param filter - The layer's link, if any.
|
|
2600
|
+
* @returns True when {@link compileLevelFilter} would return a filter.
|
|
2601
|
+
*/
|
|
2602
|
+
export declare function isLevelFilterActive(filter: LayerLevelFilter | null | undefined): boolean;
|
|
2603
|
+
/**
|
|
2604
|
+
* Compile a floor picker link into a MapLibre filter expression.
|
|
2605
|
+
*
|
|
2606
|
+
* @param filter - The layer's link, if any.
|
|
2607
|
+
* @returns An `in` test over the resolved values, or `null` when every floor
|
|
2608
|
+
* is drawn (no link, `all` mode, no floor chosen, or values unresolved).
|
|
2609
|
+
*/
|
|
2610
|
+
export declare function compileLevelFilter(filter: LayerLevelFilter | null | undefined): unknown[] | null;
|
|
2611
|
+
/**
|
|
2612
|
+
* The floor a feature is on, as the floor picker labels it: the first floor its
|
|
2613
|
+
* level value names that the picker lists (a room spanning floors `0;1` goes
|
|
2614
|
+
* to floor 0), or `null` when it names none of them.
|
|
2615
|
+
*
|
|
2616
|
+
* @param raw - The feature's level attribute.
|
|
2617
|
+
* @param levels - The floors the picker lists.
|
|
2618
|
+
* @returns The floor's label, or `null`.
|
|
2619
|
+
*/
|
|
2620
|
+
export declare function featureLevel(raw: unknown, levels: readonly LevelEntry[]): string | null;
|
|
2621
|
+
/**
|
|
2622
|
+
* Guess which field holds the floor.
|
|
2623
|
+
*
|
|
2624
|
+
* @param fields - The layer's field names.
|
|
2625
|
+
* @returns The best candidate, or `null` when none looks like a floor field.
|
|
2626
|
+
*/
|
|
2627
|
+
export declare function guessLevelField(fields: readonly string[]): string | null;
|
|
2628
|
+
/**
|
|
2629
|
+
* List a zip archive's entry paths from its central directory, reading only
|
|
2630
|
+
* the end of the archive (a byte-range reader), never the whole file. Shared by
|
|
2631
|
+
* the plugin file-drop hints and the IMDF detection (issue #3341), so a large
|
|
2632
|
+
* shapefile zip is ruled out without being read.
|
|
2633
|
+
*/
|
|
2634
|
+
export type ReadRange = (offset: number, length: number) => Promise<Uint8Array>;
|
|
2635
|
+
/**
|
|
2636
|
+
* List the paths inside a zip from its central directory, reading only the tail
|
|
2637
|
+
* of the archive rather than the whole file.
|
|
2638
|
+
*
|
|
2639
|
+
* Deliberately not listed (the result is undefined, so a handler can still claim
|
|
2640
|
+
* by file name): archives with bytes in front of them (self-extracting zips),
|
|
2641
|
+
* and spanned or multi-disk archives. The entries are a hint for `claim`, not a full zip
|
|
2642
|
+
* parser; a handler that needs these cases unpacks the file itself in `open`.
|
|
2643
|
+
*
|
|
2644
|
+
* @param size - The archive's size in bytes.
|
|
2645
|
+
* @param readRange - Reads a byte range of the archive.
|
|
2646
|
+
* @returns The entry paths in archive order, or undefined when the file has no
|
|
2647
|
+
* readable central directory (not a zip, or truncated).
|
|
2648
|
+
*/
|
|
2649
|
+
export declare function listZipEntryPaths(size: number, readRange: ReadRange): Promise<string[] | undefined>;
|
|
2650
|
+
/** Whether an archive entry is macOS resource-fork noise (`__MACOSX/`, `._name`). */
|
|
2651
|
+
export declare function isMacOsZipMetadata(path: string): boolean;
|
|
2652
|
+
/**
|
|
2653
|
+
* Whether a list of zip entry paths is an IMDF archive: a `manifest.json` beside
|
|
2654
|
+
* a `venue`, `level` or `unit` GeoJSON file, in any folder, ignoring case and
|
|
2655
|
+
* macOS metadata entries.
|
|
2656
|
+
*
|
|
2657
|
+
* @param paths - The archive's entry paths.
|
|
2658
|
+
* @returns True for an IMDF archive.
|
|
2659
|
+
*/
|
|
2660
|
+
export declare function isImdfArchiveEntries(paths: readonly string[]): boolean;
|
|
2661
|
+
/** A byte-range reader over a `Blob` (or `File`), reading only the slices asked for. */
|
|
2662
|
+
export declare function blobRangeReader(blob: Blob): ReadRange;
|
|
2663
|
+
/** A byte-range reader over bytes already in memory. */
|
|
2664
|
+
export declare function bytesRangeReader(bytes: Uint8Array): ReadRange;
|
|
2665
|
+
/**
|
|
2666
|
+
* Whether an archive of `size` bytes is IMDF, reading only its central
|
|
2667
|
+
* directory through `readRange`.
|
|
2668
|
+
*
|
|
2669
|
+
* @param size - The archive's size in bytes.
|
|
2670
|
+
* @param readRange - Reads a byte range of the archive.
|
|
2671
|
+
* @returns True for an IMDF archive; false for any other zip or a non-zip.
|
|
2672
|
+
*/
|
|
2673
|
+
export declare function isImdfZipRange(size: number, readRange: ReadRange): Promise<boolean>;
|
|
2674
|
+
/**
|
|
2675
|
+
* Whether a `Blob` (a picked or dropped file) is an IMDF zip, reading only its
|
|
2676
|
+
* central directory.
|
|
2677
|
+
*
|
|
2678
|
+
* @param blob - The file.
|
|
2679
|
+
* @returns True for an IMDF archive.
|
|
2680
|
+
*/
|
|
2681
|
+
export declare function isImdfZipBlob(blob: Blob): Promise<boolean>;
|
|
2682
|
+
/** What probing a zip URL found. */
|
|
2683
|
+
export interface ImdfUrlProbe {
|
|
2684
|
+
/** Whether the archive is IMDF. */
|
|
2685
|
+
imdf: boolean;
|
|
2686
|
+
/**
|
|
2687
|
+
* The whole archive when the probe had to download it (a server that ignores
|
|
2688
|
+
* `Range` requests). An IMDF archive is then not downloaded again; a zip that
|
|
2689
|
+
* is not IMDF is downloaded again by the caller's control.
|
|
2690
|
+
*/
|
|
2691
|
+
bytes?: Uint8Array;
|
|
2692
|
+
}
|
|
2693
|
+
/**
|
|
2694
|
+
* Probe a zip URL for IMDF with HTTP range requests: the tail first (which
|
|
2695
|
+
* also gives the archive's size), then the central directory if it starts
|
|
2696
|
+
* before the tail.
|
|
2697
|
+
*
|
|
2698
|
+
* Two hosts need more. One that ignores `Range` answers with the whole file
|
|
2699
|
+
* (status 200); one that serves ranges cross-origin without exposing
|
|
2700
|
+
* `Content-Range` leaves the archive's size unknown. Either way the archive is
|
|
2701
|
+
* read whole instead, up to {@link MAX_PROBE_DOWNLOAD_BYTES}: a larger one is
|
|
2702
|
+
* reported as not IMDF without reading its body, so the control downloads it
|
|
2703
|
+
* once rather than twice. Below the cap, a non-IMDF archive read this way is
|
|
2704
|
+
* downloaded again by the control.
|
|
2705
|
+
*
|
|
2706
|
+
* Detection also needs the page to send `Range` cross-origin: a host whose
|
|
2707
|
+
* preflight refuses it makes the first request reject, which throws here. The
|
|
2708
|
+
* caller then passes the URL to the control, which loads an IMDF zip as a
|
|
2709
|
+
* zipped shapefile.
|
|
2710
|
+
*
|
|
2711
|
+
* @param url - The archive's URL.
|
|
2712
|
+
* @param fetchImpl - `fetch`, injectable for tests.
|
|
2713
|
+
* @returns Whether the archive is IMDF, and its bytes if they were downloaded.
|
|
2714
|
+
* @throws Error when the URL cannot be fetched at all.
|
|
2715
|
+
*/
|
|
2716
|
+
export declare function probeImdfZipUrl(url: string, fetchImpl?: typeof fetch): Promise<ImdfUrlProbe>;
|
|
2284
2717
|
/**
|
|
2285
2718
|
* Default inferred capabilities for a layer based on its type and metadata.
|
|
2286
2719
|
*
|
|
@@ -2651,7 +3084,7 @@ export declare const STYLE_LIBRARY_BUNDLE_VERSION = 1;
|
|
|
2651
3084
|
* adjustments so a symbol preset restyles a layer without dismantling its
|
|
2652
3085
|
* classification or labeling.
|
|
2653
3086
|
*/
|
|
2654
|
-
export declare const SYMBOL_STYLE_KEYS: readonly ["fillColor", "strokeColor", "strokeWidth", "strokeWidthUnit", "fillOpacity", "circleRadius", "fillPattern", "fillPatternColor", "fillPatternSvg", "markerEnabled", "markerShape", "markerColor", "markerSize", "markerSvg"];
|
|
3087
|
+
export declare const SYMBOL_STYLE_KEYS: readonly ["fillColor", "strokeColor", "strokeWidth", "strokeWidthUnit", "strokeOpacity", "strokeDash", "strokeBlur", "fillOpacity", "circleRadius", "fillPattern", "fillPatternColor", "fillPatternSvg", "markerEnabled", "markerShape", "markerColor", "markerSize", "markerSvg"];
|
|
2655
3088
|
/**
|
|
2656
3089
|
* The {@link LayerStyle} keys a `"ramp"` entry captures. The classified
|
|
2657
3090
|
* attribute (`vectorStyleProperty`) and the concrete stops are deliberately
|
|
@@ -4174,6 +4607,26 @@ interface LayersSlice {
|
|
|
4174
4607
|
setLayerQuickFilters: (id: string, filters: LayerQuickFilter[]) => void;
|
|
4175
4608
|
/** Set or clear the project-persisted expression filter for a layer. */
|
|
4176
4609
|
setLayerFilterExpression: (id: string, expression: unknown[] | null) => void;
|
|
4610
|
+
/**
|
|
4611
|
+
* Link a layer to the floor picker (issue #3341), or unlink it with `null`.
|
|
4612
|
+
* Linking a layer draws every floor until a floor is chosen.
|
|
4613
|
+
*/
|
|
4614
|
+
setLayerLevelFilter: (id: string, filter: LayerLevelFilter | null) => void;
|
|
4615
|
+
/**
|
|
4616
|
+
* Choose a floor in the floor picker: every linked layer is narrowed to
|
|
4617
|
+
* `level` (`null` for every floor) under `mode`, in one update, with the
|
|
4618
|
+
* matching values resolved from each layer's own features.
|
|
4619
|
+
*/
|
|
4620
|
+
setLevelSelection: (level: string | null, mode: LevelFilterMode) => void;
|
|
4621
|
+
/**
|
|
4622
|
+
* Write floor picker links the picker re-resolved on its own (values missing
|
|
4623
|
+
* from a saved project, or data that changed). Not a user edit: the project
|
|
4624
|
+
* stays clean and, called through `withoutHistory`, no undo step is added.
|
|
4625
|
+
*/
|
|
4626
|
+
reconcileLevelLinks: (updates: {
|
|
4627
|
+
id: string;
|
|
4628
|
+
levelFilter: LayerLevelFilter;
|
|
4629
|
+
}[]) => void;
|
|
4177
4630
|
reorderLayer: (id: string, direction: "up" | "down") => void;
|
|
4178
4631
|
moveLayer: (id: string, targetIndex: number) => void;
|
|
4179
4632
|
moveLayersRelative: (layerIds: string[], targetLayerId: string, position: "above" | "below") => void;
|
|
@@ -4366,6 +4819,47 @@ interface MapViewSlice {
|
|
|
4366
4819
|
setBasemapOpacity: (opacity: number) => void;
|
|
4367
4820
|
setBlankBackgroundColor: (color: string | null) => void;
|
|
4368
4821
|
setPreferences: (preferences: ProjectPreferences) => void;
|
|
4822
|
+
/**
|
|
4823
|
+
* How a regional basemap (served from mainland China) that a loaded project
|
|
4824
|
+
* names is treated; see {@link RegionalBasemapPolicy}. Not project data: the
|
|
4825
|
+
* app sets it once at startup from the deployment policy.
|
|
4826
|
+
*/
|
|
4827
|
+
regionalBasemapPolicy: RegionalBasemapPolicy;
|
|
4828
|
+
/**
|
|
4829
|
+
* The regional basemap the last project load set aside in favour of the
|
|
4830
|
+
* default basemap, or null. The app shell renders a confirmation (or, when
|
|
4831
|
+
* blocked, a notice) from it. Not project data and not in undo history.
|
|
4832
|
+
*/
|
|
4833
|
+
regionalBasemapHold: RegionalBasemapHold | null;
|
|
4834
|
+
/**
|
|
4835
|
+
* Bumped whenever the basemap changes because the user (or code acting for
|
|
4836
|
+
* them) chose it: a basemap setter, or Load on the regional prompt. Not
|
|
4837
|
+
* bumped by project loads, collaboration snapshots or undo. Lets observers
|
|
4838
|
+
* tell a chosen basemap from one that arrived with data, e.g. so a regional
|
|
4839
|
+
* basemap is only remembered for the next launch when it was chosen.
|
|
4840
|
+
*/
|
|
4841
|
+
basemapChoiceGeneration: number;
|
|
4842
|
+
/**
|
|
4843
|
+
* The user's answer to the regional-basemap prompt this session, per
|
|
4844
|
+
* regional style URL (true for Load). A later load naming the same basemap
|
|
4845
|
+
* reuses it instead of asking again, so a host that re-sends its project
|
|
4846
|
+
* (the Jupyter widget on every Python-side change) does not re-prompt.
|
|
4847
|
+
* Session-only: never persisted or saved into a project.
|
|
4848
|
+
*/
|
|
4849
|
+
regionalBasemapAnswers: Record<string, boolean>;
|
|
4850
|
+
/** Set the {@link regionalBasemapPolicy}. Switching to `"block"` drops a pending prompt. */
|
|
4851
|
+
setRegionalBasemapPolicy: (policy: RegionalBasemapPolicy) => void;
|
|
4852
|
+
/**
|
|
4853
|
+
* Answer the held regional basemap. With `load` true and the hold still
|
|
4854
|
+
* belonging to the open project, the regional basemap is applied without
|
|
4855
|
+
* marking the project dirty or recording an undo step (it is what the file
|
|
4856
|
+
* already says). Otherwise the default basemap stays. Either way the hold is
|
|
4857
|
+
* cleared. The answer is remembered for the session unless `remember` is
|
|
4858
|
+
* false (the dialog was dismissed rather than answered).
|
|
4859
|
+
*/
|
|
4860
|
+
resolveRegionalBasemapHold: (load: boolean, options?: {
|
|
4861
|
+
remember?: boolean;
|
|
4862
|
+
}) => void;
|
|
4369
4863
|
}
|
|
4370
4864
|
interface ProcessingSlice {
|
|
4371
4865
|
/** Saved processing pipelines (batch/model chaining; issue #344). */
|
|
@@ -4450,6 +4944,7 @@ interface ProjectSlice {
|
|
|
4450
4944
|
projectName: string;
|
|
4451
4945
|
projectPath: string | null;
|
|
4452
4946
|
projectGeneration: number;
|
|
4947
|
+
projectLoaded: boolean;
|
|
4453
4948
|
isDirty: boolean;
|
|
4454
4949
|
projectPlugins: ProjectPluginState | null;
|
|
4455
4950
|
legend: LegendConfig;
|
|
@@ -4474,9 +4969,20 @@ interface ProjectSlice {
|
|
|
4474
4969
|
layers?: GeoLibreLayer[];
|
|
4475
4970
|
layerGroups?: LayerGroup[];
|
|
4476
4971
|
}) => void;
|
|
4972
|
+
/**
|
|
4973
|
+
* Replace the open project with `project`.
|
|
4974
|
+
*
|
|
4975
|
+
* A regional basemap the project names is gated by `regionalBasemapPolicy`:
|
|
4976
|
+
* under `"prompt"` the default basemap is applied and the regional one is
|
|
4977
|
+
* held in `regionalBasemapHold` for the user to confirm, under `"block"` it is
|
|
4978
|
+
* always replaced. Pass `trustBasemap: true` for a load whose basemap the user
|
|
4979
|
+
* already chose in this session (an undo step, a duplicate, a template, a
|
|
4980
|
+
* host-driven embed load), which skips the prompt but not the block.
|
|
4981
|
+
*/
|
|
4477
4982
|
loadProject: (project: GeoLibreProject, path?: string | null, options?: {
|
|
4478
4983
|
rememberRecent?: boolean;
|
|
4479
4984
|
presenting?: boolean;
|
|
4985
|
+
trustBasemap?: boolean;
|
|
4480
4986
|
}) => void;
|
|
4481
4987
|
setProjectPath: (path: string | null) => void;
|
|
4482
4988
|
setProjectName: (name: string) => void;
|
|
@@ -6197,5 +6703,5 @@ export declare function patchJpegCogSource(source: unknown): unknown;
|
|
|
6197
6703
|
export declare function withJpegTablesPatch<M extends {
|
|
6198
6704
|
openCog: (input: never) => Promise<unknown>;
|
|
6199
6705
|
}>(module: M): M;
|
|
6200
|
-
export { AddTileLayerOptions, AppCapabilities, AppPrivilege, AppRole, type AppState, ApplyLayerJoinsResult, type ArcGISLocatorCapabilities, AttributeFormConfig, AttributeFormFieldConfig, AttributeFormValueMapEntry, AttributeFormWidget, BLANK_BASEMAP, BLEND_MODES, BlendMode, CESIUM_BASEMAPS, CesiumBasemapId, CesiumBasemapImagery, type CesiumIonAssetKind, type CesiumIonLayerOptions, type CesiumIonQuickPick, type CesiumIonQuickPickGroup, type CesiumKmlLayerOptions, CollabInvite, CollaborationChatMessage, CollaborationMode, CollaborationParticipant, CollaborationPresence, CollaborationRole, CollaborationState, CommentAnchor, CommentAuthor, CommentReply, type ConversionToolKind, CreateProjectOptions, type CredentialRedactionResult, type CzmlDocument, type CzmlLayerOptions, type CzmlPacket, type CzmlSource, DEFAULT_BASEMAP, DEFAULT_BLEND_MODE, DEFAULT_DASHBOARD_COLUMNS, DEFAULT_ELLIPSOID_ID, DEFAULT_LAYER_STYLE, DEFAULT_LEGEND_CONFIG, DEFAULT_MAP_GRID_LAYOUT, DEFAULT_PRIMARY_RENDERER, DEFAULT_PRINT_LAYOUT, DEFAULT_PROJECT_NAME, DEFAULT_PROJECT_PREFERENCES, DEFAULT_STORY_MAP, DUCKDB_VECTOR_FEATURE_WARN_COUNT, DUCKDB_VECTOR_ROUTE_BYTES, DashboardWidget, DashboardWidgetAggregation, DashboardWidgetType, DiagramField, DiagramSizeMode, DiagramType, EARTH_MEAN_RADIUS_METERS, ELLIPSOIDS, EditorTrackingConfig, Ellipsoid, EllipsoidId, FeatureChangeSummary, FieldVisibility, FillPattern, GeoArrowBatch, GeoArrowGeometryType, GeoLibreLayer, GeoLibreProject, type GeocodeMatch, type GeocodeRequest, type GeocodeStatus, type GeocodeSuggestion, type GeocoderConfig, GeocodingLocator, type GeocodingPreferenceInput, GeocodingPreferences, type GeocodingProvider, type GeocodingProviderId, type GeocodingTokenProvider, GeometryGeneratorType, type GpsStatusFix, type IdentifyState, IndicatorAggregation, LARGE_VECTOR_FEATURE_THRESHOLD, LAYER_TYPES, LabelAnchor, LabelDedupe, LabelStyle, LabelTransform, LayerCapabilities, LayerConnection, LayerDescriptiveMetadata, LayerDiff, LayerGroup, LayerJoin, LayerJoinStats, LayerLibraryEntry, LayerMetadataContact, LayerMetadataLink, LayerMetadataTemporalExtent, LayerPopupConfig, LayerQuickFilter, LayerStyle, type LayerSummary, LayerType, LayerVirtualField, LegendConfig, LegendCustomEntry, LegendCustomItem, LegendCustomShape, LegendItemOverride, LegendPanelPosition, LineDecoration, MAX_DASHBOARD_COLUMNS, MAX_MAP_GRID_DIM, MAX_PROCESSING_HISTORY, MAX_PROJECT_BOOKMARKS, MIN_DASHBOARD_COLUMNS, MapGridLayout, MapPreferences, MapProjection, MapRendererKind, MapScaleUnit, MapViewState, MarkerShape, ModelGraphEdge, ModelGraphNode, ModelGraphNodeKind, ModelGraphPort, ModelPortKind, ModelToolProvider, NETCDF_IMAGE_SOURCE_KIND, type NetworkToolKind, type NominatimForwardResult, type NominatimReverseResult, NonGeographicCoordinates, OPENFREEMAP_BASEMAPS, PLANETARY_BASEMAPS, PLANETARY_BASEMAP_GROUPS, PLANETARY_BASEMAP_SENTINEL_PREFIX, PLANET_SWITCHER_OPTIONS, PROJECT_VERSION, PROTOMAPS_BASEMAPS, ParticipantIdentity, PlanetaryBasemap, PlanetaryBasemapGroup, PlanetaryBasemapSectionId, PluginDiff, PointRenderer, PolylineBatchOptions, PolylineDecodeResult, PopupDateFormat, PopupFieldConfig, PopupFieldFormat, PopupFieldKind, PrintLayoutConfig, PrintLayoutCorner, PrintLayoutLegendEntry, PrintLayoutPageFilter, ProcessingModel, ProcessingModelGraph, ProcessingModelStep, ProcessingRerunRequest, ProcessingRun, ProcessingRunKind, ProcessingRunStatus, ProjectBookmark, ProjectBookmarkGroup, ProjectComment, ProjectControlSetting, type ProjectCredentialLookup, ProjectDiff, ProjectDiffOptions, ProjectInteraction, ProjectLayerSerializationCache, ProjectPluginControlPosition, ProjectPluginState, ProjectPreferences, ProjectTemplateEntry, ProjectValueChange, QuickFilterDateKind, QuickFilterKind, QuickFilterTextOperator, type RasterToolKind, RecentProjectEntry, type ReverseGeocodeDisplay, RuntimeEnvironmentVariable, SQL_QUERY_SOURCE_KIND, SecondaryMapView, type StatisticsToolKind, StoryActiveSlideMode, StoryChapter, StoryChapterAlignment, StoryChapterAnimation, StoryChapterLocation, StoryInsetPosition, StoryLayerOpacityChange, StoryMap, StorySlideMode, StrokeWidthUnit, StyleLibraryEntry, StyleLibraryEntryKind, VectorRule, VectorStyleMode, VectorStyleStop, type VectorToolKind, applyJoinsToLayer, applyLayerJoins, applyProjectToStore, availableCesiumBasemap, basemapToCesiumImagery, batchDecodePolylines, bodyLengthToEarth, cascadeLayerJoinRefresh, collectTransitiveJoinSourceIds, computeGeoArrowBBox, createDefaultMapView, createDefaultPrintLayout, createEmptyProject, createProjectLayerSerializationCache, createProjectTemplate, decodePolyline, decodePolylineDetailed, detachProjectCopy, detectNonGeographicCoordinates, diffFeatureCollections, diffProjects, earthAreaToBody, earthLengthToBody, encodePolyline, featureCollectionToGeoArrow, geoArrowToFeatureCollection, geoJSONToPolylineStr, geojsonHasZCoordinates, getActiveBodyRadiusRatio, getActiveEllipsoid, getActiveMeanRadiusMeters, getActiveSemiMajorAxisMeters, getEllipsoid, getPlanetaryBasemapById, getPlanetaryBasemapByStyleUrl, horizontalBbox, hydrateProjectLayer, isAllowedPluginManifestUrl, isDefaultPrintLayout, isDuckDBQueryLayer, isGeoArrowBatch, isSessionOnlyLayer, jsonValuesEqual, layerJoinKey, meanRadiusMeters, normalizeBlankBackgroundColor, normalizeBookmarkGroups, normalizeBookmarks, normalizeCesiumBasemap, normalizeDashboardColumns, normalizeLegendConfig, normalizeMapLayout, normalizeMapViewState, normalizeModelGraph, normalizeModels, normalizeObiaWorkbench, normalizePrimaryRenderer, normalizePrintLayoutConfig, normalizeProcessingHistory, normalizeProjectComments, normalizeProjectInteraction, normalizeSecondaryMapViews, normalizeStoryMap, normalizeWidgets, parseProject, polylineStrToGeoJSON, portableWmsTileUrl, previewValue, printLayoutConfigsEqual, projectFromStore, reapplyLayerJoins, resolveMapGrid, sameCesiumImagery, scrubPrintLayoutForLayers, scrubPrintLayoutForRemovedLayers, serializeProject, serializeProjectWithLayerCache, serializeProjectWithLayerCacheAsync, setActiveEllipsoidId, shouldUseTiledRendering, storyMapHasContent, stripJoinFields, styleValue, transformGeojsonElevation, unescapePolyline };
|
|
6706
|
+
export { AddTileLayerOptions, AppCapabilities, AppPrivilege, AppRole, type AppState, ApplyLayerJoinsResult, type ArcGISLocatorCapabilities, AttributeFormConfig, AttributeFormFieldConfig, AttributeFormValueMapEntry, AttributeFormWidget, BLANK_BASEMAP, BLEND_MODES, BlendMode, CESIUM_BASEMAPS, CesiumBasemapId, CesiumBasemapImagery, type CesiumIonAssetKind, type CesiumIonLayerOptions, type CesiumIonQuickPick, type CesiumIonQuickPickGroup, type CesiumKmlLayerOptions, CollabInvite, CollaborationChatMessage, CollaborationMode, CollaborationParticipant, CollaborationPresence, CollaborationRole, CollaborationState, CommentAnchor, CommentAuthor, CommentReply, type ConversionToolKind, CreateProjectOptions, type CredentialRedactionResult, type CzmlDocument, type CzmlLayerOptions, type CzmlPacket, type CzmlSource, DEFAULT_BASEMAP, DEFAULT_BLEND_MODE, DEFAULT_DASHBOARD_COLUMNS, DEFAULT_ELLIPSOID_ID, DEFAULT_LAYER_STYLE, DEFAULT_LEGEND_CONFIG, DEFAULT_MAP_GRID_LAYOUT, DEFAULT_PRIMARY_RENDERER, DEFAULT_PRINT_LAYOUT, DEFAULT_PROJECT_NAME, DEFAULT_PROJECT_PREFERENCES, DEFAULT_STORY_MAP, DUCKDB_VECTOR_FEATURE_WARN_COUNT, DUCKDB_VECTOR_ROUTE_BYTES, DashboardWidget, DashboardWidgetAggregation, DashboardWidgetType, DiagramField, DiagramSizeMode, DiagramType, EARTH_MEAN_RADIUS_METERS, ELLIPSOIDS, EditorTrackingConfig, Ellipsoid, EllipsoidId, FeatureChangeSummary, FieldVisibility, FillPattern, GeoArrowBatch, GeoArrowGeometryType, GeoLibreLayer, GeoLibreProject, type GeocodeMatch, type GeocodeRequest, type GeocodeStatus, type GeocodeSuggestion, type GeocoderConfig, GeocodingLocator, type GeocodingPreferenceInput, GeocodingPreferences, type GeocodingProvider, type GeocodingProviderId, type GeocodingTokenProvider, GeometryGeneratorType, type GpsStatusFix, type IdentifyState, IndicatorAggregation, LARGE_VECTOR_FEATURE_THRESHOLD, LAYER_TYPES, LabelAnchor, LabelDedupe, LabelStyle, LabelTransform, LayerCapabilities, LayerConnection, LayerDescriptiveMetadata, LayerDiff, LayerGroup, LayerJoin, LayerJoinStats, LayerLevelFilter, LayerLibraryEntry, LayerMetadataContact, LayerMetadataLink, LayerMetadataTemporalExtent, LayerPopupConfig, LayerQuickFilter, LayerStyle, type LayerSummary, LayerType, LayerVirtualField, LegendConfig, LegendCustomEntry, LegendCustomItem, LegendCustomShape, LegendItemOverride, LegendPanelPosition, LevelFilterMode, LineDecoration, MAX_DASHBOARD_COLUMNS, MAX_MAP_GRID_DIM, MAX_PROCESSING_HISTORY, MAX_PROJECT_BOOKMARKS, MIN_DASHBOARD_COLUMNS, MapGridLayout, MapPreferences, MapProjection, MapRendererKind, MapScaleUnit, MapViewState, MarkerShape, ModelGraphEdge, ModelGraphNode, ModelGraphNodeKind, ModelGraphPort, ModelPortKind, ModelToolProvider, NETCDF_IMAGE_SOURCE_KIND, type NetworkToolKind, type NominatimForwardResult, type NominatimReverseResult, NonGeographicCoordinates, OPENFREEMAP_BASEMAPS, PLANETARY_BASEMAPS, PLANETARY_BASEMAP_GROUPS, PLANETARY_BASEMAP_SENTINEL_PREFIX, PLANET_SWITCHER_OPTIONS, PROJECT_VERSION, PROTOMAPS_BASEMAPS, ParticipantIdentity, PlanetaryBasemap, PlanetaryBasemapGroup, PlanetaryBasemapSectionId, PluginDiff, PointRenderer, PolylineBatchOptions, PolylineDecodeResult, PopupDateFormat, PopupFieldConfig, PopupFieldFormat, PopupFieldKind, PrintLayoutConfig, PrintLayoutCorner, PrintLayoutLegendEntry, PrintLayoutPageFilter, ProcessingModel, ProcessingModelGraph, ProcessingModelStep, ProcessingRerunRequest, ProcessingRun, ProcessingRunKind, ProcessingRunStatus, ProjectBookmark, ProjectBookmarkGroup, ProjectComment, ProjectControlSetting, type ProjectCredentialLookup, ProjectDiff, ProjectDiffOptions, ProjectInteraction, ProjectLayerSerializationCache, ProjectPluginControlPosition, ProjectPluginState, ProjectPreferences, ProjectTemplateEntry, ProjectValueChange, QuickFilterDateKind, QuickFilterKind, QuickFilterTextOperator, type RasterToolKind, RecentProjectEntry, type ReverseGeocodeDisplay, RuntimeEnvironmentVariable, SQL_QUERY_SOURCE_KIND, STROKE_DASH_PRESETS, SecondaryMapView, type StatisticsToolKind, StoryActiveSlideMode, StoryChapter, StoryChapterAlignment, StoryChapterAnimation, StoryChapterLocation, StoryInsetPosition, StoryLayerOpacityChange, StoryMap, StorySlideMode, StrokeDashPreset, StrokeWidthUnit, StyleLibraryEntry, StyleLibraryEntryKind, VectorRule, VectorStyleMode, VectorStyleStop, type VectorToolKind, applyJoinsToLayer, applyLayerJoins, applyProjectToStore, availableCesiumBasemap, basemapToCesiumImagery, batchDecodePolylines, bodyLengthToEarth, cascadeLayerJoinRefresh, centralAngle, collectTransitiveJoinSourceIds, computeGeoArrowBBox, createDefaultMapView, createDefaultPrintLayout, createEmptyProject, createProjectLayerSerializationCache, createProjectTemplate, decodePolyline, decodePolylineDetailed, detachProjectCopy, detectNonGeographicCoordinates, diffFeatureCollections, diffProjects, earthAreaToBody, earthLengthToBody, encodePolyline, featureCollectionToGeoArrow, geoArrowToFeatureCollection, geoJSONToPolylineStr, geodesicDistance, geodesicLength, geodesicRadiusBounds, geodesicRingArea, geojsonHasZCoordinates, getActiveBodyRadiusRatio, getActiveEllipsoid, getActiveMeanRadiusMeters, getActiveSemiMajorAxisMeters, getEllipsoid, getPlanetaryBasemapById, getPlanetaryBasemapByStyleUrl, horizontalBbox, hydrateProjectLayer, isAllowedPluginManifestUrl, isDefaultPrintLayout, isDuckDBQueryLayer, isGeoArrowBatch, isLonLat, isSessionOnlyLayer, jsonValuesEqual, latLonBoxArea, layerJoinKey, meanRadiusMeters, normalizeBlankBackgroundColor, normalizeBookmarkGroups, normalizeBookmarks, normalizeCesiumBasemap, normalizeDashboardColumns, normalizeLegendConfig, normalizeMapLayout, normalizeMapViewState, normalizeModelGraph, normalizeModels, normalizeObiaWorkbench, normalizePrimaryRenderer, normalizePrintLayoutConfig, normalizeProcessingHistory, normalizeProjectComments, normalizeProjectInteraction, normalizeSecondaryMapViews, normalizeStoryMap, normalizeWidgets, parseProject, polylineStrToGeoJSON, portableWmsTileUrl, previewValue, printLayoutConfigsEqual, projectFromStore, reapplyLayerJoins, resolveMapGrid, sameCesiumImagery, scrubPrintLayoutForLayers, scrubPrintLayoutForRemovedLayers, serializeProject, serializeProjectWithLayerCache, serializeProjectWithLayerCacheAsync, setActiveEllipsoidId, shouldUseTiledRendering, storyMapHasContent, stripJoinFields, styleValue, transformGeojsonElevation, unescapePolyline, withinGeodesicDistance };
|
|
6201
6707
|
//# sourceMappingURL=index.d.mts.map
|