Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

13 lines
5.2 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
define("exports ../../../Color ../../../core/colorUtils ../../../core/has ../../../core/handleUtils ../../../chunks/vec32 ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../geometry/projection/projectVectorToVector ../../../support/elevationInfoUtils ./visualElements/ExtendedLineVisualElement ./visualElements/ParallelLineVisualElement ./visualElements/PointVisualElement ./visualElements/RightAngleQuadVisualElement ../layers/interfaces ../webgl-engine/lib/Material ../../interactive/sketch/normalizedPoint ../../interactive/snapping/Settings ../../interactive/snapping/SnappingDomain ../../interactive/snapping/snappingUtils ../../interactive/snapping/SnappingVisualizer ../../interactive/snapping/hints/LineSnappingHint ../../interactive/support/viewUtils".split(" "),
function(y,z,D,P,p,E,F,G,t,A,H,B,I,w,l,u,k,J,x,K,C,L){function q(a){({effectiveTheme:a}=a.view);const b=z.toUnitRGBA(a.accentColor),c=[0,0,0,0];return{intersectionPointColor:c,intersectionPointOutlineColor:b,pointColor:c,pointOutlineColor:b,lineColor:b,lineOutlineColor:void 0,parallelSignColor:b,rightAngleColor:b,rightAngleColorDraped:z.toUnitRGBA(D.multiplyOpacity(a.accentColor,.5)),rightAngleOutlineColor:b}}function m(a,b,{selfSnappingZ:c,view:f,spatialReference:e}){return 0!==(b&J.SnappingDomain.SELF)&&
u.isTarget(a)&&null!=c?u.withSelfSnappingZ(a,c,f,e):a}function v(a){return a.isDraped?t.onTheGroundElevationInfo:t.absoluteHeightElevationInfo}function M(a,b,c,f,e,d,g,h=!1,r=!0,N=!0){b=n(b,f,e,d,h);c=n(c,f,e,d,h);d=new A.ExtendedLineVisualElement({view:d,extensionType:A.ExtensionType.FADED,start:b,end:c,isDraped:h,color:g.lineColor,renderOccluded:h?l.RenderOccludedFlag.OccludeAndTransparent:l.RenderOccludedFlag.Opaque,renderGroup:w.DrapedRenderGroup.SnappingHint,isDecoration:!0});switch(a){case x.LineSegmentHintType.TARGET:d.width=
k.defaults.lineHintWidthTarget;d.fadedExtensions={start:0,end:k.defaults.lineHintFadedExtensions};break;case x.LineSegmentHintType.REFERENCE_EXTENSION:d.width=k.defaults.lineHintWidthReference;d.fadedExtensions={start:0,end:0};break;case x.LineSegmentHintType.REFERENCE:d.width=k.defaults.lineHintWidthReference,d.fadedExtensions={start:r?k.defaults.lineHintFadedExtensions:0,end:N?k.defaults.lineHintFadedExtensions:0}}d.attached=!0;return d}function n(a,b,c,f,e){const d=F.create();e?G.projectVectorToVector(a,
b,d,f.basemapTerrain.overlayManager.renderer.spatialReference):L.vectorToRender(a,b,c,f,d);return d}class O extends K.SnappingVisualizer{sortUniqueHints(a){return a.sort((b,c)=>(c instanceof C.LineSnappingHint?c.length:0)-(b instanceof C.LineSnappingHint?b.length:0))}visualizeIntersectionPoint(a,b){const {spatialReference:c,view:f}=b;b=q(b);return p.destroyHandle(new B.PointVisualElement({view:f,primitive:"circle",geometry:u.toDehydratedPoint(a.intersectionPoint,c),elevationInfo:a.isDraped?t.onTheGroundElevationInfo:
t.absoluteHeightElevationInfo,size:20,outlineSize:2,color:b.intersectionPointColor,outlineColor:b.intersectionPointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,attached:!0}))}visualizePoint(a,b){const {view:c,spatialReference:f}=b,e=q(b);b=m(a.point,a.domain,b);return p.destroyHandle(new B.PointVisualElement({view:c,primitive:"circle",geometry:u.toDehydratedPoint(b,f),elevationInfo:v(a),size:20,outlineSize:2,color:e.pointColor,outlineColor:e.pointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,
attached:!0}))}visualizeLine(a,b){const {view:c,spatialReference:f}=b,e=q(b),d=m(a.lineStart,a.domain,b);b=m(a.lineEnd,a.domain,b);return p.destroyHandle(M(a.type,d,b,f,v(a),c,e,a.isDraped,a.fadeLeft,a.fadeRight))}visualizeParallelSign(a,b){const {view:c,spatialReference:f}=b;var e=q(b);const {isDraped:d}=a;var g=v(a),h=m(a.lineStart,a.domain,b);a=m(a.lineEnd,a.domain,b);h=n(h,f,g,c,d);g=n(a,f,g,c,d);g=E.lerp(g,h,g,.5);e=new H.ParallelLineVisualElement({view:c,attached:!1,offset:k.defaults.parallelLineHintOffset,
length:k.defaults.parallelLineHintLength,width:k.defaults.parallelLineHintWidth,color:e.parallelSignColor,location:g,renderOccluded:d?l.RenderOccludedFlag.OccludeAndTransparent:l.RenderOccludedFlag.Opaque,isDraped:d,renderGroup:w.DrapedRenderGroup.SnappingHint,isDecoration:!0});e.setDirectionFromPoints(h,g);e.attached=!0;return p.destroyHandle(e)}visualizeRightAngleQuad(a,b){const {view:c,spatialReference:f}=b,e=q(b);var d=v(a);const {isDraped:g}=a;var h=m(a.previousVertex,a.domain,b),r=m(a.centerVertex,
a.domain,b);a=m(a.nextVertex,a.domain,b);h=n(h,f,d,c,g);r=n(r,f,d,c,g);d=n(a,f,d,c,g);return p.destroyHandle(new I.RightAngleQuadVisualElement({view:c,attached:!0,color:g?e.rightAngleColorDraped:e.rightAngleColor,renderOccluded:g?l.RenderOccludedFlag.OccludeAndTransparent:l.RenderOccludedFlag.Transparent,outlineRenderOccluded:g?l.RenderOccludedFlag.OccludeAndTransparent:l.RenderOccludedFlag.Opaque,outlineColor:e.rightAngleOutlineColor,outlineSize:k.defaults.rightAngleHintOutlineSize,size:k.defaults.rightAngleHintSize,
isDraped:g,geometry:{previous:h,center:r,next:d},renderGroup:w.DrapedRenderGroup.SnappingHint,isDecoration:!0}))}}y.SnappingVisualizer3D=O;Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});