@arcgis/core 5.2.0-next.127 → 5.2.0-next.128
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/WebScene.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.d.ts +14 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/applications/WebEditor/sketchUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/038d2b80d96237c25b6f.js +1 -0
- package/assets/esri/core/workers/chunks/3f045f09ac95e7f22a97.js +1 -0
- package/assets/esri/core/workers/chunks/500f6d6f0ffa235cae85.js +1 -0
- package/assets/esri/core/workers/chunks/{e6637f9176566382ed3e.js → 606cca69eaea84bfcdc6.js} +1 -1
- package/assets/esri/core/workers/chunks/{26995de0c18bef8db590.js → 6267a1fe1603daa399b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c7fc24649d91552e68a.js → 67fd2cdb2e6834bfa710.js} +1 -1
- package/assets/esri/core/workers/chunks/{50c29d10ec53f0e48e8a.js → 75294f515c7f8393181c.js} +1 -1
- package/assets/esri/core/workers/chunks/761ea719ec1b4d562db2.js +1 -0
- package/assets/esri/core/workers/chunks/89dad6c1bfd81e4d7f8e.js +1 -0
- package/assets/esri/core/workers/chunks/{8daed13400d9e63e65ae.js → 8a842cde240aef12e417.js} +1 -1
- package/assets/esri/core/workers/chunks/92509dd25996c6390a31.js +1 -0
- package/assets/esri/core/workers/chunks/9ccc2c8f7416943cc373.js +29 -0
- package/assets/esri/core/workers/chunks/a0a9c41400ae98df1912.js +1 -0
- package/assets/esri/core/workers/chunks/d1187ad6cc4959683819.js +1 -0
- package/assets/esri/core/workers/chunks/d94a2b3b2ef49af9c2e3.js +1 -0
- package/assets/esri/core/workers/chunks/ec187933b42fe65594b7.js +1 -0
- package/assets/esri/core/workers/chunks/eec5a93dbc258a90b6de.js +1 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/3ae1e25e-3aa6-4061-a016-a079159f9d65.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/41331c3c-3759-4462-8695-33c9a21b6a5b.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/94aa531e-7746-4df0-bb6e-349891f2eda5.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts.scss +0 -0
- package/assets/esri/themes/base/widgets/_Tooltip.scss +5 -3
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
- package/config.js +1 -1
- package/core/units.js +1 -1
- package/geometry/HeightModelInfo.js +1 -1
- package/geometry/ellipsoidUtils.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/interfaces.d.ts +1 -0
- package/kernel.js +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/transferFeatures.js +2 -0
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/mixins/HeightModelInfoMixin.js +2 -0
- package/layers/mixins/SceneService.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/raster/datasets/RasterFactory.js +1 -1
- package/package.json +2 -2
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
- package/views/3d/state/Constraints.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/support/PBFDecoder.js +1 -1
- package/views/3d/support/PBFDecoderWorker.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/interactive/options/TooltipVisibleElements.d.ts +11 -1
- package/views/interactive/options/TooltipVisibleElements.js +1 -1
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/assets/esri/core/workers/chunks/0a2b7c691a577cb3d189.js +0 -1
- package/assets/esri/core/workers/chunks/2146c25c01c9fc11b16c.js +0 -1
- package/assets/esri/core/workers/chunks/4678a8170d8a3ccd1a7b.js +0 -1
- package/assets/esri/core/workers/chunks/56e97b98dcb8a3f2bcb7.js +0 -1
- package/assets/esri/core/workers/chunks/6e75f09fb9452bd5f9fb.js +0 -1
- package/assets/esri/core/workers/chunks/7441d121f00ce747c08e.js +0 -1
- package/assets/esri/core/workers/chunks/76548469fe1b9c3b2051.js +0 -1
- package/assets/esri/core/workers/chunks/82ce034b5ba54de9b970.js +0 -29
- package/assets/esri/core/workers/chunks/ba435cc73956d9c64a11.js +0 -1
- package/assets/esri/core/workers/chunks/c77496c350004ee66eb2.js +0 -1
- package/assets/esri/core/workers/chunks/d371d9279b30548efa02.js +0 -1
- package/assets/esri/core/workers/chunks/e5ee64e2fb5bfcb716d8.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"attachments":{"addFile":"Add file","attachmentNumberedLabel":"Attachment {index}","attach":"Attach","attachmentEditingDisabled":"Attachment editing is disabled.","attachmentLimitExceeded":"Attachment limit exceeded","attachmentLimitReached":"Attachment limit reached","attachmentMustBeShorterThan":"Attachment must be shorter than {maxDuration}","attachmentsMustBeShorterThan":"Attachments must be shorter than {maxDuration}","attachmentMustBeSmallerThan":"Attachment must be smaller than {maxSize}","attachmentsMustBeSmallerThan":"Attachments must be smaller than {maxSize}","durationInSecond":"{count} second","durationInSeconds":"{count} seconds","capture":"Capture","captureMethodNotSupported":"Capture method is not supported","captureUnsupportedAdd":"Capture is not supported on this device.","captureUnsupportedDetail":"Capture is not supported on this device.","chooseFile":"Choose file","count":"Count: {count}","deleted":"Deleted","download":"Download","dragAndDropFile":"Drag and drop file.","fileExceedsMaximumSize":"File exceeds the maximum size","fileName":"File name","fileSelected":"File selected","fileToBeReplaced":"File to be replaced","imageResizedToMeetRequirements":"Image has been resized to meet requirements","maximumAudioLength":"Max audio length: {maxDuration}","maximumFileSize":"Maximum file size: {maxSize}","maximumNumberOfFiles":"Maximum number of files: {count}","maximumVideoLength":"Max video length: {maxDuration}","maximize":"Maximize","maximumNumberReachedRemoveToContinue":"Maximum number reached. Remove attachments to continue.","maxAttachmentsShort":"Max: {count}","maxAttachments":"Maximum attachments: {count}","minimumNotMet":"Minimum attachment requirement not met","minimumNumberOfFiles":"Minimum number of files: {count}","minAttachmentsShort":"Min: {count}","minAttachments":"Minimum attachments: {count}","noAttachments":"No attachments","noPreviewAvailable":"No preview available","remove":"Remove","replace":"Replace","recordAudio":"Record audio","takePhoto":"Take photo","takeVideo":"Take video","searchAttachments":"Search attachments","replaceFile":"Replace file","selectFile":"Select file","size":"Size","type":"Type","unableToAddAttachment":"Unable to add attachment","unableToAddAttachments":"Unable to add attachments","unsupportedDevice":"Unsupported device","unsupportedDeviceCaptureMessage":"This device does not support the required capture method.","viewAll":"View all","youCanAddUpToOneAttachment":"You can add up to 1 attachment","youCanAddUpToAttachments":"You can add up to {count} attachments"},"addFeature":"Add feature","addRecord":"Add record","unsupportedDomainGroupTitle":"Unsupported values","differentValues":"Different values","differentValuesPlaceholder":"(Different values)","empty":"No value","otherOptionLabel":"Other","expressionEvaluationFailed":"Form failed to run calculations","failedToCalculateValues":"Failed to calculate values","footerButtons":{"add":"Add","delete":"Delete","discard":"Discard","done":"Done","replace":"Replace","reset":"Reset","update":"Update"},"footerNotices":{"deleteDisabledMinimumAttachments":"Delete disabled. This feature requires a minimum number of attachments."},"formFailedToLoad":"Form failed to load.","formFailedToLoadTooManyComplexFeatures":"This form uses functions that limit attribute editing to {num} features.","formFailedToLoadTooManyFeatures":"Select up to {num} features to edit attributes.","noVisibleFields":{"allElementsHidden":"The selected features have no fields to display","elementsHiddenInSome":"The selected features have shared fields that are not displayed because of visibility expressions","noElements":"The selected feature has no fields to display","noElementsInCommon":"The selected features have no shared fields"},"other":"Other","recommended":"Recommended","relatedRecords":{"noOriginKeyFeature":"A feature cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noOriginKeyRecord":"A record cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noRecordsFound":"No records were found.","noRelatedRecordsFound":"No related records were found.","relatedRecordsTitle":"Related records","untitledLayer":"Untitled layer"},"requiredFieldBatchMode":"This field is required for one or more features.","requiredFieldLabel":"{name} - required field","deselectAllLabel":"Deselect all","selectAllLabel":"Select all","showAll":"Show all","showAllOptions":"Show all options","titles":{"addAttachments":"Add attachments","attachments":"Attachments","editFeature":"Edit feature","editFeatures":"Edit features","editAttachment":"Edit attachment","replaceAttachment":"Replace attachment"},"totalCount":"Total: {count}","unsupported":"Unsupported","unsupportedContingentValues":"Editing attributes for multiple features is not available for layers with contingent values.","validationErrors":{"cannotBeNull":"Please enter a value","invalidCodedValue":"Value should be one of the listed values.","invalidType":"Not a valid value","invalidBatchFormType":"One or more features contain invalid values. Check individual features.","featuresInError":"One or more features have errors. Check individual features.","featuresWithInvalidValues":"One or more features have invalid values","nonVisibleError_changeValues":"The selected feature has hidden fields with invalid values. Change the values so that fields are visible.","nonVisibleError_checkIndividualFeatures":"One or more features have hidden fields with invalid values. Check individual features and correct the issues.","outsideRange":"Value should be between {min} and {max}","outsideRangeMax":"Value should be less than or equal to {max}","outsideRangeMin":"Value should be greater than or equal to {min}","tooFewSelectedChoices":"Select at least {min} of the options","tooManySelectedChoices":"Select no more than {max} of the options","tooShort":"This field requires a minimum of {min} characters","valuesIncompatible":"Value is incompatible with other selected values"},"valueExpressionError":"Failed to calculate value","viewAll":"View all","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."}}
|
|
1
|
+
{"attachments":{"addFile":"Add file","attachmentNumberedLabel":"Attachment {index}","attach":"Attach","attachmentEditingDisabled":"Attachment editing is disabled.","attachmentLimitExceeded":"Attachment limit exceeded","attachmentLimitReached":"Attachment limit reached","attachmentMustBeShorterThan":"Attachment must be shorter than {maxDuration}","attachmentsMustBeShorterThan":"Attachments must be shorter than {maxDuration}","attachmentMustBeSmallerThan":"Attachment must be smaller than {maxSize}","attachmentsMustBeSmallerThan":"Attachments must be smaller than {maxSize}","durationInSecond":"{count} second","durationInSeconds":"{count} seconds","capture":"Capture","captureMethodNotSupported":"Capture method is not supported","captureUnsupportedAdd":"Capture is not supported on this device.","captureUnsupportedDetail":"Capture is not supported on this device.","chooseFile":"Choose file","count":"Count: {count}","deleted":"Deleted","download":"Download","dragAndDropFile":"Drag and drop file.","fileExceedsMaximumSize":"File exceeds the maximum size","fileName":"File name","fileSelected":"File selected","fileToBeReplaced":"File to be replaced","imageResizedToMeetRequirements":"Image has been resized to meet requirements","maximumAudioLength":"Max audio length: {maxDuration}","maximumFileSize":"Maximum file size: {maxSize}","maximumNumberOfFiles":"Maximum number of files: {count}","maximumVideoLength":"Max video length: {maxDuration}","maximize":"Maximize","maximumNumberReachedRemoveToContinue":"Maximum number reached. Remove attachments to continue.","maxAttachmentsShort":"Max: {count}","maxAttachments":"Maximum attachments: {count}","minimumNotMet":"Minimum attachment requirement not met","minimumNumberOfFiles":"Minimum number of files: {count}","minAttachmentsShort":"Min: {count}","minAttachments":"Minimum attachments: {count}","noAttachments":"No attachments","noPreviewAvailable":"No preview available","remove":"Remove","replace":"Replace","recordAudio":"Record audio","takePhoto":"Take photo","takeVideo":"Take video","searchAttachments":"Search attachments","replaceFile":"Replace file","selectFile":"Select file","size":"Size","type":"Type","unableToAddAttachment":"Unable to add attachment","unableToAddAttachments":"Unable to add attachments","unsupportedDevice":"Unsupported device","unsupportedDeviceCaptureMessage":"This device does not support the required capture method.","viewAll":"View all","youCanAddUpToOneAttachment":"You can add up to 1 attachment","youCanAddUpToAttachments":"You can add up to {count} attachments"},"addFeature":"Add feature","addRecord":"Add record","unsupportedDomainGroupTitle":"Unsupported values","differentValues":"Different values","differentValuesPlaceholder":"(Different values)","empty":"No value","noDynamicChoices":"No choices were returned for this field","otherOptionLabel":"Other","expressionEvaluationFailed":"Form failed to run calculations","failedToCalculateValues":"Failed to calculate values","footerButtons":{"add":"Add","delete":"Delete","discard":"Discard","done":"Done","replace":"Replace","reset":"Reset","update":"Update"},"footerNotices":{"deleteDisabledMinimumAttachments":"Delete disabled. This feature requires a minimum number of attachments."},"formFailedToLoad":"Form failed to load.","formFailedToLoadTooManyComplexFeatures":"This form uses functions that limit attribute editing to {num} features.","formFailedToLoadTooManyFeatures":"Select up to {num} features to edit attributes.","noVisibleFields":{"allElementsHidden":"The selected features have no fields to display","elementsHiddenInSome":"The selected features have shared fields that are not displayed because of visibility expressions","noElements":"The selected feature has no fields to display","noElementsInCommon":"The selected features have no shared fields"},"other":"Other","recommended":"Recommended","relatedRecords":{"noOriginKeyFeature":"A feature cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noOriginKeyRecord":"A record cannot be added to '{relatedLayerName}' until the '{originKeyField}' has been entered.","noRecordsFound":"No records were found.","noRelatedRecordsFound":"No related records were found.","relatedRecordsTitle":"Related records","untitledLayer":"Untitled layer"},"requiredFieldBatchMode":"This field is required for one or more features.","requiredFieldLabel":"{name} - required field","deselectAllLabel":"Deselect all","selectAllLabel":"Select all","showAll":"Show all","showAllOptions":"Show all options","titles":{"addAttachments":"Add attachments","attachments":"Attachments","editFeature":"Edit feature","editFeatures":"Edit features","editAttachment":"Edit attachment","replaceAttachment":"Replace attachment"},"totalCount":"Total: {count}","unsupported":"Unsupported","unsupportedContingentValues":"Editing attributes for multiple features is not available for layers with contingent values.","validationErrors":{"cannotBeNull":"Please enter a value","invalidCodedValue":"Value should be one of the listed values.","invalidType":"Not a valid value","invalidBatchFormType":"One or more features contain invalid values. Check individual features.","featuresInError":"One or more features have errors. Check individual features.","featuresWithInvalidValues":"One or more features have invalid values","nonVisibleError_changeValues":"The selected feature has hidden fields with invalid values. Change the values so that fields are visible.","nonVisibleError_checkIndividualFeatures":"One or more features have hidden fields with invalid values. Check individual features and correct the issues.","outsideRange":"Value should be between {min} and {max}","outsideRangeMax":"Value should be less than or equal to {max}","outsideRangeMin":"Value should be greater than or equal to {min}","tooFewSelectedChoices":"Select at least {min} of the options","tooManySelectedChoices":"Select no more than {max} of the options","tooShort":"This field requires a minimum of {min} characters","valuesIncompatible":"Value is incompatible with other selected values"},"valueExpressionError":"Failed to calculate value","viewAll":"View all","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."}}
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.128";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/core/units.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{strict as e}from"./jsonMap.js";import{getReferenceEllipsoid as s,isEarth as i}from"../geometry/ellipsoidUtils.js";import{earth as t,mars as n,moon as r}from"../geometry/support/Ellipsoid.js";import{isWKIDFromMars as a,isWKIDFromMoon as c,isGeographic as u}from"../geometry/support/spatialReferenceUtils.js";import{vcsLookup as l}from"../geometry/support/vcsLookup.js";import o from"../geometry/support/WKIDUnitConversion.js";const m=39.37,f=t.radius*Math.PI/200,d=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,U=o,b=/UNIT\[([^\]]+)]/i,B=new Set([4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104025,104026,104139,104140]),k=e()({millimeter:"millimeters",centimeter:"centimeters",meter:"meters",meter_german:"german-meters",kilometer:"kilometers",decimeter:"decimeters",micrometer:"micrometers",nanometer:"nanometers","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",fathom:"fathoms",nautical_mile:"nautical-miles",chain_us:"us-chains",link_us:"us-links",mile_us:"us-miles",yard_clarke:"clarke-yards",chain_clarke:"clarke-chains",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",link_sears:"sears-links",yard_benoit_1895_a:"benoit-1895-a-yards",foot_benoit_1895_a:"benoit-1895-a-feet",chain_benoit_1895_a:"benoit-1895-a-chains",link_benoit_1895_a:"benoit-1895-a-links",yard_benoit_1895_b:"benoit-1895-b-yards",foot_benoit_1895_b:"benoit-1895-b-feet",chain_benoit_1895_b:"benoit-1895-b-chains",link_benoit_1895_b:"benoit-1895-b-links",foot_1865:"1865-feet",foot_indian:"indian-feet",foot_indian_1937:"indian-1937-feet",foot_indian_1962:"indian-1962-feet",foot_indian_1975:"indian-1975-feet",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",yard_indian_1962:"indian-1962-yards",yard_indian_1975:"indian-1975-yards",statute_mile:"statute-miles",foot_gold_coast:"gold-coast-feet",foot_british_1936:"british-1936-feet",yard:"yards",chain:"chains",link:"links",yard_sears_1922_truncated:"sears-1922-truncated-yards",foot_sears_1922_truncated:"sears-1922-truncated-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains",link_sears_1922_truncated:"sears-1922-truncated-links",yard_us:"us-yards",inch:"inches",inch_us:"us-inches",rod:"rods",rod_us:"us-rods",nautical_mile_us:"us-nautical-miles",nautical_mile_uk:"uk-nautical-miles",smoot:"smoots",vara_tx:"tx-vara",point:"points"}),h=e=>e*e,_=e=>e*e*e,q={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},meters:{inBaseUnits:1},feet:{inBaseUnits:.3048},"us-feet":{inBaseUnits:.3048006096012192},"clarke-feet":{inBaseUnits:.3047972654},fathoms:{inBaseUnits:1.8288},"nautical-miles":{inBaseUnits:1852},"german-meters":{inBaseUnits:1.0000135965},"us-chains":{inBaseUnits:20.11684023368047},"us-links":{inBaseUnits:.2011684023368047},"us-miles":{inBaseUnits:1609.347218694438},kilometers:{inBaseUnits:1e3},"clarke-yards":{inBaseUnits:.9143917962},"clarke-chains":{inBaseUnits:20.1166195164},"clarke-links":{inBaseUnits:.201166195164},"sears-yards":{inBaseUnits:.9143984146160287},"sears-feet":{inBaseUnits:.3047994715386762},"sears-chains":{inBaseUnits:20.11676512155263},"sears-links":{inBaseUnits:.2011676512155263},"benoit-1895-a-yards":{inBaseUnits:.9143992},"benoit-1895-a-feet":{inBaseUnits:.3047997333333333},"benoit-1895-a-chains":{inBaseUnits:20.1167824},"benoit-1895-a-links":{inBaseUnits:.201167824},"benoit-1895-b-yards":{inBaseUnits:.9143992042898124},"benoit-1895-b-feet":{inBaseUnits:.3047997347632708},"benoit-1895-b-chains":{inBaseUnits:20.11678249437587},"benoit-1895-b-links":{inBaseUnits:.2011678249437587},"1865-feet":{inBaseUnits:.3048008333333334},"indian-feet":{inBaseUnits:.3047995102481469},"indian-1937-feet":{inBaseUnits:.30479841},"indian-1962-feet":{inBaseUnits:.3047996},"indian-1975-feet":{inBaseUnits:.3047995},"indian-yards":{inBaseUnits:.9143985307444408},"indian-1937-yards":{inBaseUnits:.91439523},"indian-1962-yards":{inBaseUnits:.9143988},"indian-1975-yards":{inBaseUnits:.9143985},miles:{inBaseUnits:1609.344},"statute-miles":{inBaseUnits:1609.344},"gold-coast-feet":{inBaseUnits:.3047997101815088},"british-1936-feet":{inBaseUnits:.3048007491},yards:{inBaseUnits:.9144},chains:{inBaseUnits:20.1168},links:{inBaseUnits:.201168},"sears-1922-truncated-yards":{inBaseUnits:.914398},"sears-1922-truncated-feet":{inBaseUnits:.3047993333333334},"sears-1922-truncated-chains":{inBaseUnits:20.116756},"sears-1922-truncated-links":{inBaseUnits:.20116756},"us-yards":{inBaseUnits:.9144018288036576},decimeters:{inBaseUnits:.1},inches:{inBaseUnits:.0254},"us-inches":{inBaseUnits:.0254000508001016},rods:{inBaseUnits:5.0292},"us-rods":{inBaseUnits:5.029210058420118},"us-nautical-miles":{inBaseUnits:1853.248},"uk-nautical-miles":{inBaseUnits:1853.184},smoots:{inBaseUnits:1.7018},"tx-vara":{inBaseUnits:.8466683600033867},points:{inBaseUnits:.0003527777777777778},micrometers:{inBaseUnits:1e-6},nanometers:{inBaseUnits:1e-9},"50-kilometers":{inBaseUnits:5e4},"150-kilometers":{inBaseUnits:15e4}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:h(.001)},"square-centimeters":{inBaseUnits:h(.01)},"square-decimeters":{inBaseUnits:h(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:h(1e3)},"square-inches":{inBaseUnits:h(.0254)},"square-feet":{inBaseUnits:h(.3048)},"square-yards":{inBaseUnits:h(.9144)},"square-miles":{inBaseUnits:h(1609.344)},"square-nautical-miles":{inBaseUnits:h(1852)},"square-us-feet":{inBaseUnits:h(1200/3937)},acres:{inBaseUnits:.0015625*h(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},megaliters:{inBaseUnits:1e6},gigaliters:{inBaseUnits:1e9},"cubic-millimeters":{inBaseUnits:1e3*_(.001)},"cubic-centimeters":{inBaseUnits:1e3*_(.01)},"cubic-decimeters":{inBaseUnits:1e3*_(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*_(1e3)},"cubic-inches":{inBaseUnits:1e3*_(.0254)},"cubic-feet":{inBaseUnits:1e3*_(.3048)},"cubic-yards":{inBaseUnits:1e3*_(.9144)},"cubic-miles":{inBaseUnits:1e3*_(1609.344)},"cubic-us-feet":{inBaseUnits:1e3*_(1200/3937)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},y=(()=>{const e={};for(const s in q)for(const i in q[s].units)e[i]=s;return e})();function p(e,s,i){return e*q[i].units[s].inBaseUnits}function g(e,s,i){return e/q[i].units[s].inBaseUnits}const w=["inches","feet","yards","miles","nautical-miles","us-feet","millimeters","centimeters","decimeters","meters","kilometers"],M=["square-inches","square-feet","square-yards","square-miles","square-nautical-miles","square-us-feet","square-millimeters","square-centimeters","square-decimeters","square-meters","square-kilometers","acres","ares","hectares"],v=["cubic-inches","cubic-feet","cubic-yards","cubic-miles","cubic-us-feet","liters","megaliters","gigaliters","cubic-millimeters","cubic-centimeters","cubic-decimeters","cubic-meters","cubic-kilometers"],S=["metric","imperial"],D=[...S,...M],C=[...S,...w],E=[...S,...v],P=new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);function x(e){return"imperial"===e||"metric"===e}function W(e){const s=y[e];if(!s)throw new Error("unknown type");return s}function I(e){return q[e].baseUnit}function j(e){return I(W(e))}function R(e,s=null){return s=s||W(e),q[s].baseUnit===e}function F(e,s,i){if(s===i)return e;const t=W(s);if(t!==W(i))throw new Error("incompatible units");const n=R(s,t)?e:p(e,s,t);return R(i,t)?n:g(n,i,t)}function N(e,s,i,t=!1){if(!t&&u(s))throw new Error("Unable to convert from an angular unit to a linear unit.");const n=me(s);return n!==i&&(e=n?F(e,n,i):F(e*=ae(s),"meters",i)),e}function O(e,s,i,t=!1){if(!t&&u(i))throw new Error("Unable to convert from a linear unit to an angular unit.");const n=me(i);return s!==n&&(e=n?F(e,s,n):F(e,s,"meters")/ae(i)),e}function J(e){switch(e){case"metric":return"meters";case"imperial":return"feet";default:return e}}function T(e){return J(e)}function V(e){switch(e){case"metric":return"square-meters";case"imperial":return"square-feet";default:return e}}function K(e){switch(e){case"metric":return"cubic-meters";case"imperial":return"cubic-feet";default:return e}}function L(e,s,i){switch(i){case"metric":return G(e,s);case"imperial":return Y(e,s);default:return i}}function A(e,s,i){switch(i){case"metric":return H(e,s);case"imperial":return $(e,s);default:return i}}function G(e,s){const i=F(e,s,"meters");return Math.abs(i)<3e3?"meters":"kilometers"}function H(e,s){const i=F(e,s,"meters");return Math.abs(i)<1e5?"meters":"kilometers"}function Y(e,s){const i=F(e,s,"feet");return Math.abs(i)<1e3?"feet":"miles"}function $(e,s){const i=F(e,s,"feet");return Math.abs(i)<1e5?"feet":"miles"}function z(e,s){const i=F(e,s,"square-meters");return Math.abs(i)<3e6?"square-meters":"square-kilometers"}function Q(e,s){const i=F(e,s,"square-feet");return Math.abs(i)<1e6?"square-feet":"square-miles"}function X(e,s,i){switch(i){case"metric":return z(e,s);case"imperial":return Q(e,s);default:return i}}function Z(e,s){const i=F(e,s,"cubic-meters");return Math.abs(i)<3e8?"cubic-meters":"cubic-kilometers"}function ee(e,s){const i=F(e,s,"cubic-feet");return Math.abs(i)<1e8?"cubic-feet":"cubic-miles"}function se(e,s,i){switch(i){case"metric":return Z(e,s);case"imperial":return ee(e,s);default:return i}}function ie(e,s,i){return F(e,s,"meters")/(i*Math.PI/180)}function te(e){return k.fromJSON(e.toLowerCase())||null}function ne(e){const s=(e?.latestVcsWkid?l.get(e.latestVcsWkid):null)??(e?.vcsWkid?l.get(e.vcsWkid):null);return s?s.unit.conversionFactor:null==e||i(e)?ce(e,!1)??1:1}function re(e){const i=(e?.latestVcsWkid?l.get(e.latestVcsWkid):null)??(e?.vcsWkid?l.get(e.vcsWkid):null);if(i)return te(i.unit.name);return ae(e)>=s(e).metersPerDegree?"meters":me(e)}function ae(e,s=t.metersPerDegree){return ce(e,!0)??s}function ce(e,s=!1){const i=e?.wkid??null,t=e?.wkt2??e?.wkt??null;let u=null;if(i){if(a(i))return n.metersPerDegree;if(c(i))return r.metersPerDegree;u=U.values[U[i]],!u&&s&&B.has(i)&&(u=f)}else t&&(Be(t)?u=le(d.exec(t),u):be(t)&&(u=le(b.exec(t),u)));return u}function ue(e){return u(e)?1:ae(e)}function le(e,s){return e?.[1]?oe(e[1]):s}function oe(e){return parseFloat(e.split(",")[1])}function me(e){const s=e?.wkid??null,i=e?.wkt2??e?.wkt??null;let t=null;if(s)t=U.units[U[s]];else if(i){const e=Be(i)?d:be(i)?b:null;if(e){const s=e.exec(i);s?.[1]&&(t=he(s[1]))}}return null!=t?te(t):null}function fe(e){const s=me(e);return null!=s&&C.includes(s)?s:null}function de(e){const s=re(e);return null!=s&&C.includes(s)?s:null}function Ue(e){const s=me(e);return null==s?null:P.get(s)}function be(e){return/^GEOCCS/i.test(e)}function Be(e){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(e)}const ke=1e-7;function he(e){const s=/[\\"']([^\\"']+)/.exec(e);let i=s?.[1];if(!i||!te(i)){const s=oe(e);i=null;const t=U.values;for(let e=0;e<t.length;++e)if(Math.abs(s-t[e])<ke){i=U.units[e];break}}return i}function _e(e){const s=me(e);if(null==s)return null;switch(s){case"feet":case"us-feet":case"clarke-feet":case"fathoms":case"nautical-miles":case"us-chains":case"us-links":case"us-miles":case"clarke-yards":case"clarke-chains":case"clarke-links":case"sears-yards":case"sears-feet":case"sears-chains":case"sears-links":case"benoit-1895-a-yards":case"benoit-1895-a-feet":case"benoit-1895-a-chains":case"benoit-1895-a-links":case"benoit-1895-b-yards":case"benoit-1895-b-feet":case"benoit-1895-b-chains":case"benoit-1895-b-links":case"1865-feet":case"indian-feet":case"indian-1937-feet":case"indian-1962-feet":case"indian-1975-feet":case"indian-yards":case"indian-1937-yards":case"indian-1962-yards":case"indian-1975-yards":case"statute-miles":case"gold-coast-feet":case"british-1936-feet":case"yards":case"chains":case"links":case"sears-1922-truncated-yards":case"sears-1922-truncated-feet":case"sears-1922-truncated-chains":case"sears-1922-truncated-links":case"us-yards":case"inches":case"us-inches":case"rods":case"us-rods":case"us-nautical-miles":case"uk-nautical-miles":case"smoots":case"tx-vara":case"points":return"imperial";case"millimeters":case"centimeters":case"meters":case"german-meters":case"kilometers":case"decimeters":case"micrometers":case"nanometers":case"50-kilometers":case"150-kilometers":return"metric"}return null}const qe={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},ye={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},pe={esriDUDecimalDegrees:"degrees",esriDURadians:"radians"},ge=e()(qe),we=e()(ye),Me=e()(pe);function ve(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-nautical-miles":return"nautical-miles";case"square-us-feet":return"us-feet";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";case"square-meters":return"meters";case"square-kilometers":return"kilometers"}throw new Error("unhandled area unit")}export{X as adaptiveAreaUnit,Q as adaptiveImperialAreaUnit,Y as adaptiveImperialLengthUnit,$ as adaptiveImperialVerticalLengthUnit,ee as adaptiveImperialVolumeUnit,L as adaptiveLengthUnit,z as adaptiveMetricAreaUnit,G as adaptiveMetricLengthUnit,H as adaptiveMetricVerticalLengthUnit,Z as adaptiveMetricVolumeUnit,A as adaptiveVerticalLengthUnit,se as adaptiveVolumeUnit,Me as angleUnitsJSONMap,Ue as areaUnitFromSpatialReference,ge as areaUnitsJSONMap,j as baseUnitForUnit,I as baseUnitForUnitType,N as convertFromSpatialReferenceUnit,O as convertToSpatialReferenceUnit,F as convertUnit,V as defaultAreaUnit,J as defaultLengthUnit,T as defaultVerticalLengthUnit,K as defaultVolumeUnit,ve as deriveLengthUnitFromAreaUnit,_e as getDefaultUnitSystem,ue as getMetersPerCartesianUnitForSR,ce as getMetersPerUnit,ae as getMetersPerUnitForSR,ne as getMetersPerVerticalUnitForSR,me as getUnitString,re as getVerticalUnitStringForSR,B as gradGcsIds,m as inchesPerMeter,R as isBaseUnit,x as isMeasurementSystem,Be as isProjectedWKT,ie as lengthToDegrees,fe as lengthUnitFromSpatialReference,w as lengthUnits,we as lengthUnitsJSONMap,D as measurementAreaUnits,C as measurementLengthUnits,E as measurementVolumeUnits,te as unitFromRESTJSON,W as unitType,de as verticalLengthUnitFromSpatialReference};
|
|
2
|
+
import{strict as e}from"./jsonMap.js";import{isEarth as s,getReferenceEllipsoid as i}from"../geometry/ellipsoidUtils.js";import{earth as t,mars as n,moon as r}from"../geometry/support/Ellipsoid.js";import{isWKIDFromMars as a,isWKIDFromMoon as c,isGeographic as u}from"../geometry/support/spatialReferenceUtils.js";import{vcsLookup as l}from"../geometry/support/vcsLookup.js";import o from"../geometry/support/WKIDUnitConversion.js";const m=39.37,f=t.radius*Math.PI/200,d=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,U=o,b=/UNIT\[([^\]]+)]/i,B=new Set([4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104025,104026,104139,104140]),k=e()({millimeter:"millimeters",centimeter:"centimeters",meter:"meters",meter_german:"german-meters",kilometer:"kilometers",decimeter:"decimeters",micrometer:"micrometers",nanometer:"nanometers","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",fathom:"fathoms",nautical_mile:"nautical-miles",chain_us:"us-chains",link_us:"us-links",mile_us:"us-miles",yard_clarke:"clarke-yards",chain_clarke:"clarke-chains",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",link_sears:"sears-links",yard_benoit_1895_a:"benoit-1895-a-yards",foot_benoit_1895_a:"benoit-1895-a-feet",chain_benoit_1895_a:"benoit-1895-a-chains",link_benoit_1895_a:"benoit-1895-a-links",yard_benoit_1895_b:"benoit-1895-b-yards",foot_benoit_1895_b:"benoit-1895-b-feet",chain_benoit_1895_b:"benoit-1895-b-chains",link_benoit_1895_b:"benoit-1895-b-links",foot_1865:"1865-feet",foot_indian:"indian-feet",foot_indian_1937:"indian-1937-feet",foot_indian_1962:"indian-1962-feet",foot_indian_1975:"indian-1975-feet",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",yard_indian_1962:"indian-1962-yards",yard_indian_1975:"indian-1975-yards",statute_mile:"statute-miles",foot_gold_coast:"gold-coast-feet",foot_british_1936:"british-1936-feet",yard:"yards",chain:"chains",link:"links",yard_sears_1922_truncated:"sears-1922-truncated-yards",foot_sears_1922_truncated:"sears-1922-truncated-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains",link_sears_1922_truncated:"sears-1922-truncated-links",yard_us:"us-yards",inch:"inches",inch_us:"us-inches",rod:"rods",rod_us:"us-rods",nautical_mile_us:"us-nautical-miles",nautical_mile_uk:"uk-nautical-miles",smoot:"smoots",vara_tx:"tx-vara",point:"points"}),h=e=>e*e,_=e=>e*e*e,q={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},meters:{inBaseUnits:1},feet:{inBaseUnits:.3048},"us-feet":{inBaseUnits:.3048006096012192},"clarke-feet":{inBaseUnits:.3047972654},fathoms:{inBaseUnits:1.8288},"nautical-miles":{inBaseUnits:1852},"german-meters":{inBaseUnits:1.0000135965},"us-chains":{inBaseUnits:20.11684023368047},"us-links":{inBaseUnits:.2011684023368047},"us-miles":{inBaseUnits:1609.347218694438},kilometers:{inBaseUnits:1e3},"clarke-yards":{inBaseUnits:.9143917962},"clarke-chains":{inBaseUnits:20.1166195164},"clarke-links":{inBaseUnits:.201166195164},"sears-yards":{inBaseUnits:.9143984146160287},"sears-feet":{inBaseUnits:.3047994715386762},"sears-chains":{inBaseUnits:20.11676512155263},"sears-links":{inBaseUnits:.2011676512155263},"benoit-1895-a-yards":{inBaseUnits:.9143992},"benoit-1895-a-feet":{inBaseUnits:.3047997333333333},"benoit-1895-a-chains":{inBaseUnits:20.1167824},"benoit-1895-a-links":{inBaseUnits:.201167824},"benoit-1895-b-yards":{inBaseUnits:.9143992042898124},"benoit-1895-b-feet":{inBaseUnits:.3047997347632708},"benoit-1895-b-chains":{inBaseUnits:20.11678249437587},"benoit-1895-b-links":{inBaseUnits:.2011678249437587},"1865-feet":{inBaseUnits:.3048008333333334},"indian-feet":{inBaseUnits:.3047995102481469},"indian-1937-feet":{inBaseUnits:.30479841},"indian-1962-feet":{inBaseUnits:.3047996},"indian-1975-feet":{inBaseUnits:.3047995},"indian-yards":{inBaseUnits:.9143985307444408},"indian-1937-yards":{inBaseUnits:.91439523},"indian-1962-yards":{inBaseUnits:.9143988},"indian-1975-yards":{inBaseUnits:.9143985},miles:{inBaseUnits:1609.344},"statute-miles":{inBaseUnits:1609.344},"gold-coast-feet":{inBaseUnits:.3047997101815088},"british-1936-feet":{inBaseUnits:.3048007491},yards:{inBaseUnits:.9144},chains:{inBaseUnits:20.1168},links:{inBaseUnits:.201168},"sears-1922-truncated-yards":{inBaseUnits:.914398},"sears-1922-truncated-feet":{inBaseUnits:.3047993333333334},"sears-1922-truncated-chains":{inBaseUnits:20.116756},"sears-1922-truncated-links":{inBaseUnits:.20116756},"us-yards":{inBaseUnits:.9144018288036576},decimeters:{inBaseUnits:.1},inches:{inBaseUnits:.0254},"us-inches":{inBaseUnits:.0254000508001016},rods:{inBaseUnits:5.0292},"us-rods":{inBaseUnits:5.029210058420118},"us-nautical-miles":{inBaseUnits:1853.248},"uk-nautical-miles":{inBaseUnits:1853.184},smoots:{inBaseUnits:1.7018},"tx-vara":{inBaseUnits:.8466683600033867},points:{inBaseUnits:.0003527777777777778},micrometers:{inBaseUnits:1e-6},nanometers:{inBaseUnits:1e-9},"50-kilometers":{inBaseUnits:5e4},"150-kilometers":{inBaseUnits:15e4}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:h(.001)},"square-centimeters":{inBaseUnits:h(.01)},"square-decimeters":{inBaseUnits:h(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:h(1e3)},"square-inches":{inBaseUnits:h(.0254)},"square-feet":{inBaseUnits:h(.3048)},"square-yards":{inBaseUnits:h(.9144)},"square-miles":{inBaseUnits:h(1609.344)},"square-nautical-miles":{inBaseUnits:h(1852)},"square-us-feet":{inBaseUnits:h(1200/3937)},acres:{inBaseUnits:.0015625*h(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},megaliters:{inBaseUnits:1e6},gigaliters:{inBaseUnits:1e9},"cubic-millimeters":{inBaseUnits:1e3*_(.001)},"cubic-centimeters":{inBaseUnits:1e3*_(.01)},"cubic-decimeters":{inBaseUnits:1e3*_(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*_(1e3)},"cubic-inches":{inBaseUnits:1e3*_(.0254)},"cubic-feet":{inBaseUnits:1e3*_(.3048)},"cubic-yards":{inBaseUnits:1e3*_(.9144)},"cubic-miles":{inBaseUnits:1e3*_(1609.344)},"cubic-us-feet":{inBaseUnits:1e3*_(1200/3937)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},y=(()=>{const e={};for(const s in q)for(const i in q[s].units)e[i]=s;return e})();function p(e,s,i){return e*q[i].units[s].inBaseUnits}function g(e,s,i){return e/q[i].units[s].inBaseUnits}const w=["inches","feet","yards","miles","nautical-miles","us-feet","millimeters","centimeters","decimeters","meters","kilometers"],M=["square-inches","square-feet","square-yards","square-miles","square-nautical-miles","square-us-feet","square-millimeters","square-centimeters","square-decimeters","square-meters","square-kilometers","acres","ares","hectares"],v=["cubic-inches","cubic-feet","cubic-yards","cubic-miles","cubic-us-feet","liters","megaliters","gigaliters","cubic-millimeters","cubic-centimeters","cubic-decimeters","cubic-meters","cubic-kilometers"],S=["metric","imperial"],D=[...S,...M],C=[...S,...w],E=[...S,...v],P=new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);function x(e){return"imperial"===e||"metric"===e}function W(e){const s=y[e];if(!s)throw new Error("unknown type");return s}function I(e){return q[e].baseUnit}function j(e){return I(W(e))}function R(e,s=null){return s=s||W(e),q[s].baseUnit===e}function F(e,s,i){if(s===i)return e;const t=W(s);if(t!==W(i))throw new Error("incompatible units");const n=R(s,t)?e:p(e,s,t);return R(i,t)?n:g(n,i,t)}function N(e,s,i,t=!1){if(!t&&u(s))throw new Error("Unable to convert from an angular unit to a linear unit.");const n=fe(s);return n!==i&&(e=n?F(e,n,i):F(e*=ce(s),"meters",i)),e}function O(e,s,i,t=!1){if(!t&&u(i))throw new Error("Unable to convert from a linear unit to an angular unit.");const n=fe(i);return s!==n&&(e=n?F(e,s,n):F(e,s,"meters")/ce(i)),e}function J(e){switch(e){case"metric":return"meters";case"imperial":return"feet";default:return e}}function T(e){return J(e)}function V(e){switch(e){case"metric":return"square-meters";case"imperial":return"square-feet";default:return e}}function K(e){switch(e){case"metric":return"cubic-meters";case"imperial":return"cubic-feet";default:return e}}function L(e,s,i){switch(i){case"metric":return G(e,s);case"imperial":return Y(e,s);default:return i}}function A(e,s,i){switch(i){case"metric":return H(e,s);case"imperial":return $(e,s);default:return i}}function G(e,s){const i=F(e,s,"meters");return Math.abs(i)<3e3?"meters":"kilometers"}function H(e,s){const i=F(e,s,"meters");return Math.abs(i)<1e5?"meters":"kilometers"}function Y(e,s){const i=F(e,s,"feet");return Math.abs(i)<1e3?"feet":"miles"}function $(e,s){const i=F(e,s,"feet");return Math.abs(i)<1e5?"feet":"miles"}function z(e,s){const i=F(e,s,"square-meters");return Math.abs(i)<3e6?"square-meters":"square-kilometers"}function Q(e,s){const i=F(e,s,"square-feet");return Math.abs(i)<1e6?"square-feet":"square-miles"}function X(e,s,i){switch(i){case"metric":return z(e,s);case"imperial":return Q(e,s);default:return i}}function Z(e,s){const i=F(e,s,"cubic-meters");return Math.abs(i)<3e8?"cubic-meters":"cubic-kilometers"}function ee(e,s){const i=F(e,s,"cubic-feet");return Math.abs(i)<1e8?"cubic-feet":"cubic-miles"}function se(e,s,i){switch(i){case"metric":return Z(e,s);case"imperial":return ee(e,s);default:return i}}function ie(e,s,i){return F(e,s,"meters")/(i*Math.PI/180)}function te(e){return k.fromJSON(e.toLowerCase())||null}function ne(e){const i=(e?.latestVcsWkid?l.get(e.latestVcsWkid):null)??(e?.vcsWkid?l.get(e.vcsWkid):null);return i?i.unit.conversionFactor:null==e||s(e)?ue(e,!1)??1:1}function re(e){const s=(e?.latestVcsWkid?l.get(e.latestVcsWkid):null)??(e?.vcsWkid?l.get(e.vcsWkid):null);return s?te(s.unit.name):ae(e)}function ae(e){return ce(e)>=i(e).metersPerDegree?"meters":fe(e)}function ce(e,s=t.metersPerDegree){return ue(e,!0)??s}function ue(e,s=!1){const i=e?.wkid??null,t=e?.wkt2??e?.wkt??null;let u=null;if(i){if(a(i))return n.metersPerDegree;if(c(i))return r.metersPerDegree;u=U.values[U[i]],!u&&s&&B.has(i)&&(u=f)}else t&&(ke(t)?u=oe(d.exec(t),u):Be(t)&&(u=oe(b.exec(t),u)));return u}function le(e){return u(e)?1:ce(e)}function oe(e,s){return e?.[1]?me(e[1]):s}function me(e){return parseFloat(e.split(",")[1])}function fe(e){const s=e?.wkid??null,i=e?.wkt2??e?.wkt??null;let t=null;if(s)t=U.units[U[s]];else if(i){const e=ke(i)?d:Be(i)?b:null;if(e){const s=e.exec(i);s?.[1]&&(t=_e(s[1]))}}return null!=t?te(t):null}function de(e){const s=fe(e);return null!=s&&C.includes(s)?s:null}function Ue(e){const s=re(e);return null!=s&&C.includes(s)?s:null}function be(e){const s=fe(e);return null==s?null:P.get(s)}function Be(e){return/^GEOCCS/i.test(e)}function ke(e){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(e)}const he=1e-7;function _e(e){const s=/[\\"']([^\\"']+)/.exec(e);let i=s?.[1];if(!i||!te(i)){const s=me(e);i=null;const t=U.values;for(let e=0;e<t.length;++e)if(Math.abs(s-t[e])<he){i=U.units[e];break}}return i}function qe(e){const s=fe(e);if(null==s)return null;switch(s){case"feet":case"us-feet":case"clarke-feet":case"fathoms":case"nautical-miles":case"us-chains":case"us-links":case"us-miles":case"clarke-yards":case"clarke-chains":case"clarke-links":case"sears-yards":case"sears-feet":case"sears-chains":case"sears-links":case"benoit-1895-a-yards":case"benoit-1895-a-feet":case"benoit-1895-a-chains":case"benoit-1895-a-links":case"benoit-1895-b-yards":case"benoit-1895-b-feet":case"benoit-1895-b-chains":case"benoit-1895-b-links":case"1865-feet":case"indian-feet":case"indian-1937-feet":case"indian-1962-feet":case"indian-1975-feet":case"indian-yards":case"indian-1937-yards":case"indian-1962-yards":case"indian-1975-yards":case"statute-miles":case"gold-coast-feet":case"british-1936-feet":case"yards":case"chains":case"links":case"sears-1922-truncated-yards":case"sears-1922-truncated-feet":case"sears-1922-truncated-chains":case"sears-1922-truncated-links":case"us-yards":case"inches":case"us-inches":case"rods":case"us-rods":case"us-nautical-miles":case"uk-nautical-miles":case"smoots":case"tx-vara":case"points":return"imperial";case"millimeters":case"centimeters":case"meters":case"german-meters":case"kilometers":case"decimeters":case"micrometers":case"nanometers":case"50-kilometers":case"150-kilometers":return"metric"}return null}const ye={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},pe={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},ge={esriDUDecimalDegrees:"degrees",esriDURadians:"radians"},we=e()(ye),Me=e()(pe),ve=e()(ge);function Se(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-nautical-miles":return"nautical-miles";case"square-us-feet":return"us-feet";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";case"square-meters":return"meters";case"square-kilometers":return"kilometers"}throw new Error("unhandled area unit")}export{X as adaptiveAreaUnit,Q as adaptiveImperialAreaUnit,Y as adaptiveImperialLengthUnit,$ as adaptiveImperialVerticalLengthUnit,ee as adaptiveImperialVolumeUnit,L as adaptiveLengthUnit,z as adaptiveMetricAreaUnit,G as adaptiveMetricLengthUnit,H as adaptiveMetricVerticalLengthUnit,Z as adaptiveMetricVolumeUnit,A as adaptiveVerticalLengthUnit,se as adaptiveVolumeUnit,ve as angleUnitsJSONMap,be as areaUnitFromSpatialReference,we as areaUnitsJSONMap,j as baseUnitForUnit,I as baseUnitForUnitType,N as convertFromSpatialReferenceUnit,O as convertToSpatialReferenceUnit,F as convertUnit,V as defaultAreaUnit,J as defaultLengthUnit,T as defaultVerticalLengthUnit,K as defaultVolumeUnit,Se as deriveLengthUnitFromAreaUnit,qe as getDefaultUnitSystem,ae as getDefaultVerticalUnitStringForSR,le as getMetersPerCartesianUnitForSR,ue as getMetersPerUnit,ce as getMetersPerUnitForSR,ne as getMetersPerVerticalUnitForSR,fe as getUnitString,re as getVerticalUnitStringForSR,B as gradGcsIds,m as inchesPerMeter,R as isBaseUnit,x as isMeasurementSystem,ke as isProjectedWKT,ie as lengthToDegrees,de as lengthUnitFromSpatialReference,w as lengthUnits,Me as lengthUnitsJSONMap,D as measurementAreaUnits,C as measurementLengthUnits,E as measurementVolumeUnits,te as unitFromRESTJSON,W as unitType,Ue as verticalLengthUnitFromSpatialReference};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{removeUnordered as t}from"../core/arrayUtils.js";import{strict as r}from"../core/jsonMap.js";import{JSONSupport as i}from"../core/JSONSupport.js";import{unitFromRESTJSON as o
|
|
2
|
+
import{__decorate as e}from"tslib";import{removeUnordered as t}from"../core/arrayUtils.js";import{strict as r}from"../core/jsonMap.js";import{JSONSupport as i}from"../core/JSONSupport.js";import{unitFromRESTJSON as o}from"../core/units.js";import s from"../core/Warning.js";import{property as n,subclass as a}from"../core/accessorSupport/decorators.js";import{vcsLookup as l}from"./support/vcsLookup.js";import{writer as c}from"../core/accessorSupport/decorators/writer.js";import{reader as h}from"../core/accessorSupport/decorators/reader.js";var d;const p=r()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),u=p.jsonValues.slice();t(u,"orthometric");const g=r()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=d=class extends i{constructor(e){super(e),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(e,t){super.read(e,t),"service"!==t?.origin&&"web-scene"!==t?.origin||(this.origin="service"===t.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(e,t,r){return p.write(e,t,r)}readHeightModel(e,t,r){const i=p.read(e);return i||(r?.messages&&r.messages.push(y(e,{context:r})),null)}readHeightUnit(e,t,r){const i=g.read(e);return i||(r?.messages&&r.messages.push(f(e,{context:r})),null)}readHeightUnitService(e,t,r){const i=o(e)||g.read(e);return i||(r?.messages&&r.messages.push(f(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new d({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static fromSpatialReference(e){const{latestVcsWkid:t,vcsWkid:r}=e;if(!r)return null;const i=(null!=t?l.get(t):null)??l.get(r);return i?new d({heightModel:0===i.type?"gravity-related-height":"ellipsoidal",heightUnit:o(i.unit.name),vertCRS:i.datum,origin:3,associatedSpatialReference:e}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new d;return t.read(e,{origin:"web-scene"}),t}};function f(e,t){return new s("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}function y(e,t){return new s("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}e([n()],m.prototype,"origin",void 0),e([n()],m.prototype,"associatedSpatialReference",void 0),e([n({type:p.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:u,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),e([c("web-scene","heightModel")],m.prototype,"writeHeightModel",null),e([h(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),e([n({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),e([h("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),e([h("service","heightUnit")],m.prototype,"readHeightUnitService",null),e([n({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),e([h("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=d=e([a("esri.geometry.HeightModelInfo")],m);export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{earth as n,mars as t,moon as r}from"./support/Ellipsoid.js";import{equals as e,isWKIDFromMars as i,isWKIDFromMoon as c,isValid as o}from"./support/spatialReferenceUtils.js";function u(n){return{wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${n.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`}}const S=u(n),T=u(t),G=u(r),I={wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${n.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`},p=T.wkt.toUpperCase(),s=G.wkt.toUpperCase();function E(e){if(null!=e&&o(e)){const n=e.wkid,o=e.wkt2??e.wkt;if(i(n))return t;const u=o?.toUpperCase();if(o&&u===p)return t;if(c(n)||u&&u===s)return r}return n}const f=Math.cos(Math.PI/16/16);function R(e){return i(e)?t:c(e)?r:n}function A(n){return e(n,S)}function O(n){return A(n)||e(n,T)||e(n,G)}function U(n){return!(H(n)||w(n))}function H(n){return i(n?.wkid)||e(n,T)}function w(n){return c(n?.wkid)||e(n,G)}export{S as SphericalECEFSpatialReferenceLike,T as SphericalPCPFMarsLike,G as SphericalPCPFMoonLike,I as WGS84ECEFSpatialReferenceLike,E as getReferenceEllipsoid,R as getReferenceEllipsoidFromWKID,U as isEarth,H as isMars,w as isMoon,A as isSphericalECEF,O as isSphericalPCPF,f as radiusModifier};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../core/Error.js";import t from"../HeightModelInfo.js";import{parse as
|
|
2
|
+
import e from"../../core/Error.js";import{getDefaultVerticalUnitStringForSR as t}from"../../core/units.js";import n from"../HeightModelInfo.js";import{parse as i}from"../../layers/support/arcgisLayerUrl.js";function a(n,i){if(!n)return null;if(!s(n))return new e("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:n});const a=n.heightUnit,r=t(i);return a!==r?new e("webscene:incompatible-height-unit",`The vertical units of the scene (${a}) must match the horizontal units of the scene (${r})`,{verticalUnit:a,horizontalUnit:r}):null}function r(n,i,a){const r=h(n),s=i,l=o(r,s,a);if(r){const i=t(n.spatialReference);if(!a&&i!==r.heightUnit){const t=new e("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${i})`,{horizontalUnit:i});return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:r,error:t})}}if(!c(n)||4===l)return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:r});switch(l){case 1:{const t=r?.heightUnit||"unknown",n=s?.heightUnit||"unknown",i=new e("layerview:incompatible-height-unit",`The vertical units of the layer (${t}) must match the vertical units of the scene (${n})`,{layerUnit:t,sceneUnit:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:r,sceneHeightModelInfo:s,error:i})}case 2:{const t=r?.heightModel||"unknown",n=s?.heightModel||"unknown",i=new e("layerview:incompatible-height-model",`The height model of the layer (${t}) must match the height model of the scene (${n})`,{layerHeightModel:t,sceneHeightModel:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:r,sceneHeightModelInfo:s,error:i})}case 3:{const t=r?.vertCRS||"unknown",n=s?.vertCRS||"unknown",i=new e("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${t}) must match the vertical datum of the scene (${n})`,{layerDatum:t,sceneDatum:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:r,sceneHeightModelInfo:s,error:i})}}return null}function o(e,t,n){if(!s(e)||!s(t))return 4;if(null==e||null==t)return 0;if(!n&&e.heightUnit!==t.heightUnit)return 1;if(e.heightModel!==t.heightModel)return 2;switch(e.heightModel){case"gravity-related-height":return 0;case"ellipsoidal":return e.vertCRS===t.vertCRS?0:3;default:return 4}}function s(e){return null==e||null!=e.heightModel&&null!=e.heightUnit}function c(e){return"heightModelInfo"in e&&null!=e.heightModelInfo||null!=e.spatialReference||!g(e)}function l(e){const t=e.url?i(e.url):void 0,n=e.spatialReference?.vcsWkid;return!(null==n&&null!=t&&"ImageServer"===t.serverType)&&u(e)&&e.heightModelInfo?e.heightModelInfo:null}function h(e,i){const a=l(e);if(a)return a;if(!g(e))return null;const r=i??e.spatialReference,o=r&&n.fromSpatialReference(r);if(o)return o;const s=t(r);return s?new n({heightModel:"gravity-related-height",heightUnit:s,origin:4,associatedSpatialReference:r}):null}function u(e){return"heightModelInfo"in e}function f(e){if("unknown"===e.type||!("capabilities"in e))return!1;switch(e.type){case"annotation-feature":case"catalog":case"catalog-footprint":case"csv":case"feature":case"dimension-feature":case"geojson":case"subtype-group":case"ogc-feature":case"oriented-imagery":case"wfs":case"knowledge-graph-sublayer":return!0;default:return!1}}function g(e){return f(e)?!!(e.capabilities&&e.capabilities.data&&e.capabilities.data.supportsZ):m(e)}function d(e){return null!=e.layers||m(e)||f(e)||u(e)}function m(e){switch(e.type){case"annotation-feature":case"building-scene":case"elevation":case"gaussian-splat":case"integrated-mesh":case"integrated-mesh-3dtiles":case"point-cloud":case"scene":case"voxel":return!0;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"catalog":case"catalog-footprint":case"catalog-dynamic-group":case"csv":case"dimension":case"dimension-feature":case"geojson":case"feature":case"subtype-group":case"geospatial-pdf":case"geo-rss":case"graphics":case"group":case"imagery":case"imagery-tile":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-image":case"map-notes":case"media":case"ogc-feature":case"open-street-map":case"oriented-imagery":case"parquet":case"route":case"stream":case"tile":case"unknown":case"unsupported":case"vector-tile":case"video":case"viewshed":case"wcs":case"web-tile":case"wfs":case"wms":case"wmts":case null:return!1}return!1}export{h as deriveHeightModelInfoFromLayer,l as getLayerHeightModelInfo,o as isCompatible,r as rejectLayerError,d as supportsHeightModelInfo,a as validateWebSceneError};
|
package/interfaces.d.ts
CHANGED
|
@@ -1100,6 +1100,7 @@ declare namespace __esri {
|
|
|
1100
1100
|
getSourceLayerFromBuildingComponentSublayerGraphic: typeof import("./applications/SceneViewer/sceneViewerUtils.js").getSourceLayerFromBuildingComponentSublayerGraphic;
|
|
1101
1101
|
setSourceLayerOfBuildingComponentSublayerGraphic: typeof import("./applications/SceneViewer/sceneViewerUtils.js").setSourceLayerOfBuildingComponentSublayerGraphic;
|
|
1102
1102
|
getColorWithEmissiveStrength: typeof import("./applications/SceneViewer/sceneViewerUtils.js").getColorWithEmissiveStrength;
|
|
1103
|
+
getBasemapTerrainTilingSchemeLocked: typeof import("./applications/SceneViewer/sceneViewerUtils.js").getBasemapTerrainTilingSchemeLocked;
|
|
1103
1104
|
}
|
|
1104
1105
|
|
|
1105
1106
|
export const sceneViewerUtils: sceneViewerUtils;
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.128",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
|
package/layers/ElevationLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import r from"../core/Error.js";import{releaseMaybe as i}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a,throwIfAborted as s}from"../core/promiseUtils.js";import{objectToQuery as l}from"../core/urlUtils.js";import{property as p,subclass as n}from"../core/accessorSupport/decorators.js";import c from"
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import r from"../core/Error.js";import{releaseMaybe as i}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a,throwIfAborted as s}from"../core/promiseUtils.js";import{objectToQuery as l}from"../core/urlUtils.js";import{property as p,subclass as n}from"../core/accessorSupport/decorators.js";import c from"./Layer.js";import{ArcGISCachedService as d}from"./mixins/ArcGISCachedService.js";import{ArcGISService as u}from"./mixins/ArcGISService.js";import{HeightModelInfoMixin as y}from"./mixins/HeightModelInfoMixin.js";import{OperationalLayer as h}from"./mixins/OperationalLayer.js";import{PortalLayer as m}from"./mixins/PortalLayer.js";import{url as v}from"./support/commonProperties.js";import f from"./support/ElevationTileData.js";import{acquireDecoder as w}from"./support/LercDecoder.js";import{reader as S}from"../core/accessorSupport/decorators/reader.js";let g=class extends(y(d(u(h(m(o(c))))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=w()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=i(this._lercDecoder)}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());if(!r)return{operations:{supportsTileMap:!1}};return{operations:{supportsTileMap:r.includes("tilemap")}}}get memoizedElevationQueryDependencies(){return[this.loadStatus,this.tileInfo,this.fullExtent,this.spatialReference]}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new r("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(a).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,i,o,a){const s=a?.signal,l={responseType:"array-buffer",signal:s,useQueue:a?.useQueue,priority:a?.priority},p={noDataValue:a?.noDataValue,returnFileInfo:!0};await this.load(),await this._fetchTileAvailability(e,i,o,a);const n=await t(this.getTileUrl(e,i,o),l),c=await this._lercDecoder.decode(n.data,p,s);if(!c)throw new r("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new f({values:c.pixelData,width:c.width,height:c.height,noDataValue:c.noDataValue})}getTileUrl(e,t,r){const i=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,o=l({...this.parsedUrl.query,blankTile:!i&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${o?"?"+o:""}`}async queryElevation(e,t){const{query:r}=await(import("./support/ElevationQuery.js"));return s(t),r(this,e,t)}async createElevationSampler(e,t){const{createSampler:r}=await(import("./support/ElevationQuery.js"));return s(t),r(this,e,t)}_fetchTileAvailability(e,t,r,i){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,i):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const r={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await t(this.parsedUrl.path,r);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[j]}};e([p({readOnly:!0})],g.prototype,"capabilities",void 0),e([S("service","capabilities",["capabilities"])],g.prototype,"readCapabilities",null),e([p({json:{read:{source:"copyrightText"}}})],g.prototype,"copyright",void 0),e([p({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],g.prototype,"path",void 0),e([p({type:["show","hide"]})],g.prototype,"listMode",void 0),e([p({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],g.prototype,"minScale",void 0),e([p({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],g.prototype,"maxScale",void 0),e([p({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],g.prototype,"opacity",void 0),e([p({type:["ArcGISTiledElevationServiceLayer"]})],g.prototype,"operationalLayerType",void 0),e([p()],g.prototype,"sourceJSON",void 0),e([p({json:{read:!1},value:"elevation",readOnly:!0})],g.prototype,"type",void 0),e([p()],g.prototype,"memoizedElevationQueryDependencies",null),e([p(v)],g.prototype,"url",void 0),e([p()],g.prototype,"version",void 0),e([S("version",["currentVersion"])],g.prototype,"readVersion",null),g=e([n("esri.layers.ElevationLayer")],g);const j=Symbol("default-fetch-tile");g.prototype.fetchTile[j]=!0;const T=g;export{T as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../core/Error.js";import{setDeepValue as i}from"../core/object.js";import{property as r,subclass as o}from"../core/accessorSupport/decorators.js";import a from"../geometry/SpatialReference.js";import n from"../graphic/OrientedImageryGraphicOrigin.js";import s from"./FeatureLayer.js";import{getEffectiveElevationSource as p,parseSequenceOrderFields as l,orientedImageryTypeMap as d,timeIntervalUnitTypeMap as y,verticalMeasurementTypeMap as m,isOrientationAccuracy as u,padAccuracyArray as c}from"./orientedImagery/core/utils.js";import h from"./support/Field.js";import
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../core/Error.js";import{setDeepValue as i}from"../core/object.js";import{property as r,subclass as o}from"../core/accessorSupport/decorators.js";import a from"../geometry/SpatialReference.js";import n from"../graphic/OrientedImageryGraphicOrigin.js";import s from"./FeatureLayer.js";import{getEffectiveElevationSource as p,parseSequenceOrderFields as l,orientedImageryTypeMap as d,timeIntervalUnitTypeMap as y,verticalMeasurementTypeMap as m,isOrientationAccuracy as u,padAccuracyArray as c}from"./orientedImagery/core/utils.js";import h from"./support/Field.js";import g from"../tables/AttributeTableTemplate.js";import f from"../time/TimeExtent.js";const v=new Set(["demPathPrefix","demPathSuffix","depthImagePathPrefix","depthImagePathSuffix","elevationSource","horizontalMeasurementUnit","imageGeometryField","imageReferenceField","referenceIDField","sequenceOrderField","sequenceOrderFields","verticalMeasurementUnit","videoPathPrefix","videoPathSuffix","timeAnimation","visibilityTimeExtent"]),S=new Set(["elevationSource"]),P=(e,t)=>!v.has(t)&&e,j=(e,t,i)=>{const r=`orientedImageryProperties.${e}`,o={allowNull:S.has(e),ignoreOrigin:!0};return{name:r,write:t?{...o,target:r,writer:t}:o,read:i?{ignoreOrigin:!0,source:r,reader:i}:{ignoreOrigin:!0}}};function I(e,t,i,r){const{name:o,write:a,read:n}=j(e,t,i),s={name:o,write:a,read:n,origins:{service:{name:`orientedImageryInfo.${o}`,write:t,read:i},"web-scene":{name:o,write:P(a,e),read:P(n,e)},"web-map":{name:o,write:a,read:n}}};return r&&s.origins?(s.type=r,s.origins["web-map"].type=r,s.origins["web-scene"].type=r,s):s}function O(e,t,r){e?.length&&i(r,e,t)}let b=class extends s{constructor(e){super(e),this.attributeTableTemplate=null,this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.graphicOrigin=new n(this),this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imageGeometryField="ImageGeometry",this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageReferenceField="OIObjectID",this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.referenceIDField="OBJECTID",this.sequenceOrderField="SequenceOrder",this.sequenceOrderFields=[],this.subtypeField=null,this.subtypes=null,this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit="days",this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.verticalSearchRange=null,this.videoPathPrefix=null,this.videoPathSuffix=null,this.virtualCacheDirectory=null,this.dataStoreID=null,this.imageAccessPaths=null,this.visibilityTimeExtent=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:i}=this;return p(e,t,i)}get effectiveSequenceOrderField(){const{sequenceOrderField:e,fields:t,sequenceOrderFields:i}=this;return l(e,t,i)}get fieldConfigurations(){return super.fieldConfigurations}set fieldConfigurations(e){super.fieldConfigurations=e}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}findFirstValidLayerId(e){return e.layers?.find(({type:e})=>!!e&&this.supportedSourceTypes.has(e))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new t("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};e([r({type:g,json:{write:!1,read:!1}})],b.prototype,"attributeTableTemplate",void 0),e([r({type:Number,json:I("cameraHeading")})],b.prototype,"cameraHeading",void 0),e([r({type:Number,json:I("cameraHeight")})],b.prototype,"cameraHeight",void 0),e([r({type:Number,json:I("cameraPitch")})],b.prototype,"cameraPitch",void 0),e([r({type:Number,json:I("cameraRoll")})],b.prototype,"cameraRoll",void 0),e([r({type:Number,json:I("coveragePercent")})],b.prototype,"coveragePercent",void 0),e([r({type:String,json:I("demPathPrefix")})],b.prototype,"demPathPrefix",void 0),e([r({type:String,json:I("demPathSuffix")})],b.prototype,"demPathSuffix",void 0),e([r({type:String,json:I("depthImagePathPrefix")})],b.prototype,"depthImagePathPrefix",void 0),e([r({type:String,json:I("depthImagePathSuffix")})],b.prototype,"depthImagePathSuffix",void 0),e([r({type:Object,json:I("elevationSource")})],b.prototype,"elevationSource",void 0),e([r({readOnly:!0})],b.prototype,"effectiveElevationSource",null),e([r({readOnly:!0})],b.prototype,"effectiveSequenceOrderField",null),e([r({type:Number,json:I("farDistance")})],b.prototype,"farDistance",void 0),e([r({type:[h]})],b.prototype,"fields",void 0),e([r()],b.prototype,"geometryType",void 0),e([r({readOnly:!0,clonable:!1})],b.prototype,"graphicOrigin",void 0),e([r({type:Number,json:I("horizontalFieldOfView")})],b.prototype,"horizontalFieldOfView",void 0),e([r({type:String,json:I("horizontalMeasurementUnit")})],b.prototype,"horizontalMeasurementUnit",void 0),e([r({type:String,json:{...I("imageGeometryField"),default:"ImageGeometry"}})],b.prototype,"imageGeometryField",void 0),e([r({type:String,json:I("imagePathPrefix")})],b.prototype,"imagePathPrefix",void 0),e([r({type:String,json:I("imagePathSuffix")})],b.prototype,"imagePathSuffix",void 0),e([r({type:String,json:{...I("imageReferenceField"),default:"OIObjectID"}})],b.prototype,"imageReferenceField",void 0),e([r({type:Number,json:I("imageRotation")})],b.prototype,"imageRotation",void 0),e([r({type:Number,json:I("maximumDistance")})],b.prototype,"maximumDistance",void 0),e([r({type:Number,json:I("nearDistance")})],b.prototype,"nearDistance",void 0),e([r({type:["OrientedImageryLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],b.prototype,"operationalLayerType",void 0),e([r({json:{...I("orientationAccuracy",(e,t,r)=>{i(r,e.join(";"),t)},e=>{const t=e?.split(";")?.map(Number);return u(t)?c(t):[0,0,0,0,0,0,0,0]},String)}})],b.prototype,"orientationAccuracy",void 0),e([r({json:{...I("orientedImageryType",d.write,d.read,d.jsonValues.slice(1))}})],b.prototype,"orientedImageryType",void 0),e([r({type:String,json:{...I("referenceIDField"),default:"OBJECTID"}})],b.prototype,"referenceIDField",void 0),e([r({type:String,json:{...I("sequenceOrderField"),default:"SequenceOrder"}})],b.prototype,"sequenceOrderField",void 0),e([r({json:{...I("sequenceOrderFields",O),default:[]}})],b.prototype,"sequenceOrderFields",void 0),e([r({type:a})],b.prototype,"spatialReference",void 0),e([r({readOnly:!0})],b.prototype,"subtypeField",void 0),e([r({readOnly:!0})],b.prototype,"subtypes",void 0),e([r({json:{read:!1},value:"oriented-imagery",readOnly:!0})],b.prototype,"type",void 0),e([r({type:y.apiValues,json:{...I("timeIntervalUnit",y.write,y.read,y.jsonValues)}})],b.prototype,"timeIntervalUnit",void 0),e([r({type:Number,json:I("verticalFieldOfView")})],b.prototype,"verticalFieldOfView",void 0),e([r({type:m.apiValues,json:{...I("verticalMeasurementUnit",m.write,m.read,m.jsonValues)}})],b.prototype,"verticalMeasurementUnit",void 0),e([r({type:Number,json:I("verticalSearchRange")})],b.prototype,"verticalSearchRange",void 0),e([r({type:String,json:I("videoPathPrefix")})],b.prototype,"videoPathPrefix",void 0),e([r({type:String,json:I("videoPathSuffix")})],b.prototype,"videoPathSuffix",void 0),e([r({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.orientedImageryProperties.virtualCacheDirectory",read:!0}}}})],b.prototype,"virtualCacheDirectory",void 0),e([r({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.dsid",read:!0}}}})],b.prototype,"dataStoreID",void 0),e([r({type:Object,readOnly:!0,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.imageAccessPaths",read:!0}}}})],b.prototype,"imageAccessPaths",void 0),e([r({type:f,json:{origins:{"web-scene":{write:!1,read:!1}}}})],b.prototype,"visibilityTimeExtent",void 0),b=e([o("esri.layers.OrientedImageryLayer")],b);const x=b;export{x as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{baseObjectMemory as e,estimateNumberArrayMemory as t,estimateNestedObjectMemory as s,estimateAttributesMemory as n}from"../../core/memoryEstimations.js";import{generateUID as r}from"../../core/uid.js";import i from"../../geometry/SpatialReference.js";import{empty as o,expandWithNestedArray as a}from"../../geometry/support/aaBoundingBox.js";import{empty as l,expandWithNestedArray as u}from"../../geometry/support/aaBoundingRect.js";import{unquantizePolyline as c,unquantizePolygon as p,unquantizeMultipoint as m,unquantizePoint as h}from"../../geometry/support/quantizationUtils.js";import{featureGeometryTypeKebabDictionary as
|
|
2
|
+
import{baseObjectMemory as e,estimateNumberArrayMemory as t,estimateNestedObjectMemory as s,estimateAttributesMemory as n}from"../../core/memoryEstimations.js";import{generateUID as r}from"../../core/uid.js";import i from"../../geometry/SpatialReference.js";import{empty as o,expandWithNestedArray as a}from"../../geometry/support/aaBoundingBox.js";import{empty as l,expandWithNestedArray as u}from"../../geometry/support/aaBoundingRect.js";import{unquantizePolyline as c,unquantizePolygon as p,unquantizeMultipoint as m,unquantizePoint as h}from"../../geometry/support/quantizationUtils.js";import{featureGeometryTypeKebabDictionary as y}from"../../geometry/support/typeUtils.js";import{getApproximateMaxDensificationSegments as g}from"../../views/2d/layers/graphics/densificationConstants.js";export{equals}from"./dehydratedFeatureComparison.js";class f{constructor(e,t,s){this.uid=e,this.geometry=t,this.attributes=s,this.visible=!0,this.objectId=null,this.centroid=null}}function d(e){return null!=e.geometry}class b{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null,this.missingAttributes=null}}function x(e,t){const s=y.fromJSON(e.geometryType),n=i.fromJSON(e.spatialReference),r=e.transform,o=e.objectIdFieldName,a=t?.maxStringAttributeLength,l=t?.maxStringAttributeFields;let u;const g=e.features.map(t=>{const i=j(t,s,n,e.objectIdFieldName),y=i.geometry;if(A(i.attributes,l,a,e=>{u??=[];const t=R(i,o);null!=t&&u.push({objectId:t,attribute:e})}),null!=y&&r)switch(y.type){case"point":i.geometry=h(r,y,y);break;case"multipoint":i.geometry=m(r,y,y);break;case"polygon":i.geometry=p(r,y,y);break;case"polyline":i.geometry=c(r,y,y);break;case"extent":case"mesh":i.geometry=y}return i});return{geometryType:s,features:g,spatialReference:n,fields:e.fields??[],objectIdFieldName:e.objectIdFieldName,globalIdFieldName:e.globalIdFieldName,geohashFieldName:e.geohashFieldName,geometryProperties:e.geometryProperties,hasZ:e.hasZ,hasM:e.hasM,exceededTransferLimit:e.exceededTransferLimit,transform:null,missingAttributes:u}}function j(e,t,s,n){return{uid:r(),objectId:n&&e.attributes?e.attributes[n]:null,attributes:e.attributes,geometry:Z(e.geometry,t,s),visible:!0}}function Z(e,t,s){if(null==e)return null;switch(t){case"point":{const t=e;return{x:t.x,y:t.y,z:t.z,m:t.m,hasZ:null!=t.z,hasM:null!=t.m,type:"point",spatialReference:s}}case"polyline":{const t=e;return{paths:t.paths,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polyline",spatialReference:s}}case"polygon":{const t=e;return{rings:t.rings,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polygon",spatialReference:s}}case"multipoint":{const t=e;return{points:t.points,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"multipoint",spatialReference:s}}}}function N(n){if(null==n)return 0;switch(n.type){case"point":return e+10+8+24;case"polyline":case"polygon":{let t=0;const r=2+(n.hasZ?1:0)+(n.hasM?1:0),i="polyline"===n.type?n.paths:n.rings,o="polyline"===n.type?n.curvePaths:n.curveRings;if(o?.length){const e=3*g()*128;t=8*e*r+128*e+32*(i.length+1)}else t=s(i);return e+64+t+34}case"multipoint":{const t=s(n.points);return e+t+64+34+32}case"extent":return e+10+64+34;case"mesh":{const s=n.vertexAttributes;return e+t(s.position,s.normal,s.uv,s.tangent)}default:return e}}const F=43;function I(e){return F+n(e.attributes)+N(e.geometry)}function k(e){if(null==e)return 0;switch(e.type){case"point":return 1;case"polyline":{let t=0;for(const s of e.paths)t+=s.length;return t}case"polygon":{let t=0;for(const s of e.rings)t+=s.length;return t}case"multipoint":return e.points.length;case"extent":return 2;case"mesh":{const t=e.vertexAttributes&&e.vertexAttributes.position;return t?t.length/3:0}default:return}}function M(e){if(null==e)return!1;switch(e.type){case"extent":case"point":return!0;case"polyline":for(const t of e.paths)if(t.length>0)return!0;return!1;case"polygon":for(const t of e.rings)if(t.length>0)return!0;return!1;case"multipoint":return e.points.length>0;case"mesh":return!e.loaded||e.vertexAttributes.position.length>0}}function v(e,t){switch(o(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[3]=e.x,t[1]=t[4]=e.y,e.hasZ&&(t[2]=t[5]=e.z);break;case"polyline":for(let s=0;s<e.paths.length;s++)a(t,e.paths[s],!!e.hasZ);break;case"polygon":for(let s=0;s<e.rings.length;s++)a(t,e.rings[s],!!e.hasZ);break;case"multipoint":a(t,e.points,!!e.hasZ);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[3]=e.xmax,t[4]=e.ymax,null!=e.zmin&&(t[2]=e.zmin),null!=e.zmax&&(t[5]=e.zmax)}return t}function z(e,t){switch(l(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[2]=e.x,t[1]=t[3]=e.y;break;case"polyline":for(let s=0;s<e.paths.length;s++)u(t,e.paths[s]);break;case"polygon":for(let s=0;s<e.rings.length;s++)u(t,e.rings[s]);break;case"multipoint":u(t,e.points);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax}}function R(e,t){return null!=e.objectId?e.objectId:e.attributes&&t?e.attributes[t]:null}function A(e,t,s,n){if(t?.size&&null!=s&&e)for(const r in e){if(!t.has(r))continue;const i=e[r];"string"==typeof i&&i.length>s&&(n(r),e[r]="")}}export{f as DehydratedFeatureClass,b as DehydratedFeatureSetClass,F as baseDehydratedGraphicMemory,v as computeAABB,z as computeAABR,N as estimateGeometryMemory,I as estimateSize,x as fromFeatureSetJSON,Z as fromJSONGeometry,R as getObjectId,d as hasGeometry,M as hasVertices,k as numVertices,A as removeLargeStringAttributes};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
function t(t,e,o){if(!t||"extent"===t.type||"mesh"===t.type)return t;if("point"===t.type)return t.spatialReference=o,t;const{coords:s,lengths:n}=e,{hasZ:p,hasM:r}=t,f=2+Number(!!p)+Number(!!r),i="multipoint"===t.type?[s.length/f]:n,u=[];let l=0;if(2===f)for(const h of i){const t=[];for(let e=0;e<h;e++,l+=2)t.push([s[l],s[l+1]]);u.push(t)}else if(3===f)for(const h of i){const t=[];for(let e=0;e<h;e++,l+=3)t.push([s[l],s[l+1],s[l+2]]);u.push(t)}else for(const h of i){const t=[];for(let e=0;e<h;e++,l+=4)t.push([s[l],s[l+1],s[l+2],s[l+3]]);u.push(t)}return t.spatialReference=o,"multipoint"===t.type?t.points=u[0]:"polygon"===t.type?t.rings=u:t.paths=u,t}export{t as toDehydratedGeometry};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import{clone as i}from"../../core/lang.js";import{hasSameOrigin as r,getHost as o,changeHost as s}from"../../core/urlUtils.js";import{property as n,subclass as p}from"../../core/accessorSupport/decorators.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import{idToName as d}from"../../core/accessorSupport/PropertyOrigin.js";import a from"../../geometry/Extent.js";import u from"../../geometry/HeightModelInfo.js";import c from"../../geometry/SpatialReference.js";import{elevationInfo as y,maxScale as f,minScale as m,timeInfo as h}from"../support/commonProperties.js";import v from"../support/EditFieldsInfo.js";import{FeatureIndex as g}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as I,hasCurrentUser as F,isLayerCacheStale as S,supportsQueryOnly as b,readGlobalIdField as j,readObjectIdField as E,readVersion as U}from"../support/featureLayerUtils.js";import x from"../support/GeometryFieldsInfo.js";import O from"../support/LayerFloorInfo.js";import{isPreferredUrlApplicable as M,getPreferredUrl as D,applyPreferredHostToPortalItem as T,getPreferredHost as w}from"../support/layerUtils.js";import{urlProperty as C,normalizeParsedUrlObject as H}from"../support/multiLayerServiceUtils.js";import R from"../support/Relationship.js";import{getFeatureLayerCapabilities as B}from"../support/serviceCapabilitiesUtils.js";import A from"../support/Subtype.js";import{hasTypeKeyword as q,typeKeyword as Q}from"../../portal/support/portalItemUtils.js";import{timeZoneProperty as P}from"../../time/timeZoneUtils.js";import{reader as G}from"../../core/accessorSupport/decorators/reader.js";const V=V=>{const Z=V;let _=class extends Z{constructor(){super(...arguments),this.cacheMaxAge=0,this.capabilities=null,this.copyright=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(t.ofType(g)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=c.WGS84,this.subtypeField=null,this.subtypes=null,this.timeInfo=null,this.trackIdField=null,this.uniqueIdFields=null,this.url=null,this.version=void 0,this._isUrlHostModified=!1,this._isUrlHostModificationEnabled=!1}getFieldDomain(e,t){throw new Error("Not implemented")}getField(e){return this.fieldsIndex.get(e)}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:i,editing:r}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(i.supportsEditing&&!(r.supportsUpdateByOthers&&r.supportsUpdateByAnonymous&&r.supportsDeleteByOthers&&r.supportsDeleteByAnonymous))return"load"}if(F(this.serviceDefinitionExpression)||F(this.definitionExpression))return"load";if(this.userHasUpdateItemPrivileges){if(S(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return B(t,this.url)}readEditingInfo(e,t){const{editingInfo:i}=t;return i?{lastEditDate:null!=i.lastEditDate?new Date(i.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=i(e),{operations:r,editing:o}=t;return b(this)?(this.userHasUpdateItemPrivileges&&(r.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(r.supportsAdd=r.supportsDelete=r.supportsEditing=r.supportsQuery=r.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&r.supportsEditing&&(r.supportsAdd=r.supportsDelete=r.supportsUpdate=o.supportsGeometryUpdate=!0),t)}get effectiveEditingEnabled(){return!1}get effectiveUniqueIdFields(){return this.uniqueIdFields?[...this.uniqueIdFields]:[this.objectIdField]}readGlobalIdFieldFromService(e,t){return j(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||b(this))return!1;const{operations:t,editing:i}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&i.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:i}=e;return b(this)?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&i.supportsDeleteByOthers&&i.supportsGeometryUpdate&&i.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return E(t)}get parsedUrl(){return H(this)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readUniqueIdFields(e,t){return t.uniqueIdInfo?.OIDFieldContainsHashValue?t.uniqueIdInfo.fields:null}readVersion(e,t){return U(t)}get isUrlHostModified(){const{loaded:e,url:t,_isUrlHostModified:i}=this;if(i)return!0;if(!e||!t)return!1;if(this.originIdOf("url")<7)return!1;const o=this.sourceJSON?.preferredHost;if(!o)return!1;if(!r(t,`https://${o}`,!0))return!1;for(let s=6;s>=3;s--){const e=this.getAtOrigin("url",d(s));if(e)return!r(t,e,!0)}return!1}applyPreferredHost(e){const{url:t,portalItem:i}=this;if(!t||!M(i))return;const r=D();r&&this._isUrlHostModificationEnabled&&(this._set("url",r),this._isUrlHostModified=!0,i&&T(i,w()))}applyHostFromPortalItem(){const{url:e,portalItem:t}=this;if(!e||7===this.originIdOf("url")||!t?.url||!M(t)||!q(t,Q.HOSTED_SERVICE)||r(e,t.url,!0)||!this._isUrlHostModificationEnabled)return;const i=o(t.url);this._set("url",s(e,i)),this._isUrlHostModified=!0}};return e([n({readOnly:!0})],_.prototype,"authenticationTriggerEvent",null),e([n({readOnly:!0,json:{read:e=>e/60}})],_.prototype,"cacheMaxAge",void 0),e([n({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","isDataBranchVersioned","isDataVersioned","maxRecordCount","maxRecordCountFactor","maxUniqueIDCount","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","standardMaxRecordCountNoGeometry","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],_.prototype,"capabilities",void 0),e([G("service","capabilities")],_.prototype,"readCapabilitiesFromService",null),e([n({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],_.prototype,"copyright",void 0),e([n(P("dateFieldsTimeReference"))],_.prototype,"dateFieldsTimeZone",void 0),e([n({type:Boolean})],_.prototype,"datesInUnknownTimezone",void 0),e([n({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],_.prototype,"definitionExpression",void 0),e([n({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],_.prototype,"displayField",void 0),e([n({readOnly:!0,type:v})],_.prototype,"editFieldsInfo",void 0),e([n({readOnly:!0})],_.prototype,"editingInfo",void 0),e([G("editingInfo")],_.prototype,"readEditingInfo",null),e([n({readOnly:!0})],_.prototype,"effectiveCapabilities",null),e([n()],_.prototype,"effectiveEditingEnabled",null),e([n({readOnly:!0,type:[String]})],_.prototype,"effectiveUniqueIdFields",null),e([n((()=>{const e=i(y),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],_.prototype,"elevationInfo",void 0),e([n()],_.prototype,"fieldsIndex",void 0),e([n({type:O,json:{name:"layerDefinition.floorInfo",write:{layerContainerTypes:l}}})],_.prototype,"floorInfo",void 0),e([n({type:a,json:{origins:{service:{read:{source:"extent"}}}}})],_.prototype,"fullExtent",void 0),e([n()],_.prototype,"gdbVersion",void 0),e([n({readOnly:!0,type:x,json:{read:{source:"geometryProperties"}}})],_.prototype,"geometryFieldsInfo",void 0),e([n({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:I.read}}}})],_.prototype,"geometryType",void 0),e([n({type:String})],_.prototype,"globalIdField",void 0),e([G("service","globalIdField",["globalIdField","fields"])],_.prototype,"readGlobalIdFieldFromService",null),e([n({readOnly:!0})],_.prototype,"hasFullEditingRestrictions",null),e([n({type:Boolean,json:{origins:{service:{read:!0}}}})],_.prototype,"hasM",void 0),e([n({readOnly:!0})],_.prototype,"hasUpdateItemRestrictions",null),e([n({type:Boolean,json:{origins:{service:{read:!0}}}})],_.prototype,"hasZ",void 0),e([n({readOnly:!0,type:u})],_.prototype,"heightModelInfo",void 0),e([n({type:Date})],_.prototype,"historicMoment",void 0),e([n({type:t.ofType(g),readOnly:!0})],_.prototype,"indexes",void 0),e([n({readOnly:!0})],_.prototype,"isTable",void 0),e([G("service","isTable",["type"])],_.prototype,"readIsTableFromService",null),e([n({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],_.prototype,"layerId",void 0),e([n(f)],_.prototype,"maxScale",void 0),e([G("service","maxScale",["maxScale","effectiveMaxScale"])],_.prototype,"readMaxScale",null),e([n(m)],_.prototype,"minScale",void 0),e([G("service","minScale",["minScale","effectiveMinScale"])],_.prototype,"readMinScale",null),e([n({type:String})],_.prototype,"objectIdField",void 0),e([G("service","objectIdField",["objectIdField","fields"])],_.prototype,"readObjectIdFieldFromService",null),e([n({readOnly:!0})],_.prototype,"parsedUrl",null),e([n(P("preferredTimeReference"))],_.prototype,"preferredTimeZone",void 0),e([n({type:[R],readOnly:!0})],_.prototype,"relationships",void 0),e([n({type:Boolean})],_.prototype,"returnM",void 0),e([n({type:Boolean})],_.prototype,"returnZ",void 0),e([n({readOnly:!0,json:{write:!1}})],_.prototype,"serverGens",void 0),e([n({readOnly:!0})],_.prototype,"serviceDefinitionExpression",void 0),e([G("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],_.prototype,"readServiceDefinitionExpression",null),e([n({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_.prototype,"serviceItemId",void 0),e([n()],_.prototype,"sourceJSON",void 0),e([n({type:c,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],_.prototype,"spatialReference",void 0),e([n({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],_.prototype,"subtypeField",void 0),e([n({type:[A],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_.prototype,"subtypes",void 0),e([n(h())],_.prototype,"timeInfo",void 0),e([n({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],_.prototype,"trackIdField",void 0),e([n({type:[String]})],_.prototype,"uniqueIdFields",void 0),e([G("service","uniqueIdFields",["uniqueIdInfo.OIDFieldContainsHashValue","uniqueIdInfo.fields"])],_.prototype,"readUniqueIdFields",null),e([n(C({nonStandardUrlAllowed:!0}))],_.prototype,"url",void 0),e([n({json:{origins:{service:{read:!0}},read:!1}})],_.prototype,"version",void 0),e([G("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],_.prototype,"readVersion",null),e([n({readOnly:!0})],_.prototype,"isUrlHostModified",null),_=e([p("esri.layers.mixins.FeatureLayerBase")],_),_};export{V as FeatureLayerBase};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import{clone as i}from"../../core/lang.js";import{hasSameOrigin as r,getHost as o,changeHost as s}from"../../core/urlUtils.js";import{property as n,subclass as p}from"../../core/accessorSupport/decorators.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import{idToName as d}from"../../core/accessorSupport/PropertyOrigin.js";import a from"../../geometry/Extent.js";import u from"../../geometry/SpatialReference.js";import{HeightModelInfoMixin as c}from"./HeightModelInfoMixin.js";import{elevationInfo as y,maxScale as f,minScale as m,timeInfo as h}from"../support/commonProperties.js";import v from"../support/EditFieldsInfo.js";import{FeatureIndex as g}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as I,hasCurrentUser as F,isLayerCacheStale as S,supportsQueryOnly as b,readGlobalIdField as j,readObjectIdField as E,readVersion as U}from"../support/featureLayerUtils.js";import x from"../support/GeometryFieldsInfo.js";import O from"../support/LayerFloorInfo.js";import{isPreferredUrlApplicable as M,getPreferredUrl as D,applyPreferredHostToPortalItem as T,getPreferredHost as w}from"../support/layerUtils.js";import{urlProperty as C,normalizeParsedUrlObject as H}from"../support/multiLayerServiceUtils.js";import R from"../support/Relationship.js";import{getFeatureLayerCapabilities as B}from"../support/serviceCapabilitiesUtils.js";import A from"../support/Subtype.js";import{hasTypeKeyword as q,typeKeyword as Q}from"../../portal/support/portalItemUtils.js";import{timeZoneProperty as P}from"../../time/timeZoneUtils.js";import{reader as G}from"../../core/accessorSupport/decorators/reader.js";const V=V=>{const Z=c(V);let _=class extends Z{constructor(){super(...arguments),this.cacheMaxAge=0,this.capabilities=null,this.copyright=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.historicMoment=null,this.indexes=new(t.ofType(g)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=u.WGS84,this.subtypeField=null,this.subtypes=null,this.timeInfo=null,this.trackIdField=null,this.uniqueIdFields=null,this.url=null,this.version=void 0,this._isUrlHostModified=!1,this._isUrlHostModificationEnabled=!1}getFieldDomain(e,t){throw new Error("Not implemented")}getField(e){return this.fieldsIndex.get(e)}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:i,editing:r}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(i.supportsEditing&&!(r.supportsUpdateByOthers&&r.supportsUpdateByAnonymous&&r.supportsDeleteByOthers&&r.supportsDeleteByAnonymous))return"load"}if(F(this.serviceDefinitionExpression)||F(this.definitionExpression))return"load";if(this.userHasUpdateItemPrivileges){if(S(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return B(t,this.url)}readEditingInfo(e,t){const{editingInfo:i}=t;return i?{lastEditDate:null!=i.lastEditDate?new Date(i.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=i(e),{operations:r,editing:o}=t;return b(this)?(this.userHasUpdateItemPrivileges&&(r.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(r.supportsAdd=r.supportsDelete=r.supportsEditing=r.supportsQuery=r.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&r.supportsEditing&&(r.supportsAdd=r.supportsDelete=r.supportsUpdate=o.supportsGeometryUpdate=!0),t)}get effectiveEditingEnabled(){return!1}get effectiveUniqueIdFields(){return this.uniqueIdFields?[...this.uniqueIdFields]:[this.objectIdField]}readGlobalIdFieldFromService(e,t){return j(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||b(this))return!1;const{operations:t,editing:i}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&i.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:i}=e;return b(this)?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&i.supportsDeleteByOthers&&i.supportsGeometryUpdate&&i.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return E(t)}get parsedUrl(){return H(this)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readUniqueIdFields(e,t){return t.uniqueIdInfo?.OIDFieldContainsHashValue?t.uniqueIdInfo.fields:null}readVersion(e,t){return U(t)}get isUrlHostModified(){const{loaded:e,url:t,_isUrlHostModified:i}=this;if(i)return!0;if(!e||!t)return!1;if(this.originIdOf("url")<7)return!1;const o=this.sourceJSON?.preferredHost;if(!o)return!1;if(!r(t,`https://${o}`,!0))return!1;for(let s=6;s>=3;s--){const e=this.getAtOrigin("url",d(s));if(e)return!r(t,e,!0)}return!1}applyPreferredHost(e){const{url:t,portalItem:i}=this;if(!t||!M(i))return;const r=D();r&&this._isUrlHostModificationEnabled&&(this._set("url",r),this._isUrlHostModified=!0,i&&T(i,w()))}applyHostFromPortalItem(){const{url:e,portalItem:t}=this;if(!e||7===this.originIdOf("url")||!t?.url||!M(t)||!q(t,Q.HOSTED_SERVICE)||r(e,t.url,!0)||!this._isUrlHostModificationEnabled)return;const i=o(t.url);this._set("url",s(e,i)),this._isUrlHostModified=!0}};return e([n({readOnly:!0})],_.prototype,"authenticationTriggerEvent",null),e([n({readOnly:!0,json:{read:e=>e/60}})],_.prototype,"cacheMaxAge",void 0),e([n({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","isDataBranchVersioned","isDataVersioned","maxRecordCount","maxRecordCountFactor","maxUniqueIDCount","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","standardMaxRecordCountNoGeometry","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],_.prototype,"capabilities",void 0),e([G("service","capabilities")],_.prototype,"readCapabilitiesFromService",null),e([n({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],_.prototype,"copyright",void 0),e([n(P("dateFieldsTimeReference"))],_.prototype,"dateFieldsTimeZone",void 0),e([n({type:Boolean})],_.prototype,"datesInUnknownTimezone",void 0),e([n({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],_.prototype,"definitionExpression",void 0),e([n({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],_.prototype,"displayField",void 0),e([n({readOnly:!0,type:v})],_.prototype,"editFieldsInfo",void 0),e([n({readOnly:!0})],_.prototype,"editingInfo",void 0),e([G("editingInfo")],_.prototype,"readEditingInfo",null),e([n({readOnly:!0})],_.prototype,"effectiveCapabilities",null),e([n()],_.prototype,"effectiveEditingEnabled",null),e([n({readOnly:!0,type:[String]})],_.prototype,"effectiveUniqueIdFields",null),e([n((()=>{const e=i(y),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],_.prototype,"elevationInfo",void 0),e([n()],_.prototype,"fieldsIndex",void 0),e([n({type:O,json:{name:"layerDefinition.floorInfo",write:{layerContainerTypes:l}}})],_.prototype,"floorInfo",void 0),e([n({type:a,json:{origins:{service:{read:{source:"extent"}}}}})],_.prototype,"fullExtent",void 0),e([n()],_.prototype,"gdbVersion",void 0),e([n({readOnly:!0,type:x,json:{read:{source:"geometryProperties"}}})],_.prototype,"geometryFieldsInfo",void 0),e([n({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:I.read}}}})],_.prototype,"geometryType",void 0),e([n({type:String})],_.prototype,"globalIdField",void 0),e([G("service","globalIdField",["globalIdField","fields"])],_.prototype,"readGlobalIdFieldFromService",null),e([n({readOnly:!0})],_.prototype,"hasFullEditingRestrictions",null),e([n({type:Boolean,json:{origins:{service:{read:!0}}}})],_.prototype,"hasM",void 0),e([n({readOnly:!0})],_.prototype,"hasUpdateItemRestrictions",null),e([n({type:Boolean,json:{origins:{service:{read:!0}}}})],_.prototype,"hasZ",void 0),e([n({type:Date})],_.prototype,"historicMoment",void 0),e([n({type:t.ofType(g),readOnly:!0})],_.prototype,"indexes",void 0),e([n({readOnly:!0})],_.prototype,"isTable",void 0),e([G("service","isTable",["type"])],_.prototype,"readIsTableFromService",null),e([n({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],_.prototype,"layerId",void 0),e([n(f)],_.prototype,"maxScale",void 0),e([G("service","maxScale",["maxScale","effectiveMaxScale"])],_.prototype,"readMaxScale",null),e([n(m)],_.prototype,"minScale",void 0),e([G("service","minScale",["minScale","effectiveMinScale"])],_.prototype,"readMinScale",null),e([n({type:String})],_.prototype,"objectIdField",void 0),e([G("service","objectIdField",["objectIdField","fields"])],_.prototype,"readObjectIdFieldFromService",null),e([n({readOnly:!0})],_.prototype,"parsedUrl",null),e([n(P("preferredTimeReference"))],_.prototype,"preferredTimeZone",void 0),e([n({type:[R],readOnly:!0})],_.prototype,"relationships",void 0),e([n({type:Boolean})],_.prototype,"returnM",void 0),e([n({type:Boolean})],_.prototype,"returnZ",void 0),e([n({readOnly:!0,json:{write:!1}})],_.prototype,"serverGens",void 0),e([n({readOnly:!0})],_.prototype,"serviceDefinitionExpression",void 0),e([G("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],_.prototype,"readServiceDefinitionExpression",null),e([n({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_.prototype,"serviceItemId",void 0),e([n()],_.prototype,"sourceJSON",void 0),e([n({type:u,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],_.prototype,"spatialReference",void 0),e([n({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],_.prototype,"subtypeField",void 0),e([n({type:[A],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_.prototype,"subtypes",void 0),e([n(h())],_.prototype,"timeInfo",void 0),e([n({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],_.prototype,"trackIdField",void 0),e([n({type:[String]})],_.prototype,"uniqueIdFields",void 0),e([G("service","uniqueIdFields",["uniqueIdInfo.OIDFieldContainsHashValue","uniqueIdInfo.fields"])],_.prototype,"readUniqueIdFields",null),e([n(C({nonStandardUrlAllowed:!0}))],_.prototype,"url",void 0),e([n({json:{origins:{service:{read:!0}},read:!1}})],_.prototype,"version",void 0),e([G("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],_.prototype,"readVersion",null),e([n({readOnly:!0})],_.prototype,"isUrlHostModified",null),_=e([p("esri.layers.mixins.FeatureLayerBase")],_),_};export{V as FeatureLayerBase};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as o,subclass as t}from"../../core/accessorSupport/decorators.js";import r from"../../geometry/HeightModelInfo.js";const i=i=>{const s=i;let n=class extends s{constructor(){super(...arguments),this.heightModelInfo=null}read(e,o){super.read(e,o),"service"===o?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return e([o({readOnly:!0,type:r})],n.prototype,"heightModelInfo",void 0),n=e([t("esri.layers.mixins.HeightModelInfoMixin")],n),n};export{i as HeightModelInfoMixin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../request.js";import r from"../../core/Error.js";import i from"../../core/Logger.js";import{debounce as o}from"../../core/promiseUtils.js";import{property as s,subclass as a}from"../../core/accessorSupport/decorators.js";import{updateOrigins as n}from"../../core/accessorSupport/originUtils.js";import l from"../../geometry/Extent.js";import p from"../../geometry/HeightModelInfo.js";import c from"../../geometry/SpatialReference.js";import{titleFromUrlAndName as u,parse as d,cleanTitle as y,sanitizeUrlWithLayerId as m}from"../support/arcgisLayerUrl.js";import{id as h}from"../support/commonProperties.js";import{fetchIndexInfo as f}from"../support/I3SIndexInfo.js";import{urlProperty as v,normalizeParsedUrlObject as S}from"../support/multiLayerServiceUtils.js";import{getLoader as g}from"../support/schemaValidatorLoader.js";import w from"../../portal/Portal.js";import x from"../../portal/PortalItem.js";import{createForItemWrite as I}from"../../portal/support/jsonContext.js";import{saveResources as j,updateItemWithResources as b}from"../../webdoc/support/resourceUtils.js";import{evaluateWriteErrors as N}from"../../webdoc/support/saveUtils.js";import{reader as _}from"../../core/accessorSupport/decorators/reader.js";const R=m=>{const R=m;let E=class extends R{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.url=null,this.indexInfo=null,this._debouncedSaveOperations=o(async(e,t,r)=>{switch(e){case 0:return this._save(t);case 1:return this._saveAs(r,t)}})}readSpatialReference(e,t){return T(t)}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:T(t)}:e;return l.fromJSON(i,r)}const i=t.store,o=T(t);return null==o||null==i?.extent||!Array.isArray(i.extent)||i.extent.some(e=>e<L)?null:new l({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:o})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){if("item-title"===this.sublayerTitleMode)return this.url?u(this.url,t.name):t.name;let r=t.name;if(!r&&this.url){const e=d(this.url);null!=e&&(r=e.title)}const i=this.portalItem?.title;return"item-title-and-service-name"===this.sublayerTitleMode&&i&&(r=i+" - "+r),y(r)}get parsedUrl(){return S(this,{separator:"layers"})}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=f(this.parsedUrl?.path??"",this.rootNode,e,this.customParameters,this.apiKey,i.getLogger(this),t),this.indexInfo.catch(()=>{});const{fullExtent:r}=this;null==r||r.hasZ||this._updateExtent(r,await this.indexInfo)}_updateExtent(e,t){if("page"===t?.type){const r=t.rootIndex%t.pageSize,i=t.rootPage?.nodes?.[r];A(e,i?.obb)}else if("node"===t?.type){const r=t.rootNode?.mbs;if(!Array.isArray(r)||4!==r.length||r[0]<L)return;const i=r[2],o=r[3];e.zmin=i-o,e.zmax=i+o}}async _fetchService(e){if(null==this.url)throw new r("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const r=await t(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(r.data&&Array.isArray(r.data.layers)&&r.data.layers.length>0)return r.data.layers[0].id}async _fetchServiceLayer(e){const r=await t(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});r.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let i=!1;if(r.data.layerType&&"Voxel"===r.data.layerType&&(i=!0),i)return this._fetchVoxelServiceLayer();const o=r.data;this.read(o,this._getServiceContext()),this.validateLayer(o)}async _fetchVoxelServiceLayer(e){const r=(await t(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(r,this._getServiceContext()),this.validateLayer(r)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){const i={...P,...t};let o=x.from(e);if(!o)throw new r("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");o.id&&(o=o.clone(),o.id=null);const s=o.portal||w.getDefault();await this._ensureLoadBeforeSave(),o.type=U,o.portal=s;const a=I(o,"portal-item",{withResources:!0}),l={layers:[this.write({},a)]};return await Promise.all(a.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(l,a,i),this.url&&(o.url=this.url),o.title||(o.title=this.title),O(o,i,1),await s.signIn(),await s.user.addItem({item:o,folder:i?.folder,data:l}),await j(this.resourceReferences,a),this.portalItem=o,n(a),a.portalItem=o,o}async _save(e){const t={...P,...e};if(!this.portalItem)throw new r("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==U)throw new r("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${U}"`);await this._ensureLoadBeforeSave();const i=I(this.portalItem,"portal-item",{withResources:!0}),o=this.write({},i),s=await C(this.portalItem,o);await Promise.all(i.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(s,i,t);const a=q(this.portalItem,this.url);return a&&(this.portalItem.url=a),this.portalItem.title||(this.portalItem.title=this.title),O(this.portalItem,t,0),await b(this.portalItem,s,this.resourceReferences,i),n(i),this.portalItem}async _validateAgainstJSONSchema(e,t,o){const s=o?.validationOptions;N(t,{errorName:"sceneservice:save"},{ignoreUnsupported:s?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const a=s?.enabled,n=g();if(a&&n){const t=(await n()).validate(e,o.portalItemLayerType);if(!t.length)return;const a=`Layer item did not validate:\n${t.join("\n")}`;if(i.getLogger(this).error(`_validateAgainstJSONSchema(): ${a}`),"throw"===s.failPolicy){const e=t.map(e=>new r("sceneservice:schema-validation",e));throw new r("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return e([s(h)],E.prototype,"id",void 0),e([s({type:c})],E.prototype,"spatialReference",void 0),e([_("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],E.prototype,"readSpatialReference",null),e([s({type:l})],E.prototype,"fullExtent",void 0),e([_("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],E.prototype,"readFullExtent",null),e([s({readOnly:!0,type:p})],E.prototype,"heightModelInfo",void 0),e([s({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],E.prototype,"minScale",void 0),e([s({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],E.prototype,"maxScale",void 0),e([s({readOnly:!0})],E.prototype,"version",void 0),e([_("version",["store.version"])],E.prototype,"readVersion",null),e([s({type:String,json:{read:{source:"copyrightText"}}})],E.prototype,"copyright",void 0),e([s({type:String,json:{read:!1}})],E.prototype,"sublayerTitleMode",void 0),e([s({type:String})],E.prototype,"title",void 0),e([_("portal-item","title")],E.prototype,"readTitlePortalItem",null),e([_("service","title",["name"])],E.prototype,"readTitleService",null),e([s({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],E.prototype,"layerId",void 0),e([s(v({separator:"layers"}))],E.prototype,"url",void 0),e([s({readOnly:!0})],E.prototype,"parsedUrl",null),e([s({readOnly:!0})],E.prototype,"store",void 0),e([s({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],E.prototype,"rootNode",void 0),E=e([a("esri.layers.mixins.SceneService")],E),E},L=-1e38;function T(e){if(null!=e.spatialReference)return c.fromJSON(e.spatialReference);const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.slice(r.lastIndexOf("/")+1),10);return null!=i?new c(i):null}function A(e,t){if(null==t?.center||null==t.halfSize)throw new r("sceneservice:invalid-node-page","Invalid node page.");if(t.center[0]<L)return;const i=t.halfSize,o=t.center[2],s=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);e.zmin=o-s,e.zmax=o+s}function O(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const o of i)e.typeKeywords.push(o);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t),1===r&&(e.typeKeywords=e.typeKeywords.filter(e=>"Hosted Service"!==e)))}const U="Scene Service",P={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}},E={layerId:null};function K(e,t){const r=e.findIndex(({id:e})=>e===t.id);-1===r?e.push(t):e[r]=t}async function C(e,t){const r=await e.fetchData("json")??{};return Array.isArray(r.layers)||(r.layers=await V(e,t)),K(r.layers,t),r}function q(e,t){return t&&M(e.url,t)?e.url:t}function M(e,t){const r=J(e);return!!r&&r===F(t).url}async function V(e,t){const r=await z(e).catch(()=>null);return r?.some(({id:e})=>e===t.id)?r:[t]}async function z(e){const r=J(e.url);if(!r)return null;const i=(await t(r,{query:{f:"json"},responseType:"json"})).data.layers;if(!Array.isArray(i))return null;const o=i.filter(({id:e})=>null!=e).map(({id:e})=>({id:e}));return o.length?o:null}function J(e){if(!e)return null;const t=F(e);if(null!=t.layerId)return null;const r=d(t.url);return null==r||"SceneServer"===r.serverType?t.url:null}function F(e){return m({layer:E,url:e,nonStandardUrlAllowed:!0})}export{R as SceneService,U as sceneServiceItemType,A as updateExtentFromPageObb};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../request.js";import r from"../../core/Error.js";import i from"../../core/Logger.js";import{debounce as o}from"../../core/promiseUtils.js";import{property as s,subclass as a}from"../../core/accessorSupport/decorators.js";import{updateOrigins as n}from"../../core/accessorSupport/originUtils.js";import l from"../../geometry/Extent.js";import p from"../../geometry/SpatialReference.js";import{HeightModelInfoMixin as c}from"./HeightModelInfoMixin.js";import{titleFromUrlAndName as u,parse as d,cleanTitle as m,sanitizeUrlWithLayerId as y}from"../support/arcgisLayerUrl.js";import{id as h}from"../support/commonProperties.js";import{fetchIndexInfo as f}from"../support/I3SIndexInfo.js";import{urlProperty as v,normalizeParsedUrlObject as S}from"../support/multiLayerServiceUtils.js";import{getLoader as g}from"../support/schemaValidatorLoader.js";import w from"../../portal/Portal.js";import x from"../../portal/PortalItem.js";import{createForItemWrite as I}from"../../portal/support/jsonContext.js";import{saveResources as j,updateItemWithResources as b}from"../../webdoc/support/resourceUtils.js";import{evaluateWriteErrors as N}from"../../webdoc/support/saveUtils.js";import{reader as _}from"../../core/accessorSupport/decorators/reader.js";const R=y=>{const R=c(y);let E=class extends R{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.url=null,this.indexInfo=null,this._debouncedSaveOperations=o(async(e,t,r)=>{switch(e){case 0:return this._save(t);case 1:return this._saveAs(r,t)}})}readSpatialReference(e,t){return T(t)}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:T(t)}:e;return l.fromJSON(i,r)}const i=t.store,o=T(t);return null==o||null==i?.extent||!Array.isArray(i.extent)||i.extent.some(e=>e<L)?null:new l({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:o})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){if("item-title"===this.sublayerTitleMode)return this.url?u(this.url,t.name):t.name;let r=t.name;if(!r&&this.url){const e=d(this.url);null!=e&&(r=e.title)}const i=this.portalItem?.title;return"item-title-and-service-name"===this.sublayerTitleMode&&i&&(r=i+" - "+r),m(r)}get parsedUrl(){return S(this,{separator:"layers"})}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=f(this.parsedUrl?.path??"",this.rootNode,e,this.customParameters,this.apiKey,i.getLogger(this),t),this.indexInfo.catch(()=>{});const{fullExtent:r}=this;null==r||r.hasZ||this._updateExtent(r,await this.indexInfo)}_updateExtent(e,t){if("page"===t?.type){const r=t.rootIndex%t.pageSize,i=t.rootPage?.nodes?.[r];A(e,i?.obb)}else if("node"===t?.type){const r=t.rootNode?.mbs;if(!Array.isArray(r)||4!==r.length||r[0]<L)return;const i=r[2],o=r[3];e.zmin=i-o,e.zmax=i+o}}async _fetchService(e){if(null==this.url)throw new r("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const r=await t(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(r.data&&Array.isArray(r.data.layers)&&r.data.layers.length>0)return r.data.layers[0].id}async _fetchServiceLayer(e){const r=await t(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});r.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let i=!1;if(r.data.layerType&&"Voxel"===r.data.layerType&&(i=!0),i)return this._fetchVoxelServiceLayer();const o=r.data;this.read(o,this._getServiceContext()),this.validateLayer(o)}async _fetchVoxelServiceLayer(e){const r=(await t(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(r,this._getServiceContext()),this.validateLayer(r)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){const i={...P,...t};let o=x.from(e);if(!o)throw new r("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");o.id&&(o=o.clone(),o.id=null);const s=o.portal||w.getDefault();await this._ensureLoadBeforeSave(),o.type=U,o.portal=s;const a=I(o,"portal-item",{withResources:!0}),l={layers:[this.write({},a)]};return await Promise.all(a.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(l,a,i),this.url&&(o.url=this.url),o.title||(o.title=this.title),O(o,i,1),await s.signIn(),await s.user.addItem({item:o,folder:i?.folder,data:l}),await j(this.resourceReferences,a),this.portalItem=o,n(a),a.portalItem=o,o}async _save(e){const t={...P,...e};if(!this.portalItem)throw new r("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==U)throw new r("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${U}"`);await this._ensureLoadBeforeSave();const i=I(this.portalItem,"portal-item",{withResources:!0}),o=this.write({},i),s=await C(this.portalItem,o);await Promise.all(i.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(s,i,t);const a=q(this.portalItem,this.url);return a&&(this.portalItem.url=a),this.portalItem.title||(this.portalItem.title=this.title),O(this.portalItem,t,0),await b(this.portalItem,s,this.resourceReferences,i),n(i),this.portalItem}async _validateAgainstJSONSchema(e,t,o){const s=o?.validationOptions;N(t,{errorName:"sceneservice:save"},{ignoreUnsupported:s?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const a=s?.enabled,n=g();if(a&&n){const t=(await n()).validate(e,o.portalItemLayerType);if(!t.length)return;const a=`Layer item did not validate:\n${t.join("\n")}`;if(i.getLogger(this).error(`_validateAgainstJSONSchema(): ${a}`),"throw"===s.failPolicy){const e=t.map(e=>new r("sceneservice:schema-validation",e));throw new r("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return e([s(h)],E.prototype,"id",void 0),e([s({type:p})],E.prototype,"spatialReference",void 0),e([_("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],E.prototype,"readSpatialReference",null),e([s({type:l})],E.prototype,"fullExtent",void 0),e([_("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],E.prototype,"readFullExtent",null),e([s({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],E.prototype,"minScale",void 0),e([s({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],E.prototype,"maxScale",void 0),e([s({readOnly:!0})],E.prototype,"version",void 0),e([_("version",["store.version"])],E.prototype,"readVersion",null),e([s({type:String,json:{read:{source:"copyrightText"}}})],E.prototype,"copyright",void 0),e([s({type:String,json:{read:!1}})],E.prototype,"sublayerTitleMode",void 0),e([s({type:String})],E.prototype,"title",void 0),e([_("portal-item","title")],E.prototype,"readTitlePortalItem",null),e([_("service","title",["name"])],E.prototype,"readTitleService",null),e([s({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],E.prototype,"layerId",void 0),e([s(v({separator:"layers"}))],E.prototype,"url",void 0),e([s({readOnly:!0})],E.prototype,"parsedUrl",null),e([s({readOnly:!0})],E.prototype,"store",void 0),e([s({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],E.prototype,"rootNode",void 0),E=e([a("esri.layers.mixins.SceneService")],E),E},L=-1e38;function T(e){if(null!=e.spatialReference)return p.fromJSON(e.spatialReference);const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.slice(r.lastIndexOf("/")+1),10);return null!=i?new p(i):null}function A(e,t){if(null==t?.center||null==t.halfSize)throw new r("sceneservice:invalid-node-page","Invalid node page.");if(t.center[0]<L)return;const i=t.halfSize,o=t.center[2],s=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);e.zmin=o-s,e.zmax=o+s}function O(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const o of i)e.typeKeywords.push(o);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t),1===r&&(e.typeKeywords=e.typeKeywords.filter(e=>"Hosted Service"!==e)))}const U="Scene Service",P={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}},E={layerId:null};function K(e,t){const r=e.findIndex(({id:e})=>e===t.id);-1===r?e.push(t):e[r]=t}async function C(e,t){const r=await e.fetchData("json")??{};return Array.isArray(r.layers)||(r.layers=await V(e,t)),K(r.layers,t),r}function q(e,t){return t&&M(e.url,t)?e.url:t}function M(e,t){const r=J(e);return!!r&&r===F(t).url}async function V(e,t){const r=await z(e).catch(()=>null);return r?.some(({id:e})=>e===t.id)?r:[t]}async function z(e){const r=J(e.url);if(!r)return null;const i=(await t(r,{query:{f:"json"},responseType:"json"})).data.layers;if(!Array.isArray(i))return null;const o=i.filter(({id:e})=>null!=e).map(({id:e})=>({id:e}));return o.length?o:null}function J(e){if(!e)return null;const t=F(e);if(null!=t.layerId)return null;const r=d(t.url);return null==r||"SceneServer"===r.serverType?t.url:null}function F(e){return y({layer:E,url:e,nonStandardUrlAllowed:!0})}export{R as SceneService,U as sceneServiceItemType,A as updateExtentFromPageObb};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../../core/Clonable.js";import r from"../../../core/Error.js";import{JSONSupport as o}from"../../../core/JSONSupport.js";import a from"../../../core/Logger.js";import{property as i,cast as n,subclass as s}from"../../../core/accessorSupport/decorators.js";import l from"../../../geometry/Point.js";import{getGeometryZScaler as p}from"../../../geometry/support/zscale.js";import c from"./CameraOrientation.js";import m from"./cameraOrientationFactory.js";import{appendPrefixAndSuffix as u,getEffectiveElevationSource as y,getArcGISServerUrl as d,getMetersPerUnitOfSR as f,orientedImageryTypeMap as g}from"./utils.js";import{ltpToGeographic as h}from"../transformations/utils.js";import{reader as v}from"../../../core/accessorSupport/decorators/reader.js";import{writer as w}from"../../../core/accessorSupport/decorators/writer.js";import{enumeration as O}from"../../../core/accessorSupport/decorators/enumeration.js";function b(e){throw new r("exposure-point:missing-default-value",`a value for ${e} is missing in default properties`)}function j(e,t){throw new r("exposure-point:missing-attribute-value",`a value for ${e} is missing in attribute table`,{exposurePoint:t})}const S=e=>({cast:e=>{const t=parseFloat(e);return Number.isFinite(t)?t:void 0},json:{name:e,write:{writer:(e,t,r)=>{t[r]=Number.isFinite(e)?e:void 0}}}}),N=e=>({cast:e=>"string"==typeof e?e.split(";").map(Number):e,json:{default:e,write:{writer:(e,t,r)=>{t[r]=e?.join(";")}}}}),I="$virtualCacheDirectory:",x="/rest/directories/dsid_",z=new Set(["location"]);let C=class extends(t(o)){constructor(e){super(e),this._geometry=null,this.cameraOrientation=null,this.elevation=null,this.elevationSource=null,this.name=null,this.sourceMap=null}read(e,t){const r={},{attributes:o,geometry:a}=e,i={};for(const p in o)z.has(p.toLowerCase())||(r[p.toLowerCase()]=o[p],i[p.toLowerCase()]=p);const n=e.layer??{},s=n.effectiveSequenceOrderField;let l=null;if(s?.length){s.map(e=>e.fieldName).forEach(e=>{i[e.toLowerCase()]=e}),l=s.map(e=>({value:o[e.fieldName],...e}))}super.read({geometry:a,layer:n,sourceMap:i,sequenceOrder:l,...r},t)}write(e,t){const r=super.write(e,t),{sourceMap:o}=this;if(!o||!r)return r;const a={};for(const i in r){const e=o[i.toLowerCase()];e&&(a[e]=r[i])}return a}readCameraHeading(e,t){const{cameraheading:r,camheading:o,layer:a}=t;return r??o??a.cameraHeading}readCameraHeight(e,t){const{cameraheight:r,avghtag:o,layer:a}=t;return r??o??a.cameraHeight}readCamOffset(e,t){const{cameraoffset:r,camoffset:o}=t;return r?.split(";").map(Number)??o?.split(";").map(Number)??null}writeCameraOffset(e,t){e&&(t.cameraOffset=e.join(";"))}readCameraOrientation(e,t){const{cameraorientation:r,camori:o}=t;return r??o}readCameraPitch(e,t){const{camerapitch:r,campitch:o,layer:a}=t;return r??o??a.cameraPitch}readCameraRoll(e,t){const{cameraroll:r,camroll:o,layer:a}=t;return r??o??a.cameraRoll}readDepthImage(e,t){const{depthimage:r,depthimg:o,layer:a}=t,i=r??o??null,{depthImagePathPrefix:n,depthImagePathSuffix:s}=a??{};return u(i,n,s)}readElevationSource(e,t){const{elevationsource:r,layer:o}=t,{demPathSuffix:a,demPathPrefix:i}=o;if(r){const e=this._parseIfJSON(r);return y(e,i,a)}return o.effectiveElevationSource}readFarDistance(e,t){const{fardistance:r,fardist:o,layer:a}=t;return r??o??a.farDistance}get geometry(){const e=this._geometry.clone();if(!e)return null;const{cameraOffset:t}=this;if(t){const[r,o,a]=t;e.x+=r,e.y+=o,null!=e.z&&null!=a&&(e.z+=a)}return e}set geometry(e){this._geometry=e}writeGeometry(e,t){t.geometry=this._geometry.toJSON()}readHFOV(e,t){const{horizontalfieldofview:r,hfov:o,layer:a}=t;return r??o??a.horizontalFieldOfView}readImageURL(e,t){const{imagepath:r,layer:o}=t;r||j("imagePath",this);const{imagePathPrefix:a,imagePathSuffix:i}=o;if(r.startsWith(I)){return`${d(o.url)}${x}${r.replace(I,o.dataStoreID+"/")}`}return u(r,a,i)}readImageRotation(e,t){const{imagerotation:r,imgrot:o,layer:a}=t;return r??o??a.imageRotation}get isHorizontal(){return"horizontal"===this.orientedImageryType}get isInspection(){return"inspection"===this.orientedImageryType}get isNadir(){return"nadir"===this.orientedImageryType}get isOblique(){return"oblique"===this.orientedImageryType}get isSpherical(){return this.orientedImageryType?.includes("360")??!1}get location(){const{cameraOrientation:e,cameraHeight:t,elevation:r}=this;if(e){const{type:t,x:r,y:o,z:a,horizontalWKID:i,verticalWKID:n}=e,s="number"==typeof i?{wkid:i}:{wkt:i};if(4===t){const{latitude:t,longitude:r,ellipsoidRadius:o,squaredEccentricity:a,properties:i}=e,{x:n,y:s,z:p}=i;return new l(h([n,s,p],[t,r,o,a]))}const c=new l({x:r,y:o,z:a,spatialReference:s}),m=n?p("point",{wkid:n},s):null;return m&&m(c),c}if("number"!=typeof t)throw b("cameraHeight");const o=this.geometry.clone(),i=(r??0)+t/f(o.spatialReference);if("360"===this.orientedImageryType&&o.hasZ){const e=i-o.z;return null!=r&&Math.abs(e)>.001&&(a.getLogger(this).warnOnce("The elevation value is different from the geometry's z value. The geometry's z value will be updated.",{elevation:r,geometryZ:o.z}),o.z=i),o}return o.z=o.hasZ?o.z:i,o}set matrix(e){if(e)return 9!==e.length?(a.getLogger(this).warnOnce("Ignoring rotation matrix because it doesn't have 9 values",{value:e}),void this._set("matrix",null)):void this._set("matrix",e)}readNearDistance(e,t){const{neardistance:r,neardist:o,layer:a}=t;return r??o??a.nearDistance}readOffsetFromStart(e,t){return t.offsetfromstart??null}readOrientationAccuracy(e,t){const{accuracy:r,orientationaccuracy:o}=t;return o?.split(";").map(Number)??r?.split(";").map(Number)??null}writeOrientationAccuracy(e,t){e&&(t.orientationAccuracy=e.join(";"))}readOIType(e,t){const{orientedimagerytype:r,oitype:o,camerapitch:a,campitch:i,layer:n}=t,s=g.read(r??o??n.orientedImageryType),l=a??i??n.cameraPitch;return"oblique"===s?l<10?"nadir":"oblique":s}set radial(e){if(e){if("string"==typeof e){const[t,r,o]=e.split(";").map(Number);return void this._set("radial",[t??0,r??0,o??0])}this._set("radial",e)}else this._set("radial",[0,0,0])}set tangential(e){if(e){if("string"==typeof e){const[t,r]=e.split(";").map(Number);return void this._set("tangential",[t??0,r??0])}this._set("tangential",e)}else this._set("tangential",[0,0])}readVFOV(e,t){const{verticalfieldofview:r,vfov:o,layer:a}=t;return r??o??a.verticalFieldOfView}_parseIfJSON(e){let t=null;try{t=JSON.parse(e)}catch(r){a.getLogger(this).error("couldn't parse the given elevation source JSON",e,r)}return t}clone(){const e=super.clone();return e._geometry=this._geometry.clone(),e}};e([i()],C.prototype,"_geometry",void 0),e([i(S())],C.prototype,"a0",void 0),e([i(S())],C.prototype,"a1",void 0),e([i(S())],C.prototype,"a2",void 0),e([i({type:Date,json:{write:{enabled:!0,target:"acquisitionDate"},name:"acquisitiondate"}})],C.prototype,"acquisitionDate",void 0),e([i(S())],C.prototype,"b0",void 0),e([i(S())],C.prototype,"b1",void 0),e([i(S())],C.prototype,"b2",void 0),e([i({type:Number,json:{write:!0,read:{source:["cameraheading","camheading","layer.cameraHeading"]}}})],C.prototype,"cameraHeading",void 0),e([v("cameraHeading")],C.prototype,"readCameraHeading",null),e([i({type:Number,json:{write:!0}})],C.prototype,"cameraHeight",void 0),e([v("cameraHeight",["cameraheight","avghtag","layer.cameraHeight"])],C.prototype,"readCameraHeight",null),e([i()],C.prototype,"cameraOffset",void 0),e([v("cameraOffset",["cameraoffset","camoffset"])],C.prototype,"readCamOffset",null),e([w("cameraOffset")],C.prototype,"writeCameraOffset",null),e([i({json:{write:{writer:(e,t,r)=>{t[r]=e.toString()}}},type:c}),n(e=>e?m.getCameraOrientation(e):null)],C.prototype,"cameraOrientation",void 0),e([v("cameraOrientation",["cameraorientation","camori"])],C.prototype,"readCameraOrientation",null),e([i({type:Number,json:{write:!0}})],C.prototype,"cameraPitch",void 0),e([v("cameraPitch",["camerapitch","campitch","layer.cameraPitch"])],C.prototype,"readCameraPitch",null),e([i({type:Number,json:{write:!0}})],C.prototype,"cameraRoll",void 0),e([v("cameraRoll",["cameraroll","camroll","layer.cameraRoll"])],C.prototype,"readCameraRoll",null),e([i({json:{write:!0},type:String})],C.prototype,"depthImage",void 0),e([v("depthImage",["depthimage","depthimg"])],C.prototype,"readDepthImage",null),e([i({type:Number,json:{write:!0}})],C.prototype,"elevation",void 0),e([i({json:{write:!0},clonable:"reference"})],C.prototype,"elevationSource",void 0),e([v("elevationSource",["elevationsource","layer.effectiveElevationSource"])],C.prototype,"readElevationSource",null),e([i({json:{name:"exposurestationid",write:{target:"exposureStationId"}},type:String})],C.prototype,"exposureStationId",void 0),e([i({type:Number,json:{write:!0}})],C.prototype,"farDistance",void 0),e([v("farDistance",["fardistance","fardist","layer.farDistance"])],C.prototype,"readFarDistance",null),e([i(S("focallength"))],C.prototype,"focalLength",void 0),e([i({type:l,json:{name:"geometry"}})],C.prototype,"geometry",null),e([w("geometry")],C.prototype,"writeGeometry",null),e([i({type:Number,json:{write:!0}})],C.prototype,"horizontalFieldOfView",void 0),e([v("horizontalFieldOfView",["horizontalfieldofview","hfov","layer.horizontalFieldOfView"])],C.prototype,"readHFOV",null),e([i({json:{write:!0},type:String})],C.prototype,"imagePath",void 0),e([v("imagePath",["imagepath"])],C.prototype,"readImageURL",null),e([i({type:Number,json:{write:!0}})],C.prototype,"imageRotation",void 0),e([v("imageRotation",["imagerotation","imgrot","layer.imageRotation"])],C.prototype,"readImageRotation",null),e([i()],C.prototype,"isHorizontal",null),e([i()],C.prototype,"isInspection",null),e([i()],C.prototype,"isNadir",null),e([i()],C.prototype,"isOblique",null),e([i()],C.prototype,"isSpherical",null),e([i()],C.prototype,"location",null),e([i(N())],C.prototype,"matrix",null),e([i({json:{write:!0},type:String})],C.prototype,"name",void 0),e([i({type:Number,json:{write:!0}})],C.prototype,"nearDistance",void 0),e([v("nearDistance",["neardistance","neardist","layer.nearDistance"])],C.prototype,"readNearDistance",null),e([i({json:{write:!0,name:"objectid"},type:Number})],C.prototype,"objectId",void 0),e([i({type:Number,json:{write:!0}})],C.prototype,"offsetFromStart",void 0),e([v("offsetFromStart",["offsetfromstart"])],C.prototype,"readOffsetFromStart",null),e([i()],C.prototype,"orientationAccuracy",void 0),e([v("orientationAccuracy",["accuracy","orientationaccuracy"])],C.prototype,"readOrientationAccuracy",null),e([w("orientationAccuracy")],C.prototype,"writeOrientationAccuracy",null),e([O(g)],C.prototype,"orientedImageryType",void 0),e([v("orientedImageryType",["orientedimagerytype","oitype","layer.orientedImageryType"])],C.prototype,"readOIType",null),e([i({type:Number,json:{write:!0,read:{source:"principalx"}}})],C.prototype,"principalX",void 0),e([i({type:Number,json:{write:!0,read:{source:"principaly"}}})],C.prototype,"principalY",void 0),e([i(N([0,0,0]))],C.prototype,"radial",null),e([i({json:{write:(e,t)=>{e&&e.forEach(e=>t[e.fieldName]=e.value)}}})],C.prototype,"sequenceOrder",void 0),e([i({type:Object})],C.prototype,"sourceMap",void 0),e([i(N([0,0]))],C.prototype,"tangential",null),e([i({type:Number,json:{write:!0}})],C.prototype,"verticalFieldOfView",void 0),e([v("verticalFieldOfView",["verticalfieldofview","vfov","layer.verticalFieldOfView"])],C.prototype,"readVFOV",null),C=e([s("esri.layers.orientedImagery.core.ExposurePoint")],C);const F=C;export{F as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{id as t}from"../../../kernel.js";import{ClonableMixin as r}from"../../../core/Clonable.js";import o from"../../../core/Error.js";import{JSONSupport as a}from"../../../core/JSONSupport.js";import i from"../../../core/Logger.js";import{isAbsolute as n,addQueryParameter as s}from"../../../core/urlUtils.js";import{property as l,cast as p,subclass as c}from"../../../core/accessorSupport/decorators.js";import m from"../../../geometry/Point.js";import{getGeometryZScaler as u}from"../../../geometry/support/zscale.js";import y from"./CameraOrientation.js";import d from"./cameraOrientationFactory.js";import{appendPrefixAndSuffix as f,getEffectiveElevationSource as g,getArcGISServerUrl as h,getMetersPerUnitOfSR as v,orientedImageryTypeMap as w}from"./utils.js";import{ltpToGeographic as O}from"../transformations/utils.js";import{reader as b}from"../../../core/accessorSupport/decorators/reader.js";import{writer as j}from"../../../core/accessorSupport/decorators/writer.js";import{enumeration as S}from"../../../core/accessorSupport/decorators/enumeration.js";function N(e){throw new o("exposure-point:missing-default-value",`a value for ${e} is missing in default properties`)}function I(e,t){throw new o("exposure-point:missing-attribute-value",`a value for ${e} is missing in attribute table`,{exposurePoint:t})}function x(e){return e.trim().replaceAll("\\","/").replace(/^\/+/,"")}function C(e,t){return n(e)?e:f(e,t.imagePathPrefix,t.imagePathSuffix)}function z(e,t){if(n(e))return e;const r=t.url?h(t.url):null;return r?`${r}/${x(e)}`:null}function F(e){const r=t?.findCredential(e.url)?.token;return r??null}function P(e,t){const r=F(t);return r?s(e,"token",r):e}const D=e=>({cast:e=>{const t=parseFloat(e);return Number.isFinite(t)?t:void 0},json:{name:e,write:{writer:(e,t,r)=>{t[r]=Number.isFinite(e)?e:void 0}}}}),H=e=>({cast:e=>"string"==typeof e?e.split(";").map(Number):e,json:{default:e,write:{writer:(e,t,r)=>{t[r]=e?.join(";")}}}}),_="$virtualCacheDirectory:",R="/rest/directories/dsid_",T=new Set(["location"]);let V=class extends(r(a)){constructor(e){super(e),this._geometry=null,this.cameraOrientation=null,this.elevation=null,this.elevationSource=null,this.name=null,this.sourceMap=null}read(e,t){const r={},{attributes:o,geometry:a}=e,i={};for(const p in o)T.has(p.toLowerCase())||(r[p.toLowerCase()]=o[p],i[p.toLowerCase()]=p);const n=e.layer??{},s=n.effectiveSequenceOrderField;let l=null;if(s?.length){s.map(e=>e.fieldName).forEach(e=>{i[e.toLowerCase()]=e}),l=s.map(e=>({value:o[e.fieldName],...e}))}super.read({geometry:a,layer:n,sourceMap:i,sequenceOrder:l,...r},t)}write(e,t){const r=super.write(e,t),{sourceMap:o}=this;if(!o||!r)return r;const a={};for(const i in r){const e=o[i.toLowerCase()];e&&(a[e]=r[i])}return a}readCameraHeading(e,t){const{cameraheading:r,camheading:o,layer:a}=t;return r??o??a.cameraHeading}readCameraHeight(e,t){const{cameraheight:r,avghtag:o,layer:a}=t;return r??o??a.cameraHeight}readCamOffset(e,t){const{cameraoffset:r,camoffset:o}=t;return r?.split(";").map(Number)??o?.split(";").map(Number)??null}writeCameraOffset(e,t){e&&(t.cameraOffset=e.join(";"))}readCameraOrientation(e,t){const{cameraorientation:r,camori:o}=t;return r??o}readCameraPitch(e,t){const{camerapitch:r,campitch:o,layer:a}=t;return r??o??a.cameraPitch}readCameraRoll(e,t){const{cameraroll:r,camroll:o,layer:a}=t;return r??o??a.cameraRoll}readDepthImage(e,t){const{depthimage:r,depthimg:o,layer:a}=t,i=r??o??null,{depthImagePathPrefix:n,depthImagePathSuffix:s}=a??{};return f(i,n,s)}readElevationSource(e,t){const{elevationsource:r,layer:o}=t,{demPathSuffix:a,demPathPrefix:i}=o;if(r){const e=this._parseIfJSON(r);return g(e,i,a)}return o.effectiveElevationSource}readFarDistance(e,t){const{fardistance:r,fardist:o,layer:a}=t;return r??o??a.farDistance}get geometry(){const e=this._geometry.clone();if(!e)return null;const{cameraOffset:t}=this;if(t){const[r,o,a]=t;e.x+=r,e.y+=o,null!=e.z&&null!=a&&(e.z+=a)}return e}set geometry(e){this._geometry=e}writeGeometry(e,t){t.geometry=this._geometry.toJSON()}readHFOV(e,t){const{horizontalfieldofview:r,hfov:o,layer:a}=t;return r??o??a.horizontalFieldOfView}readImageURL(e,t){const{connectionid:r,imagepath:o,layer:a}=t;if(o||I("imagePath",this),o.startsWith(_)){return`${h(a.url)}${R}${o.replace(_,a.dataStoreID+"/")}`}if(null==r)return C(o,a);const i=a.imageAccessPaths?.[r];if(!i)return C(o,a);const n=z(i,a);if(!n)return C(o,a);return P(`${n}/${x(o)}`,a)}readImageRotation(e,t){const{imagerotation:r,imgrot:o,layer:a}=t;return r??o??a.imageRotation}get isHorizontal(){return"horizontal"===this.orientedImageryType}get isInspection(){return"inspection"===this.orientedImageryType}get isNadir(){return"nadir"===this.orientedImageryType}get isOblique(){return"oblique"===this.orientedImageryType}get isSpherical(){return this.orientedImageryType?.includes("360")??!1}get location(){const{cameraOrientation:e,cameraHeight:t,elevation:r}=this;if(e){const{type:t,x:r,y:o,z:a,horizontalWKID:i,verticalWKID:n}=e,s="number"==typeof i?{wkid:i}:{wkt:i};if(4===t){const{latitude:t,longitude:r,ellipsoidRadius:o,squaredEccentricity:a,properties:i}=e,{x:n,y:s,z:l}=i;return new m(O([n,s,l],[t,r,o,a]))}const l=new m({x:r,y:o,z:a,spatialReference:s}),p=n?u("point",{wkid:n},s):null;return p&&p(l),l}if("number"!=typeof t)throw N("cameraHeight");const o=this.geometry.clone(),a=(r??0)+t/v(o.spatialReference);if("360"===this.orientedImageryType&&o.hasZ){const e=a-o.z;return null!=r&&Math.abs(e)>.001&&(i.getLogger(this).warnOnce("The elevation value is different from the geometry's z value. The geometry's z value will be updated.",{elevation:r,geometryZ:o.z}),o.z=a),o}return o.z=o.hasZ?o.z:a,o}set matrix(e){if(e)return 9!==e.length?(i.getLogger(this).warnOnce("Ignoring rotation matrix because it doesn't have 9 values",{value:e}),void this._set("matrix",null)):void this._set("matrix",e)}readNearDistance(e,t){const{neardistance:r,neardist:o,layer:a}=t;return r??o??a.nearDistance}readOffsetFromStart(e,t){return t.offsetfromstart??null}readOrientationAccuracy(e,t){const{accuracy:r,orientationaccuracy:o}=t;return o?.split(";").map(Number)??r?.split(";").map(Number)??null}writeOrientationAccuracy(e,t){e&&(t.orientationAccuracy=e.join(";"))}readOIType(e,t){const{orientedimagerytype:r,oitype:o,camerapitch:a,campitch:i,layer:n}=t,s=w.read(r??o??n.orientedImageryType),l=a??i??n.cameraPitch;return"oblique"===s?l<10?"nadir":"oblique":s}set radial(e){if(e){if("string"==typeof e){const[t,r,o]=e.split(";").map(Number);return void this._set("radial",[t??0,r??0,o??0])}this._set("radial",e)}else this._set("radial",[0,0,0])}set tangential(e){if(e){if("string"==typeof e){const[t,r]=e.split(";").map(Number);return void this._set("tangential",[t??0,r??0])}this._set("tangential",e)}else this._set("tangential",[0,0])}readVFOV(e,t){const{verticalfieldofview:r,vfov:o,layer:a}=t;return r??o??a.verticalFieldOfView}_parseIfJSON(e){let t=null;try{t=JSON.parse(e)}catch(r){i.getLogger(this).error("couldn't parse the given elevation source JSON",e,r)}return t}clone(){const e=super.clone();return e._geometry=this._geometry.clone(),e}};e([l()],V.prototype,"_geometry",void 0),e([l(D())],V.prototype,"a0",void 0),e([l(D())],V.prototype,"a1",void 0),e([l(D())],V.prototype,"a2",void 0),e([l({type:Date,json:{write:{enabled:!0,target:"acquisitionDate"},name:"acquisitiondate"}})],V.prototype,"acquisitionDate",void 0),e([l(D())],V.prototype,"b0",void 0),e([l(D())],V.prototype,"b1",void 0),e([l(D())],V.prototype,"b2",void 0),e([l({type:Number,json:{write:!0,read:{source:["cameraheading","camheading","layer.cameraHeading"]}}})],V.prototype,"cameraHeading",void 0),e([b("cameraHeading")],V.prototype,"readCameraHeading",null),e([l({type:Number,json:{write:!0}})],V.prototype,"cameraHeight",void 0),e([b("cameraHeight",["cameraheight","avghtag","layer.cameraHeight"])],V.prototype,"readCameraHeight",null),e([l()],V.prototype,"cameraOffset",void 0),e([b("cameraOffset",["cameraoffset","camoffset"])],V.prototype,"readCamOffset",null),e([j("cameraOffset")],V.prototype,"writeCameraOffset",null),e([l({json:{write:{writer:(e,t,r)=>{t[r]=e.toString()}}},type:y}),p(e=>e?d.getCameraOrientation(e):null)],V.prototype,"cameraOrientation",void 0),e([b("cameraOrientation",["cameraorientation","camori"])],V.prototype,"readCameraOrientation",null),e([l({type:Number,json:{write:!0}})],V.prototype,"cameraPitch",void 0),e([b("cameraPitch",["camerapitch","campitch","layer.cameraPitch"])],V.prototype,"readCameraPitch",null),e([l({type:Number,json:{write:!0}})],V.prototype,"cameraRoll",void 0),e([b("cameraRoll",["cameraroll","camroll","layer.cameraRoll"])],V.prototype,"readCameraRoll",null),e([l({json:{write:!0},type:String})],V.prototype,"depthImage",void 0),e([b("depthImage",["depthimage","depthimg"])],V.prototype,"readDepthImage",null),e([l({type:Number,json:{write:!0}})],V.prototype,"elevation",void 0),e([l({json:{write:!0},clonable:"reference"})],V.prototype,"elevationSource",void 0),e([b("elevationSource",["elevationsource","layer.effectiveElevationSource"])],V.prototype,"readElevationSource",null),e([l({json:{name:"exposurestationid",write:{target:"exposureStationId"}},type:String})],V.prototype,"exposureStationId",void 0),e([l({type:Number,json:{write:!0}})],V.prototype,"farDistance",void 0),e([b("farDistance",["fardistance","fardist","layer.farDistance"])],V.prototype,"readFarDistance",null),e([l(D("focallength"))],V.prototype,"focalLength",void 0),e([l({type:m,json:{name:"geometry"}})],V.prototype,"geometry",null),e([j("geometry")],V.prototype,"writeGeometry",null),e([l({type:Number,json:{write:!0}})],V.prototype,"horizontalFieldOfView",void 0),e([b("horizontalFieldOfView",["horizontalfieldofview","hfov","layer.horizontalFieldOfView"])],V.prototype,"readHFOV",null),e([l({json:{write:!0},type:String})],V.prototype,"imagePath",void 0),e([b("imagePath",["imagepath"])],V.prototype,"readImageURL",null),e([l({type:Number,json:{write:!0}})],V.prototype,"imageRotation",void 0),e([b("imageRotation",["imagerotation","imgrot","layer.imageRotation"])],V.prototype,"readImageRotation",null),e([l()],V.prototype,"isHorizontal",null),e([l()],V.prototype,"isInspection",null),e([l()],V.prototype,"isNadir",null),e([l()],V.prototype,"isOblique",null),e([l()],V.prototype,"isSpherical",null),e([l()],V.prototype,"location",null),e([l(H())],V.prototype,"matrix",null),e([l({json:{write:!0},type:String})],V.prototype,"name",void 0),e([l({type:Number,json:{write:!0}})],V.prototype,"nearDistance",void 0),e([b("nearDistance",["neardistance","neardist","layer.nearDistance"])],V.prototype,"readNearDistance",null),e([l({json:{write:!0,name:"objectid"},type:Number})],V.prototype,"objectId",void 0),e([l({type:Number,json:{write:!0}})],V.prototype,"offsetFromStart",void 0),e([b("offsetFromStart",["offsetfromstart"])],V.prototype,"readOffsetFromStart",null),e([l()],V.prototype,"orientationAccuracy",void 0),e([b("orientationAccuracy",["accuracy","orientationaccuracy"])],V.prototype,"readOrientationAccuracy",null),e([j("orientationAccuracy")],V.prototype,"writeOrientationAccuracy",null),e([S(w)],V.prototype,"orientedImageryType",void 0),e([b("orientedImageryType",["orientedimagerytype","oitype","layer.orientedImageryType"])],V.prototype,"readOIType",null),e([l({type:Number,json:{write:!0,read:{source:"principalx"}}})],V.prototype,"principalX",void 0),e([l({type:Number,json:{write:!0,read:{source:"principaly"}}})],V.prototype,"principalY",void 0),e([l(H([0,0,0]))],V.prototype,"radial",null),e([l({json:{write:(e,t)=>{e&&e.forEach(e=>t[e.fieldName]=e.value)}}})],V.prototype,"sequenceOrder",void 0),e([l({type:Object})],V.prototype,"sourceMap",void 0),e([l(H([0,0]))],V.prototype,"tangential",null),e([l({type:Number,json:{write:!0}})],V.prototype,"verticalFieldOfView",void 0),e([b("verticalFieldOfView",["verticalfieldofview","vfov","layer.verticalFieldOfView"])],V.prototype,"readVFOV",null),V=e([c("esri.layers.orientedImagery.core.ExposurePoint")],V);const q=V;export{q as default};
|