22 lines
46 KiB
JavaScript
22 lines
46 KiB
JavaScript
/*!@license
|
|
* Infragistics.Web.ClientUI infragistics.dv_geo.js 19.1.20191.172
|
|
*
|
|
* Copyright (c) 2011-2019 Infragistics Inc.
|
|
*
|
|
* http://www.infragistics.com/
|
|
*
|
|
* Depends:
|
|
* jquery-1.4.4.js
|
|
* jquery.ui.core.js
|
|
* jquery.ui.widget.js
|
|
* infragistics.util.js
|
|
* infragistics.ext_core.js
|
|
* infragistics.ext_collections.js
|
|
* infragistics.ext_io.js
|
|
* infragistics.ext_text.js
|
|
* infragistics.ext_web.js
|
|
* infragistics.dv_core.js
|
|
* infragistics.ext_ui.js
|
|
*/
|
|
(function(factory){if(typeof define==="function"&&define.amd){define(["./infragistics.util","./infragistics.ext_core","./infragistics.ext_collections","./infragistics.ext_io","./infragistics.ext_text","./infragistics.ext_web","./infragistics.dv_core","./infragistics.ext_ui"],factory)}else{factory(igRoot)}})(function($){$.ig=$.ig||{};var $$t={};$.ig.globalDefs=$.ig.globalDefs||{};$.ig.globalDefs.$$z=$$t;$$0=$.ig.globalDefs.$$0;$$4=$.ig.globalDefs.$$4;$$7=$.ig.globalDefs.$$7;$$8=$.ig.globalDefs.$$8;$$b=$.ig.globalDefs.$$b;$$1=$.ig.globalDefs.$$1;$$w=$.ig.globalDefs.$$w;$$6=$.ig.globalDefs.$$6;$$a=$.ig.globalDefs.$$a;$.ig.$currDefinitions=$$t;$.ig.util.bulkDefine(["XamMultiScaleImageView:a","GetTileImageUriEventHandler:l","IMapRenderDeferralHandler:s","IEasingFunction:v","XamMultiScaleImage:w","DownloadingMultiScaleImageEventHandler:x","XamMultiScaleTileSource:z","TriangulationStatusEventHandler:ag"]);var $a=$.ig.intDivide,$b=$.ig.util.cast,$c=$.ig.util.defType,$d=$.ig.util.defEnum,$e=$.ig.util.getBoxIfEnum,$f=$.ig.util.getDefaultValue,$g=$.ig.util.getEnumValue,$h=$.ig.util.getValue,$i=$.ig.util.intSToU,$j=$.ig.util.nullableEquals,$k=$.ig.util.nullableIsNull,$l=$.ig.util.nullableNotEquals,$m=$.ig.util.toNullable,$n=$.ig.util.toString$1,$o=$.ig.util.u32BitwiseAnd,$p=$.ig.util.u32BitwiseOr,$q=$.ig.util.u32BitwiseXor,$r=$.ig.util.u32LS,$s=$.ig.util.unwrapNullable,$t=$.ig.util.wrapNullable,$u=String.fromCharCode,$v=$.ig.util.castObjTo$t,$w=$.ig.util.compareSimple,$x=$.ig.util.tryParseNumber,$y=$.ig.util.tryParseNumber1,$z=$.ig.util.numberToString,$0=$.ig.util.numberToString1,$1=$.ig.util.parseNumber,$2=$.ig.util.compare,$3=$.ig.util.replace,$4=$.ig.util.stringFormat,$5=$.ig.util.stringFormat1,$6=$.ig.util.stringFormat2,$7=$.ig.util.stringCompare1,$8=$.ig.util.stringCompare2,$9=$.ig.util.stringCompare3,$aa=$.ig.util.equalsSimple,$ab=$.ig.util.tryParseInt32_1,$ac=$.ig.util.tryParseInt32_2,$ad=$.ig.util.intToString1,$ae=$.ig.util.parseInt32_1,$af=$.ig.util.parseInt32_2;$d("XBaseDataType:d",false,false,{Character:0,Number:1,Logical:2,Date:3,Memo:4,FloatingPoint:5,Binary:6,General:7,Picture:8,Currency:9,DateTime:10,Integer:11,VariField:12,Variant:13,Timestamp:14,"Double:double1":15,AutoIncrement:16});$d("ShapeType:b",false,false,{None:0,Point:1,PolyLine:3,Polygon:5,PolyPoint:8,PointZ:11,PolyLineZ:13,PolygonZ:15,PolyPointZ:18,PointM:21,PolyLineM:23,PolygonM:25,PolyPointM:28,PolyPatch:31});$c("Triangle:aa","Object",{init:function(){$.ig.$op.init.call(this)},v1:0,v2:0,v3:0,$type:new $.ig.Type("Triangle",$.ig.$ot)},true);$c("HalfEdge:ab","Object",{init:function(a,b){$.ig.$op.init.call(this);this._a=a;this._b=b},_a:0,_b:0,$type:new $.ig.Type("HalfEdge",$.ig.$ot)},true);$c("HalfEdgeSet:ac","Object",{init:function(){$.ig.$op.init.call(this);this.b=new $$4.h($$t.$ab.$type,$.ig.$op.$type,2,new $$t.ad)},getEnumerator:function(){return this.b.keys().getEnumerator()},add:function(a){this.b.add(a,null)},remove:function(a){this.b.remove(a)},clear:function(){this.b.clear()},count:function(){return this.b.count()},contains:function(a){return this.b.containsKey(a)},b:null,$type:new $.ig.Type("HalfEdgeSet",$.ig.$ot,[$$0.$bw.$type.specialize($$t.$ab.$type)])},true);$c("EdgeComparer:ad","Object",{init:function(){$.ig.$op.init.call(this)},equalsC:function(a,b){return a._a==b._a&&a._b==b._b||a._a==b._b&&a._b==b._a},getHashCodeC:function(a){return 65536*Math.max(a._a,a._b)+Math.min(a._a,a._b)},$type:new $.ig.Type("EdgeComparer",$.ig.$ot,[$$0.$by.$type.specialize($$t.$ab.$type)])},true);$c("PointTester:ae","Object",{init:function(){$.ig.$op.init.call(this)},c:function(a,b,c,d,e,f,g,h){var i=Math.abs(d-f);var j=Math.abs(f-h);var k=0;var l=0;if(i==0&&j==0){return false}if(i==0&&j!=0){k=(e+c)/2;l=-(g-e)/(h-f)*(k-(e+g)/2)+(f+h)/2}if(i!=0&&j==0){k=(g+e)/2;l=-(e-c)/(f-d)*(k-(c+e)/2)+(d+f)/2}if(i!=0&&j!=0){var m=-(e-c)/(f-d);var n=-(g-e)/(h-f);var o=(c+e)/2;var p=(e+g)/2;var q=(d+f)/2;var r=(f+h)/2;k=(m*o-n*p+r-q)/(m-n);l=i>j?m*(k-o)+q:n*(k-p)+r}var s=e-k;var t=f-l;var u=s*s+t*t;s=a-k;t=b-l;var v=s*s+t*t;this.b=v<=u;this.a=k<a&&(a-k)*(a-k)>u;return true},a:false,b:false,$type:new $.ig.Type("PointTester",$.ig.$ot)},true);$c("PointComparer:af","Object",{init:function(){$.ig.$op.init.call(this)},equalsC:function(a,b){return a.__x==b.__x&&a.__y==b.__y},getHashCodeC:function(a){return a.__x^a.__y},$type:new $.ig.Type("PointComparer",$.ig.$ot,[$$0.$by.$type.specialize($$a.$y.$type)])},true);$c("TriangulationStatusEventArgs:ah","EventArgs",{_currentStatus:0,currentStatus:function(a){if(arguments.length===1){this._currentStatus=a;return a}else{return this._currentStatus}},init:function(a){$$0.$w.init.call(this);this.currentStatus(a)},$type:new $.ig.Type("TriangulationStatusEventArgs",$$0.$w.$type)},true);$c("Triangulator:ai","DependencyObject",{o:0,l:null,m:null,init:function(a,b,c){this.p=0;$$a.$r.init.call(this);this.o=a;this.l=b;this.m=c},y:function(){{this.v();if(this._k!=null){this._k.c=true}this.u()}},x:function(){{this.v();if(this._k!=null){this._k.c=false}this.u()}},v:function(){var a=this.o;var b=this.l;var c=this.m;var d=new $$4.x($$t.$aa.$type,0);var e=function(){var $ret=new $$4.x($$0.$aw.$type,0);$ret.capacity(a);return $ret}();var f=new $$4.q($$a.$y.$type,2,new $$t.af);for(var g=0;g<a;++g){var h=b.item(g),i=c.item(g);if($.ig.util.isNaN(h)||$.ig.util.isNaN(i)||Number.isInfinity(h)||Number.isInfinity(i)){continue}var j={__x:h,__y:i,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};if(f.contains(j)){continue}f.add(j);e.add(g)}a=e.count();if(a>=3){var k=function(l,m){if(b.item(l)<b.item(m)){return-1}else if(b.item(l)>b.item(m)){return 1}if(c.item(l)<c.item(m)){return-1}else if(c.item(l)>c.item(m)){return 1}return 0};e.sort2(k);var l=b.item(e.__inner[0]);var m=b.item(e.__inner[a-1]);var n=c.item(e.__inner[0]);var o=n;for(var p=1;p<a;p++){var q=c.item(e.__inner[p]);if($.ig.util.isNaN(q)){continue}n=Math.min(n,q);o=Math.max(o,q)}var r=m-l;var s=o-n;var t=Math.max(r,s);var u=(m+l)/2;var v=(o+n)/2;var w={__x:u-20*t,__y:v-t,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var x={__x:u,__y:v+20*t,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var y={__x:u+20*t,__y:v-t,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};var z=new $$4.v($$t.$aa.$type);var aa=new $$4.v($$t.$aa.$type);var ab=new $$t.ac;var ac=new $$t.ae;z.e(function(){var $ret=new $$t.aa;$ret.v1=a;$ret.v2=a+1;$ret.v3=a+2;return $ret}());var ad=new $$t.aj;ad.j=a;ad.n=w;ad.o=x;ad.p=y;ad.f=aa;ad.a=ab;ad.h=e;ad.b=ac;ad.i=d;ad.g=z;ad.d=b;ad.e=c;var ae=1;if(a>3e3){ae=20}ad.m=$.ig.truncate(Math.ceil(a/ae));ad.l=0;ad.k=ad.m;this.p=0;this.t();this._k=ad}},t:function(){this.s()},s:function(){if(this.triangulationStatusChanged!=null){this.triangulationStatusChanged(this,new $$t.ah(this.p))}},n:function(){if(this._k==null){return null}return this._k.i},_k:null,w:function(){{if(this._k==null){return}var a=this._k;var b=this._k.j;var c=this._k.d;var d=this._k.e;var e=this._k.h;var f=this._k.n;var g=this._k.o;var h=this._k.p;var i=this._k.i;var j=this._k.g;var k=this._k.f;var l=this._k.b;var m=this._k.a;var n=this._k.l;var o=this._k.k;var p;var q;var r;var s;var t;var u;var v;var w;var x;var y;var z;var aa;for(var ab=n;ab<o;++ab){m.clear();if(ab<b){p=c.item(e.__inner[ab]);q=d.item(e.__inner[ab])}else if(ab==b){p=f.__x;q=f.__y}else if(ab==b+1){p=g.__x;q=g.__y}else{p=h.__x;q=h.__y}var ac=null;for(var ad=j.c();ad!=null;ad=ac){ac=ad.a;aa=ad._c;r=aa.v1;u=aa.v2;x=aa.v3;if(r<b){s=c.item(e.__inner[r]);t=d.item(e.__inner[r])}else if(r==b){s=f.__x;t=f.__y}else if(r==b+1){s=g.__x;t=g.__y}else{s=h.__x;t=h.__y}if(u<b){v=c.item(e.__inner[u]);w=d.item(e.__inner[u])}else if(u==b){v=f.__x;w=f.__y}else if(u==b+1){v=g.__x;w=g.__y}else{v=h.__x;w=h.__y}if(x<b){y=c.item(e.__inner[x]);z=d.item(e.__inner[x])}else if(x==b){y=f.__x;z=f.__y}else if(x==b+1){y=g.__x;z=g.__y}else{y=h.__x;z=h.__y}l.c(p,q,s,t,v,w,y,z);if(l.a){k.f(aa);j.h(ad)}if(l.b){var ae;ae=new $$t.ab(r,u);if(m.contains(ae)){m.remove(ae)}else{m.add(ae)}ae=new $$t.ab(u,x);if(m.contains(ae)){m.remove(ae)}else{m.add(ae)}ae=new $$t.ab(x,r);if(m.contains(ae)){m.remove(ae)}else{m.add(ae)}j.h(ad)}}var ag=m.getEnumerator();while(ag.moveNext()){var af=ag.current();var ah=new $$t.aa;ah.v1=af._a;ah.v2=af._b;ah.v3=ab;j.f(ah)}}if(o==b){for(var ai=k.c();ai!=null;ai=ai.a){aa=ai._c;if(aa.v1<b&&aa.v2<b&&aa.v3<b){i.add(function(){var $ret=new $$t.aa;$ret.v1=e.__inner[aa.v1];$ret.v2=e.__inner[aa.v2];$ret.v3=e.__inner[aa.v3];return $ret}())}}for(var aj=j.c();aj!=null;aj=aj.a){aa=aj._c;if(aa.v1<b&&aa.v2<b&&aa.v3<b){i.add(function(){var $ret=new $$t.aa;$ret.v1=e.__inner[aa.v1];$ret.v2=e.__inner[aa.v2];$ret.v3=e.__inner[aa.v3];return $ret}())}}this.p=100;this.t()}else{n=o;o+=a.m;if(o>b){o=b}a.l=n;a.k=o;this.p+=$.ig.truncate(Math.floor(100/20));this.t();this.u()}}},r:function(){{this._k=null}},u:function(){{if(this._k!=null&&this._k.c){window.setTimeout(this.w.runOn(this),0)}else{this.w()}}},p:0,q:function(){return this.p},triangulationStatusChanged:null,$type:new $.ig.Type("Triangulator",$$a.$r.$type)},true);$c("TriangulatorContext:aj","Object",{init:function(){$.ig.$op.init.call(this)},j:0,d:null,e:null,i:null,n:null,o:null,p:null,g:null,f:null,h:null,a:null,b:null,m:0,l:0,k:0,c:false,$type:new $.ig.Type("TriangulatorContext",$.ig.$ot)},true);$c("TriangulationSource:ak","Object",{init:function(){$.ig.$op.init.call(this)},create:function(a,b,c){var d=new $$t.ak;var e=new Array(a);var f;var g;var h=new Array(a);var i=new Array(a);var j=0;var k=0;for(var l=0;l<a;l++){f=new $$t.al;g=b(l);j=g.__x;k=g.__y;f.pointX=j;f.pointY=k;f.value=c(l);e[l]=f;h[l]=j;i[l]=k}d.points(e);var m=new $$t.ai(a,h,i);m.x();d.triangles(m.n());return d},loadItf:function(a){a.readBytes(5);var b=a.readInt32();var c=a.readInt32();var d=a.readInt32();var e=a.readInt32();a.readBytes(e);var f=new $$t.ak;var g=new Array(b);var h;for(var i=0;i<b;i++){h=new $$t.al;h.pointX=a.readDouble();h.pointY=a.readDouble();h.value=a.readSingle();g[i]=h}f.points(g);var j=new Array(c);var k;for(var l=0;l<c;l++){k=new $$t.aa;k.v1=a.readInt32();k.v2=a.readInt32();k.v3=a.readInt32();j[l]=k}f.triangles(j);return f},_points:null,points:function(a){if(arguments.length===1){this._points=a;return a}else{return this._points}},_triangles:null,triangles:function(a){if(arguments.length===1){this._triangles=a;return a}else{return this._triangles}},$type:new $.ig.Type("TriangulationSource",$.ig.$ot)},true);$c("TriangulationSourcePointRecord:al","Object",{init:function(){$.ig.$op.init.call(this)},pointX:0,pointY:0,value:0,$type:new $.ig.Type("TriangulationSourcePointRecord",$.ig.$ot)},true);$c("XamMultiScaleImageView:a","Object",{_b:null,init:function(a){var $self=this;this.g=new $$4.h($.ig.$op.$type,$$4.$x.$type.specialize($$0.$c.$type),0);this.j=new $$4.x($$t.$r.$type,0);this.i=new $$4.x($$t.$r.$type,0);this.p=-1;this.o=-1;this.au=$$a.$ae.empty();$.ig.$op.init.call(this);this._b=a;this._b.tileScheduler().l(this);this._h=new $$4.x($$a.$al.$type,0);this._b.ao=function(){var $ret=new $.ig.StackPool$1($$a.$al.$type);$ret._j=$self.at.runOn($self);$ret._b=$self.y.runOn($self);$ret._c=$self.aa.runOn($self);$ret._d=$self.z.runOn($self);return $ret}();for(var b=0;b<4;++b){this.i.add(null)}},_h:null,at:function(){return new $$a.al},y:function(a){this._h.add(a)},aa:function(a){this._h.remove(a)},z:function(a){},ao:function(a,b,c){a._n=b;a._o=c},r:function(a){for(var b=0;b<this.i.count();++b){if(a==this.i.__inner[b]){if(a.f!=null&&a.f._ac!=null){var c=a.f._ac;var d=c._c;if(this.g.containsKey(d)){var e=this.g.item(d);for(var f=0;f<e.count();f++){e.__inner[f]()}e.clear();this.g.remove(d)}}this.i.__inner[b]=null;this.q();return}}for(var g=0;g<this.j.count();++g){if(this.j.__inner[g]==a){this.j.removeAt(g);break}}},u:function(a){this.j.add(a);this.j.sort2(function(b,c){var d=0;var e=0;if(b.e!=null){d=b.e._ac._b}if(c.e!=null){e=c.e._ac._b}if(d<e){return-1}else if(d>e){return 1}return 0});this.q()},g:null,q:function(){var $self=this;var index_=-1;if(this.j.count()>0){for(var a=0;a<this.i.count();++a){if(this.i.__inner[a]==null){index_=a;break}}}if(index_>=0){this.i.__inner[index_]=this.j.__inner[0];var b=new $$t.q(this._b.source()._m,this._b.source()._k);this.i.__inner[index_].f._ac=b;var ele_=this._l.createElement("img");var c=ele_.getNativeElement();b._c=c;var self_=this;var d=new $$4.x($$0.$c.$type,0);this.g.add(c,d);d.add(ele_.listen("load",function(e){$self.ab(e,index_)}));d.add(ele_.listen("readystatechange",function(e){$self.ab(e,index_)}));d.add(ele_.listen("error",function(e){$self.ac(e,index_)}));this.j.removeAt(0);var e=this._b.source().r(this.i.__inner[index_].d+8,this.i.__inner[index_].b,this.i.__inner[index_].c);var f=e.value();var g=function(){var $ret=new $$t.y;$ret.uri(f);$ret.image(c);return $ret}();this._b.bk(g);f=g.uri();if(f!=null){c.src=f}}},ab:function(a,b){var e_=a.originalEvent;var img_=e_.target;var c=img_.complete||img_.readyState=="complete"&&e_.type=="readystatechange";if(c){this.downloadCompleted(a,b)}},ac:function(a,b){this.downloadError(a,b)},j:null,i:null,downloadError:function(a,b){var c=this.i.__inner[b];this.i.__inner[b]=null;if(c!=null&&c.f!=null&&c.f._ac!=null){var e_=a.originalEvent;var d=e_.target;if(this.g.containsKey(d)){var e=this.g.item(d);for(var f=0;f<e.count();f++){e.__inner[f]()}e.clear();this.g.remove(d)}}this.q();this.makeDirty()},downloadCompleted:function(a,b){var c=this.i.__inner[b];var d=true;if(c!=null&&c.f!=null&&c.f._ac!=null){d=false;var ele_=c.f._ac._c;if(!ele_.complete){d=true}if(ele_.width==0&&ele_.height==0){d=true}}this.i.__inner[b]=null;if(d){this.q();this.makeDirty();return}var e_=a.originalEvent;var e=e_.target;if(this.g.containsKey(e)){var f=this.g.item(e);for(var g=0;g<f.count();g++){f.__inner[g]()}f.clear();this.g.remove(e)}this._b.be(c,c.f._ac);if(c.f!=null){this._b.bz(c)}this.q();this.makeDirty()},a:function(a,b,c,d){var e=new $$t.q(a,a);e._c=b._c;if(!b._d.isEmpty()){c+=$.ig.truncate(Math.round(b._d.left()));d+=$.ig.truncate(Math.round(b._d.top()))}e._d=new $$a.ae(0,c,d,a,a);return e},am:function(a){a._s=0},an:function(a){a._s=1},f:function(){return true},s:function(a){if(this._b.deferralHandler()!=null){this._b.deferralHandler().deferredRefresh()}else{if(this._k!=null){this._k.setTimeout(a,0)}else{window.setTimeout(a,0)}}},p:0,o:0,aq:function(){if(this.p==-1){this.p=window.setInterval(this._b.by.runOn(this._b),50)}},as:function(){if(this.p!=-1){window.clearInterval(this.p);this.p=-1}},ap:function(){if(this.o==-1){this.o=window.setInterval(this._b.bh.runOn(this._b),50)}},ar:function(){if(this.o!=-1){window.clearInterval(this.o);this.o=-1}},t:function(){if(this.p!=-1){this.ar();this._b.bn()}},_k:null,_m:null,_c:null,ae:function(a){this._k=a;this._k.rootWrapper().setStyleProperty("position","relative");this._m=this._k.createElement("canvas");this._m.setStyleProperty("position","absolute");this._m.setStyleProperty("top","0px");this._m.setStyleProperty("left","0px");this._k.append(this._m);this._c=new $.ig.RenderingContext(new $.ig.CanvasViewRenderer,this._k.get2DCanvasContext(this._m));this.af(this._k.rootWrapper().width(),this._k.rootWrapper().height())},af:function(a,b){this._m.setAttribute("width",$.ig.truncate(a*this._b.a1()).toString());this._m.setAttribute("height",$.ig.truncate(b*this._b.a1()).toString());this._m.setStyleProperty("width",a.toString()+"px");this._m.setStyleProperty("height",b.toString()+"px");this._b._b9=new $$a.ae(0,0,0,a,b);this._b.bu()},aj:function(){this.makeDirty()},index:function(){return 0},postRender:function(){},_isDirty:false,isDirty:function(a){if(arguments.length===1){this._isDirty=a;return a}else{return this._isDirty}},makeDirty:function(){if(this._c==null){return}if(!this.isDirty()){this.isDirty(true);this._b.tileScheduler().n()}},undirty:function(a){this.isDirty(false);this.ak()},au:null,ak:function(){if(this._c==null){return}if(this._c.d()&&this._b.a1()!=1){this._c.z();this._c.aa(this._b.a1(),this._b.a1())}if(!this.au.isEmpty()){this._c.k(this.au.left(),this.au.top(),this.au.width(),this.au.height())}this.au=this._b._b9;for(var a=0;a<this._h.count();a++){var b=this._h.__inner[a];if(b._s==0){this.al(b)}}for(var c=0;c<this._h.count();c++){var d=this._h.__inner[c];if(d._s==1){this.al(d)}}if(this._c.d()&&this._b.a1()!=1){this._c.y()}this._b.bj();this._b.bl()},d:function(){var a=true;for(var b=0;b<this.i.count();b++){if(this.i.__inner[b]!=null){a=false}}return a},al:function(a){if(this._c==null){return}var b=a._ac;var c=a.__opacity;if(b==null||b._c==null){return}if(this.e(b._c)){return}if(!b._d.isEmpty()){if(b._d.width()<1||b._d.height()<1){return}this._c.n(b._c,c,b._d.left(),b._d.top(),b._d.width(),b._d.height(),Math.round(a._n+this._b._b9.left()),Math.round(a._o+this._b._b9.top()),a.width(),a.height())}else{this._c.m(b._c,c,Math.round(a._n+this._b._b9.left()),Math.round(a._o+this._b._b9.top()),a.width(),a.height())}},e:function(a){var img_=a;if(!img_.complete){return true}if(img_.width==0&&img_.height==0){return true}return false},x:function(){this.makeDirty()},ag:function(a){this._c=a;this.makeDirty()},_l:null,ah:function(a){this._l=a},ai:function(a){this._b._b9=a;this._b.bu()},preRender:function(){},isValid:function(){return true},$type:new $.ig.Type("XamMultiScaleImageView",$.ig.$ot,[$.ig.ISchedulableRender.prototype.$type])},true);$c("XBaseField:c","Object",{init:function(){$.ig.$op.init.call(this)},c:null,a:0,b:0,$type:new $.ig.Type("XBaseField",$.ig.$ot)},true);$c("ShapefileRecord:f","DependencyObject",{init:function(){$$a.$r.init.call(this);this.fieldsNames(new $$4.x(String,0));this.fieldsTypes(new $$4.x(String,0))},_shapeType:0,shapeType:function(a){if(arguments.length===1){this._shapeType=a;return a}else{return this._shapeType}},_fieldsNames:null,fieldsNames:function(a){if(arguments.length===1){this._fieldsNames=a;return a}else{return this._fieldsNames}},_fieldsTypes:null,fieldsTypes:function(a){if(arguments.length===1){this._fieldsTypes=a;return a}else{return this._fieldsTypes}},fields:null,points:null,o:function(a){if(this.propertyChanged!=null){this.propertyChanged(this,new $$0.b7(a))}},propertyChanged:null,$type:new $.ig.Type("ShapefileRecord",$$a.$r.$type,[$$0.$b6.$type])},true);$c("ShapefileConverter:e","DependencyObjectNotifier",{init:function(){var $self=this;$.ig.DependencyObjectNotifier.prototype.init.call(this);this.records(new $$4.f($$t.$f.$type,0));var a=this.records();a.collectionChanged=$.ig.Delegate.prototype.combine(a.collectionChanged,function(a,b){if($self.collectionChanged!=null){$self.collectionChanged($self,b)}})},worldRect:function(a){if(arguments.length===1){if($$a.$ae.l_op_Inequality(this.aa,a)){var b=this.aa;this.aa=a;this.x("WorldRect",b,this.aa)}return a}else{return this.aa}},aa:null,shapeType:function(){return this.shapeHeader()._a},_shapeHeader:null,shapeHeader:function(a){if(arguments.length===1){this._shapeHeader=a;return a}else{return this._shapeHeader}},shapefileSource:function(a){if(arguments.length===1){this.h($$t.$e.shapefileSourceProperty,a);return a}else{return $b($$6.$x.$type,this.c($$t.$e.shapefileSourceProperty))}},databaseSource:function(a){if(arguments.length===1){this.h($$t.$e.databaseSourceProperty,a);return a}else{return $b($$6.$x.$type,this.c($$t.$e.databaseSourceProperty))}},x:function(a,b,c){switch(a){case"ShapefileSource":case"DatabaseSource":if(this.shapefileSource()!=null&&this.databaseSource()!=null){this.u()}break}this.j(a)},importCompleted:null,v:function(a){if(this.importCompleted!=null){this.importCompleted(this,a)}},u:function(){var $self=this;var a=null;var b=null;var c=function(){if(a!=null&&b!=null){$self.w(a,b);$self.v(new $$6.ae(null,false,null))}};$$b.$b.a(this.shapefileSource().value(),function(d){a=new $$7.c(0,d,false);c()},function(d){throw new $$0.n(1,"shape file download error: "+d)});$$b.$b.a(this.databaseSource().value(),function(d){b=new $$7.c(0,d,false);c()},function(d){throw new $$0.n(1,"dbf file download error: "+d)})},w:function(a,b){this.shapeHeader($$t.$h.a(a,b));this.worldRect(this.shapeHeader()._e);var c=a.currentPosition();var d=a.length();while(c<d){var e=$$t.$h.e(this.shapeHeader(),a,b);var record_=e;this.records().add(e);c=a.currentPosition();d=a.length()}},m:null,records:function(a){if(arguments.length===1){this.m=a;return a}else{return this.m}},collectionChanged:null,indexOf:function(a){return this.m.indexOf(a)},insert:function(a,b){this.m.insert(a,b)},removeAt:function(a){this.m.removeAt(a)},item:function(a,b){if(arguments.length===2){this.m.item(a,b);return b}else{return this.m.__inner[a]}},add:function(a){this.m.add(a)},clear:function(){this.m.clear()},contains:function(a){return this.m.contains(a)},copyTo:function(a,b){this.m.copyTo(a,b)},count:function(){return this.m.count()},isReadOnly:function(){return this.m.isReadOnly()},remove:function(a){return this.m.remove(a)},getEnumerator:function(){return this.m.getEnumerator()},getEnumerator:function(){return this.m.getEnumerator()},$type:new $.ig.Type("ShapefileConverter",$.ig.DependencyObjectNotifier.prototype.$type,[$$0.$bz.$type.specialize($$t.$f.$type),$$4.$ac.$type])},true);$c("Header:g","Object",{init:function(){this.b=new $$4.x($$t.$c.$type,0);$.ig.$op.init.call(this)},_a:0,_e:null,d:function(){return{__x:this._e.left(),__y:this._e.top(),$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}},c:function(){return{__x:this._e.right(),__y:this._e.bottom(),$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}},b:null,$type:new $.ig.Type("Header",$.ig.$ot)},true);$c("ShapeFileUtil:h","Object",{init:function(){$.ig.$op.init.call(this)},a:function(a,b){if($$t.$h.j==null){$$t.$h.m()}var c=new $$t.g;var d=$$t.$h.k(a.readInt32());if(d!=9994){throw new $$0.n(1,"Corrupt Shp file - incorrect file code")}a.readInt32();a.readInt32();a.readInt32();a.readInt32();a.readInt32();$$t.$h.k(a.readInt32());a.readInt32();c._a=a.readInt32();var e=new $$a.y(0);var f=new $$a.y(0);e.__x=a.readDouble();e.__y=a.readDouble();f.__x=a.readDouble();f.__y=a.readDouble();a.readDouble();a.readDouble();a.readDouble();a.readDouble();c._e=new $$a.ae(0,e.__x,e.__y,f.__x-e.__x,f.__y-e.__y);if(b!=null){var g=b.readByte();if(g!=3){throw new $$0.n(1,"Corrupt Dbf file - wrong version number")}b.readByte();b.readByte();b.readByte();b.readUInt32();b.readUInt16();var h=b.readUInt16();b.readBytes(2);b.readBytes(1);b.readBytes(1);b.readBytes(4);b.readBytes(8);b.readBytes(1);b.readBytes(1);b.readBytes(2);var i=0;while(i<h-1){var j=new $$t.c;j.c=$3($$8.$a.uTF8().getString1(b.readBytes(11),0,10),"\0","");var k=$$8.$a.uTF8().getString1(b.readBytes(1),0,1).charAt(0);j.a=$$t.$h.j.item(k);b.readBytes(4);j.b=b.readByte();b.readBytes(15);c.b.add(j);i+=j.b}if(b.readByte()!=13){throw new $$0.n(1,"Corrupt Dbf file - Missing field descriptor array terminator")}}return c},e:function(a,b,c){var d=$$t.$h.k(b.readInt32());var e=$$t.$h.k(b.readInt32());var f=b.readInt32();var g=null;switch(f){case 0:break;case 1:g=$$t.$h.i(b);break;case 3:g=$$t.$h.b(b);break;case 5:g=$$t.$h.f(b);break;case 8:break;case 11:break;case 13:g=$$t.$h.d(b);break;case 15:g=$$t.$h.h(b);break;case 18:break;case 21:break;case 23:break;case 25:break;case 28:break;case 31:break;default:break}if(g==null){throw new $$0.n(1,"Corrupt Shp file - failed to read "+$$t.$b.$getName(f))}g.shapeType(f);if(c!=null){c.readBytes(1);g.fields=new $$4.h(String,$.ig.$op.$type,0);var i=a.b.getEnumerator();while(i.moveNext()){var h=i.current();g.fieldsNames().add(h.c);var j=c.readBytes(h.b);var k=$$8.$a.uTF8().getString1(j,0,h.b);switch(h.a){case 1:g.fieldsTypes().add("double");var l=parseFloat(k);if(!$.ig.util.isNaN(l)){g.fields.add(h.c,l);$$t.$h.l(g,h.c,l)}break;case 5:g.fieldsTypes().add("float");var m=parseFloat(k);if(!$.ig.util.isNaN(m)){g.fields.add(h.c,m);$$t.$h.l(g,h.c,m)}break;case 0:g.fieldsTypes().add("string");var n=k.trim();g.fields.add(h.c,n);$$t.$h.l(g,h.c,n);break;case 3:g.fieldsTypes().add("date");var str_=k;var o=Date.parse(str_);g.fields.add(h.c,o);$$t.$h.l(g,h.c,o);break;default:throw new $$0.n(1,"Unrecognized field type: "+$$t.$d.getBox(h.a))}}}return g},l:function(row_,property_,val_){if(!row_.fieldValues){row_.fieldValues={}}row_.fieldValues[property_]=val_},k:function(a){return(a&255)<<24|(a&65280)<<8|(a&16711680)>>8|$o(a,4278190080)>>24},i:function(a){var b=function(){var $ret=new $$a.y(0);$ret.x(a.readDouble());$ret.y(a.readDouble());return $ret}();return function(){var $ret=new $$t.f;$ret.points=new $$4.x($$4.$x.$type.specialize($$a.$y.$type),1,[new $$4.x($$a.$y.$type,1,[b])]);return $ret}()},d:function(a){var b,c;var d=function(){var e=$$t.$h.c(a,b,c);b=e.p1;c=e.p2;return e.ret}();a.readDouble();a.readDouble();for(var e=0;e<c;e++){a.readDouble()}a.readDouble();a.readDouble();for(var f=0;f<c;f++){a.readDouble()}return d},c:function(a,b,c){var d=new $$a.y(0);var e=function(){var $ret=new $$a.y(0);$ret.x(a.readDouble());$ret.y(a.readDouble());return $ret}();var f=function(){var $ret=new $$a.y(0);$ret.x(a.readDouble());$ret.y(a.readDouble());return $ret}();var g=new $$a.ae(0,e.__x,e.__y,f.__x-e.__x,f.__y-e.__y);b=a.readInt32();c=a.readInt32();var h=new Array(b);for(var i=0;i<b;++i){h[i]=a.readInt32()}var j=new $$4.x($$4.$x.$type.specialize($$a.$y.$type),0);for(var k=0;k<b;++k){var l=(k<b-1?h[k+1]:c)-h[k];var m=new $$4.x($$a.$y.$type,2,l-1);for(var n=0;n<l;++n){d=new $$a.y(0);d.__x=a.readDouble();d.__y=a.readDouble();m.add(d)}if(m.count()>0){j.add(m)}}return{ret:function(){var $ret=new $$t.f;$ret.points=j;return $ret}(),p1:b,p2:c}},b:function(a){var b,c;return function(){var d=$$t.$h.c(a,b,c);b=d.p1;c=d.p2;return d.ret}()},h:function(a){var b,c;var d=function(){var e=$$t.$h.g(a,b,c);b=e.p1;c=e.p2;return e.ret}();a.readDouble();a.readDouble();for(var e=0;e<c;e++){a.readDouble()}a.readDouble();a.readDouble();for(var f=0;f<c;f++){a.readDouble()}return d},f:function(a){var b,c;return function(){var d=$$t.$h.g(a,b,c);b=d.p1;c=d.p2;return d.ret}()},g:function(a,b,c){var d=function(){var $ret=new $$a.y(0);$ret.x(a.readDouble());$ret.y(a.readDouble());return $ret}();var e=function(){var $ret=new $$a.y(0);$ret.x(a.readDouble());$ret.y(a.readDouble());return $ret}();var f=new $$a.ae(0,d.__x,d.__y,e.__x-d.__x,e.__y-d.__y);var g=new $$a.y(0);b=a.readInt32();c=a.readInt32();var h=new Array(b);for(var i=0;i<b;++i){h[i]=a.readInt32()}var j=new $$4.x($$4.$x.$type.specialize($$a.$y.$type),0);for(var k=0;k<b;++k){var l=(k<b-1?h[k+1]:c)-h[k];var m=new $$4.x($$a.$y.$type,2,l);g=new $$a.y(0);g.__x=a.readDouble();g.__y=a.readDouble();for(var n=1;n<l;++n){g=new $$a.y(0);g.__x=a.readDouble();g.__y=a.readDouble();m.add(g)}if(m.count()>1){j.add(m)}}return{ret:function(){var $ret=new $$t.f;$ret.points=j;return $ret}(),p1:b,p2:c}},m:function(){$$t.$h.j=new $$4.h($$0.$as.$type,$$t.$d.$type,0);$$t.$h.j.item("C",0);$$t.$h.j.item("N",1);$$t.$h.j.item("L",2);$$t.$h.j.item("D",3);$$t.$h.j.item("M",4);$$t.$h.j.item("F",5);$$t.$h.j.item("B",6);$$t.$h.j.item("G",7);$$t.$h.j.item("P",8);$$t.$h.j.item("Y",9);$$t.$h.j.item("T",10);$$t.$h.j.item("I",11);$$t.$h.j.item("V",12);$$t.$h.j.item("X",13);$$t.$h.j.item("@",14);$$t.$h.j.item("O",15);$$t.$h.j.item("+",16)},staticInit:function(){$$t.$h.m()},$type:new $.ig.Type("ShapeFileUtil",$.ig.$ot)},true);$c("XamMultiScaleTileSource:z","DependencyObject",{init:function(a,b,c,d,e){$$a.$r.init.call(this);this.o=a;this.n=b;this._m=c;this._k=d;this._l=e},o:0,q:function(a){if(arguments.length===1){this.o=a;this.t(0,0,0,0);return a}else{return this.o}},n:0,p:function(a){if(arguments.length===1){this.n=a;this.t(0,0,0,0);return a}else{return this.n}},_m:0,_k:0,_l:0,j:null,r:function(a,b,c){var d=new $$4.x($.ig.$op.$type,0);this.s(a,b,c,d);var e=null;if(d.count()>0){e=$b($$6.$x.$type,d.__inner[0])}return e},s:function(a,b,c,d){},t:function(a,b,c,d){if(this.j!=null){this.j.invalidateTileLayer(a,b,c,d)}},$type:new $.ig.Type("XamMultiScaleTileSource",$$a.$r.$type)},true);$c("MapTileSource:n","XamMultiScaleTileSource",{init:function(a,b,c,d,e){$$t.$z.init.call(this,a,b,c,d,e)},$type:new $.ig.Type("MapTileSource",$$t.$z.$type)},true);$c("ArcGISOnlineTileSource:i","MapTileSource",{init:function(){$$t.$n.init.call(this,2097152,2097152,256,256,0)},mapServerUri:function(a){if(arguments.length===1){this.h($$t.$i.mapServerUriProperty,a);return a}else{return this.c($$t.$i.mapServerUriProperty)}},isMapPublic:function(a){if(arguments.length===1){this.h($$t.$i.isMapPublicProperty,a);return a}else{return this.c($$t.$i.isMapPublicProperty)}},levelOfDetail:function(a){if(arguments.length===1){this.h($$t.$i.levelOfDetailProperty,a);return a}else{return $h(this.c($$t.$i.levelOfDetailProperty))}},userToken:function(a){if(arguments.length===1){this.h($$t.$i.userTokenProperty,a);return a}else{return this.c($$t.$i.userTokenProperty)}},s:function(a,b,c,d){var e=this.mapServerUri()+"/tile/{0}/{1}/{2}";var f="";if(String.isNullOrEmpty(this.mapServerUri())||this.levelOfDetail()<1||!$$6.$x.isWellFormedUriString(this.mapServerUri(),1)){return}if(!this.isMapPublic()){if(!String.isNullOrEmpty(this.userToken())){e+="?token={3}";f=this.userToken().trim()}else{return}}var g=a-8;if(g>0){var h=$5(e,[g,c,b,f]);d.add(new $$6.x(0,h))}},y:function(a,b){var c=a;if(b.f()==$$t.$i.mapServerUriProperty){c.mapServerUri($b(String,b.newValue()));c.t(0,0,0,0)}if(b.f()==$$t.$i.userTokenProperty){c.userToken($b(String,b.newValue()));c.t(0,0,0,0)}if(b.f()==$$t.$i.levelOfDetailProperty){c.q($.ig.truncate(Math.pow(2,c.levelOfDetail()-1)*256));c.p($.ig.truncate(Math.pow(2,c.levelOfDetail()-1)*256))}if(b.f()==$$t.$i.isMapPublicProperty){c.t(0,0,0,0)}},$type:new $.ig.Type("ArcGISOnlineTileSource",$$t.$n.$type)},true);$c("BingMapsTileSource:j","MapTileSource",{init:function(a){if(a>0){switch(a){case 1:this.init1.apply(this,arguments);break}return}$$t.$n.init.call(this,256<<22,256<<22,256,256,0)},init1:function(a,b,c){$$t.$j.init.call(this,0);this.tilePath(b);this.subDomains(c)},tilePath:function(a){if(arguments.length===1){this.h($$t.$j.tilePathProperty,a);return a}else{return this.c($$t.$j.tilePathProperty)}},subDomains:function(a){if(arguments.length===1){this.h($$t.$j.subDomainsProperty,a);return a}else{return this.c($$t.$j.subDomainsProperty)}},ab:function(a,b){this.t(0,0,0,0)},w:null,cultureName:function(a){if(arguments.length===1){this.h($$t.$j.cultureNameProperty,a);return a}else{return this.c($$t.$j.cultureNameProperty)}},s:function(a,b,c,d){if(!this.u()){d.clear();return}if(String.isNullOrEmpty(this.tilePath())){return}a-=8;if(a>0){var e=this.y(a,b,c);var f=this.tilePath();f=$3(f,"{culture}",this.w);f=$3(f,"{quadkey}",e);var g=$$0.$aw.parseInt(e.substr(e.length-1,1));f=$3(f,"{subdomain}",this.subDomains().__inner[g]);f=$3(f,"&token={token}","");d.add(new $$6.x(0,f))}},u:function(){var a=true;return a},y:function(a,b,c){var d=new $$6.aj(0);for(var e=a;e>0;--e){var f="0";var g=1<<e-1;if((b&g)!=0){(function(){var $value=f;f=$u($value.charCodeAt(0)+1);return $value})()}if((c&g)!=0){(function(){var $value=f;f=$u($value.charCodeAt(0)+1);return $value})();(function(){var $value=f;f=$u($value.charCodeAt(0)+1);return $value})()}d.h(f)}return d.toString()},aa:function(a,b){var c=a;if(b.f()==$$t.$j.subDomainsProperty||b.f()==$$t.$j.tilePathProperty||b.f()==$$t.$j.cultureNameProperty){if(b.f()==$$t.$j.subDomainsProperty){var d=$b($$4.$f.$type.specialize(String),b.oldValue());var e=$b($$4.$f.$type.specialize(String),b.newValue());if(d!=null){d.collectionChanged=$.ig.Delegate.prototype.remove(d.collectionChanged,c.ab.runOn(c))}if(e!=null){e.collectionChanged=$.ig.Delegate.prototype.combine(e.collectionChanged,c.ab.runOn(c))}}if(b.f()==$$t.$j.cultureNameProperty){c.w=b.newValue()}c.t(0,0,0,0)}},$type:new $.ig.Type("BingMapsTileSource",$$t.$n.$type)},true);$c("GetTileImageUriArgs:k","EventArgs",{init:function(a,b,c){$$0.$w.init.call(this);this.tileLevel(a);this.tilePositionX(b);this.tilePositionY(c)},_tileLevel:0,
|
|
tileLevel:function(a){if(arguments.length===1){this._tileLevel=a;return a}else{return this._tileLevel}},_tilePositionX:0,tilePositionX:function(a){if(arguments.length===1){this._tilePositionX=a;return a}else{return this._tilePositionX}},_tilePositionY:0,tilePositionY:function(a){if(arguments.length===1){this._tilePositionY=a;return a}else{return this._tilePositionY}},_tileImageUri:null,tileImageUri:function(a){if(arguments.length===1){this._tileImageUri=a;return a}else{return this._tileImageUri}},$type:new $.ig.Type("GetTileImageUriArgs",$$0.$w.$type)},true);$c("CustomMapTileSource:m","MapTileSource",{init:function(a,b,c,d,e){$$t.$n.init.call(this,a,b,c,d,e)},s:function(a,b,c,d){var e=new $$t.k(a,b,c);this.v(e);if(e.tileImageUri()!=null){d.add(e.tileImageUri())}},v:function(a){if(this.getTileImageUri!=null){this.getTileImageUri(this,a)}},getTileImageUri:null,$type:new $.ig.Type("CustomMapTileSource",$$t.$n.$type)},true);$c("OpenStreetMapTileSource:o","MapTileSource",{u:null,init:function(){this.u="tile.openstreetmap.org/{Z}/{X}/{Y}.png";$$t.$n.init.call(this,134217728,134217728,256,256,0);this.setTilePathUrl(this.u)},s:function(a,b,c,d){var e=a-8;if(e>0){var f=this.u;f=$3(f,"{Z}",e.toString());f=$3(f,"{X}",b.toString());f=$3(f,"{Y}",c.toString());d.add(new $$6.x(0,f))}},setTilePathUrl:function(a){if(!String.isNullOrEmpty(a)){if(a.startsWith("http://")||a.startsWith("https://")){this.u=a}else{var b="http://";b="https:"==document.location.protocol?"https://":"http://";this.u=b+a}}},$type:new $.ig.Type("OpenStreetMapTileSource",$$t.$n.$type)},true);$c("ItfConverter:p","DependencyObject",{init:function(){$$a.$r.init.call(this)},source:function(a){if(arguments.length===1){this.h($$t.$p.sourceProperty,a);return a}else{return $b($$6.$x.$type,this.c($$t.$p.sourceProperty))}},j:null,triangulationSource:function(a){if(arguments.length===1){var b=a!=this.triangulationSource();if(b){var c=this.j;this.j=a;this.r("TriangulationSource",c,this.triangulationSource())}return a}else{return this.j}},p:function(){var $self=this;var a=null;var b=function(){if(a!=null){$self.triangulationSource($$t.$ak.loadItf(a))}$self.q(new $$6.ae(null,false,null))};$$b.$b.a(this.source().value(),function(c){a=new $$7.c(0,c,false);b()},function(c){throw new $$0.n(1,"itf file download error: "+c)})},importCompleted:null,q:function(a){if(this.importCompleted!=null){this.importCompleted(this,a)}},s:function(a,b,c){switch(a){case"Source":if(this.source()!=null){this.p()}break}},r:function(a,b,c){if(this.propertyChanged!=null){this.propertyChanged(this,new $$0.b7(a))}this.s(a,b,c)},propertyChanged:null,$type:new $.ig.Type("ItfConverter",$$a.$r.$type,[$$0.$b6.$type])},true);$c("WriteableBitmap:q","Object",{init:function(a,b){$.ig.$op.init.call(this);this._b=a;this._a=b;this._d=$$a.$ae.empty()},_b:0,_a:0,_c:null,_d:null,$type:new $.ig.Type("WriteableBitmap",$.ig.$ot)},true);$c("Tile:r","Object",{init:function(){$.ig.$op.init.call(this)},b:0,c:0,d:0,f:null,e:null,a:new Date,g:function(){var a=Math.pow(2,-this.d);var b=Math.pow(2,-this.d);return new $$a.ae(0,this.b*a,this.c*b,a,b)},$type:new $.ig.Type("Tile",$.ig.$ot)},true);$c("IMapRenderDeferralHandler:s","Object",{$type:new $.ig.Type("IMapRenderDeferralHandler",null)},true);$c("TilePositionComparer:t","Object",{init:function(){$.ig.$op.init.call(this)},equalsC:function(a,b){return a.b==b.b&&a.c==b.c&&a.d==b.d},getHashCodeC:function(a){var b=23;b=b*31+a.b;b=b*31+a.c;b=b*31+a.d;return b},$type:new $.ig.Type("TilePositionComparer",$.ig.$ot,[$$0.$by.$type.specialize($$t.$r.$type)])},true);$c("Pair$2:u","Object",{$t1:null,$t2:null,init:function($t1,$t2,a,b){this.$t1=$t1;this.$t2=$t2;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$t1,this.$t2)}$.ig.$op.init.call(this);this._a=a;this._b=b},_a:null,_b:null,$type:new $.ig.Type("Pair$2",$.ig.$ot)},true);$c("IEasingFunction:v","Object",{$type:new $.ig.Type("IEasingFunction",null)},true);$c("XamMultiScaleImage:w","Control",{init:function(){this.av=new $$4.x($$t.$r.$type,0);this.at=false;this.ap=new $.ig.LRUCache$2($$t.$r.$type,$$t.$q.$type,1,2147483647,new $$t.t);this.aw=new $$4.x($$t.$r.$type,0);this.ar=false;this.ay=1;$$a.$f.init.call(this);this._b9=$$a.$ae.empty();this.tileScheduler(new $.ig.CanvasRenderScheduler);this._am=new $$t.a(this);this._ab=$$t.$w.$type;this._b6=this.viewportOrigin();this._az=this.viewportWidth()},ao:null,_am:null,aj:null,deferralHandler:function(a){if(arguments.length===1){if(this.aj!=null){this.aj.unRegister(this)}this.aj=a;if(this.aj!=null){this.aj.register(this,this.bv.runOn(this))}return a}else{return this.aj}},source:function(a){if(arguments.length===1){this.h($$t.$w.sourceProperty,a);return a}else{return this.c($$t.$w.sourceProperty)}},viewportOrigin:function(a){if(arguments.length===1){this.h($$t.$w.viewportOriginProperty,a);return a}else{return this.c($$t.$w.viewportOriginProperty)}},_b6:null,viewportWidth:function(a){if(arguments.length===1){this.h($$t.$w.viewportWidthProperty,a);return a}else{return this.c($$t.$w.viewportWidthProperty)}},_az:0,useSprings:function(a){if(arguments.length===1){this.h($$t.$w.useSpringsProperty,a);return a}else{return this.c($$t.$w.useSpringsProperty)}},springsEasingFunction:function(a){if(arguments.length===1){this.h($$t.$w.springsEasingFunctionProperty,a);return a}else{return this.c($$t.$w.springsEasingFunctionProperty)}},propertyChanged:null,bm:function(a){if(this.propertyChanged!=null){this.propertyChanged(this,a)}switch(a.propertyName()){case"Source":if(this.source()!=null){this.source().j=this}this.bt();this.bw();this.bu();break;case"ViewportOrigin":this.bx();break;case"ViewportWidth":this.bx();break;case"UseSprings":if(!this.useSprings()){this._am.t()}break}},_a7:0,_a8:0,bw:function(){this.b0();if(this.source()!=null){this._a7=$$6.$g.toInt32(Math.logBase(this.source()._m,2));this._a8=$$6.$g.toInt32(Math.logBase(this.source().q(),2))}},invalidateTileLayer:function(a,b,c,d){this.bt();this.bw();this.bu()},ax:new Date,b7:null,a0:0,bx:function(){if(this.useSprings()){this.ax=$$0.$s.now();this.b7=this._b6;this.a0=this._az;this._am.aq()}else{this._b6=this.viewportOrigin();this._az=this.viewportWidth();this.bu()}},by:function(){var a=2;var b=$$0.$s.now().getTime()-this.ax.getTime();var c=b/1e3;var d=$.ig.MathUtil.prototype.b(c/a,0,1);var e=this.springsEasingFunction()!=null?this.springsEasingFunction().ease(d):d;var f=1-e;this._az=this.a0*f+this.viewportWidth()*e;this._b6={__x:this.b7.__x*f+this.viewportOrigin().__x*e,__y:this.b7.__y*f+this.viewportOrigin().__y*e,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};if(d>=1){this._am.as()}else{}this.bu()},av:null,a5:function(a,b,c){for(var d=0;d<this.av.count();++d){if(this.av.__inner[d].b==a&&this.av.__inner[d].c==b&&this.av.__inner[d].d==c){return d}}return-1},bv:function(a){var $self=this;this.at=false;this.ar=false;if(this.source()==null||!this._am.f()||this._b9.width()==0||this._b9.height()==0){return}var b=$.ig.truncate(Math.ceil(this._b9.width()/this.source()._m));var c=$.ig.truncate(Math.max(1,Math.floor(-Math.logBase(this._az/b,2))));if(c>=this._a8-8){c=this._a8-8-1}var d=$.ig.truncate(Math.round(Math.pow(2,c)));var e=this._az;var f=this._b9.height()*e/this._b9.width();var g=this.source().q()/Math.pow(2,c);var h=this.source().p()/Math.pow(2,c);var i=Math.max($.ig.truncate(Math.floor(this._b6.__x*this.source().q()/g)),0);var j=Math.min($.ig.truncate(Math.ceil((this._b6.__x+e)*this.source().q()/g)),d);var k=Math.max($.ig.truncate(Math.floor(this._b6.__y*this.source().p()/h)),0);var l=Math.min($.ig.truncate(Math.ceil((this._b6.__y+f)*this.source().q()/h)),d);var m=(i*g-this._b6.__x*this.source().q())/g;var n=(k*h-this._b6.__y*this.source().p())/h;var o=e*this.source().q()/g*(this.source()._m/this._b9.width());var p=new $$4.x($$t.$r.$type,0);for(var q=i;q<j;++q){for(var r=k;r<l;++r){var s=this.a5(q,r,c);if(s>=0){p.add(this.av.__inner[s]);this.av.removeAt(s)}else{p.add(function(){var $ret=new $$t.r;$ret.b=q;$ret.c=r;$ret.d=c;return $ret}())}}}this.ao.f(true);this.b0();this.av=p;for(var t=0;t<this.av.count();++t){if(this.av.__inner[t].f==null){this.av.__inner[t].f=this.ao.a();this.av.__inner[t].f.__opacity=1;this._am.am(this.av.__inner[t].f);var u=this.al(this.av.__inner[t]);if(u!=null){this.av.__inner[t].f._ac=u}else{var v=null;var w=function(){var $ret=new $$t.r;$ret.b=$self.av.__inner[t].b;$ret.c=$self.av.__inner[t].c;$ret.d=$self.av.__inner[t].d;return $ret}();while(w.d>=0&&v==null){w.b=w.b>>1;w.c=w.c>>1;w.d=w.d-1;v=this.al(w)}if(v!=null){var x=$.ig.truncate(Math.pow(2,this.av.__inner[t].d-w.d));var y=$a(256,x);var z=y*(this.av.__inner[t].b%x);var aa=y*(this.av.__inner[t].c%x);this.av.__inner[t].e=this.ao.a();this.av.__inner[t].e.__opacity=1;this._am.an(this.av.__inner[t].e);u=this._am.a(y,v,z,aa);this.av.__inner[t].e._ac=u}this._am.u(this.av.__inner[t])}}var ab=this.source()._m/o;var ac=this.source()._k/o;var ad=(this.av.__inner[t].b-i+m)*ab;var ae=(this.av.__inner[t].c-k+n)*ac;this.av.__inner[t].f.width(ab+.5);this.av.__inner[t].f.height(ac+.5);this._am.ao(this.av.__inner[t].f,ad,ae);if(this.av.__inner[t].e!=null){this.av.__inner[t].e.width(ab+.5);this.av.__inner[t].e.height(ac+.5);this._am.ao(this.av.__inner[t].e,ad,ae)}}this.ao.f(false);this._am.aj()},at:false,bu:function(){if(this.source()==null||!this._am.f()||this._b9.width()==0||this._b9.height()==0){return}if(this.at){return}this.at=true;this._am.s(this.bv.runOn(this))},b0:function(){for(var a=0;a<this.av.count();++a){this._am.r(this.av.__inner[a]);this.bf(this.av.__inner[a]);if(this.av.__inner[a].f!=null){this.ao.n(this.av.__inner[a].f);this.av.__inner[a].f._ac=null;this.av.__inner[a].f=null}}},bt:function(){this.aq().i()},al:function(a){return this.aq().item(a)},be:function(a,b){this.aq().item(a,b)},ap:null,aq:function(a){if(arguments.length===1){this.ap=a;return a}else{return this.ap}},aw:null,as:function(){return this.aw.count()!=0},imageTilesReady:null,ar:false,bj:function(){var a=true;if(this.as()){a=false}if(!this._am.d()){a=false}if(a&&!this.ar){if(this.imageTilesReady!=null){this.imageTilesReady(this,new $$0.w)}}this.ar=a},bz:function(a){if(a.e!=null){a.a=$$0.$s.now();this.aw.add(a);this._am.ap()}else{this.bj()}},bf:function(a){if(a.e!=null){this.ao.n(a.e);a.e._ac=null;a.e=null;for(var b=0;b<this.aw.count();++b){if(this.aw.__inner[b]==a){this.aw.removeAt(b);break}}if(this.aw.count()==0){this._am.ar()}}},bh:function(){var a=$$0.$s.now();var b=.5;for(var c=0;c<this.aw.count();){var d=a.getTime()-this.aw.__inner[c].a.getTime();var e=d/1e3;var f=e/b;f=$.ig.MathUtil.prototype.b(f,0,1);this.aw.__inner[c].e.__opacity=1-f;if(f>=1){this.ao.n(this.aw.__inner[c].e);this.aw.__inner[c].e._ac=null;this.aw.__inner[c].e=null;this.aw.removeAt(c)}else{++c}this._am.x()}if(this.aw.count()==0){this._am.ar()}},_b9:null,bn:function(){this._az=this.viewportWidth();this._b6=this.viewportOrigin();this.bu()},provideContainer:function(a){var b=a;this.tileScheduler().j(b);this._am.ae(a)},provideContext:function(a){this._am.ag(a)},provideRenderer:function(a){this._am.ah(a)},provideViewport:function(a){this._am.ai(a)},_tileScheduler:null,tileScheduler:function(a){if(arguments.length===1){this._tileScheduler=a;return a}else{return this._tileScheduler}},bl:function(){if(this.imagesChanged!=null){this.imagesChanged(this,new $$0.w)}},imagesChanged:null,bg:function(){this.at=false},downloadingImage:null,bk:function(a){if(this.downloadingImage!=null){this.downloadingImage(this,a)}},ay:0,a1:function(){return this.ay},pixelScalingRatioChanged:function(a){this.ay=a},a6:function(a){if(arguments.length===1){var b=a!=this.a6();if(b){this.aq(new $.ig.LRUCache$2($$t.$r.$type,$$t.$q.$type,1,a,new $$t.t))}return a}else{return this.aq().h()}},$type:new $.ig.Type("XamMultiScaleImage",$$a.$f.$type,[$$0.$b6.$type])},true);$c("DownloadingMultiScaleImageEventArgs:y","EventArgs",{init:function(){$$0.$w.init.call(this)},_uri:null,uri:function(a){if(arguments.length===1){this._uri=a;return a}else{return this._uri}},_image:null,image:function(a){if(arguments.length===1){this._image=a;return a}else{return this._image}},$type:new $.ig.Type("DownloadingMultiScaleImageEventArgs",$$0.$w.$type)},true);$$t.$e.shapefileSourceProperty=$$a.$s.i("ShapefileSource",$$6.$x.$type,$$t.$e.$type,new $$a.ac(2,null,function(a,b){$b($$t.$e.$type,a).x("ShapefileSource",b.oldValue(),b.newValue())}));$$t.$e.databaseSourceProperty=$$a.$s.i("DatabaseSource",$$6.$x.$type,$$t.$e.$type,new $$a.ac(2,null,function(a,b){$b($$t.$e.$type,a).x("DatabaseSource",b.oldValue(),b.newValue())}));$$t.$h.j=null;if($$t.$h.staticInit&&!$$t.$h.shapeFileUtilStaticInitCalled){$$t.$h.staticInit();$$t.$h.shapeFileUtilStaticInitCalled=true}$$t.$i.mapServerUriProperty=$$a.$s.i("MapServerUri",String,$$t.$i.$type,new $$a.ac(2,null,$$t.$i.y));$$t.$i.isMapPublicProperty=$$a.$s.i("IsMapPublic",$$0.$aq.$type,$$t.$i.$type,new $$a.ac(2,true,$$t.$i.y));$$t.$i.levelOfDetailProperty=$$a.$s.i("LevelOfDetail",$$0.$aw.$type,$$t.$i.$type,new $$a.ac(2,(-1),$$t.$i.y));$$t.$i.userTokenProperty=$$a.$s.i("UserToken",String,$$t.$i.$type,new $$a.ac(2,null,$$t.$i.y));$$t.$j.tilePathProperty=$$a.$s.i("TilePath",String,$$t.$j.$type,new $$a.ac(2,null,$$t.$j.aa));$$t.$j.subDomainsProperty=$$a.$s.i("SubDomains",$$4.$f.$type.specialize(String),$$t.$j.$type,new $$a.ac(2,null,$$t.$j.aa));$$t.$j.cultureNameProperty=$$a.$s.i("CultureName",String,$$t.$j.$type,new $$a.ac(2,null,$$t.$j.aa));$$t.$p.sourceProperty=$$a.$s.i("Source",$$6.$x.$type,$$t.$p.$type,new $$a.ac(2,null,function(a,b){$b($$t.$p.$type,a).s("Source",b.oldValue(),b.newValue())}));$$t.$w.sourceProperty=$$a.$s.i("Source",$$t.$z.$type,$$t.$w.$type,new $$a.ac(2,null,function(a,b){a.bm(new $.ig.PropertyChangedEventArgs$1($$t.$z.$type,"Source",$b($$t.$z.$type,b.oldValue()),$b($$t.$z.$type,b.newValue())))}));$$t.$w.viewportOriginProperty=$$a.$s.i("ViewportOrigin",$$a.$y.$type,$$t.$w.$type,new $$a.ac(2,{__x:0,__y:0,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName},function(a,b){a.bm(new $.ig.PropertyChangedEventArgs$1($$a.$y.$type,"ViewportOrigin",b.oldValue(),b.newValue()))}));$$t.$w.viewportWidthProperty=$$a.$s.i("ViewportWidth",Number,$$t.$w.$type,new $$a.ac(2,1,function(a,b){a.bm(new $.ig.PropertyChangedEventArgs$1(Number,"ViewportWidth",b.oldValue(),b.newValue()))}));$$t.$w.useSpringsProperty=$$a.$s.i("UseSprings",$$0.$aq.$type,$$t.$w.$type,new $$a.ac(2,false,function(a,b){a.bm(new $.ig.PropertyChangedEventArgs$1($$0.$aq.$type,"UseSprings",b.oldValue(),b.newValue()))}));$$t.$w.springsEasingFunctionProperty=$$a.$s.i("SpringsEasingFunction",$$t.$v.$type,$$t.$w.$type,new $$a.ac(2,null,function(a,b){a.bm(new $.ig.PropertyChangedEventArgs$1($$t.$v.$type,"SpringsEasingFunction",b.oldValue(),b.newValue()))}))}); |