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.
 
 

6 lines
1.4 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"],function(g){function q(a,b){return d(a,b[0],b[1])}function d(a,b,c,e){return b>=a.xmin&&b<=a.xmax&&c>=a.ymin&&c<=a.ymax?null!=e&&a.hasZ?e>=a.zmin&&e<=a.zmax:!0:!1}function r(a,b){return t(a.rings,b)}function t(a,b){if(!a)return!1;if(!Array.isArray(a[0][0]))return u(!1,a,b);let c=!1;for(let e=0,f=a.length;e<f;e++)c=u(c,a[e],b);return c}function u(a,b,c){const [e,f]=c;c=0;for(let h=0,k=b.length;h<k;h++){c++;c===k&&(c=0);const [l,m]=b[h],[v,n]=b[c];(m<f&&n>=f||n<f&&m>=f)&&l+(f-m)/
(n-m)*(v-l)<e&&(a=!a)}return a}const p=[0,0];g.extentContainsCoords2D=q;g.extentContainsCoords3D=function(a,b){return d(a,b[0],b[1],b[2])};g.extentContainsExtent=function(a,b){const {xmin:c,ymin:e,zmin:f,xmax:h,ymax:k,zmax:l}=b;return a.hasZ&&b.hasZ?d(a,c,e,f)&&d(a,c,k,f)&&d(a,h,k,f)&&d(a,h,e,f)&&d(a,c,e,l)&&d(a,c,k,l)&&d(a,h,k,l)&&d(a,h,e,l):d(a,c,e)&&d(a,c,k)&&d(a,h,k)&&d(a,h,e)};g.extentContainsMultipoint=function(a,b){if(!b.points||b.points.length)return!1;for(const c of b.points)if(!q(a,c))return!1;
return!0};g.extentContainsPoint=function(a,b){return null!=b?d(a,b.x,b.y,b.z):!1};g.extentContainsXYZ=d;g.polygonContainsCoords=r;g.polygonContainsPoint=function(a,b){p[1]=b.y;p[0]=b.x;return r(a,p)};g.ringsContainsCoords=t;Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});