| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(geolens): remember and auto-connect server (#2472) * feat(geolens): remember and auto-connect server * Address Claude review feedback - Exclude Tauri webview origins from the current-origin GeoLens preset. - Gate same-origin auto-connect behind the Docker or build configuration sentinel so static sites remain idle. - Generalize the service URL logging comment for the added GeoLens setting. * Address Claude review feedback - Add a GEOLIBRE_GEOLENS_URL=off opt-out that suppresses saved and same-origin auto-connect defaults. * Address final automated review feedback - Normalize GeoLens sentinel settings case-insensitively. - Clarify the Docker boot log when GeoLens auto-connect is disabled. * Address CodeRabbit review feedback - Reject query-bearing GeoLens server roots before publishing or logging them. - Trim configured defaults before matching sentinel values and cover whitespace variants. * Address Claude review feedback - Preserve baked GeoLens defaults when no runtime override is supplied. - Keep stock images on the documented same-origin default at build time. * Address Claude review feedback - Accept same-origin as an explicit GeoLens runtime sentinel. - Reject fragment-bearing server roots alongside query parameters. - Document GeoLens server-root validation and runtime default precedence. * Address CodeRabbit review feedback - Normalize scheme-less GeoLens runtime hosts to HTTPS while preserving strict validation. * Harden GeoLens URL validation - Reject non-loopback HTTP and non-HTTP GeoLens server URLs. - Apply shared validation to same-origin and configured defaults. - Add regression coverage for safe and unsafe server URLs. * Allow IPv6 loopback GeoLens URLs - Keep Docker runtime validation consistent with client-side loopback handling. | 5 天前 | |
feat(arcgis): add the ArcGIS Maps SDK for JavaScript as an optional CDN-loaded rendering engine (#2423) * feat(arcgis): add the ArcGIS Maps SDK for JavaScript as an optional CDN-loaded rendering engine Adds "arcgis" as a fourth renderer next to MapLibre, Mapbox and Cesium. Nothing is bundled: the engine imports the SDK's ES modules from Esri's versioned CDN at runtime (packages/map/src/arcgis-sdk.ts), so dist/, the wheel and the installers stay the same size. - arcgis-layers.ts compiles store layers into SDK layer plans; GeoJSON symbology is evaluated per feature with the style-spec engine and baked into a unique-value renderer, filters and labels included. XYZ/WMTS templates, WMS GetMap templates, vector tiles, ArcGIS services and image overlays have translations. - arcgis-engine.ts implements MapEngine: camera (rotation vs bearing), layer sync and ordering, basemap translation via the shared cesium-imagery catalog plus Esri basemap styles when an API key is present, hit-test identify, highlight, extent drawing, manual placement, capture, and the SDK widgets as built-in controls. - ArcgisCanvas.tsx owns construction and the store subscription; PrimaryArcgisCanvas hosts it in the shell and split panes. - Device-local ArcGIS API key under Settings → Environment Variables, ARCGIS_API_KEY bridge in vite.config.ts, getArcgisApiKey in core. - Add Data greys out sources without an adapter; layer panels badge "No ArcGIS". - CSP allow-lists js.arcgis.com in tauri.conf.json and nginx.conf; the service worker caches the SDK for offline reuse. - Python, MCP, embed and agent-skill renderer lists accept "arcgis"; project format carries preferences.map.arcgisBasemap. - Tests: arcgis-layers, arcgis-engine (fake SDK), arcgis-renderer; opt-in e2e/arcgis-renderer.spec.ts; translations for every locale; docs/arcgis-renderer.md and a maintenance note. Refs #2421 * fix(arcgis): use the view's own attribution and stop rebuilding layers on opacity changes - Drop the deprecated Attribution widget: the 5.x view draws attribution itself while `attributionVisible` is on (Esri requires it), so the engine sets that instead of mounting a widget, which also removes the deprecation warning. - Ignore the SDK's "Aborted" layer-view errors and errors for layers the engine has already removed: a restyle rebuilds the native layer and the outgoing one's cancelled load was surfacing in the error banner once per slider tick. - Compile vector-tile styles at full opacity and visible so the VectorTileLayer's native opacity/visibility carry those, and an opacity change no longer rebuilds the layer. - `fullExtent` is read-only on VectorTileLayer; only tile and WMS layers receive it. Refs #2421 * Address CodeRabbit review feedback - useArcgisApiKey: read the device-local key directly as a fallback so an ArcGIS pane that mounts with the app gets the saved key before the first runtime-env projection (which fires no change event); the resolver still wins once it answers. - vite.config.ts: give the ArcGIS SDK its own `geolibre-arcgis-sdk` CacheFirst cache scoped to the versioned `/5.1/` path, so its few hundred modules cannot evict the other CDN engines from the shared 400-entry cache. - DesktopShell / e2e: anchor the file-drop target with `data-testid="desktop-shell"` and fail loudly in the spec when it is missing instead of falling back to `document.body`. - arcgis-sdk.ts: reject HTTP error responses before installing the stylesheet, and tag each theme request with a generation so a stale fetch can neither overwrite a newer theme nor clear its pending state. - ArcgisCanvas: accept a translated `closeLabel` for the identify popup's close button; the desktop caller passes `t("common.close")`. - test_map.py: round-trip a mixed 1x3 layout so a MapLibre pane survives beside the ArcGIS primary and pane. * Address CodeRabbit review feedback - Allow `https://js.arcgis.com/` (and `data:`) in `font-src` in both the Tauri and nginx content-security policies: the SDK's inlined theme stylesheet loads its Avenir Next and icon WOFF2 files from the CDN, which `default-src 'self'` alone would block. Docs updated to match. * Address CodeRabbit review feedback - docs/arcgis-renderer.md: name the dedicated `geolibre-arcgis-sdk` service-worker cache instead of the shared `geolibre-cdn-engines` rule the SDK no longer uses. * Address CodeRabbit review feedback - docs/arcgis-renderer.md: limit the offline claim to the cached SDK bootstrap; remote basemaps and services still need the network. * Address Claude review feedback - arcgis-layers.ts: translate a FeatureServer layer's filters (quick filters, expression, time and embed filters, rule visibility) into an SQL `definitionExpression` via `filterToSql`; a filter with no SQL form is flagged on the plan and the engine reports that the service draws unfiltered instead of staying silent. - arcgis-layers.ts / arcgis-engine.ts: place georeferenced images by their four corners through a `ControlPointsGeoreference` (image pixel size read on load) instead of collapsing them to an axis-aligned extent, so rotated and skewed fits match MapLibre. - arcgis-engine.ts: destroy the outgoing custom basemap on every swap, including into a named Esri style, and re-apply the stored basemap visibility/opacity once a named style's layers have loaded; a style that fails to load is reported. - arcgis-sdk.ts: redact `token=`/`apiKey=`/`api_key=` values without a leading `?`/`&` as well. * Address CodeRabbit review feedback - docker/nginx.conf: drop the Esri CDN from the JupyterLite prefix's CSP (script-src and the font-src directive added for it). The in-app notebook is an iframe whose client drives the parent GeoLibre document over postMessage, so the ArcGIS SDK only ever loads under the main application policy, which keeps its entries. * Address Claude review feedback - arcgis-layers.ts / arcgis-engine.ts: point markers now render. A Style-panel marker (shape or custom SVG) compiles to a placeholder carrying its per-class colour and scale; the engine bakes the same sprites MapLibre uses (`renderMarkerCanvas`) into `picture-marker` symbols and swaps them in, drawing the circle fallback until then. A KML feature's own icon becomes a `picture-marker` directly. - arcgis-engine.ts: `identifyFeatures` performs a real synchronous query for any coordinate by testing the store's GeoJSON geometry (point-in-polygon, pixel-tolerance for points and lines, filters and visibility honoured), so the scripting, notebook and command bridges get answers; the cached hit-test result still serves the clicked location. - arcgis-engine.ts / ArcgisCanvas.tsx: the async hit test bails out when the engine was destroyed mid-flight, guards the post-await `toMap`, and the canvas catches a rejection instead of leaving it unhandled. - Tests for the marker placeholder and KML icon plans, the geometry hit tests, the synchronous identify, and a hit test that outlives the engine. * Address Claude review feedback - scripts/credential-patterns.json: list `VITE_ARCGIS_API_KEY` so redistributable builds strip it and the credential scan covers it, like the sibling tokens. - store.ts: a basemap pick clears the pinned ArcGIS style whenever any pane draws with ArcGIS, not only the primary, so split panes follow the picker (Blank included). - arcgis-engine.ts: identify falls back to the hit graphic's own geometry (converted from the view's spatial reference) and object id for service layers whose features never live in the store. - arcgis-engine.ts: GeoJSON layers declare their three synthetic fields with explicit widths instead of letting the SDK infer them from sampled features, so long labels are not truncated. - arcgis-sdk.ts: redact both Esri key prefixes (`AAPK` legacy API keys and `AAPT` API key credentials). - add-data-renderer.ts: use the catalog's real ids (`deckgl-viz`, `gltf-model`) and also grey out the Vector and Raster panels, which are MapLibre controls with nowhere to mount on this engine. - useArcgisApiKey.ts: the device key fills in only while the runtime environment has no ArcGIS entry at all, so an explicit empty project override still suppresses it. - arcgis-layers.ts: remote GeoJSON-URL plans carry the resolver's `zoomDependent` flag so zoom-interpolated styles re-bake on zoom. | 7 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 5 天前 | ||
| 7 天前 |