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.
8 lines
2.3 KiB
8 lines
2.3 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 ../../geometry ../../core/screenUtils ../../core/accessorSupport/PropertyOrigin ../../geometry/support/spatialReferenceUtils ./ControlPointsGeoreference ../../geometry/Extent ../../geometry/Point".split(" "),function(k,v,l,n,t,m,u,h){k.createDefaultControlPointsGeoreference=async function(a,b){a.loaded||await a.load();const {contentWidth:d,contentHeight:e}=a;({spatialReference:a}=b);var c=t.getInfo(a),f=!1;c&&b.width>c.valid[1]-c.valid[0]&&(b=new u({xmin:c.valid[0],ymin:b.ymin,xmax:c.valid[1], |
|
ymax:b.ymax,spatialReference:b.spatialReference}),f=!0);b=b.expand(.5);const {center:g,width:p,height:q}=b;c=f||d>e?p:d/e*q;b=f||d>e?e/d*p:q;f=g.x-c/2;c=g.x+c/2;const r=g.y+b/2;b=g.y-b/2;return new m({controlPoints:[{sourcePoint:{x:100,y:e-100},mapPoint:new h({x:f,y:b,spatialReference:a})},{sourcePoint:{x:100,y:100},mapPoint:new h({x:f,y:r,spatialReference:a})},{sourcePoint:{x:d-100,y:100},mapPoint:new h({x:c,y:r,spatialReference:a})},{sourcePoint:{x:d-100,y:e-100},mapPoint:new h({x:c,y:b,spatialReference:a})}], |
|
width:d,height:e})};k.createLocalModeControlPointsGeoreference=function(a){a=a.georeference;if("control-points"!==a.type)return null;const b={wkid:0},{width:d,height:e}=a;return new m({controlPoints:a.controlPoints.map(c=>{const {x:f,y:g}=c.sourcePoint;return{sourcePoint:{x:f,y:g},mapPoint:new h({x:f,y:e-g,spatialReference:b})}}),width:d,height:e})};k.isWritingLayerFromItemToWebDocument=function(a,b){b=n.nameToId(b);return"media"===a?.type&&!!a.portalItem&&null!=b&&b>n.OriginId.PORTAL_ITEM};k.toControlPointsGeoreference= |
|
function(a,b,d){if(!a||"control-points"===a.type)return a;({coords:a}=a);if(5!==a?.rings[0]?.length)return null;const [e,c,f,g]=a.rings[0];({spatialReference:a}=a);return new m({controlPoints:[{mapPoint:new h({x:e[0],y:e[1],spatialReference:a}),sourcePoint:l.createScreenPoint(0,d)},{mapPoint:new h({x:c[0],y:c[1],spatialReference:a}),sourcePoint:l.createScreenPoint(0,0)},{mapPoint:new h({x:f[0],y:f[1],spatialReference:a}),sourcePoint:l.createScreenPoint(b,0)},{mapPoint:new h({x:g[0],y:g[1],spatialReference:a}), |
|
sourcePoint:l.createScreenPoint(b,d)}],width:b,height:d})};Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}); |