@honua/app-platform 0.0.20-alpha.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/LICENSE +201 -0
- package/README.md +11 -0
- package/app/index.d.ts +164 -0
- package/app/index.d.ts.map +1 -0
- package/app/index.js +424 -0
- package/app-controller/controller.d.ts +425 -0
- package/app-controller/controller.d.ts.map +1 -0
- package/app-controller/controller.js +1173 -0
- package/app-controller/index.d.ts +14 -0
- package/app-controller/index.d.ts.map +1 -0
- package/app-controller/index.js +12 -0
- package/app-workspace/index.d.ts +421 -0
- package/app-workspace/index.d.ts.map +1 -0
- package/app-workspace/index.js +722 -0
- package/collaboration/client.d.ts +40 -0
- package/collaboration/client.d.ts.map +1 -0
- package/collaboration/client.js +299 -0
- package/collaboration/errors.d.ts +15 -0
- package/collaboration/errors.d.ts.map +1 -0
- package/collaboration/errors.js +17 -0
- package/collaboration/fixture.d.ts +41 -0
- package/collaboration/fixture.d.ts.map +1 -0
- package/collaboration/fixture.js +362 -0
- package/collaboration/index.d.ts +18 -0
- package/collaboration/index.d.ts.map +1 -0
- package/collaboration/index.js +14 -0
- package/collaboration/types.d.ts +240 -0
- package/collaboration/types.d.ts.map +1 -0
- package/collaboration/types.js +1 -0
- package/contract/analytics-sources.d.ts +149 -0
- package/contract/analytics-sources.d.ts.map +1 -0
- package/contract/analytics-sources.js +235 -0
- package/contract/edit-session.d.ts +203 -0
- package/contract/edit-session.d.ts.map +1 -0
- package/contract/edit-session.js +760 -0
- package/contract/edit-sketch.d.ts +91 -0
- package/contract/edit-sketch.d.ts.map +1 -0
- package/contract/edit-sketch.js +281 -0
- package/contract/index.d.ts +63 -0
- package/contract/index.d.ts.map +1 -0
- package/contract/index.js +52 -0
- package/contract/jobs.d.ts +149 -0
- package/contract/jobs.d.ts.map +1 -0
- package/contract/jobs.js +40 -0
- package/contract/pmtiles.d.ts +162 -0
- package/contract/pmtiles.d.ts.map +1 -0
- package/contract/pmtiles.js +155 -0
- package/contract/source.d.ts +447 -0
- package/contract/source.d.ts.map +1 -0
- package/contract/source.js +3909 -0
- package/contract/spatial-aggregation.d.ts +336 -0
- package/contract/spatial-aggregation.d.ts.map +1 -0
- package/contract/spatial-aggregation.js +298 -0
- package/contract/temporal.d.ts +455 -0
- package/contract/temporal.d.ts.map +1 -0
- package/contract/temporal.js +146 -0
- package/contract/tiles.d.ts +370 -0
- package/contract/tiles.d.ts.map +1 -0
- package/contract/tiles.js +519 -0
- package/contract/types.d.ts +694 -0
- package/contract/types.d.ts.map +1 -0
- package/contract/types.js +183 -0
- package/contract/widget-source.d.ts +205 -0
- package/contract/widget-source.d.ts.map +1 -0
- package/contract/widget-source.js +1473 -0
- package/control-plane/client.d.ts +95 -0
- package/control-plane/client.d.ts.map +1 -0
- package/control-plane/client.js +374 -0
- package/control-plane/index.d.ts +18 -0
- package/control-plane/index.d.ts.map +1 -0
- package/control-plane/index.js +14 -0
- package/control-plane/types.d.ts +233 -0
- package/control-plane/types.d.ts.map +1 -0
- package/control-plane/types.js +7 -0
- package/controls/basemap-style-binding.d.ts +54 -0
- package/controls/basemap-style-binding.d.ts.map +1 -0
- package/controls/basemap-style-binding.js +199 -0
- package/controls/basemap-switcher.d.ts +95 -0
- package/controls/basemap-switcher.d.ts.map +1 -0
- package/controls/basemap-switcher.js +379 -0
- package/controls/element-utils.d.ts +48 -0
- package/controls/element-utils.d.ts.map +1 -0
- package/controls/element-utils.js +78 -0
- package/controls/index.d.ts +33 -0
- package/controls/index.d.ts.map +1 -0
- package/controls/index.js +30 -0
- package/controls/layer-list.d.ts +98 -0
- package/controls/layer-list.d.ts.map +1 -0
- package/controls/layer-list.js +375 -0
- package/controls/legend-derive.d.ts +53 -0
- package/controls/legend-derive.d.ts.map +1 -0
- package/controls/legend-derive.js +196 -0
- package/controls/legend.d.ts +104 -0
- package/controls/legend.d.ts.map +1 -0
- package/controls/legend.js +381 -0
- package/controls/swipe-control.d.ts +80 -0
- package/controls/swipe-control.d.ts.map +1 -0
- package/controls/swipe-control.js +368 -0
- package/controls/types.d.ts +227 -0
- package/controls/types.d.ts.map +1 -0
- package/controls/types.js +11 -0
- package/core/auth/client-credentials-provider.d.ts +51 -0
- package/core/auth/client-credentials-provider.d.ts.map +1 -0
- package/core/auth/client-credentials-provider.js +115 -0
- package/core/auth/credential-store.d.ts +52 -0
- package/core/auth/credential-store.d.ts.map +1 -0
- package/core/auth/credential-store.js +82 -0
- package/core/auth/index.d.ts +23 -0
- package/core/auth/index.d.ts.map +1 -0
- package/core/auth/index.js +20 -0
- package/core/auth/oauth2-provider.d.ts +114 -0
- package/core/auth/oauth2-provider.d.ts.map +1 -0
- package/core/auth/oauth2-provider.js +408 -0
- package/core/auth/pkce.d.ts +25 -0
- package/core/auth/pkce.d.ts.map +1 -0
- package/core/auth/pkce.js +46 -0
- package/core/auth/static-providers.d.ts +20 -0
- package/core/auth/static-providers.d.ts.map +1 -0
- package/core/auth/static-providers.js +26 -0
- package/core/auth/token-endpoint.d.ts +40 -0
- package/core/auth/token-endpoint.d.ts.map +1 -0
- package/core/auth/token-endpoint.js +133 -0
- package/core/auth/types.d.ts +144 -0
- package/core/auth/types.d.ts.map +1 -0
- package/core/auth/types.js +8 -0
- package/core/batch.d.ts +37 -0
- package/core/batch.d.ts.map +1 -0
- package/core/batch.js +79 -0
- package/core/cache-state.d.ts +79 -0
- package/core/cache-state.d.ts.map +1 -0
- package/core/cache-state.js +87 -0
- package/core/client.d.ts +607 -0
- package/core/client.d.ts.map +1 -0
- package/core/client.js +1716 -0
- package/core/compatibility.d.ts +18 -0
- package/core/compatibility.d.ts.map +1 -0
- package/core/compatibility.js +245 -0
- package/core/errors.d.ts +139 -0
- package/core/errors.d.ts.map +1 -0
- package/core/errors.js +176 -0
- package/core/esri-geojson.d.ts +66 -0
- package/core/esri-geojson.d.ts.map +1 -0
- package/core/esri-geojson.js +363 -0
- package/core/geoparquet-sql.d.ts +162 -0
- package/core/geoparquet-sql.d.ts.map +1 -0
- package/core/geoparquet-sql.js +333 -0
- package/core/geoservices.d.ts +34 -0
- package/core/geoservices.d.ts.map +1 -0
- package/core/geoservices.js +434 -0
- package/core/grpc-adapter.d.ts +23 -0
- package/core/grpc-adapter.d.ts.map +1 -0
- package/core/grpc-adapter.js +688 -0
- package/core/odata.d.ts +347 -0
- package/core/odata.d.ts.map +1 -0
- package/core/odata.js +913 -0
- package/core/ogc-conformance.d.ts +35 -0
- package/core/ogc-conformance.d.ts.map +1 -0
- package/core/ogc-conformance.js +134 -0
- package/core/ogc-endpoint-layout.d.ts +70 -0
- package/core/ogc-endpoint-layout.d.ts.map +1 -0
- package/core/ogc-endpoint-layout.js +173 -0
- package/core/ogc-features.d.ts +23 -0
- package/core/ogc-features.d.ts.map +1 -0
- package/core/ogc-features.js +129 -0
- package/core/ogc-maps.d.ts +49 -0
- package/core/ogc-maps.d.ts.map +1 -0
- package/core/ogc-maps.js +126 -0
- package/core/ogc-processes.d.ts +118 -0
- package/core/ogc-processes.d.ts.map +1 -0
- package/core/ogc-processes.js +423 -0
- package/core/ogc-records.d.ts +75 -0
- package/core/ogc-records.d.ts.map +1 -0
- package/core/ogc-records.js +251 -0
- package/core/ogc-tiles.d.ts +125 -0
- package/core/ogc-tiles.d.ts.map +1 -0
- package/core/ogc-tiles.js +183 -0
- package/core/path-utils.d.ts +69 -0
- package/core/path-utils.d.ts.map +1 -0
- package/core/path-utils.js +123 -0
- package/core/pbf-decoder.d.ts +39 -0
- package/core/pbf-decoder.d.ts.map +1 -0
- package/core/pbf-decoder.js +702 -0
- package/core/process-runner.d.ts +104 -0
- package/core/process-runner.d.ts.map +1 -0
- package/core/process-runner.js +315 -0
- package/core/protocol-transport.d.ts +76 -0
- package/core/protocol-transport.d.ts.map +1 -0
- package/core/protocol-transport.js +15 -0
- package/core/query-builder.d.ts +261 -0
- package/core/query-builder.d.ts.map +1 -0
- package/core/query-builder.js +538 -0
- package/core/request-pipeline.d.ts +88 -0
- package/core/request-pipeline.d.ts.map +1 -0
- package/core/request-pipeline.js +273 -0
- package/core/spatial-filter.d.ts +93 -0
- package/core/spatial-filter.d.ts.map +1 -0
- package/core/spatial-filter.js +153 -0
- package/core/stac-static.d.ts +51 -0
- package/core/stac-static.d.ts.map +1 -0
- package/core/stac-static.js +195 -0
- package/core/stac.d.ts +67 -0
- package/core/stac.d.ts.map +1 -0
- package/core/stac.js +259 -0
- package/core/surfaces.d.ts +540 -0
- package/core/surfaces.d.ts.map +1 -0
- package/core/surfaces.js +1964 -0
- package/core/terrain-elevation.d.ts +114 -0
- package/core/terrain-elevation.d.ts.map +1 -0
- package/core/terrain-elevation.js +150 -0
- package/core/types.d.ts +1404 -0
- package/core/types.d.ts.map +1 -0
- package/core/types.js +13 -0
- package/core/wfs-capabilities.d.ts +153 -0
- package/core/wfs-capabilities.d.ts.map +1 -0
- package/core/wfs-capabilities.js +490 -0
- package/core/wfs-filter.d.ts +118 -0
- package/core/wfs-filter.d.ts.map +1 -0
- package/core/wfs-filter.js +634 -0
- package/core/wfs.d.ts +232 -0
- package/core/wfs.d.ts.map +1 -0
- package/core/wfs.js +426 -0
- package/core/wire-shared.d.ts +32 -0
- package/core/wire-shared.d.ts.map +1 -0
- package/core/wire-shared.js +76 -0
- package/core/wms-axis.d.ts +36 -0
- package/core/wms-axis.d.ts.map +1 -0
- package/core/wms-axis.js +73 -0
- package/core/wms-capabilities.d.ts +110 -0
- package/core/wms-capabilities.d.ts.map +1 -0
- package/core/wms-capabilities.js +559 -0
- package/core/wms-types.d.ts +128 -0
- package/core/wms-types.d.ts.map +1 -0
- package/core/wms-types.js +32 -0
- package/core/wms.d.ts +144 -0
- package/core/wms.d.ts.map +1 -0
- package/core/wms.js +338 -0
- package/core/wmts-capabilities.d.ts +82 -0
- package/core/wmts-capabilities.d.ts.map +1 -0
- package/core/wmts-capabilities.js +402 -0
- package/core/wmts.d.ts +103 -0
- package/core/wmts.d.ts.map +1 -0
- package/core/wmts.js +332 -0
- package/core/xml-text.d.ts +20 -0
- package/core/xml-text.d.ts.map +1 -0
- package/core/xml-text.js +85 -0
- package/esri-compat/basemap-gallery.d.ts +38 -0
- package/esri-compat/basemap-gallery.d.ts.map +1 -0
- package/esri-compat/basemap-gallery.js +159 -0
- package/esri-compat/basemap-layer-list.d.ts +35 -0
- package/esri-compat/basemap-layer-list.d.ts.map +1 -0
- package/esri-compat/basemap-layer-list.js +139 -0
- package/esri-compat/basemap.d.ts +32 -0
- package/esri-compat/basemap.d.ts.map +1 -0
- package/esri-compat/basemap.js +84 -0
- package/esri-compat/bookmarks.d.ts +36 -0
- package/esri-compat/bookmarks.d.ts.map +1 -0
- package/esri-compat/bookmarks.js +108 -0
- package/esri-compat/class-breaks-renderer.d.ts +50 -0
- package/esri-compat/class-breaks-renderer.d.ts.map +1 -0
- package/esri-compat/class-breaks-renderer.js +164 -0
- package/esri-compat/color.d.ts +22 -0
- package/esri-compat/color.d.ts.map +1 -0
- package/esri-compat/color.js +106 -0
- package/esri-compat/controls.d.ts +174 -0
- package/esri-compat/controls.d.ts.map +1 -0
- package/esri-compat/controls.js +479 -0
- package/esri-compat/coordinate-conversion.d.ts +41 -0
- package/esri-compat/coordinate-conversion.d.ts.map +1 -0
- package/esri-compat/coordinate-conversion.js +125 -0
- package/esri-compat/directions.d.ts +45 -0
- package/esri-compat/directions.d.ts.map +1 -0
- package/esri-compat/directions.js +123 -0
- package/esri-compat/editor.d.ts +47 -0
- package/esri-compat/editor.d.ts.map +1 -0
- package/esri-compat/editor.js +170 -0
- package/esri-compat/esri-config.d.ts +16 -0
- package/esri-compat/esri-config.d.ts.map +1 -0
- package/esri-compat/esri-config.js +23 -0
- package/esri-compat/esri-request.d.ts +17 -0
- package/esri-compat/esri-request.d.ts.map +1 -0
- package/esri-compat/esri-request.js +127 -0
- package/esri-compat/event-bus.d.ts +106 -0
- package/esri-compat/event-bus.d.ts.map +1 -0
- package/esri-compat/event-bus.js +90 -0
- package/esri-compat/expand.d.ts +36 -0
- package/esri-compat/expand.d.ts.map +1 -0
- package/esri-compat/expand.js +97 -0
- package/esri-compat/extent.d.ts +43 -0
- package/esri-compat/extent.d.ts.map +1 -0
- package/esri-compat/extent.js +140 -0
- package/esri-compat/feature-filter.d.ts +55 -0
- package/esri-compat/feature-filter.d.ts.map +1 -0
- package/esri-compat/feature-filter.js +109 -0
- package/esri-compat/feature-form.d.ts +64 -0
- package/esri-compat/feature-form.d.ts.map +1 -0
- package/esri-compat/feature-form.js +137 -0
- package/esri-compat/feature-layer.d.ts +173 -0
- package/esri-compat/feature-layer.d.ts.map +1 -0
- package/esri-compat/feature-layer.js +661 -0
- package/esri-compat/feature-set.d.ts +32 -0
- package/esri-compat/feature-set.d.ts.map +1 -0
- package/esri-compat/feature-set.js +80 -0
- package/esri-compat/feature-table.d.ts +141 -0
- package/esri-compat/feature-table.d.ts.map +1 -0
- package/esri-compat/feature-table.js +500 -0
- package/esri-compat/feature-templates.d.ts +41 -0
- package/esri-compat/feature-templates.d.ts.map +1 -0
- package/esri-compat/feature-templates.js +97 -0
- package/esri-compat/feature.d.ts +33 -0
- package/esri-compat/feature.d.ts.map +1 -0
- package/esri-compat/feature.js +83 -0
- package/esri-compat/geojson-layer.d.ts +86 -0
- package/esri-compat/geojson-layer.d.ts.map +1 -0
- package/esri-compat/geojson-layer.js +191 -0
- package/esri-compat/geometry-engine.d.ts +107 -0
- package/esri-compat/geometry-engine.d.ts.map +1 -0
- package/esri-compat/geometry-engine.js +266 -0
- package/esri-compat/graphic.d.ts +46 -0
- package/esri-compat/graphic.d.ts.map +1 -0
- package/esri-compat/graphic.js +103 -0
- package/esri-compat/graphics-layer.d.ts +49 -0
- package/esri-compat/graphics-layer.d.ts.map +1 -0
- package/esri-compat/graphics-layer.js +185 -0
- package/esri-compat/group-layer.d.ts +48 -0
- package/esri-compat/group-layer.d.ts.map +1 -0
- package/esri-compat/group-layer.js +212 -0
- package/esri-compat/identify.d.ts +71 -0
- package/esri-compat/identify.d.ts.map +1 -0
- package/esri-compat/identify.js +299 -0
- package/esri-compat/identity-manager.d.ts +74 -0
- package/esri-compat/identity-manager.d.ts.map +1 -0
- package/esri-compat/identity-manager.js +245 -0
- package/esri-compat/imagery-layer.d.ts +78 -0
- package/esri-compat/imagery-layer.d.ts.map +1 -0
- package/esri-compat/imagery-layer.js +167 -0
- package/esri-compat/label-class.d.ts +31 -0
- package/esri-compat/label-class.d.ts.map +1 -0
- package/esri-compat/label-class.js +102 -0
- package/esri-compat/layer-list.d.ts +77 -0
- package/esri-compat/layer-list.d.ts.map +1 -0
- package/esri-compat/layer-list.js +342 -0
- package/esri-compat/legend.d.ts +53 -0
- package/esri-compat/legend.d.ts.map +1 -0
- package/esri-compat/legend.js +254 -0
- package/esri-compat/map-image-layer.d.ts +162 -0
- package/esri-compat/map-image-layer.d.ts.map +1 -0
- package/esri-compat/map-image-layer.js +709 -0
- package/esri-compat/map-view.d.ts +323 -0
- package/esri-compat/map-view.d.ts.map +1 -0
- package/esri-compat/map-view.js +1175 -0
- package/esri-compat/map.d.ts +47 -0
- package/esri-compat/map.d.ts.map +1 -0
- package/esri-compat/map.js +209 -0
- package/esri-compat/measurement-2d.d.ts +61 -0
- package/esri-compat/measurement-2d.d.ts.map +1 -0
- package/esri-compat/measurement-2d.js +184 -0
- package/esri-compat/measurement.d.ts +45 -0
- package/esri-compat/measurement.d.ts.map +1 -0
- package/esri-compat/measurement.js +193 -0
- package/esri-compat/oauth-info.d.ts +50 -0
- package/esri-compat/oauth-info.d.ts.map +1 -0
- package/esri-compat/oauth-info.js +142 -0
- package/esri-compat/picture-marker-symbol.d.ts +35 -0
- package/esri-compat/picture-marker-symbol.d.ts.map +1 -0
- package/esri-compat/picture-marker-symbol.js +126 -0
- package/esri-compat/point.d.ts +31 -0
- package/esri-compat/point.d.ts.map +1 -0
- package/esri-compat/point.js +102 -0
- package/esri-compat/polygon.d.ts +31 -0
- package/esri-compat/polygon.d.ts.map +1 -0
- package/esri-compat/polygon.js +107 -0
- package/esri-compat/polyline.d.ts +31 -0
- package/esri-compat/polyline.d.ts.map +1 -0
- package/esri-compat/polyline.js +107 -0
- package/esri-compat/popup-template.d.ts +55 -0
- package/esri-compat/popup-template.d.ts.map +1 -0
- package/esri-compat/popup-template.js +128 -0
- package/esri-compat/popup.d.ts +54 -0
- package/esri-compat/popup.d.ts.map +1 -0
- package/esri-compat/popup.js +312 -0
- package/esri-compat/print.d.ts +47 -0
- package/esri-compat/print.d.ts.map +1 -0
- package/esri-compat/print.js +105 -0
- package/esri-compat/query.d.ts +58 -0
- package/esri-compat/query.d.ts.map +1 -0
- package/esri-compat/query.js +128 -0
- package/esri-compat/reactive-utils.d.ts +24 -0
- package/esri-compat/reactive-utils.d.ts.map +1 -0
- package/esri-compat/reactive-utils.js +193 -0
- package/esri-compat/request.d.ts +41 -0
- package/esri-compat/request.d.ts.map +1 -0
- package/esri-compat/request.js +253 -0
- package/esri-compat/route-layer.d.ts +59 -0
- package/esri-compat/route-layer.d.ts.map +1 -0
- package/esri-compat/route-layer.js +223 -0
- package/esri-compat/route-task.d.ts +88 -0
- package/esri-compat/route-task.d.ts.map +1 -0
- package/esri-compat/route-task.js +225 -0
- package/esri-compat/scene-view.d.ts +41 -0
- package/esri-compat/scene-view.d.ts.map +1 -0
- package/esri-compat/scene-view.js +68 -0
- package/esri-compat/search.d.ts +112 -0
- package/esri-compat/search.d.ts.map +1 -0
- package/esri-compat/search.js +820 -0
- package/esri-compat/simple-fill-symbol.d.ts +27 -0
- package/esri-compat/simple-fill-symbol.d.ts.map +1 -0
- package/esri-compat/simple-fill-symbol.js +85 -0
- package/esri-compat/simple-line-symbol.d.ts +27 -0
- package/esri-compat/simple-line-symbol.d.ts.map +1 -0
- package/esri-compat/simple-line-symbol.js +85 -0
- package/esri-compat/simple-marker-symbol.d.ts +29 -0
- package/esri-compat/simple-marker-symbol.d.ts.map +1 -0
- package/esri-compat/simple-marker-symbol.js +92 -0
- package/esri-compat/simple-renderer.d.ts +29 -0
- package/esri-compat/simple-renderer.d.ts.map +1 -0
- package/esri-compat/simple-renderer.js +92 -0
- package/esri-compat/sketch.d.ts +64 -0
- package/esri-compat/sketch.d.ts.map +1 -0
- package/esri-compat/sketch.js +227 -0
- package/esri-compat/spatial-reference.d.ts +31 -0
- package/esri-compat/spatial-reference.d.ts.map +1 -0
- package/esri-compat/spatial-reference.js +102 -0
- package/esri-compat/swipe.d.ts +34 -0
- package/esri-compat/swipe.d.ts.map +1 -0
- package/esri-compat/swipe.js +93 -0
- package/esri-compat/table-list.d.ts +36 -0
- package/esri-compat/table-list.d.ts.map +1 -0
- package/esri-compat/table-list.js +126 -0
- package/esri-compat/text-symbol.d.ts +37 -0
- package/esri-compat/text-symbol.d.ts.map +1 -0
- package/esri-compat/text-symbol.js +123 -0
- package/esri-compat/tile-layer.d.ts +52 -0
- package/esri-compat/tile-layer.d.ts.map +1 -0
- package/esri-compat/tile-layer.js +168 -0
- package/esri-compat/time-slider.d.ts +70 -0
- package/esri-compat/time-slider.d.ts.map +1 -0
- package/esri-compat/time-slider.js +208 -0
- package/esri-compat/track.d.ts +51 -0
- package/esri-compat/track.d.ts.map +1 -0
- package/esri-compat/track.js +174 -0
- package/esri-compat/unique-value-renderer.d.ts +41 -0
- package/esri-compat/unique-value-renderer.d.ts.map +1 -0
- package/esri-compat/unique-value-renderer.js +127 -0
- package/esri-compat/url.d.ts +13 -0
- package/esri-compat/url.d.ts.map +1 -0
- package/esri-compat/url.js +68 -0
- package/esri-compat/vector-tile-layer.d.ts +47 -0
- package/esri-compat/vector-tile-layer.d.ts.map +1 -0
- package/esri-compat/vector-tile-layer.js +130 -0
- package/esri-compat/web-map.d.ts +14 -0
- package/esri-compat/web-map.d.ts.map +1 -0
- package/esri-compat/web-map.js +24 -0
- package/esri-compat/wfs-layer.d.ts +64 -0
- package/esri-compat/wfs-layer.d.ts.map +1 -0
- package/esri-compat/wfs-layer.js +145 -0
- package/esri-compat/wms-layer.d.ts +76 -0
- package/esri-compat/wms-layer.d.ts.map +1 -0
- package/esri-compat/wms-layer.js +157 -0
- package/exploration/context.d.ts +25 -0
- package/exploration/context.d.ts.map +1 -0
- package/exploration/context.js +396 -0
- package/exploration/index.d.ts +27 -0
- package/exploration/index.d.ts.map +1 -0
- package/exploration/index.js +24 -0
- package/exploration/presets.d.ts +27 -0
- package/exploration/presets.d.ts.map +1 -0
- package/exploration/presets.js +114 -0
- package/exploration/reducer.d.ts +23 -0
- package/exploration/reducer.d.ts.map +1 -0
- package/exploration/reducer.js +332 -0
- package/exploration/selection.d.ts +25 -0
- package/exploration/selection.d.ts.map +1 -0
- package/exploration/selection.js +34 -0
- package/exploration/selectors.d.ts +56 -0
- package/exploration/selectors.d.ts.map +1 -0
- package/exploration/selectors.js +110 -0
- package/exploration/types.d.ts +294 -0
- package/exploration/types.d.ts.map +1 -0
- package/exploration/types.js +33 -0
- package/expr/expression.d.ts +457 -0
- package/expr/expression.d.ts.map +1 -0
- package/expr/expression.js +663 -0
- package/expr/index.d.ts +32 -0
- package/expr/index.d.ts.map +1 -0
- package/expr/index.js +30 -0
- package/filter-registry/index.d.ts +145 -0
- package/filter-registry/index.d.ts.map +1 -0
- package/filter-registry/index.js +531 -0
- package/gen/honua/v1/feature_service_pb.d.ts +918 -0
- package/gen/honua/v1/feature_service_pb.d.ts.map +1 -0
- package/gen/honua/v1/feature_service_pb.js +375 -0
- package/generated-app/errors.d.ts +41 -0
- package/generated-app/errors.d.ts.map +1 -0
- package/generated-app/errors.js +41 -0
- package/generated-app/index.d.ts +17 -0
- package/generated-app/index.d.ts.map +1 -0
- package/generated-app/index.js +12 -0
- package/generated-app/manifest.d.ts +183 -0
- package/generated-app/manifest.d.ts.map +1 -0
- package/generated-app/manifest.js +14 -0
- package/generated-app/projection.d.ts +44 -0
- package/generated-app/projection.d.ts.map +1 -0
- package/generated-app/projection.js +234 -0
- package/generated-app/runtime.d.ts +215 -0
- package/generated-app/runtime.d.ts.map +1 -0
- package/generated-app/runtime.js +1196 -0
- package/geocoding/index.d.ts +106 -0
- package/geocoding/index.d.ts.map +1 -0
- package/geocoding/index.js +278 -0
- package/interactions/detail-model.d.ts +54 -0
- package/interactions/detail-model.d.ts.map +1 -0
- package/interactions/detail-model.js +105 -0
- package/interactions/exploration-bindings.d.ts +120 -0
- package/interactions/exploration-bindings.d.ts.map +1 -0
- package/interactions/exploration-bindings.js +218 -0
- package/interactions/feature-state.d.ts +144 -0
- package/interactions/feature-state.d.ts.map +1 -0
- package/interactions/feature-state.js +169 -0
- package/interactions/hit-test.d.ts +112 -0
- package/interactions/hit-test.d.ts.map +1 -0
- package/interactions/hit-test.js +291 -0
- package/interactions/index.d.ts +31 -0
- package/interactions/index.d.ts.map +1 -0
- package/interactions/index.js +24 -0
- package/interactions/share-state.d.ts +36 -0
- package/interactions/share-state.d.ts.map +1 -0
- package/interactions/share-state.js +123 -0
- package/map/feature-service-adapter.d.ts +138 -0
- package/map/feature-service-adapter.d.ts.map +1 -0
- package/map/feature-service-adapter.js +279 -0
- package/map/honua-map.d.ts +203 -0
- package/map/honua-map.d.ts.map +1 -0
- package/map/honua-map.js +347 -0
- package/map/index.d.ts +27 -0
- package/map/index.d.ts.map +1 -0
- package/map/index.js +22 -0
- package/map/maplibre-target.d.ts +103 -0
- package/map/maplibre-target.d.ts.map +1 -0
- package/map/maplibre-target.js +164 -0
- package/map/webmap-maplibre.d.ts +60 -0
- package/map/webmap-maplibre.d.ts.map +1 -0
- package/map/webmap-maplibre.js +212 -0
- package/operate/client.d.ts +94 -0
- package/operate/client.d.ts.map +1 -0
- package/operate/client.js +361 -0
- package/operate/index.d.ts +22 -0
- package/operate/index.d.ts.map +1 -0
- package/operate/index.js +19 -0
- package/operate/types.d.ts +397 -0
- package/operate/types.d.ts.map +1 -0
- package/operate/types.js +17 -0
- package/operator/client.d.ts +60 -0
- package/operator/client.d.ts.map +1 -0
- package/operator/client.js +20 -0
- package/operator/controllers/approval.d.ts +52 -0
- package/operator/controllers/approval.d.ts.map +1 -0
- package/operator/controllers/approval.js +123 -0
- package/operator/controllers/base.d.ts +27 -0
- package/operator/controllers/base.d.ts.map +1 -0
- package/operator/controllers/base.js +53 -0
- package/operator/controllers/builder-workspace.d.ts +55 -0
- package/operator/controllers/builder-workspace.d.ts.map +1 -0
- package/operator/controllers/builder-workspace.js +108 -0
- package/operator/controllers/chat.d.ts +61 -0
- package/operator/controllers/chat.d.ts.map +1 -0
- package/operator/controllers/chat.js +154 -0
- package/operator/controllers/clarification.d.ts +52 -0
- package/operator/controllers/clarification.d.ts.map +1 -0
- package/operator/controllers/clarification.js +121 -0
- package/operator/controllers/execution.d.ts +60 -0
- package/operator/controllers/execution.d.ts.map +1 -0
- package/operator/controllers/execution.js +286 -0
- package/operator/controllers/index.d.ts +23 -0
- package/operator/controllers/index.d.ts.map +1 -0
- package/operator/controllers/index.js +15 -0
- package/operator/controllers/map-workspace.d.ts +85 -0
- package/operator/controllers/map-workspace.d.ts.map +1 -0
- package/operator/controllers/map-workspace.js +296 -0
- package/operator/controllers/plan-review.d.ts +66 -0
- package/operator/controllers/plan-review.d.ts.map +1 -0
- package/operator/controllers/plan-review.js +124 -0
- package/operator/errors.d.ts +62 -0
- package/operator/errors.d.ts.map +1 -0
- package/operator/errors.js +75 -0
- package/operator/i18n/index.d.ts +10 -0
- package/operator/i18n/index.d.ts.map +1 -0
- package/operator/i18n/index.js +8 -0
- package/operator/i18n/messages.d.ts +19 -0
- package/operator/i18n/messages.d.ts.map +1 -0
- package/operator/i18n/messages.js +54 -0
- package/operator/index.d.ts +19 -0
- package/operator/index.d.ts.map +1 -0
- package/operator/index.js +15 -0
- package/operator/telemetry.d.ts +26 -0
- package/operator/telemetry.d.ts.map +1 -0
- package/operator/telemetry.js +9 -0
- package/operator/theming/index.d.ts +12 -0
- package/operator/theming/index.d.ts.map +1 -0
- package/operator/theming/index.js +9 -0
- package/operator/theming/provider.d.ts +27 -0
- package/operator/theming/provider.d.ts.map +1 -0
- package/operator/theming/provider.js +26 -0
- package/operator/theming/tokens.d.ts +28 -0
- package/operator/theming/tokens.d.ts.map +1 -0
- package/operator/theming/tokens.js +65 -0
- package/operator/workspace/events.d.ts +70 -0
- package/operator/workspace/events.d.ts.map +1 -0
- package/operator/workspace/events.js +9 -0
- package/operator/workspace/index.d.ts +12 -0
- package/operator/workspace/index.d.ts.map +1 -0
- package/operator/workspace/index.js +8 -0
- package/operator/workspace/types.d.ts +178 -0
- package/operator/workspace/types.d.ts.map +1 -0
- package/operator/workspace/types.js +47 -0
- package/operator/workspace/workspace.d.ts +58 -0
- package/operator/workspace/workspace.d.ts.map +1 -0
- package/operator/workspace/workspace.js +339 -0
- package/package.json +105 -0
- package/realtime/exploration.d.ts +16 -0
- package/realtime/exploration.d.ts.map +1 -0
- package/realtime/exploration.js +32 -0
- package/realtime/honua-server.d.ts +123 -0
- package/realtime/honua-server.d.ts.map +1 -0
- package/realtime/honua-server.js +188 -0
- package/realtime/index.d.ts +20 -0
- package/realtime/index.d.ts.map +1 -0
- package/realtime/index.js +14 -0
- package/realtime/projections.d.ts +30 -0
- package/realtime/projections.d.ts.map +1 -0
- package/realtime/projections.js +51 -0
- package/realtime/reducer.d.ts +14 -0
- package/realtime/reducer.d.ts.map +1 -0
- package/realtime/reducer.js +351 -0
- package/realtime/sse.d.ts +23 -0
- package/realtime/sse.d.ts.map +1 -0
- package/realtime/sse.js +143 -0
- package/realtime/store.d.ts +18 -0
- package/realtime/store.d.ts.map +1 -0
- package/realtime/store.js +63 -0
- package/realtime/types.d.ts +190 -0
- package/realtime/types.d.ts.map +1 -0
- package/realtime/types.js +10 -0
- package/replica-sync/client.d.ts +32 -0
- package/replica-sync/client.d.ts.map +1 -0
- package/replica-sync/client.js +52 -0
- package/replica-sync/errors.d.ts +22 -0
- package/replica-sync/errors.d.ts.map +1 -0
- package/replica-sync/errors.js +29 -0
- package/replica-sync/fixture.d.ts +40 -0
- package/replica-sync/fixture.d.ts.map +1 -0
- package/replica-sync/fixture.js +364 -0
- package/replica-sync/index.d.ts +22 -0
- package/replica-sync/index.d.ts.map +1 -0
- package/replica-sync/index.js +17 -0
- package/replica-sync/types.d.ts +270 -0
- package/replica-sync/types.d.ts.map +1 -0
- package/replica-sync/types.js +13 -0
- package/runtime/diff.d.ts +31 -0
- package/runtime/diff.d.ts.map +1 -0
- package/runtime/diff.js +143 -0
- package/runtime/errors.d.ts +40 -0
- package/runtime/errors.d.ts.map +1 -0
- package/runtime/errors.js +35 -0
- package/runtime/index.d.ts +59 -0
- package/runtime/index.d.ts.map +1 -0
- package/runtime/index.js +40 -0
- package/runtime/legend.d.ts +23 -0
- package/runtime/legend.d.ts.map +1 -0
- package/runtime/legend.js +38 -0
- package/runtime/load-package.d.ts +125 -0
- package/runtime/load-package.d.ts.map +1 -0
- package/runtime/load-package.js +272 -0
- package/runtime/map-package-fetch.d.ts +107 -0
- package/runtime/map-package-fetch.d.ts.map +1 -0
- package/runtime/map-package-fetch.js +336 -0
- package/runtime/map-package-realtime.d.ts +169 -0
- package/runtime/map-package-realtime.d.ts.map +1 -0
- package/runtime/map-package-realtime.js +350 -0
- package/runtime/map-package-validation.d.ts +30 -0
- package/runtime/map-package-validation.d.ts.map +1 -0
- package/runtime/map-package-validation.js +257 -0
- package/runtime/map-package-watch.d.ts +78 -0
- package/runtime/map-package-watch.d.ts.map +1 -0
- package/runtime/map-package-watch.js +695 -0
- package/runtime/map-package.d.ts +167 -0
- package/runtime/map-package.d.ts.map +1 -0
- package/runtime/map-package.js +15 -0
- package/runtime/ogc-styles.d.ts +110 -0
- package/runtime/ogc-styles.d.ts.map +1 -0
- package/runtime/ogc-styles.js +195 -0
- package/runtime/pmtiles-protocol.d.ts +77 -0
- package/runtime/pmtiles-protocol.d.ts.map +1 -0
- package/runtime/pmtiles-protocol.js +120 -0
- package/runtime/popups.d.ts +62 -0
- package/runtime/popups.d.ts.map +1 -0
- package/runtime/popups.js +95 -0
- package/runtime/query-tiles.d.ts +217 -0
- package/runtime/query-tiles.d.ts.map +1 -0
- package/runtime/query-tiles.js +801 -0
- package/runtime/runtime.d.ts +243 -0
- package/runtime/runtime.d.ts.map +1 -0
- package/runtime/runtime.js +1147 -0
- package/runtime/source-bridge.d.ts +99 -0
- package/runtime/source-bridge.d.ts.map +1 -0
- package/runtime/source-bridge.js +428 -0
- package/runtime/style-compose.d.ts +46 -0
- package/runtime/style-compose.d.ts.map +1 -0
- package/runtime/style-compose.js +144 -0
- package/runtime/style-interactions.d.ts +141 -0
- package/runtime/style-interactions.d.ts.map +1 -0
- package/runtime/style-interactions.js +574 -0
- package/runtime/style-spec-validation.d.ts +23 -0
- package/runtime/style-spec-validation.d.ts.map +1 -0
- package/runtime/style-spec-validation.js +357 -0
- package/scene-workspace/analysis-widgets.d.ts +334 -0
- package/scene-workspace/analysis-widgets.d.ts.map +1 -0
- package/scene-workspace/analysis-widgets.js +424 -0
- package/scene-workspace/cesium-adapter.d.ts +438 -0
- package/scene-workspace/cesium-adapter.d.ts.map +1 -0
- package/scene-workspace/cesium-adapter.js +493 -0
- package/scene-workspace/index.d.ts +21 -0
- package/scene-workspace/index.d.ts.map +1 -0
- package/scene-workspace/index.js +14 -0
- package/scene-workspace/primitives.d.ts +162 -0
- package/scene-workspace/primitives.d.ts.map +1 -0
- package/scene-workspace/primitives.js +255 -0
- package/scene-workspace/scene-discovery.d.ts +196 -0
- package/scene-workspace/scene-discovery.d.ts.map +1 -0
- package/scene-workspace/scene-discovery.js +228 -0
- package/scene-workspace/scene-view.d.ts +209 -0
- package/scene-workspace/scene-view.d.ts.map +1 -0
- package/scene-workspace/scene-view.js +267 -0
- package/scene-workspace/types.d.ts +229 -0
- package/scene-workspace/types.d.ts.map +1 -0
- package/scene-workspace/types.js +23 -0
- package/scene-workspace/workspace.d.ts +13 -0
- package/scene-workspace/workspace.d.ts.map +1 -0
- package/scene-workspace/workspace.js +391 -0
- package/share/denial.d.ts +78 -0
- package/share/denial.d.ts.map +1 -0
- package/share/denial.js +61 -0
- package/share/embed-token.d.ts +71 -0
- package/share/embed-token.d.ts.map +1 -0
- package/share/embed-token.js +99 -0
- package/share/index.d.ts +35 -0
- package/share/index.d.ts.map +1 -0
- package/share/index.js +30 -0
- package/share/open-data.d.ts +114 -0
- package/share/open-data.d.ts.map +1 -0
- package/share/open-data.js +81 -0
- package/share/types.d.ts +163 -0
- package/share/types.d.ts.map +1 -0
- package/share/types.js +17 -0
- package/studio/capability-manifest.d.ts +285 -0
- package/studio/capability-manifest.d.ts.map +1 -0
- package/studio/capability-manifest.js +59 -0
- package/studio/chart-spec.d.ts +85 -0
- package/studio/chart-spec.d.ts.map +1 -0
- package/studio/chart-spec.js +106 -0
- package/studio/index.d.ts +34 -0
- package/studio/index.d.ts.map +1 -0
- package/studio/index.js +27 -0
- package/studio/provenance.d.ts +131 -0
- package/studio/provenance.d.ts.map +1 -0
- package/studio/provenance.js +39 -0
- package/studio/publish.d.ts +64 -0
- package/studio/publish.d.ts.map +1 -0
- package/studio/publish.js +13 -0
- package/studio/types.d.ts +278 -0
- package/studio/types.d.ts.map +1 -0
- package/studio/types.js +71 -0
- package/studio/validate.d.ts +45 -0
- package/studio/validate.d.ts.map +1 -0
- package/studio/validate.js +255 -0
- package/studio/validation.d.ts +112 -0
- package/studio/validation.d.ts.map +1 -0
- package/studio/validation.js +42 -0
- package/style/factory.d.ts +30 -0
- package/style/factory.d.ts.map +1 -0
- package/style/factory.js +61 -0
- package/style/index.d.ts +25 -0
- package/style/index.d.ts.map +1 -0
- package/style/index.js +24 -0
- package/style/specification.d.ts +203 -0
- package/style/specification.d.ts.map +1 -0
- package/style/specification.js +178 -0
- package/style/wms-wmts-resolvers.d.ts +38 -0
- package/style/wms-wmts-resolvers.d.ts.map +1 -0
- package/style/wms-wmts-resolvers.js +92 -0
- package/web-components/controller.d.ts +39 -0
- package/web-components/controller.d.ts.map +1 -0
- package/web-components/controller.js +640 -0
- package/web-components/elements.d.ts +210 -0
- package/web-components/elements.d.ts.map +1 -0
- package/web-components/elements.js +1651 -0
- package/web-components/index.d.ts +24 -0
- package/web-components/index.d.ts.map +1 -0
- package/web-components/index.js +22 -0
- package/web-components/maplibre-renderer.d.ts +22 -0
- package/web-components/maplibre-renderer.d.ts.map +1 -0
- package/web-components/maplibre-renderer.js +474 -0
- package/web-components/types.d.ts +397 -0
- package/web-components/types.d.ts.map +1 -0
- package/web-components/types.js +1 -0
- package/webmap/contract.d.ts +28 -0
- package/webmap/contract.d.ts.map +1 -0
- package/webmap/contract.js +130 -0
- package/webmap/convert-basemap.d.ts +17 -0
- package/webmap/convert-basemap.d.ts.map +1 -0
- package/webmap/convert-basemap.js +78 -0
- package/webmap/convert-extent.d.ts +17 -0
- package/webmap/convert-extent.d.ts.map +1 -0
- package/webmap/convert-extent.js +114 -0
- package/webmap/convert-label.d.ts +13 -0
- package/webmap/convert-label.d.ts.map +1 -0
- package/webmap/convert-label.js +125 -0
- package/webmap/convert-layer.d.ts +22 -0
- package/webmap/convert-layer.d.ts.map +1 -0
- package/webmap/convert-layer.js +181 -0
- package/webmap/convert-popup.d.ts +34 -0
- package/webmap/convert-popup.d.ts.map +1 -0
- package/webmap/convert-popup.js +68 -0
- package/webmap/convert-renderer.d.ts +17 -0
- package/webmap/convert-renderer.d.ts.map +1 -0
- package/webmap/convert-renderer.js +161 -0
- package/webmap/convert-symbol.d.ts +17 -0
- package/webmap/convert-symbol.d.ts.map +1 -0
- package/webmap/convert-symbol.js +122 -0
- package/webmap/index.d.ts +44 -0
- package/webmap/index.d.ts.map +1 -0
- package/webmap/index.js +33 -0
- package/webmap/parse.d.ts +25 -0
- package/webmap/parse.d.ts.map +1 -0
- package/webmap/parse.js +83 -0
- package/webmap/types.d.ts +264 -0
- package/webmap/types.d.ts.map +1 -0
- package/webmap/types.js +13 -0
- package/webmap/warnings.d.ts +30 -0
- package/webmap/warnings.d.ts.map +1 -0
- package/webmap/warnings.js +37 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts Esri renderer JSON to MapLibre paint/layout properties.
|
|
3
|
+
*
|
|
4
|
+
* Handles simple, uniqueValue, and classBreaks renderers. Produces
|
|
5
|
+
* data-driven expressions (match, step) for categorized/graduated renderers.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import type { WebMapRenderer } from "./types.js";
|
|
10
|
+
import type { WarningCollector } from "./warnings.js";
|
|
11
|
+
export interface RendererConversionResult {
|
|
12
|
+
layerType: string;
|
|
13
|
+
paint: Record<string, unknown>;
|
|
14
|
+
layout: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export declare function convertRenderer(renderer: WebMapRenderer | undefined, warn: WarningCollector): RendererConversionResult | undefined;
|
|
17
|
+
//# sourceMappingURL=convert-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-renderer.d.ts","sourceRoot":"","sources":["../../../src/webmap/convert-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAA6B,cAAc,EAA2C,MAAM,YAAY,CAAC;AACrH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,IAAI,EAAE,gBAAgB,GACrB,wBAAwB,GAAG,SAAS,CActC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts Esri renderer JSON to MapLibre paint/layout properties.
|
|
3
|
+
*
|
|
4
|
+
* Handles simple, uniqueValue, and classBreaks renderers. Produces
|
|
5
|
+
* data-driven expressions (match, step) for categorized/graduated renderers.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import { convertSymbol, esriColorToCss } from "./convert-symbol.js";
|
|
10
|
+
export function convertRenderer(renderer, warn) {
|
|
11
|
+
if (!renderer)
|
|
12
|
+
return undefined;
|
|
13
|
+
switch (renderer.type) {
|
|
14
|
+
case "simple":
|
|
15
|
+
return convertSimpleRenderer(renderer.symbol, warn);
|
|
16
|
+
case "uniqueValue":
|
|
17
|
+
return convertUniqueValueRenderer(renderer, warn);
|
|
18
|
+
case "classBreaks":
|
|
19
|
+
return convertClassBreaksRenderer(renderer, warn);
|
|
20
|
+
default:
|
|
21
|
+
warn.warn("unsupported-renderer", `Unsupported renderer type: ${renderer.type}`, { type: renderer.type });
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function convertSimpleRenderer(symbol, warn) {
|
|
26
|
+
return convertSymbol(symbol, warn);
|
|
27
|
+
}
|
|
28
|
+
function convertUniqueValueRenderer(renderer, warn) {
|
|
29
|
+
const infos = renderer.uniqueValueInfos ?? [];
|
|
30
|
+
if (infos.length === 0) {
|
|
31
|
+
return convertSymbol(renderer.defaultSymbol, warn);
|
|
32
|
+
}
|
|
33
|
+
// Determine the layer type from the first valid symbol
|
|
34
|
+
const firstResult = convertSymbol(infos[0].symbol, warn);
|
|
35
|
+
if (!firstResult)
|
|
36
|
+
return undefined;
|
|
37
|
+
const { layerType } = firstResult;
|
|
38
|
+
// Build the field expression
|
|
39
|
+
const fieldExpr = buildFieldExpression(renderer);
|
|
40
|
+
// Build paint properties with match expressions
|
|
41
|
+
const paintKeys = collectPaintKeys(infos, warn, layerType);
|
|
42
|
+
const paint = {};
|
|
43
|
+
const layout = {};
|
|
44
|
+
for (const key of paintKeys) {
|
|
45
|
+
const matchArgs = [fieldExpr];
|
|
46
|
+
for (const info of infos) {
|
|
47
|
+
const symbolResult = convertSymbol(info.symbol, warn);
|
|
48
|
+
if (!symbolResult)
|
|
49
|
+
continue;
|
|
50
|
+
matchArgs.push(info.value);
|
|
51
|
+
matchArgs.push(symbolResult.paint[key] ?? symbolResult.layout[key]);
|
|
52
|
+
}
|
|
53
|
+
// Default value from defaultSymbol or first symbol
|
|
54
|
+
const defaultResult = renderer.defaultSymbol ? convertSymbol(renderer.defaultSymbol, warn) : firstResult;
|
|
55
|
+
const defaultVal = defaultResult?.paint[key] ?? defaultResult?.layout[key] ?? "transparent";
|
|
56
|
+
matchArgs.push(defaultVal);
|
|
57
|
+
if (isLayoutProperty(key)) {
|
|
58
|
+
layout[key] = ["match", ...matchArgs];
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
paint[key] = ["match", ...matchArgs];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return { layerType, paint, layout };
|
|
65
|
+
}
|
|
66
|
+
function convertClassBreaksRenderer(renderer, warn) {
|
|
67
|
+
const breaks = renderer.classBreakInfos ?? [];
|
|
68
|
+
if (breaks.length === 0) {
|
|
69
|
+
return convertSymbol(renderer.defaultSymbol, warn);
|
|
70
|
+
}
|
|
71
|
+
const firstResult = convertSymbol(breaks[0].symbol, warn);
|
|
72
|
+
if (!firstResult)
|
|
73
|
+
return undefined;
|
|
74
|
+
const { layerType } = firstResult;
|
|
75
|
+
const field = renderer.field;
|
|
76
|
+
if (!field) {
|
|
77
|
+
warn.warn("missing-field", "classBreaks renderer missing field property");
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
const paintKeys = collectPaintKeysFromBreaks(breaks, warn, layerType);
|
|
81
|
+
const paint = {};
|
|
82
|
+
const layout = {};
|
|
83
|
+
for (const key of paintKeys) {
|
|
84
|
+
// Default value
|
|
85
|
+
const defaultResult = renderer.defaultSymbol ? convertSymbol(renderer.defaultSymbol, warn) : firstResult;
|
|
86
|
+
const defaultVal = defaultResult?.paint[key] ?? defaultResult?.layout[key] ?? "transparent";
|
|
87
|
+
const stepArgs = [["get", field], defaultVal];
|
|
88
|
+
for (const brk of breaks) {
|
|
89
|
+
const symbolResult = convertSymbol(brk.symbol, warn);
|
|
90
|
+
if (!symbolResult)
|
|
91
|
+
continue;
|
|
92
|
+
const threshold = brk.classMinValue ?? brk.classMaxValue;
|
|
93
|
+
stepArgs.push(threshold);
|
|
94
|
+
stepArgs.push(symbolResult.paint[key] ?? symbolResult.layout[key]);
|
|
95
|
+
}
|
|
96
|
+
if (isLayoutProperty(key)) {
|
|
97
|
+
layout[key] = ["step", ...stepArgs];
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
paint[key] = ["step", ...stepArgs];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return { layerType, paint, layout };
|
|
104
|
+
}
|
|
105
|
+
function buildFieldExpression(renderer) {
|
|
106
|
+
if (!renderer.field2 && !renderer.field3) {
|
|
107
|
+
return ["get", renderer.field1 ?? ""];
|
|
108
|
+
}
|
|
109
|
+
// Multi-field: concatenate with delimiter
|
|
110
|
+
const delim = renderer.fieldDelimiter ?? ",";
|
|
111
|
+
const fields = [];
|
|
112
|
+
if (renderer.field1)
|
|
113
|
+
fields.push(["get", renderer.field1]);
|
|
114
|
+
if (renderer.field2) {
|
|
115
|
+
fields.push(delim);
|
|
116
|
+
fields.push(["get", renderer.field2]);
|
|
117
|
+
}
|
|
118
|
+
if (renderer.field3) {
|
|
119
|
+
fields.push(delim);
|
|
120
|
+
fields.push(["get", renderer.field3]);
|
|
121
|
+
}
|
|
122
|
+
return ["concat", ...fields];
|
|
123
|
+
}
|
|
124
|
+
function collectPaintKeys(infos, warn, layerType) {
|
|
125
|
+
const keys = new Set();
|
|
126
|
+
for (const info of infos) {
|
|
127
|
+
const result = convertSymbol(info.symbol, warn);
|
|
128
|
+
if (!result)
|
|
129
|
+
continue;
|
|
130
|
+
for (const k of Object.keys(result.paint))
|
|
131
|
+
keys.add(k);
|
|
132
|
+
for (const k of Object.keys(result.layout))
|
|
133
|
+
keys.add(k);
|
|
134
|
+
}
|
|
135
|
+
return keys;
|
|
136
|
+
}
|
|
137
|
+
function collectPaintKeysFromBreaks(breaks, warn, layerType) {
|
|
138
|
+
return collectPaintKeys(breaks, warn, layerType);
|
|
139
|
+
}
|
|
140
|
+
const LAYOUT_PROPERTIES = new Set([
|
|
141
|
+
"icon-image",
|
|
142
|
+
"icon-size",
|
|
143
|
+
"icon-offset",
|
|
144
|
+
"icon-anchor",
|
|
145
|
+
"icon-rotate",
|
|
146
|
+
"text-field",
|
|
147
|
+
"text-font",
|
|
148
|
+
"text-size",
|
|
149
|
+
"text-offset",
|
|
150
|
+
"text-anchor",
|
|
151
|
+
"text-max-width",
|
|
152
|
+
"text-letter-spacing",
|
|
153
|
+
"text-justify",
|
|
154
|
+
"text-rotate",
|
|
155
|
+
"symbol-placement",
|
|
156
|
+
"symbol-spacing",
|
|
157
|
+
"visibility",
|
|
158
|
+
]);
|
|
159
|
+
function isLayoutProperty(key) {
|
|
160
|
+
return LAYOUT_PROPERTIES.has(key);
|
|
161
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts Esri symbol JSON to MapLibre paint/layout properties.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type { EsriColor, WebMapSymbol } from "./types.js";
|
|
7
|
+
import type { WarningCollector } from "./warnings.js";
|
|
8
|
+
/** Convert Esri `[r,g,b,a]` (a 0–255) to CSS `rgba()` string. */
|
|
9
|
+
export declare function esriColorToCss(color: EsriColor | undefined): string | undefined;
|
|
10
|
+
export declare function esriLineStyleToDashArray(style: string | undefined): number[] | undefined;
|
|
11
|
+
export interface SymbolConversionResult {
|
|
12
|
+
layerType: string;
|
|
13
|
+
paint: Record<string, unknown>;
|
|
14
|
+
layout: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export declare function convertSymbol(symbol: WebMapSymbol | undefined, warn: WarningCollector): SymbolConversionResult | undefined;
|
|
17
|
+
//# sourceMappingURL=convert-symbol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-symbol.d.ts","sourceRoot":"","sources":["../../../src/webmap/convert-symbol.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,SAAS,EAKT,YAAY,EAEb,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAItD,iEAAiE;AACjE,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAM/E;AAaD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CAGxF;AAID,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,IAAI,EAAE,gBAAgB,GACrB,sBAAsB,GAAG,SAAS,CAkBpC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts Esri symbol JSON to MapLibre paint/layout properties.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
// ── Color conversion ────────────────────────────────────────
|
|
7
|
+
/** Convert Esri `[r,g,b,a]` (a 0–255) to CSS `rgba()` string. */
|
|
8
|
+
export function esriColorToCss(color) {
|
|
9
|
+
if (!color || color.length < 4)
|
|
10
|
+
return undefined;
|
|
11
|
+
const [r, g, b, a] = color;
|
|
12
|
+
const alpha = Math.round((a / 255) * 100) / 100;
|
|
13
|
+
if (alpha === 1)
|
|
14
|
+
return `rgb(${r},${g},${b})`;
|
|
15
|
+
return `rgba(${r},${g},${b},${alpha})`;
|
|
16
|
+
}
|
|
17
|
+
// ── Line style mapping ──────────────────────────────────────
|
|
18
|
+
const LINE_DASH_MAP = {
|
|
19
|
+
esriSLSSolid: undefined,
|
|
20
|
+
esriSLSDash: [6, 4],
|
|
21
|
+
esriSLSDot: [2, 4],
|
|
22
|
+
esriSLSDashDot: [6, 4, 2, 4],
|
|
23
|
+
esriSLSDashDotDot: [6, 4, 2, 4, 2, 4],
|
|
24
|
+
esriSLSNull: [0, 10],
|
|
25
|
+
};
|
|
26
|
+
export function esriLineStyleToDashArray(style) {
|
|
27
|
+
if (!style)
|
|
28
|
+
return undefined;
|
|
29
|
+
return LINE_DASH_MAP[style];
|
|
30
|
+
}
|
|
31
|
+
export function convertSymbol(symbol, warn) {
|
|
32
|
+
if (!symbol)
|
|
33
|
+
return undefined;
|
|
34
|
+
switch (symbol.type) {
|
|
35
|
+
case "esriSFS":
|
|
36
|
+
return convertSimpleFill(symbol);
|
|
37
|
+
case "esriSLS":
|
|
38
|
+
return convertSimpleLine(symbol);
|
|
39
|
+
case "esriSMS":
|
|
40
|
+
return convertSimpleMarker(symbol);
|
|
41
|
+
case "esriPMS":
|
|
42
|
+
return convertPictureMarker(symbol, warn);
|
|
43
|
+
case "esriTS":
|
|
44
|
+
return convertTextSymbol(symbol);
|
|
45
|
+
default:
|
|
46
|
+
warn.warn("unsupported-symbol", `Unsupported symbol type: ${symbol.type}`);
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function convertSimpleFill(symbol) {
|
|
51
|
+
const paint = {};
|
|
52
|
+
const fillColor = esriColorToCss(symbol.color);
|
|
53
|
+
if (fillColor)
|
|
54
|
+
paint["fill-color"] = fillColor;
|
|
55
|
+
if (symbol.color) {
|
|
56
|
+
const alpha = symbol.color[3] / 255;
|
|
57
|
+
if (alpha < 1)
|
|
58
|
+
paint["fill-opacity"] = Math.round(alpha * 100) / 100;
|
|
59
|
+
}
|
|
60
|
+
if (symbol.outline) {
|
|
61
|
+
const outlineColor = esriColorToCss(symbol.outline.color);
|
|
62
|
+
if (outlineColor)
|
|
63
|
+
paint["fill-outline-color"] = outlineColor;
|
|
64
|
+
}
|
|
65
|
+
return { layerType: "fill", paint, layout: {} };
|
|
66
|
+
}
|
|
67
|
+
function convertSimpleLine(symbol) {
|
|
68
|
+
const paint = {};
|
|
69
|
+
const layout = {};
|
|
70
|
+
const lineColor = esriColorToCss(symbol.color);
|
|
71
|
+
if (lineColor)
|
|
72
|
+
paint["line-color"] = lineColor;
|
|
73
|
+
if (symbol.width != null)
|
|
74
|
+
paint["line-width"] = symbol.width;
|
|
75
|
+
const dashArray = esriLineStyleToDashArray(symbol.style);
|
|
76
|
+
if (dashArray)
|
|
77
|
+
paint["line-dasharray"] = dashArray;
|
|
78
|
+
return { layerType: "line", paint, layout };
|
|
79
|
+
}
|
|
80
|
+
function convertSimpleMarker(symbol) {
|
|
81
|
+
const paint = {};
|
|
82
|
+
const circleColor = esriColorToCss(symbol.color);
|
|
83
|
+
if (circleColor)
|
|
84
|
+
paint["circle-color"] = circleColor;
|
|
85
|
+
if (symbol.size != null)
|
|
86
|
+
paint["circle-radius"] = symbol.size / 2;
|
|
87
|
+
if (symbol.outline) {
|
|
88
|
+
const strokeColor = esriColorToCss(symbol.outline.color);
|
|
89
|
+
if (strokeColor)
|
|
90
|
+
paint["circle-stroke-color"] = strokeColor;
|
|
91
|
+
if (symbol.outline.width != null)
|
|
92
|
+
paint["circle-stroke-width"] = symbol.outline.width;
|
|
93
|
+
}
|
|
94
|
+
return { layerType: "circle", paint, layout: {} };
|
|
95
|
+
}
|
|
96
|
+
function convertPictureMarker(symbol, warn) {
|
|
97
|
+
const layout = {};
|
|
98
|
+
if (symbol.url) {
|
|
99
|
+
layout["icon-image"] = symbol.url;
|
|
100
|
+
warn.warn("sprite-required", "Picture marker symbol requires sprite setup for icon-image", { url: symbol.url });
|
|
101
|
+
}
|
|
102
|
+
if (symbol.width != null && symbol.height != null) {
|
|
103
|
+
layout["icon-size"] = 1;
|
|
104
|
+
}
|
|
105
|
+
return { layerType: "symbol", paint: {}, layout };
|
|
106
|
+
}
|
|
107
|
+
function convertTextSymbol(symbol) {
|
|
108
|
+
const paint = {};
|
|
109
|
+
const layout = {};
|
|
110
|
+
const textColor = esriColorToCss(symbol.color);
|
|
111
|
+
if (textColor)
|
|
112
|
+
paint["text-color"] = textColor;
|
|
113
|
+
if (symbol.text)
|
|
114
|
+
layout["text-field"] = symbol.text;
|
|
115
|
+
if (symbol.font) {
|
|
116
|
+
if (symbol.font.size != null)
|
|
117
|
+
layout["text-size"] = symbol.font.size;
|
|
118
|
+
if (symbol.font.family)
|
|
119
|
+
layout["text-font"] = [symbol.font.family];
|
|
120
|
+
}
|
|
121
|
+
return { layerType: "symbol", paint, layout };
|
|
122
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@honua/sdk-js/webmap` — WebMap JSON parse + symbol / renderer / popup converters.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { parseWebMap } from "@honua/sdk-js/webmap";
|
|
7
|
+
*
|
|
8
|
+
* const webmapJson = await (await fetch("/path/to/webmap.json")).json();
|
|
9
|
+
* const { layers, warnings } = parseWebMap(webmapJson);
|
|
10
|
+
* if (warnings.length > 0) console.warn("WebMap conversion warnings:", warnings);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @example Inspect the compatibility contract
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { CONTRACT, getContractSummary } from "@honua/sdk-js/webmap";
|
|
16
|
+
*
|
|
17
|
+
* const summary = getContractSummary();
|
|
18
|
+
* console.log(summary.supported); // ["FeatureLayer", "MapImageLayer", ...]
|
|
19
|
+
* console.log(summary.unsupported); // entries with `support: "unsupported"` + reason
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @packageDocumentation
|
|
23
|
+
*/
|
|
24
|
+
export { parseWebMap } from "./parse.js";
|
|
25
|
+
export type { ParseWebMapOptions, ParseWebMapResult } from "./parse.js";
|
|
26
|
+
export { createWarningCollector } from "./warnings.js";
|
|
27
|
+
export type { WebMapWarning, WarningCollector } from "./warnings.js";
|
|
28
|
+
export { CONTRACT, getContractSummary } from "./contract.js";
|
|
29
|
+
export type { ContractEntry, ContractSupport, ContractSummary } from "./contract.js";
|
|
30
|
+
export { convertSymbol, esriColorToCss, esriLineStyleToDashArray } from "./convert-symbol.js";
|
|
31
|
+
export type { SymbolConversionResult } from "./convert-symbol.js";
|
|
32
|
+
export { convertRenderer } from "./convert-renderer.js";
|
|
33
|
+
export type { RendererConversionResult } from "./convert-renderer.js";
|
|
34
|
+
export { convertPopupInfo } from "./convert-popup.js";
|
|
35
|
+
export type { HonuaPopupConfig, HonuaPopupFieldInfo, HonuaPopupMediaInfo } from "./convert-popup.js";
|
|
36
|
+
export { convertLabelingInfo } from "./convert-label.js";
|
|
37
|
+
export { convertBasemap } from "./convert-basemap.js";
|
|
38
|
+
export type { BasemapConversionResult } from "./convert-basemap.js";
|
|
39
|
+
export { convertExtent, convertInitialViewpoint } from "./convert-extent.js";
|
|
40
|
+
export type { ExtentConversionResult } from "./convert-extent.js";
|
|
41
|
+
export { convertOperationalLayer } from "./convert-layer.js";
|
|
42
|
+
export type { LayerConversionResult } from "./convert-layer.js";
|
|
43
|
+
export type { WebMapJson, WebMapOperationalLayer, WebMapRenderer, WebMapSimpleRenderer, WebMapUniqueValueRenderer, WebMapClassBreaksRenderer, WebMapSymbol, WebMapSimpleFillSymbol, WebMapSimpleLineSymbol, WebMapSimpleMarkerSymbol, WebMapPictureMarkerSymbol, WebMapTextSymbol, WebMapBaseMap, WebMapBaseMapLayer, WebMapPopupInfo, WebMapFieldInfo, WebMapExtent, WebMapPoint, WebMapViewpoint, WebMapViewpointTargetGeometry, WebMapInitialState, WebMapBookmark, WebMapSpatialReference, WebMapLabelClass, WebMapDrawingInfo, WebMapLayerDefinition, EsriColor, } from "./types.js";
|
|
44
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webmap/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC7D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EACV,UAAU,EACV,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,WAAW,EACX,eAAe,EACf,6BAA6B,EAC7B,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,SAAS,GACV,MAAM,YAAY,CAAC"}
|
package/webmap/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@honua/sdk-js/webmap` — WebMap JSON parse + symbol / renderer / popup converters.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { parseWebMap } from "@honua/sdk-js/webmap";
|
|
7
|
+
*
|
|
8
|
+
* const webmapJson = await (await fetch("/path/to/webmap.json")).json();
|
|
9
|
+
* const { layers, warnings } = parseWebMap(webmapJson);
|
|
10
|
+
* if (warnings.length > 0) console.warn("WebMap conversion warnings:", warnings);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @example Inspect the compatibility contract
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { CONTRACT, getContractSummary } from "@honua/sdk-js/webmap";
|
|
16
|
+
*
|
|
17
|
+
* const summary = getContractSummary();
|
|
18
|
+
* console.log(summary.supported); // ["FeatureLayer", "MapImageLayer", ...]
|
|
19
|
+
* console.log(summary.unsupported); // entries with `support: "unsupported"` + reason
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @packageDocumentation
|
|
23
|
+
*/
|
|
24
|
+
export { parseWebMap } from "./parse.js";
|
|
25
|
+
export { createWarningCollector } from "./warnings.js";
|
|
26
|
+
export { CONTRACT, getContractSummary } from "./contract.js";
|
|
27
|
+
export { convertSymbol, esriColorToCss, esriLineStyleToDashArray } from "./convert-symbol.js";
|
|
28
|
+
export { convertRenderer } from "./convert-renderer.js";
|
|
29
|
+
export { convertPopupInfo } from "./convert-popup.js";
|
|
30
|
+
export { convertLabelingInfo } from "./convert-label.js";
|
|
31
|
+
export { convertBasemap } from "./convert-basemap.js";
|
|
32
|
+
export { convertExtent, convertInitialViewpoint } from "./convert-extent.js";
|
|
33
|
+
export { convertOperationalLayer } from "./convert-layer.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Top-level WebMap JSON → HonuaStyleSpecification parser.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type { HonuaStyleSpecification } from "../style/specification.js";
|
|
7
|
+
import type { HonuaPopupConfig } from "./convert-popup.js";
|
|
8
|
+
import type { WebMapBookmark, WebMapJson } from "./types.js";
|
|
9
|
+
import { type WebMapWarning } from "./warnings.js";
|
|
10
|
+
export interface ParseWebMapOptions {
|
|
11
|
+
/** If true, include basemap layers. Defaults to true. */
|
|
12
|
+
includeBasemap?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ParseWebMapResult {
|
|
15
|
+
/** The converted style specification. */
|
|
16
|
+
style: HonuaStyleSpecification;
|
|
17
|
+
/** Non-fatal warnings encountered during conversion. */
|
|
18
|
+
warnings: WebMapWarning[];
|
|
19
|
+
/** Bookmarks from the WebMap, if any. */
|
|
20
|
+
bookmarks: WebMapBookmark[];
|
|
21
|
+
/** Popup configurations keyed by layer ID. */
|
|
22
|
+
popups: Record<string, HonuaPopupConfig>;
|
|
23
|
+
}
|
|
24
|
+
export declare function parseWebMap(input: WebMapJson, options?: ParseWebMapOptions): ParseWebMapResult;
|
|
25
|
+
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../src/webmap/parse.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAA0B,MAAM,YAAY,CAAC;AACrF,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,KAAK,EAAE,uBAAuB,CAAC;IAC/B,wDAAwD;IACxD,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,yCAAyC;IACzC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC1C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,CAoD9F"}
|
package/webmap/parse.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Top-level WebMap JSON → HonuaStyleSpecification parser.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { convertBasemap } from "./convert-basemap.js";
|
|
7
|
+
import { convertExtent, convertInitialViewpoint } from "./convert-extent.js";
|
|
8
|
+
import { convertOperationalLayer } from "./convert-layer.js";
|
|
9
|
+
import { createWarningCollector, warnUnknownProperties, } from "./warnings.js";
|
|
10
|
+
export function parseWebMap(input, options) {
|
|
11
|
+
const warn = createWarningCollector();
|
|
12
|
+
const includeBasemap = options?.includeBasemap !== false;
|
|
13
|
+
warnUnknownProperties(input, WEBMAP_TOP_LEVEL_PROPERTIES, warn);
|
|
14
|
+
detectVersionWarnings(input, warn);
|
|
15
|
+
detectUnsupported3DProperties(input, warn);
|
|
16
|
+
const sources = {};
|
|
17
|
+
const layers = [];
|
|
18
|
+
const popups = {};
|
|
19
|
+
// Convert basemap
|
|
20
|
+
if (includeBasemap && input.baseMap) {
|
|
21
|
+
const basemapResult = convertBasemap(input.baseMap, warn.child("baseMap"));
|
|
22
|
+
Object.assign(sources, basemapResult.sources);
|
|
23
|
+
layers.push(...basemapResult.layers);
|
|
24
|
+
}
|
|
25
|
+
// Convert operational layers
|
|
26
|
+
if (input.operationalLayers) {
|
|
27
|
+
const opLayers = input.operationalLayers;
|
|
28
|
+
for (let i = 0; i < opLayers.length; i++) {
|
|
29
|
+
const opLayer = opLayers[i];
|
|
30
|
+
const layerResult = convertOperationalLayer(opLayer, i, warn);
|
|
31
|
+
Object.assign(sources, layerResult.sources);
|
|
32
|
+
layers.push(...layerResult.layers);
|
|
33
|
+
if (layerResult.popup) {
|
|
34
|
+
const layerId = opLayer.id ?? `operational-${i}`;
|
|
35
|
+
popups[layerId] = layerResult.popup;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
// Convert initial viewpoint (preferred over initialExtent for WebMap 2.x)
|
|
40
|
+
const viewpointResult = convertInitialViewpoint(input.initialViewpoint ?? input.initialState?.viewpoint, warn.child("initialViewpoint"));
|
|
41
|
+
const extentResult = viewpointResult ?? convertExtent(input.initialExtent, warn.child("initialExtent"));
|
|
42
|
+
const style = {
|
|
43
|
+
version: 8,
|
|
44
|
+
sources,
|
|
45
|
+
layers,
|
|
46
|
+
...(extentResult ? { center: extentResult.center, zoom: extentResult.zoom } : {}),
|
|
47
|
+
};
|
|
48
|
+
// Bookmarks
|
|
49
|
+
const bookmarks = input.bookmarks ?? [];
|
|
50
|
+
return { style, warnings: warn.warnings, bookmarks, popups };
|
|
51
|
+
}
|
|
52
|
+
const WEBMAP_TOP_LEVEL_PROPERTIES = [
|
|
53
|
+
"version",
|
|
54
|
+
"authoringApp",
|
|
55
|
+
"authoringAppVersion",
|
|
56
|
+
"operationalLayers",
|
|
57
|
+
"baseMap",
|
|
58
|
+
"initialExtent",
|
|
59
|
+
"initialViewpoint",
|
|
60
|
+
"initialState",
|
|
61
|
+
"bookmarks",
|
|
62
|
+
"spatialReference",
|
|
63
|
+
"tables",
|
|
64
|
+
];
|
|
65
|
+
const THREE_D_TOP_LEVEL_PROPERTIES = new Set(["ground", "heightModelInfo", "viewingMode", "camera"]);
|
|
66
|
+
function detectVersionWarnings(input, warn) {
|
|
67
|
+
if (typeof input.version === "string" && !input.version.startsWith("2.")) {
|
|
68
|
+
warn.warn("unsupported-webmap-version", `WebMap version '${input.version}' is outside the 2.x compatibility target`, { version: input.version });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function detectUnsupported3DProperties(input, warn) {
|
|
72
|
+
for (const key of THREE_D_TOP_LEVEL_PROPERTIES) {
|
|
73
|
+
if (Object.prototype.hasOwnProperty.call(input, key)) {
|
|
74
|
+
warn.warn("unsupported-3d-property", `Top-level 3D property '${key}' is not supported by the 2D WebMap style path`, {
|
|
75
|
+
property: key,
|
|
76
|
+
status: key === "ground" || key === "camera" ? "degraded" : "unsupported",
|
|
77
|
+
fallback: key === "ground"
|
|
78
|
+
? "Convert ground/elevation metadata into scene workspace terrain primitives for MapLibre 2.5D."
|
|
79
|
+
: "Preserve the property for a scene renderer adapter; the generated 2D style will ignore it.",
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|