@honua/react 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 +9 -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 +61 -0
- package/contract/index.d.ts.map +1 -0
- package/contract/index.js +51 -0
- package/contract/jobs.d.ts +149 -0
- package/contract/jobs.d.ts.map +1 -0
- package/contract/jobs.js +40 -0
- package/contract/source.d.ts +423 -0
- package/contract/source.d.ts.map +1 -0
- package/contract/source.js +3802 -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 +665 -0
- package/contract/types.d.ts.map +1 -0
- package/contract/types.js +175 -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/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 +577 -0
- package/core/client.d.ts.map +1 -0
- package/core/client.js +1664 -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 +107 -0
- package/core/errors.d.ts.map +1 -0
- package/core/errors.js +156 -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/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-features.d.ts +23 -0
- package/core/ogc-features.d.ts.map +1 -0
- package/core/ogc-features.js +114 -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.d.ts +55 -0
- package/core/stac.d.ts.map +1 -0
- package/core/stac.js +229 -0
- package/core/surfaces.d.ts +527 -0
- package/core/surfaces.d.ts.map +1 -0
- package/core/surfaces.js +1917 -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 +1355 -0
- package/core/types.d.ts.map +1 -0
- package/core/types.js +13 -0
- package/core/wfs-capabilities.d.ts +143 -0
- package/core/wfs-capabilities.d.ts.map +1 -0
- package/core/wfs-capabilities.js +478 -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 +219 -0
- package/core/wfs.d.ts.map +1 -0
- package/core/wfs.js +406 -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 +31 -0
- package/esri-compat/identity-manager.d.ts.map +1 -0
- package/esri-compat/identity-manager.js +115 -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 +35 -0
- package/esri-compat/oauth-info.d.ts.map +1 -0
- package/esri-compat/oauth-info.js +115 -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/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/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/package.json +37 -0
- package/react/context.d.ts +32 -0
- package/react/context.d.ts.map +1 -0
- package/react/context.js +19 -0
- package/react/honua-layer.d.ts +35 -0
- package/react/honua-layer.d.ts.map +1 -0
- package/react/honua-layer.js +47 -0
- package/react/honua-map.d.ts +83 -0
- package/react/honua-map.d.ts.map +1 -0
- package/react/honua-map.js +109 -0
- package/react/honua-popup.d.ts +26 -0
- package/react/honua-popup.d.ts.map +1 -0
- package/react/honua-popup.js +34 -0
- package/react/hooks.d.ts +127 -0
- package/react/hooks.d.ts.map +1 -0
- package/react/hooks.js +206 -0
- package/react/index.d.ts +42 -0
- package/react/index.d.ts.map +1 -0
- package/react/index.js +34 -0
- package/react/provider.d.ts +36 -0
- package/react/provider.d.ts.map +1 -0
- package/react/provider.js +35 -0
- package/react/query-cache.d.ts +76 -0
- package/react/query-cache.d.ts.map +1 -0
- package/react/query-cache.js +188 -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 +43 -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 +264 -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 +43 -0
- package/runtime/map-package-validation.d.ts.map +1 -0
- package/runtime/map-package-validation.js +269 -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/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 +401 -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/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/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,363 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert Esri-JSON geometry (as returned by `queryFeatures` and contract
|
|
3
|
+
* {@link HonuaFeature} results) into standard GeoJSON geometry.
|
|
4
|
+
*
|
|
5
|
+
* Esri encodes geometry as `{ x, y }` points, `{ paths }` polylines,
|
|
6
|
+
* `{ rings }` polygons, `{ points }` multipoints, and `{ xmin, ymin, xmax,
|
|
7
|
+
* ymax }` envelopes. GeoJSON consumers (MapLibre, Leaflet, turf, etc.) expect
|
|
8
|
+
* `Point` / `LineString` / `Polygon` and their `Multi*` variants. This module
|
|
9
|
+
* provides that translation as a first-class, dependency-free utility.
|
|
10
|
+
*
|
|
11
|
+
* Polygon rings are grouped following the Esri convention where clockwise
|
|
12
|
+
* rings are exterior and counter-clockwise rings are holes, producing `Polygon`
|
|
13
|
+
* for a single exterior ring and `MultiPolygon` when several exterior rings are
|
|
14
|
+
* present. The emitted rings are rewound to the GeoJSON RFC 7946 right-hand rule
|
|
15
|
+
* (counter-clockwise exterior, clockwise holes) so conformant consumers do not
|
|
16
|
+
* interpret polygons inside-out.
|
|
17
|
+
*
|
|
18
|
+
* @module
|
|
19
|
+
*/
|
|
20
|
+
function isFinitePosition(value) {
|
|
21
|
+
return (Array.isArray(value) &&
|
|
22
|
+
value.length >= 2 &&
|
|
23
|
+
typeof value[0] === "number" &&
|
|
24
|
+
Number.isFinite(value[0]) &&
|
|
25
|
+
typeof value[1] === "number" &&
|
|
26
|
+
Number.isFinite(value[1]));
|
|
27
|
+
}
|
|
28
|
+
function collectFinitePositions(value) {
|
|
29
|
+
if (!Array.isArray(value)) {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
return value.filter(isFinitePosition);
|
|
33
|
+
}
|
|
34
|
+
function collectPositionSets(value) {
|
|
35
|
+
if (!Array.isArray(value)) {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
return value.map((entry) => collectFinitePositions(entry)).filter((entry) => entry.length > 0);
|
|
39
|
+
}
|
|
40
|
+
function computeRingSignedArea(ring) {
|
|
41
|
+
if (ring.length < 3) {
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
44
|
+
let area = 0;
|
|
45
|
+
for (let index = 0; index < ring.length; index += 1) {
|
|
46
|
+
const current = ring[index];
|
|
47
|
+
const next = ring[(index + 1) % ring.length];
|
|
48
|
+
if (!current || !next) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
area += current[0] * next[1] - next[0] * current[1];
|
|
52
|
+
}
|
|
53
|
+
return area / 2;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Esri uses clockwise (negative signed area in screen/standard math
|
|
57
|
+
* orientation) rings for exterior boundaries and counter-clockwise rings for
|
|
58
|
+
* holes.
|
|
59
|
+
*/
|
|
60
|
+
function isExteriorRing(ring) {
|
|
61
|
+
return computeRingSignedArea(ring) < 0;
|
|
62
|
+
}
|
|
63
|
+
function isPointOnSegment(point, segmentStart, segmentEnd) {
|
|
64
|
+
const epsilon = 1e-9;
|
|
65
|
+
const crossProduct = (point[0] - segmentStart[0]) * (segmentEnd[1] - segmentStart[1]) -
|
|
66
|
+
(point[1] - segmentStart[1]) * (segmentEnd[0] - segmentStart[0]);
|
|
67
|
+
if (Math.abs(crossProduct) > epsilon) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
const dotProduct = (point[0] - segmentStart[0]) * (segmentEnd[0] - segmentStart[0]) +
|
|
71
|
+
(point[1] - segmentStart[1]) * (segmentEnd[1] - segmentStart[1]);
|
|
72
|
+
if (dotProduct < -epsilon) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
const segmentLengthSquared = (segmentEnd[0] - segmentStart[0]) * (segmentEnd[0] - segmentStart[0]) +
|
|
76
|
+
(segmentEnd[1] - segmentStart[1]) * (segmentEnd[1] - segmentStart[1]);
|
|
77
|
+
return dotProduct - segmentLengthSquared <= epsilon;
|
|
78
|
+
}
|
|
79
|
+
function isPointInsideRing(point, ring) {
|
|
80
|
+
if (ring.length < 3) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
let isInside = false;
|
|
84
|
+
for (let index = 0, previousIndex = ring.length - 1; index < ring.length; previousIndex = index, index += 1) {
|
|
85
|
+
const current = ring[index];
|
|
86
|
+
const previous = ring[previousIndex];
|
|
87
|
+
if (!current || !previous) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (isPointOnSegment(point, previous, current)) {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
const intersects = current[1] > point[1] !== previous[1] > point[1] &&
|
|
94
|
+
point[0] < ((previous[0] - current[0]) * (point[1] - current[1])) / (previous[1] - current[1]) + current[0];
|
|
95
|
+
if (intersects) {
|
|
96
|
+
isInside = !isInside;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return isInside;
|
|
100
|
+
}
|
|
101
|
+
function findContainingPolygonIndex(polygons, outerAreas, ring) {
|
|
102
|
+
const samplePoint = ring[0];
|
|
103
|
+
if (!samplePoint) {
|
|
104
|
+
return -1;
|
|
105
|
+
}
|
|
106
|
+
let containingPolygonIndex = -1;
|
|
107
|
+
let smallestContainingArea = Number.POSITIVE_INFINITY;
|
|
108
|
+
for (let index = 0; index < polygons.length; index += 1) {
|
|
109
|
+
const polygon = polygons[index];
|
|
110
|
+
const outerRing = polygon?.[0];
|
|
111
|
+
const outerArea = outerAreas[index];
|
|
112
|
+
if (!outerRing || outerArea === undefined || !isPointInsideRing(samplePoint, outerRing)) {
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (outerArea < smallestContainingArea) {
|
|
116
|
+
smallestContainingArea = outerArea;
|
|
117
|
+
containingPolygonIndex = index;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return containingPolygonIndex;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Rewind a ring to the GeoJSON RFC 7946 §3.1.6 right-hand rule: exterior rings
|
|
124
|
+
* counter-clockwise (positive signed area), interior rings (holes) clockwise
|
|
125
|
+
* (negative signed area). Esri uses the opposite convention (clockwise
|
|
126
|
+
* exterior), so emitting Esri rings verbatim produces GeoJSON that
|
|
127
|
+
* RFC 7946-conformant consumers (and the S2 spherical winding used by some
|
|
128
|
+
* renderers) interpret inside-out.
|
|
129
|
+
*/
|
|
130
|
+
function rewindRingForGeoJson(ring, exterior) {
|
|
131
|
+
const copy = ring.map((position) => [...position]);
|
|
132
|
+
const area = computeRingSignedArea(copy);
|
|
133
|
+
if (area === 0) {
|
|
134
|
+
return copy;
|
|
135
|
+
}
|
|
136
|
+
const correctlyWound = exterior ? area > 0 : area < 0;
|
|
137
|
+
return correctlyWound ? copy : copy.reverse();
|
|
138
|
+
}
|
|
139
|
+
function rewindPolygonForGeoJson(polygon) {
|
|
140
|
+
return polygon.map((ring, index) => rewindRingForGeoJson(ring, index === 0));
|
|
141
|
+
}
|
|
142
|
+
function convertPolygonRings(rings) {
|
|
143
|
+
const polygons = [];
|
|
144
|
+
const outerAreas = [];
|
|
145
|
+
const interiorRings = [];
|
|
146
|
+
for (const ring of rings) {
|
|
147
|
+
if (isExteriorRing(ring)) {
|
|
148
|
+
polygons.push([ring]);
|
|
149
|
+
outerAreas.push(Math.abs(computeRingSignedArea(ring)));
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
interiorRings.push(ring);
|
|
153
|
+
}
|
|
154
|
+
for (const ring of interiorRings) {
|
|
155
|
+
const containingPolygonIndex = findContainingPolygonIndex(polygons, outerAreas, ring);
|
|
156
|
+
if (containingPolygonIndex < 0) {
|
|
157
|
+
polygons.push([ring]);
|
|
158
|
+
outerAreas.push(Math.abs(computeRingSignedArea(ring)));
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
polygons[containingPolygonIndex]?.push(ring);
|
|
162
|
+
}
|
|
163
|
+
return polygons.length === 1
|
|
164
|
+
? {
|
|
165
|
+
type: "Polygon",
|
|
166
|
+
coordinates: rewindPolygonForGeoJson(polygons[0] ?? []),
|
|
167
|
+
}
|
|
168
|
+
: {
|
|
169
|
+
type: "MultiPolygon",
|
|
170
|
+
coordinates: polygons.map(rewindPolygonForGeoJson),
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function hasNumber(geometry, key) {
|
|
174
|
+
return typeof geometry[key] === "number" && Number.isFinite(geometry[key]);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Convert a single Esri-JSON geometry into a GeoJSON geometry.
|
|
178
|
+
*
|
|
179
|
+
* Supports Esri point (`{ x, y }`), multipoint (`{ points }`), polyline
|
|
180
|
+
* (`{ paths }`), polygon (`{ rings }`), and envelope (`{ xmin, ymin, xmax,
|
|
181
|
+
* ymax }`) shapes. Returns `null` for `null`/`undefined` input and for
|
|
182
|
+
* geometries that contain no finite coordinates (e.g. empty `rings`/`paths`).
|
|
183
|
+
*
|
|
184
|
+
* @param geometry Esri geometry, the `geometry` field of a {@link HonuaFeature},
|
|
185
|
+
* or `null`/`undefined`.
|
|
186
|
+
* @returns The equivalent GeoJSON geometry, or `null` when the input is empty
|
|
187
|
+
* or unrecognized.
|
|
188
|
+
*/
|
|
189
|
+
export function esriGeometryToGeoJSON(geometry) {
|
|
190
|
+
if (!geometry || typeof geometry !== "object") {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
const candidate = geometry;
|
|
194
|
+
if (hasNumber(candidate, "x") && hasNumber(candidate, "y")) {
|
|
195
|
+
return {
|
|
196
|
+
type: "Point",
|
|
197
|
+
coordinates: [candidate.x, candidate.y],
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
if (Array.isArray(candidate.points)) {
|
|
201
|
+
const coordinates = collectFinitePositions(candidate.points);
|
|
202
|
+
if (coordinates.length < 1) {
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
return {
|
|
206
|
+
type: "MultiPoint",
|
|
207
|
+
coordinates,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
if (Array.isArray(candidate.paths)) {
|
|
211
|
+
const coordinates = collectPositionSets(candidate.paths);
|
|
212
|
+
if (coordinates.length < 1) {
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
return coordinates.length === 1
|
|
216
|
+
? {
|
|
217
|
+
type: "LineString",
|
|
218
|
+
coordinates: coordinates[0] ?? [],
|
|
219
|
+
}
|
|
220
|
+
: {
|
|
221
|
+
type: "MultiLineString",
|
|
222
|
+
coordinates,
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
if (Array.isArray(candidate.rings)) {
|
|
226
|
+
const coordinates = collectPositionSets(candidate.rings);
|
|
227
|
+
if (coordinates.length < 1) {
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
return convertPolygonRings(coordinates);
|
|
231
|
+
}
|
|
232
|
+
if (hasNumber(candidate, "xmin") &&
|
|
233
|
+
hasNumber(candidate, "ymin") &&
|
|
234
|
+
hasNumber(candidate, "xmax") &&
|
|
235
|
+
hasNumber(candidate, "ymax")) {
|
|
236
|
+
const xmin = candidate.xmin;
|
|
237
|
+
const ymin = candidate.ymin;
|
|
238
|
+
const xmax = candidate.xmax;
|
|
239
|
+
const ymax = candidate.ymax;
|
|
240
|
+
return {
|
|
241
|
+
type: "Polygon",
|
|
242
|
+
coordinates: [
|
|
243
|
+
[
|
|
244
|
+
[xmin, ymin],
|
|
245
|
+
[xmax, ymin],
|
|
246
|
+
[xmax, ymax],
|
|
247
|
+
[xmin, ymax],
|
|
248
|
+
[xmin, ymin],
|
|
249
|
+
],
|
|
250
|
+
],
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
function readFeatureId(feature) {
|
|
256
|
+
const attributes = feature.attributes ?? {};
|
|
257
|
+
const candidates = [attributes.OBJECTID, attributes.objectid, attributes.id, attributes.ID, attributes.FID];
|
|
258
|
+
for (const value of candidates) {
|
|
259
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
260
|
+
return value;
|
|
261
|
+
}
|
|
262
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
263
|
+
return value;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return undefined;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Convert a contract {@link HonuaFeature} (Esri attributes + geometry) into a
|
|
270
|
+
* GeoJSON `Feature`.
|
|
271
|
+
*
|
|
272
|
+
* The feature `id` is derived from common Esri identifier attributes
|
|
273
|
+
* (`OBJECTID`, `objectid`, `id`, `ID`, `FID`) when present, and the geometry is
|
|
274
|
+
* converted with {@link esriGeometryToGeoJSON} (yielding `null` for missing or
|
|
275
|
+
* empty geometry).
|
|
276
|
+
*
|
|
277
|
+
* @param feature A contract feature with Esri-shaped `attributes` and
|
|
278
|
+
* `geometry`.
|
|
279
|
+
* @returns The equivalent GeoJSON feature.
|
|
280
|
+
*/
|
|
281
|
+
export function esriFeatureToGeoJSON(feature) {
|
|
282
|
+
const id = readFeatureId(feature);
|
|
283
|
+
return {
|
|
284
|
+
type: "Feature",
|
|
285
|
+
...(id === undefined ? {} : { id }),
|
|
286
|
+
geometry: esriGeometryToGeoJSON(feature.geometry),
|
|
287
|
+
properties: feature.attributes ?? {},
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
// ── GeoJSON → Esri (reverse of esriGeometryToGeoJSON) ─────────────
|
|
291
|
+
//
|
|
292
|
+
// The forward converter rewinds rings to the GeoJSON RFC 7946 right-hand rule
|
|
293
|
+
// (counter-clockwise exterior). Esri uses the opposite convention (clockwise
|
|
294
|
+
// exterior, counter-clockwise holes), so this reverse converter rewinds each
|
|
295
|
+
// ring back to the Esri orientation before emitting `{ rings }`.
|
|
296
|
+
function rewindRingForEsri(ring, exterior) {
|
|
297
|
+
const copy = ring.map((position) => [...position]);
|
|
298
|
+
const area = computeRingSignedArea(copy);
|
|
299
|
+
if (area === 0) {
|
|
300
|
+
return copy;
|
|
301
|
+
}
|
|
302
|
+
// Esri: exterior rings are clockwise (negative signed area), holes are
|
|
303
|
+
// counter-clockwise (positive signed area).
|
|
304
|
+
const correctlyWound = exterior ? area < 0 : area > 0;
|
|
305
|
+
return correctlyWound ? copy : copy.reverse();
|
|
306
|
+
}
|
|
307
|
+
function esriRingsFromPolygon(coordinates) {
|
|
308
|
+
return coordinates.map((ring, index) => rewindRingForEsri(ring, index === 0));
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Convert a standard GeoJSON geometry back into Esri-JSON geometry, the inverse
|
|
312
|
+
* of {@link esriGeometryToGeoJSON}. `GeometryCollection` is not representable as
|
|
313
|
+
* a single Esri geometry and yields `null`.
|
|
314
|
+
*
|
|
315
|
+
* Polygon/MultiPolygon rings are rewound to the Esri winding convention
|
|
316
|
+
* (clockwise exterior, counter-clockwise holes) and MultiPolygons are flattened
|
|
317
|
+
* into a single `{ rings }` list, matching how Esri encodes multi-part polygons.
|
|
318
|
+
*
|
|
319
|
+
* @param geometry A GeoJSON geometry, or `null`/`undefined`.
|
|
320
|
+
* @param spatialReference Optional spatial reference stamped onto the emitted
|
|
321
|
+
* Esri geometry (Esri geometries are CRS-tagged; GeoJSON is implicitly WGS84).
|
|
322
|
+
* @returns The equivalent Esri geometry, or `null` when the input is empty or
|
|
323
|
+
* unrepresentable.
|
|
324
|
+
*/
|
|
325
|
+
export function geoJsonToEsriGeometry(geometry, spatialReference) {
|
|
326
|
+
if (!geometry || typeof geometry !== "object") {
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
329
|
+
const sr = spatialReference ? { spatialReference } : {};
|
|
330
|
+
switch (geometry.type) {
|
|
331
|
+
case "Point": {
|
|
332
|
+
const [x, y] = geometry.coordinates;
|
|
333
|
+
if (typeof x !== "number" || typeof y !== "number") {
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
return { x, y, ...sr };
|
|
337
|
+
}
|
|
338
|
+
case "MultiPoint": {
|
|
339
|
+
return { points: geometry.coordinates.map((position) => [...position]), ...sr };
|
|
340
|
+
}
|
|
341
|
+
case "LineString": {
|
|
342
|
+
return { paths: [geometry.coordinates.map((position) => [...position])], ...sr };
|
|
343
|
+
}
|
|
344
|
+
case "MultiLineString": {
|
|
345
|
+
return {
|
|
346
|
+
paths: geometry.coordinates.map((line) => line.map((position) => [...position])),
|
|
347
|
+
...sr,
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
case "Polygon": {
|
|
351
|
+
return { rings: esriRingsFromPolygon(geometry.coordinates), ...sr };
|
|
352
|
+
}
|
|
353
|
+
case "MultiPolygon": {
|
|
354
|
+
const rings = [];
|
|
355
|
+
for (const polygon of geometry.coordinates) {
|
|
356
|
+
rings.push(...esriRingsFromPolygon(polygon));
|
|
357
|
+
}
|
|
358
|
+
return { rings, ...sr };
|
|
359
|
+
}
|
|
360
|
+
default:
|
|
361
|
+
return null;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Esri GeoServices wire methods: service/layer metadata plus the
|
|
3
|
+
* FeatureServer / MapServer operation endpoints (query, applyEdits,
|
|
4
|
+
* related-records, export, legend, identify, find). Concrete URL-building
|
|
5
|
+
* and param serialization invoked against an injected
|
|
6
|
+
* {@link HonuaProtocolTransport}. The `HonuaClient` facade delegates here;
|
|
7
|
+
* the gRPC-web fast path for `queryFeatures` is orchestrated by the client.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
import type { HonuaMetadataRequestOptions } from "./cache-state.js";
|
|
12
|
+
import type { HonuaProtocolTransport } from "./protocol-transport.js";
|
|
13
|
+
import type { ApplyEditsRequest, ExportMapRequest, HonuaApplyEditsResponse, HonuaExportMapResponse, HonuaFindResponse, HonuaIdentifyResponse, HonuaLayerMetadata, HonuaLegendResponse, HonuaQueryResponse, HonuaRelatedRecordsResponse, HonuaServiceMetadata, HonuaServicesResponse, MapFindRequest, MapIdentifyRequest, MapLayerQueryRequest, MapLegendRequest, MapRelatedRecordsRequest, QueryFeaturesRequest, QueryRelatedRecordsRequest } from "./types.js";
|
|
14
|
+
export declare function listServices(transport: HonuaProtocolTransport, format: "json" | "pjson", options?: HonuaMetadataRequestOptions): Promise<HonuaServicesResponse>;
|
|
15
|
+
export declare function getLayerMetadata(transport: HonuaProtocolTransport, serviceId: string, layerId: number, options?: HonuaMetadataRequestOptions): Promise<HonuaLayerMetadata>;
|
|
16
|
+
export declare function getFeatureServiceMetadata(transport: HonuaProtocolTransport, serviceId: string, options?: HonuaMetadataRequestOptions): Promise<HonuaServiceMetadata>;
|
|
17
|
+
export declare function getMapServiceMetadata(transport: HonuaProtocolTransport, serviceId: string, options?: HonuaMetadataRequestOptions): Promise<HonuaServiceMetadata>;
|
|
18
|
+
export declare function getMapLayerMetadata(transport: HonuaProtocolTransport, serviceId: string, layerId: number, options?: HonuaMetadataRequestOptions): Promise<HonuaLayerMetadata>;
|
|
19
|
+
/**
|
|
20
|
+
* REST portion of `client.queryFeatures` (the gRPC-web fast path is
|
|
21
|
+
* orchestrated by the client). Maps directly to the FeatureServer `query`
|
|
22
|
+
* endpoint, optionally negotiating a PBF response on `GET` when
|
|
23
|
+
* `preferBinary` is set.
|
|
24
|
+
*/
|
|
25
|
+
export declare function queryFeaturesRest(transport: HonuaProtocolTransport, request: QueryFeaturesRequest, preferBinary: boolean): Promise<HonuaQueryResponse>;
|
|
26
|
+
export declare function queryMapLayer(transport: HonuaProtocolTransport, request: MapLayerQueryRequest): Promise<HonuaQueryResponse>;
|
|
27
|
+
export declare function applyEdits(transport: HonuaProtocolTransport, request: ApplyEditsRequest): Promise<HonuaApplyEditsResponse>;
|
|
28
|
+
export declare function queryRelatedRecords(transport: HonuaProtocolTransport, request: QueryRelatedRecordsRequest): Promise<HonuaRelatedRecordsResponse>;
|
|
29
|
+
export declare function queryMapRelatedRecords(transport: HonuaProtocolTransport, request: MapRelatedRecordsRequest): Promise<HonuaRelatedRecordsResponse>;
|
|
30
|
+
export declare function exportMap(transport: HonuaProtocolTransport, request: ExportMapRequest): Promise<HonuaExportMapResponse>;
|
|
31
|
+
export declare function getMapLegend(transport: HonuaProtocolTransport, request: MapLegendRequest): Promise<HonuaLegendResponse>;
|
|
32
|
+
export declare function identifyMap(transport: HonuaProtocolTransport, request: MapIdentifyRequest): Promise<HonuaIdentifyResponse>;
|
|
33
|
+
export declare function findMap(transport: HonuaProtocolTransport, request: MapFindRequest): Promise<HonuaFindResponse>;
|
|
34
|
+
//# sourceMappingURL=geoservices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geoservices.d.ts","sourceRoot":"","sources":["../../../src/core/geoservices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAEpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EAEpB,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAIpB,wBAAsB,YAAY,CAChC,SAAS,EAAE,sBAAsB,EACjC,MAAM,EAAE,MAAM,GAAG,OAAO,EACxB,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,qBAAqB,CAAC,CAIhC;AAED,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,sBAAsB,EACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,kBAAkB,CAAC,CAQ7B;AAED,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,sBAAsB,EACjC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,oBAAoB,CAAC,CAQ/B;AAED,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,sBAAsB,EACjC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,oBAAoB,CAAC,CAQ/B;AAED,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,sBAAsB,EACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,kBAAkB,CAAC,CAQ7B;AAID;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,oBAAoB,EAC7B,YAAY,EAAE,OAAO,GACpB,OAAO,CAAC,kBAAkB,CAAC,CAsC7B;AAED,wBAAsB,aAAa,CACjC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,kBAAkB,CAAC,CA2B7B;AAED,wBAAsB,UAAU,CAC9B,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,uBAAuB,CAAC,CA0BlC;AAED,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,2BAA2B,CAAC,CAyCtC;AAED,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,2BAA2B,CAAC,CAwCtC;AAED,wBAAsB,SAAS,CAC7B,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,sBAAsB,CAAC,CA6CjC;AAED,wBAAsB,YAAY,CAChC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,mBAAmB,CAAC,CAiB9B;AAED,wBAAsB,WAAW,CAC/B,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,qBAAqB,CAAC,CA8ChC;AAED,wBAAsB,OAAO,CAAC,SAAS,EAAE,sBAAsB,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA2DpH"}
|