This commit is contained in:
Tom Payne
2012-10-18 11:50:40 +02:00
parent 453f8499d6
commit 1f8c98db8c
9 changed files with 106 additions and 36 deletions

View File

@@ -88,52 +88,52 @@ function Zf(a,b,c){var d=a.map.r(tf);t(d)&&d.forEach(function(a,d){if(a.V()&&a.M
m.ka=function(){this.d=i};m.za=function(){this.d=i};m.la=function(){this.d=i};m.$a=function(a){Pb(this.La(a))};m.La=function(a){a=w(a);if(a in this.D){var b=this.D[a];delete this.D[a];return b}return j};m.p=function(){var a=l;Zf(this,function(b,c){c.p()&&(a=i)});return a};m.cb=function(a,b){var c=w(a);this.D[c]=b};
function $f(a){if(a.d){var b=a.map,c=b.c(),d=b.a(),e=b.e(),b=b.d();Rf(a.c);Tf(a.c,b.width/2,b.height/2);Uf(a.c,1/d,-1/d);a.ba()&&t(e)&&Vf(a.c,-e);Tf(a.c,-c.x,-c.y);var f=a.c,c=a.J,d=f[0],e=f[1],b=f[2],g=f[3],k=f[4],q=f[5],u=f[6],r=f[7],p=f[8],x=f[9],y=f[10],M=f[11],K=f[12],S=f[13],N=f[14],f=f[15],O=d*q-e*k,ba=d*u-b*k,$=d*r-g*k,aa=e*u-b*q,va=e*r-g*q,Wb=b*r-g*u,Xb=p*S-x*K,Yb=p*N-y*K,Zb=p*f-M*K,$b=x*N-y*S,ac=x*f-M*S,bc=y*f-M*N,Q=O*bc-ba*ac+$*$b+aa*Zb-va*Yb+Wb*Xb;0!=Q&&(Q=1/Q,c[0]=(q*bc-u*ac+r*$b)*Q,
c[1]=(-e*bc+b*ac-g*$b)*Q,c[2]=(S*Wb-N*va+f*aa)*Q,c[3]=(-x*Wb+y*va-M*aa)*Q,c[4]=(-k*bc+u*Zb-r*Yb)*Q,c[5]=(d*bc-b*Zb+g*Yb)*Q,c[6]=(-K*Wb+N*$-f*ba)*Q,c[7]=(p*Wb-y*$+M*ba)*Q,c[8]=(k*ac-q*Zb+r*Xb)*Q,c[9]=(-d*ac+e*Zb-g*Xb)*Q,c[10]=(K*va-S*$+f*O)*Q,c[11]=(-p*va+x*$-M*O)*Q,c[12]=(-k*$b+q*Yb-u*Xb)*Q,c[13]=(d*$b-e*Yb+b*Xb)*Q,c[14]=(-K*aa+S*ba-N*O)*Q,c[15]=(p*aa-x*ba+y*O)*Q);a.d=l}};function ag(a){Y.call(this,a)}A(ag,Y);function bg(a,b,c){Nf.call(this,a,b);this.target=c;this.origin=j;this.xa();this.ya()}A(bg,Nf);bg.prototype.S=function(){return bg.i.S.call(this)};bg.prototype.Za=function(){this.e.map.p()};bg.prototype.xa=function(){var a=this.H().b(),b=this.target.style;"opacity"in b?b.opacity=a:"MozOpacity"in b?b.MozOpacity=a:"filter"in b&&(b.filter=""===a?"":"alpha(opacity="+100*a+")")};bg.prototype.ya=function(){Ie(this.target,this.H().M())};function cg(a,b,c){bg.call(this,a,b,c);this.b={};this.f=this.h=h;this.c={}}A(cg,bg);cg.prototype.H=function(){return cg.i.H.call(this)};cg.prototype.l=function(a){var b=a.target,b=b.Na;if(b.j===this.f){var c=b.toString();delete this.c[c]}a=i;for(c in this.c){a=l;break}if(a)for(c in a=this.f,this.b)b=dd(c),b.j!==a&&(b=this.b[c],delete this.b[c],Ec(Ld(b,this)))};
cg.prototype.p=function(){var a=this.e.map;if(a.u()){var b=dg(a),a=a.a(),c=a!==this.h,d=this.H().a,e=d.K,f=hd(e.a,a);if(f!=this.f)for(var g in this.c)Ec(Ld(this.c[g],this)),delete this.c[g];var k={};k[String(f)]={};gd(kd(e,b,a),f,function(a){var b=Wd(d,a);if(b!==j){var c=b.Na.toString();2==b.a?k[String(f)][c]=b:(c in this.c||(J(b,"change",this.l,l,this),this.c[c]=b,Md(b)),k[String(f)][c]=b,e.c(a,function(a,b){var a=String(a),c=i;gd(b,a,function(b){var e=b.toString();if(!k[a]||!k[a][e])b=Wd(d,b),b!==
j&&2==b.a?(a in k||(k[a]={}),k[a][e]=b):c=l});return c}))}},this);var q=Ha(k);q.sort(function(a,b){return a-b});b=document.createDocumentFragment();g=document.createDocumentFragment();for(var u=l,r=l,p=0,x=q.length;p<x;++p){var y=+q[p],M=k[String(y)],K;K=a;var S=ld(this.H().a.K,y);K=new T(Math.round((this.origin.x-S.x)/K),Math.round((S.y-this.origin.y)/K));for(var N in M){var S=M[N],O=md(e,S.Na,a),ba=Ld(S,this),$=ba.style,aa=!(N in this.b);if(aa||c)$.left=O.b-K.x+"px",$.top=-O.d-K.y+"px",$.width=
O.f()+"px",$.height=O.e()+"px";aa&&(this.b[N]=S,$.position="absolute",y===f?(b.appendChild(ba),u=i):(g.appendChild(ba),r=i))}}r&&((N=this.target.firstChild)?N.parentNode&&N.parentNode.insertBefore(g,N):this.target.appendChild(g));u&&this.target.appendChild(b);this.f=f;this.h=a;for(var va in this.b)a=dd(va),a=k[a.j],a&&va in a||(a=this.b[va],delete this.b[va],Ec(Ld(a,this)))}};function eg(a,b){Wf.call(this,a,b);this.a=document.createElement("DIV");this.a.className="ol-layers-pane ol-unselectable";var c=this.a.style;c.position="absolute";c.width="100%";c.height="100%";a.insertBefore(this.a,a.childNodes[0]||j);this.v={};this.f=j;this.m=h;this.g=j;this.s=h;this.h=j}A(eg,Wf);
cg.prototype.p=function(){var a=this.e.map;if(a.u()){var b=dg(a),a=a.a(),c=a!==this.h,d=this.H().a,e=d.K,f=hd(e.a,a);if(f!=this.f)for(var g in this.c)Ec(Ld(this.c[g],this)),delete this.c[g];var k={};k[f]={};gd(kd(e,b,a),f,function(a){var b=Wd(d,a);if(b!==j){var c=b.Na.toString();2==b.a?k[f][c]=b:(c in this.c||(J(b,"change",this.l,l,this),this.c[c]=b,Md(b)),k[f][c]=b,e.c(a,function(a,b){var c=i;gd(b,a,function(b){var e=b.toString();if(!k[a]||!k[a][e])b=Wd(d,b),b!==j&&2==b.a?(a in k||(k[a]={}),k[a][e]=
b):c=l});return c}))}},this);var q=za(Ha(k),Number);B.sort.call(q,Fa);b=document.createDocumentFragment();g=document.createDocumentFragment();for(var u=l,r=l,p=0,x=q.length;p<x;++p){var y=q[p],M=k[y],K;K=a;var S=ld(this.H().a.K,y);K=new T(Math.round((this.origin.x-S.x)/K),Math.round((S.y-this.origin.y)/K));for(var N in M){var S=M[N],O=md(e,S.Na,a),ba=Ld(S,this),$=ba.style,aa=!(N in this.b);if(aa||c)$.left=O.b-K.x+"px",$.top=-O.d-K.y+"px",$.width=O.f()+"px",$.height=O.e()+"px";aa&&(this.b[N]=S,$.position=
"absolute",y===f?(b.appendChild(ba),u=i):(g.appendChild(ba),r=i))}}r&&((N=this.target.firstChild)?N.parentNode&&N.parentNode.insertBefore(g,N):this.target.appendChild(g));u&&this.target.appendChild(b);this.f=f;this.h=a;for(var va in this.b)a=dd(va),a=k[a.j],a&&va in a||(a=this.b[va],delete this.b[va],Ec(Ld(a,this)))}};function eg(a,b){Wf.call(this,a,b);this.a=document.createElement("DIV");this.a.className="ol-layers-pane ol-unselectable";var c=this.a.style;c.position="absolute";c.width="100%";c.height="100%";a.insertBefore(this.a,a.childNodes[0]||j);this.v={};this.f=j;this.m=h;this.g=j;this.s=h;this.h=j}A(eg,Wf);
function fg(a,b,c,d){b="translate("+Math.round(b)+"px, "+Math.round(c)+"px) rotate("+d.toFixed(6)+"rad) scale3d(1, 1, 1)";a=a.a.style;a.WebkitTransform=b;a.MozTransform=b;a.a=b;a.msTransform=b;a.transform=b}m=eg.prototype;m.ba=Td;m.pb=function(a){if(a instanceof ag){var b=document.createElement("DIV");b.className="ol-layer";b.style.position="absolute";this.a.appendChild(b);a=new cg(this,a,b);this.v[w(a)]=b;return a}return j};m.ja=function(){eg.i.ja.call(this);var a=this.map;a.u()&&a.p()};
m.ka=function(){eg.i.ka.call(this);var a=this.map;a.u()&&a.p()};m.za=function(){var a=this.map;a.u()&&a.p()};m.la=function(){eg.i.la.call(this);var a=this.map;a.u()&&a.p()};
m.p=function(){var a=this.map;if(!a.u())return l;var b=a.c(),c=a.d(),d=a.a(),a=a.e();if(this.f===j)gg(this);else if(d!==this.m||!(c.width==this.g.width&&c.height==this.g.height))gg(this);else if(!(b==this.f||this.f&&b.x==this.f.x&&b.y==this.f.y)||a!==this.s){var e=this.map,f=e.a(),g=e.c(),k=e.d(),q=this.h,u=(g.x-q.x)/f,f=(q.y-g.y)/f;hg(this,u,f);fg(this,-(u-k.width/2),-(f-k.height/2),e.e())}this.f=b;this.m=d;this.s=a;this.g=c;return eg.i.p.call(this)};
function gg(a){var b=a.map,c=b.d(),d=c.width/2,c=c.height/2,e=b.c(),f=b.a(),g=new T(e.x-f*d,e.y+f*c);a.h=g;hg(a,d,c);fg(a,0,0,b.e());D(a.D,function(a){a.origin=g})}function hg(a,b,c){b=Math.round(b)+"px "+Math.round(c)+"px";a=a.a.style;a.WebkitTransformOrigin=b;a.MozTransformOrigin=b;a.b=b;a.c=b;a.d=b};function ig(){if(!("WebGLRenderingContext"in n))return l;try{return document.createElement("CANVAS").getContext("experimental-webgl")!==j}catch(a){return l}};function jg(a){this.a=a}function kg(a){this.a=a}A(kg,jg);kg.prototype.b=function(){return 35632};function lg(a){this.a=a}A(lg,jg);lg.prototype.b=function(){return 35633};function mg(a,b){Nf.call(this,a,b)}A(mg,Nf);function ng(a){P(a,"change")}m=mg.prototype;m.S=function(){return mg.i.S.call(this)};m.xb=function(){ng(this)};m.yb=function(){ng(this)};m.zb=function(){ng(this)};m.Za=function(){ng(this)};m.xa=function(){ng(this)};m.Ab=function(){ng(this)};m.ya=function(){ng(this)};m.Aa=s;function og(){this.a="precision mediump float;\n\nuniform sampler2D uTexture;\n\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n gl_FragColor = texture2D(uTexture, vTexCoord);\n}"}A(og,kg);da(og);function pg(){this.a="attribute vec2 aPosition;\nattribute vec2 aTexCoord;\n\nvarying vec2 vTexCoord;\n\nuniform vec4 uTileOffset;\n\nvoid main(void) {\n gl_Position.xy = aPosition * uTileOffset.xy + uTileOffset.zw;\n gl_Position.z = 0.;\n gl_Position.w = 1.;\n vTexCoord = aTexCoord;\n}"}A(pg,lg);da(pg);
function qg(a,b){Nf.call(this,a,b);this.s=og.ta();this.v=pg.ta();this.c=this.g=this.f=this.n=j;this.h=h;this.m={};this.d=Qf();this.l=this.b=j}A(qg,mg);m=qg.prototype;m.o=function(){var a=this.S().b;a.isContextLost()||(a.deleteBuffer(this.f),a.deleteFramebuffer(this.c),a.deleteTexture(this.g));qg.i.o.call(this)};m.H=function(){return qg.i.H.call(this)};m.Ac=function(){ng(this)};m.Aa=function(){this.c=this.g=this.f=this.n=j;this.h=h};
function gg(a){var b=a.map,c=b.d(),d=c.width/2,c=c.height/2,e=b.c(),f=b.a(),g=new T(e.x-f*d,e.y+f*c);a.h=g;hg(a,d,c);fg(a,0,0,b.e());D(a.D,function(a){a.origin=g})}function hg(a,b,c){b=Math.round(b)+"px "+Math.round(c)+"px";a=a.a.style;a.WebkitTransformOrigin=b;a.MozTransformOrigin=b;a.b=b;a.c=b;a.d=b};var ig=["webgl","webgl-experimental","webkit-3d","moz-webgl"];function jg(a,b){var c,d,e=ig.length;for(d=0;d<e;++d)try{if(c=a.getContext(ig[d],b),c!==j)return c}catch(f){}return j};function kg(){if(!("WebGLRenderingContext"in n))return l;try{var a=document.createElement("CANVAS");return jg(a)!==j}catch(b){return l}};function lg(a){this.a=a}function mg(a){this.a=a}A(mg,lg);mg.prototype.b=function(){return 35632};function ng(a){this.a=a}A(ng,lg);ng.prototype.b=function(){return 35633};function og(a,b){Nf.call(this,a,b)}A(og,Nf);function pg(a){P(a,"change")}m=og.prototype;m.S=function(){return og.i.S.call(this)};m.xb=function(){pg(this)};m.yb=function(){pg(this)};m.zb=function(){pg(this)};m.Za=function(){pg(this)};m.xa=function(){pg(this)};m.Ab=function(){pg(this)};m.ya=function(){pg(this)};m.Aa=s;function qg(){this.a="precision mediump float;\n\nuniform sampler2D uTexture;\n\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n gl_FragColor = texture2D(uTexture, vTexCoord);\n}"}A(qg,mg);da(qg);function rg(){this.a="attribute vec2 aPosition;\nattribute vec2 aTexCoord;\n\nvarying vec2 vTexCoord;\n\nuniform vec4 uTileOffset;\n\nvoid main(void) {\n gl_Position.xy = aPosition * uTileOffset.xy + uTileOffset.zw;\n gl_Position.z = 0.;\n gl_Position.w = 1.;\n vTexCoord = aTexCoord;\n}"}A(rg,ng);da(rg);
function sg(a,b){Nf.call(this,a,b);this.s=qg.ta();this.v=rg.ta();this.c=this.g=this.f=this.n=j;this.h=h;this.m={};this.d=Qf();this.l=this.b=j}A(sg,og);m=sg.prototype;m.o=function(){var a=this.S().b;a.isContextLost()||(a.deleteBuffer(this.f),a.deleteFramebuffer(this.c),a.deleteTexture(this.g));sg.i.o.call(this)};m.H=function(){return sg.i.H.call(this)};m.Ac=function(){pg(this)};m.Aa=function(){this.c=this.g=this.f=this.n=j;this.h=h};
m.p=function(){var a=l,b=this.S(),c=this.e.map,d=b.b,e=c.c(),f=qf(c),g=c.a(),k=dg(c),q=c.e(),u=this.H().a,r=u.K,p=hd(r.a,g),x=r.a[p],k=kd(r,k,x),y;if(this.b!==j&&this.b.b==k.b&&k.c==this.b.c&&this.b.a==k.a&&k.a==this.b.a)y=this.l;else{var g=new Wc(k.f(),k.e()),M=r.b,g=Math.max(g.width*M.width,g.height*M.height),g=Math.pow(2,Math.ceil(Math.log(g)/Math.log(2))),K=new Wc(x*g,x*g),S=ld(r,p),N=S.x+k.b*M.width*x,x=S.y+k.a*M.height*x;y=new Zc(N,x,N+K.width,x+K.height);x=this.S().b;!t(this.h)||this.h!=g?
(kc(this.e.map,rg,oa(function(a,b,c){a.isContextLost()||(a.deleteFramebuffer(b),a.deleteTexture(c))},x,this.c,this.g)),M=x.createTexture(),x.bindTexture(3553,M),x.texImage2D(3553,0,6408,g,g,0,6408,5121,j),x.texParameteri(3553,10240,9729),x.texParameteri(3553,10241,9729),N=x.createFramebuffer(),x.bindFramebuffer(36160,N),x.framebufferTexture2D(36160,36064,3553,M,0),this.g=M,this.c=N,this.h=g):x.bindFramebuffer(36160,this.c);d.viewport(0,0,g,g);d.clearColor(0,0,0,0);d.clear(16384);d.disable(3042);g=
sg(b,this.s,this.v);d.useProgram(g);this.n===j&&(this.n={ea:d.getAttribLocation(g,"aPosition"),fa:d.getAttribLocation(g,"aTexCoord"),Uc:d.getUniformLocation(g,"uTileOffset"),fb:d.getUniformLocation(g,"uTexture")});this.f===j?(g=d.createBuffer(),d.bindBuffer(34962,g),d.bufferData(34962,new Float32Array([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]),35044),this.f=g):d.bindBuffer(34962,this.f);d.enableVertexAttribArray(this.n.ea);d.vertexAttribPointer(this.n.ea,2,5126,l,16,0);d.enableVertexAttribArray(this.n.fa);
(kc(this.e.map,tg,oa(function(a,b,c){a.isContextLost()||(a.deleteFramebuffer(b),a.deleteTexture(c))},x,this.c,this.g)),M=x.createTexture(),x.bindTexture(3553,M),x.texImage2D(3553,0,6408,g,g,0,6408,5121,j),x.texParameteri(3553,10240,9729),x.texParameteri(3553,10241,9729),N=x.createFramebuffer(),x.bindFramebuffer(36160,N),x.framebufferTexture2D(36160,36064,3553,M,0),this.g=M,this.c=N,this.h=g):x.bindFramebuffer(36160,this.c);d.viewport(0,0,g,g);d.clearColor(0,0,0,0);d.clear(16384);d.disable(3042);g=
ug(b,this.s,this.v);d.useProgram(g);this.n===j&&(this.n={ea:d.getAttribLocation(g,"aPosition"),fa:d.getAttribLocation(g,"aTexCoord"),Uc:d.getUniformLocation(g,"uTileOffset"),fb:d.getUniformLocation(g,"uTexture")});this.f===j?(g=d.createBuffer(),d.bindBuffer(34962,g),d.bufferData(34962,new Float32Array([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]),35044),this.f=g):d.bindBuffer(34962,this.f);d.enableVertexAttribArray(this.n.ea);d.vertexAttribPointer(this.n.ea,2,5126,l,16,0);d.enableVertexAttribArray(this.n.fa);
d.vertexAttribPointer(this.n.fa,2,5126,l,16,8);d.uniform1i(this.n.fb,0);var O={},ba=[],$=i;O[p]={};gd(k,p,function(a){var c=Wd(u,a);if(c!==j){if(2==c.a){if(Ld(c).src in b.l){O[p][a.toString()]=c;return}ba.push(Ld(c))}else{var d=w(c);d in this.m||(Md(c),this.m[d]=J(c,"change",this.Ac,l,this))}$=l}r.c(a,function(a,b){var c=i;gd(b,a,function(b){var d=b.toString();if(!O[a]||!O[a][d])b=Wd(u,b),b!==j&&2==b.a?(O[a]||(O[a]={}),O[a][d]=b):c=l});return c})},this);g=za(Ha(O),Number);B.sort.call(g,Fa);var aa=
new Float32Array(4);C(g,function(a){D(O[a],function(a){var c=jd(r,a.Na),e=2*c.e()/K.height,f=2*(c.b-y.b)/K.width-1,g=2*(c.a-y.a)/K.height-1;aa[0]=2*c.f()/K.width;aa[1]=e;aa[2]=f;aa[3]=g;d.uniform4fv(this.n.Uc,aa);tg(b,Ld(a));d.drawArrays(5,0,4)},this)},this);0!=ba.length&&(kc(c,rg,oa(function(a,b){C(b,function(b){tg(a,b)})},b,ba)),a=i);$?(this.b=k,this.l=y):this.l=this.b=j}Rf(this.d);Tf(this.d,(e.x-y.b)/(y.c-y.b),(e.y-y.a)/(y.d-y.a));t(q)&&Vf(this.d,q);Uf(this.d,(f.c-f.b)/(y.c-y.b),(f.d-f.a)/(y.d-
y.a));Tf(this.d,-0.5,-0.5);return a};function ug(){this.a="precision mediump float;\n\nuniform float uBrightness;\nuniform float uContrast;\nuniform float uHue;\nuniform float uOpacity;\nuniform mat4 uMatrix;\nuniform float uSaturation;\nuniform sampler2D uTexture;\n\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n\n vec4 texCoord = uMatrix * vec4(vTexCoord, 0., 1.);\n vec4 color = texture2D(uTexture, texCoord.st);\n\n if (uHue != 0.) {\n float angle = uHue * 3.14159265;\n float s = sin(angle), c = cos(angle);\n vec3 weights = (vec3(2. * c, -sqrt(3.) * s - c, sqrt(3.) * s - c)\n + 1.) / 3.;\n color.rgb = vec3(\n dot(color.rgb, weights.xyz),\n dot(color.rgb, weights.zxy),\n dot(color.rgb, weights.yzx)\n );\n }\n\n if (uSaturation != 0.) {\n float average = (color.r + color.g + color.b) / 3.;\n if (uSaturation > 0.) {\n color.rgb += (average - color.rgb)\n * (1. - 1. / (1. - uSaturation));\n } else {\n color.rgb += (average - color.rgb) * -uSaturation;\n }\n }\n\n color.rgb += uBrightness;\n\n if (uContrast != 0.) {\n if (uContrast > 0.) {\n color.rgb = (color.rgb - 0.5) / (1. - uContrast) + 0.5;\n } else {\n color.rgb = (color.rgb - 0.5) * (1. + uContrast) + 0.5;\n }\n }\n\n color.a = color.a * uOpacity;\n\n gl_FragColor = color;\n\n}"}
A(ug,kg);da(ug);function vg(){this.a="attribute vec2 aPosition;\nattribute vec2 aTexCoord;\n\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n gl_Position = vec4(aPosition, 0., 1.);\n vTexCoord = aTexCoord;\n}"}A(vg,lg);da(vg);
function wg(a,b){Wf.call(this,a,b);this.a=document.createElement("CANVAS");this.a.height=a.clientHeight;this.a.width=a.clientWidth;this.a.className="ol-unselectable";a.insertBefore(this.a,a.childNodes[0]||j);this.s=new Wc(a.clientHeight,a.clientWidth);this.b=this.a.getContext("experimental-webgl",{alpha:l,antialias:i,depth:l,preserveDrawingBuffer:l,stencil:l});J(this.a,"webglcontextlost",this.Aa,l,this);J(this.a,"webglcontextrestored",this.Cc,l,this);this.f=new Ye(1,1,1,1);this.m=this.n=j;this.h=
{};this.g={};this.l={};this.oa=ug.ta();this.qa=vg.ta();this.v={};xg(this)}A(wg,Wf);m=wg.prototype;m.Ga=function(a){wg.i.Ga.call(this,a);a.M()&&this.map.p()};
function tg(a,b){var c=a.b,d=b.src,e=a.l[d];t(e)?(c.bindTexture(3553,e.Sb),9729!=e.Eb&&(c.texParameteri(3553,10240,9729),e.Eb=9729),9729!=e.Fb&&(c.texParameteri(3553,10240,9729),e.Fb=9729)):(e=c.createTexture(),c.bindTexture(3553,e),c.texImage2D(3553,0,6408,6408,5121,b),c.texParameteri(3553,10240,9729),c.texParameteri(3553,10241,9729),c.texParameteri(3553,10242,33071),c.texParameteri(3553,10243,33071),a.l[d]={Sb:e,Eb:9729,Fb:9729})}m.ba=Td;m.pb=function(a){return a instanceof ag?new qg(this,a):j};
m.o=function(){var a=this.b;a.isContextLost()||(D(this.g,function(b){a.deleteProgram(b)}),D(this.h,function(b){a.deleteShader(b)}),D(this.l,function(b){a.deleteTexture(b.Sb)}));wg.i.o.call(this)};function sg(a,b,c){var d=w(b)+"/"+w(c);if(d in a.g)return a.g[d];var e=a.b,f=e.createProgram();e.attachShader(f,yg(a,b));e.attachShader(f,yg(a,c));e.linkProgram(f);return a.g[d]=f}
function yg(a,b){var c=w(b);if(c in a.h)return a.h[c];var d=a.b,e=d.createShader(b.b());d.shaderSource(e,b.a);d.compileShader(e);return a.h[c]=e}m.tb=function(){var a=this.map.Ub();this.f=new Ye(a.d/255,a.c/255,a.b/255,a.a/255);this.map.p()};m.ja=function(){wg.i.ja.call(this);this.map.p()};m.vc=function(){this.map.p()};m.ka=function(){wg.i.ka.call(this);this.map.p()};m.za=function(){wg.i.za.call(this);this.map.p()};m.la=function(){wg.i.la.call(this);this.map.p()};
m.Aa=function(a){a.t();this.m=this.n=j;this.h={};this.g={};this.l={};D(this.D,function(a){a.Aa()})};m.Cc=function(){xg(this);this.map.p()};function xg(a){a=a.b;a.activeTexture(33984);a.blendFunc(770,771);a.disable(2884);a.disable(2929);a.disable(3089)}m.$a=function(a){wg.i.$a.call(this,a);a.M()&&this.map.p()};m.La=function(a){var b=wg.i.La.call(this,a);b!==j&&(a=w(a),L(this.v[a]),delete this.v[a]);return b};
m.p=function(){if(!this.map.u())return l;var a=this.map.d();this.s.width==a.width&&this.s.height==a.height||(this.a.width=a.width,this.a.height=a.height,this.s=a);var b=wg.i.p.call(this),c=this.b;c.bindFramebuffer(36160,j);c.clearColor(this.f.d,this.f.c,this.f.b,this.f.a);c.clear(16384);c.enable(3042);c.viewport(0,0,a.width,a.height);a=sg(this,this.oa,this.qa);c.useProgram(a);this.n===j&&(this.n={ea:c.getAttribLocation(a,"aPosition"),fa:c.getAttribLocation(a,"aTexCoord"),Oc:c.getUniformLocation(a,
new Float32Array(4);C(g,function(a){D(O[a],function(a){var c=jd(r,a.Na),e=2*c.e()/K.height,f=2*(c.b-y.b)/K.width-1,g=2*(c.a-y.a)/K.height-1;aa[0]=2*c.f()/K.width;aa[1]=e;aa[2]=f;aa[3]=g;d.uniform4fv(this.n.Uc,aa);vg(b,Ld(a));d.drawArrays(5,0,4)},this)},this);0!=ba.length&&(kc(c,tg,oa(function(a,b){C(b,function(b){vg(a,b)})},b,ba)),a=i);$?(this.b=k,this.l=y):this.l=this.b=j}Rf(this.d);Tf(this.d,(e.x-y.b)/(y.c-y.b),(e.y-y.a)/(y.d-y.a));t(q)&&Vf(this.d,q);Uf(this.d,(f.c-f.b)/(y.c-y.b),(f.d-f.a)/(y.d-
y.a));Tf(this.d,-0.5,-0.5);return a};function wg(){this.a="precision mediump float;\n\nuniform float uBrightness;\nuniform float uContrast;\nuniform float uHue;\nuniform float uOpacity;\nuniform mat4 uMatrix;\nuniform float uSaturation;\nuniform sampler2D uTexture;\n\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n\n vec4 texCoord = uMatrix * vec4(vTexCoord, 0., 1.);\n vec4 color = texture2D(uTexture, texCoord.st);\n\n if (uHue != 0.) {\n float angle = uHue * 3.14159265;\n float s = sin(angle), c = cos(angle);\n vec3 weights = (vec3(2. * c, -sqrt(3.) * s - c, sqrt(3.) * s - c)\n + 1.) / 3.;\n color.rgb = vec3(\n dot(color.rgb, weights.xyz),\n dot(color.rgb, weights.zxy),\n dot(color.rgb, weights.yzx)\n );\n }\n\n if (uSaturation != 0.) {\n float average = (color.r + color.g + color.b) / 3.;\n if (uSaturation > 0.) {\n color.rgb += (average - color.rgb)\n * (1. - 1. / (1. - uSaturation));\n } else {\n color.rgb += (average - color.rgb) * -uSaturation;\n }\n }\n\n color.rgb += uBrightness;\n\n if (uContrast != 0.) {\n if (uContrast > 0.) {\n color.rgb = (color.rgb - 0.5) / (1. - uContrast) + 0.5;\n } else {\n color.rgb = (color.rgb - 0.5) * (1. + uContrast) + 0.5;\n }\n }\n\n color.a = color.a * uOpacity;\n\n gl_FragColor = color;\n\n}"}
A(wg,mg);da(wg);function xg(){this.a="attribute vec2 aPosition;\nattribute vec2 aTexCoord;\n\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n gl_Position = vec4(aPosition, 0., 1.);\n vTexCoord = aTexCoord;\n}"}A(xg,ng);da(xg);
function yg(a,b){Wf.call(this,a,b);this.a=document.createElement("CANVAS");this.a.height=a.clientHeight;this.a.width=a.clientWidth;this.a.className="ol-unselectable";a.insertBefore(this.a,a.childNodes[0]||j);this.s=new Wc(a.clientHeight,a.clientWidth);this.b=jg(this.a,{alpha:l,antialias:i,depth:l,preserveDrawingBuffer:l,stencil:l});J(this.a,"webglcontextlost",this.Aa,l,this);J(this.a,"webglcontextrestored",this.Cc,l,this);this.f=new Ye(1,1,1,1);this.m=this.n=j;this.h={};this.g={};this.l={};this.oa=
wg.ta();this.qa=xg.ta();this.v={};zg(this)}A(yg,Wf);m=yg.prototype;m.Ga=function(a){yg.i.Ga.call(this,a);a.M()&&this.map.p()};
function vg(a,b){var c=a.b,d=b.src,e=a.l[d];t(e)?(c.bindTexture(3553,e.Sb),9729!=e.Eb&&(c.texParameteri(3553,10240,9729),e.Eb=9729),9729!=e.Fb&&(c.texParameteri(3553,10240,9729),e.Fb=9729)):(e=c.createTexture(),c.bindTexture(3553,e),c.texImage2D(3553,0,6408,6408,5121,b),c.texParameteri(3553,10240,9729),c.texParameteri(3553,10241,9729),c.texParameteri(3553,10242,33071),c.texParameteri(3553,10243,33071),a.l[d]={Sb:e,Eb:9729,Fb:9729})}m.ba=Td;m.pb=function(a){return a instanceof ag?new sg(this,a):j};
m.o=function(){var a=this.b;a.isContextLost()||(D(this.g,function(b){a.deleteProgram(b)}),D(this.h,function(b){a.deleteShader(b)}),D(this.l,function(b){a.deleteTexture(b.Sb)}));yg.i.o.call(this)};function ug(a,b,c){var d=w(b)+"/"+w(c);if(d in a.g)return a.g[d];var e=a.b,f=e.createProgram();e.attachShader(f,Ag(a,b));e.attachShader(f,Ag(a,c));e.linkProgram(f);return a.g[d]=f}
function Ag(a,b){var c=w(b);if(c in a.h)return a.h[c];var d=a.b,e=d.createShader(b.b());d.shaderSource(e,b.a);d.compileShader(e);return a.h[c]=e}m.tb=function(){var a=this.map.Ub();this.f=new Ye(a.d/255,a.c/255,a.b/255,a.a/255);this.map.p()};m.ja=function(){yg.i.ja.call(this);this.map.p()};m.vc=function(){this.map.p()};m.ka=function(){yg.i.ka.call(this);this.map.p()};m.za=function(){yg.i.za.call(this);this.map.p()};m.la=function(){yg.i.la.call(this);this.map.p()};
m.Aa=function(a){a.t();this.m=this.n=j;this.h={};this.g={};this.l={};D(this.D,function(a){a.Aa()})};m.Cc=function(){zg(this);this.map.p()};function zg(a){a=a.b;a.activeTexture(33984);a.blendFunc(770,771);a.disable(2884);a.disable(2929);a.disable(3089)}m.$a=function(a){yg.i.$a.call(this,a);a.M()&&this.map.p()};m.La=function(a){var b=yg.i.La.call(this,a);b!==j&&(a=w(a),L(this.v[a]),delete this.v[a]);return b};
m.p=function(){if(!this.map.u())return l;var a=this.map.d();this.s.width==a.width&&this.s.height==a.height||(this.a.width=a.width,this.a.height=a.height,this.s=a);var b=yg.i.p.call(this),c=this.b;c.bindFramebuffer(36160,j);c.clearColor(this.f.d,this.f.c,this.f.b,this.f.a);c.clear(16384);c.enable(3042);c.viewport(0,0,a.width,a.height);a=ug(this,this.oa,this.qa);c.useProgram(a);this.n===j&&(this.n={ea:c.getAttribLocation(a,"aPosition"),fa:c.getAttribLocation(a,"aTexCoord"),Oc:c.getUniformLocation(a,
"uBrightness"),Pc:c.getUniformLocation(a,"uContrast"),Qc:c.getUniformLocation(a,"uHue"),Rc:c.getUniformLocation(a,"uMatrix"),Sc:c.getUniformLocation(a,"uOpacity"),Tc:c.getUniformLocation(a,"uSaturation"),fb:c.getUniformLocation(a,"uTexture")});this.m===j?(a=c.createBuffer(),c.bindBuffer(34962,a),c.bufferData(34962,new Float32Array([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]),35044),this.m=a):c.bindBuffer(34962,this.m);c.enableVertexAttribArray(this.n.ea);c.vertexAttribPointer(this.n.ea,2,5126,l,16,0);c.enableVertexAttribArray(this.n.fa);
c.vertexAttribPointer(this.n.fa,2,5126,l,16,8);c.uniform1i(this.n.fb,0);Zf(this,function(a,b){c.uniformMatrix4fv(this.n.Rc,l,b.d);c.uniform1f(this.n.Oc,a.c());c.uniform1f(this.n.Pc,a.d());c.uniform1f(this.n.Qc,a.e());c.uniform1f(this.n.Sc,a.b());c.uniform1f(this.n.Tc,a.f());c.bindTexture(3553,b.g);c.drawArrays(5,0,4)},this);return b};m.cb=function(a,b){wg.i.cb.call(this,a,b);var c=w(a);this.v[c]=J(b,"change",this.vc,l,this)};var zg={$c:"dom",dd:"webgl"},Ag=["webgl","dom"],rg="postrender",Xf="backgroundColor",uf="center",tf="layers",vf="resolution",Yf="rotation",wf="size";
function Z(a){var b,c;V.call(this);var d={};t(a.center)&&(d[uf]=a.center);d[tf]=t(a.layers)?a.layers:new X;d.projection=a.projection!=j?v(a.projection)?wd(a.projection):a.projection:wd("EPSG:3857");t(a.resolution)?d[vf]=a.resolution:t(a.zoom)&&(d[vf]=Bd/(128<<a.zoom));d.userProjection=a.userProjection!=j?v(a.userProjection)?wd(a.userProjection):a.userProjection:wd("EPSG:4326");c=Wf;var e;e=t(a.renderers)?a.renderers:t(a.renderer)?[a.renderer]:Ag;var f;for(f=0;f<e.length;++f)if(b=e[f],"dom"==b){if(Td()){c=
eg;break}}else if("webgl"==b&&ig()){c=wg;break}if(t(a.resolutions)){var g=a.resolutions;e=function(a,b){if(t(a)){var c=hd(g,a),c=sc(c+b,0,g.length-1);return g[c]}}}else{t(a.maxResolution)&&t(a.numZoomLevels)&&t(a.zoomFactor)?(e=a.maxResolution,f=a.numZoomLevels,b=a.zoomFactor):(e=Bd/128,f=116,b=Math.exp(Math.log(2)/4));var k=b,q=e,u=f-1;e=function(a,b){if(t(a)){var c=Math.floor(Math.log(q/a)/Math.log(k)+0.5),c=Math.max(c+b,0);t(u)&&(c=Math.min(c,u));return q/Math.pow(k,c)}}}f=new $e(e);t(a.controls)?
c.vertexAttribPointer(this.n.fa,2,5126,l,16,8);c.uniform1i(this.n.fb,0);Zf(this,function(a,b){c.uniformMatrix4fv(this.n.Rc,l,b.d);c.uniform1f(this.n.Oc,a.c());c.uniform1f(this.n.Pc,a.d());c.uniform1f(this.n.Qc,a.e());c.uniform1f(this.n.Sc,a.b());c.uniform1f(this.n.Tc,a.f());c.bindTexture(3553,b.g);c.drawArrays(5,0,4)},this);return b};m.cb=function(a,b){yg.i.cb.call(this,a,b);var c=w(a);this.v[c]=J(b,"change",this.vc,l,this)};var Bg={$c:"dom",dd:"webgl"},Cg=["webgl","dom"],tg="postrender",Xf="backgroundColor",uf="center",tf="layers",vf="resolution",Yf="rotation",wf="size";
function Z(a){var b,c;V.call(this);var d={};t(a.center)&&(d[uf]=a.center);d[tf]=t(a.layers)?a.layers:new X;d.projection=a.projection!=j?v(a.projection)?wd(a.projection):a.projection:wd("EPSG:3857");t(a.resolution)?d[vf]=a.resolution:t(a.zoom)&&(d[vf]=Bd/(128<<a.zoom));d.userProjection=a.userProjection!=j?v(a.userProjection)?wd(a.userProjection):a.userProjection:wd("EPSG:4326");c=Wf;var e;e=t(a.renderers)?a.renderers:t(a.renderer)?[a.renderer]:Cg;var f;for(f=0;f<e.length;++f)if(b=e[f],"dom"==b){if(Td()){c=
eg;break}}else if("webgl"==b&&kg()){c=yg;break}if(t(a.resolutions)){var g=a.resolutions;e=function(a,b){if(t(a)){var c=hd(g,a),c=sc(c+b,0,g.length-1);return g[c]}}}else{t(a.maxResolution)&&t(a.numZoomLevels)&&t(a.zoomFactor)?(e=a.maxResolution,f=a.numZoomLevels,b=a.zoomFactor):(e=Bd/128,f=116,b=Math.exp(Math.log(2)/4));var k=b,q=e,u=f-1;e=function(a,b){if(t(a)){var c=Math.floor(Math.log(q/a)/Math.log(k)+0.5),c=Math.max(c+b,0);t(u)&&(c=Math.min(c,u));return q/Math.pow(k,c)}}}f=new $e(e);t(a.controls)?
e=a.controls:(e=new X,e.push(new of({})),e.push(new xf({delta:t(a.zoomDelta)?a.zoomDelta:4})));if(t(a.interactions))b=a.interactions;else{b=new X;(t(a.rotate)?a.rotate:1)&&b.push(new Ff(Af));if(t(a.doubleClickZoom)?a.doubleClickZoom:1)b.push(new zf(t(a.zoomDelta)?a.zoomDelta:4));(t(a.dragPan)?a.dragPan:1)&&b.push(new Ef(Bf));var r=t(a.keyboardPanOffset)?a.keyboardPanOffset:80;if(t(a.keyboard)?a.keyboard:1)b.push(new Kf(r)),b.push(new Lf);if(t(a.mouseWheelZoom)?a.mouseWheelZoom:1)b.push(new Mf(t(a.mouseWheelZoomDelta)?
a.mouseWheelZoomDelta:1));(t(a.shiftDragZoom)?a.shiftDragZoom:1)&&b.push(new If(Cf))}a=v(a.target)?document.getElementById(a.target):a.target;this.bb=zd;this.jb=vd;this.Rb=l;this.oa=this.l=0;this.na=l;this.qa=a;this.J=f;this.b=Bc("DIV","ol-viewport");this.b.style.position="relative";this.b.style.overflow="hidden";this.b.style.width="100%";this.b.style.height="100%";this.qa.appendChild(this.b);this.s=Bc("DIV","ol-overlaycontainer");J(this.s,["click",Xe?"touchstart":"mousedown"],Rb);this.b.appendChild(this.s);
a=new ff(this);J(a,[hf,jf,lf,mf,kf],this.Kb,l,this);Nb(this,a);a=new oe(document);J(a,"key",this.ub,l,this);Nb(this,a);a=new Ne(this.b);J(a,"mousewheel",this.ub,l,this);Nb(this,a);this.m=e;J(this.m,"add",this.tc,l,this);J(this.m,"remove",this.uc,l,this);this.ib=b;this.f=new c(this.b,this);Nb(this,this.f);this.bc=new je;J(this.bc,"resize",this.vb,l,this);J(this,W("projection"),this.yc,l,this);J(this,W("userProjection"),this.Bc,l,this);this.Ya(d);this.vb();this.m.forEach(function(a){a.C(this)},this)}
A(Z,V);Z.prototype.o=function(){Ec(this.b);Z.i.o.call(this)};Z.prototype.Ub=function(){return this.r(Xf)};Z.prototype.getBackgroundColor=Z.prototype.Ub;Z.prototype.c=function(){return this.r(uf)};Z.prototype.getCenter=Z.prototype.c;Z.prototype.Wb=ca("m");function qf(a){if(a.u()){var b=a.c(),c=a.a(),a=a.d();return new Zc(b.x-c*a.width/2,b.y-c*a.height/2,b.x+c*a.width/2,b.y+c*a.height/2)}}Z.prototype.Xb=ca("ib");
function Hf(a,b){if(a.u()){var c=a.f;$f(c);var d=[b.x,b.y,0];Sf(c.c,d,d);return new bf(d[0],d[1])}}Z.prototype.g=function(){return this.r("projection")};Z.prototype.getProjection=Z.prototype.g;Z.prototype.a=function(){return this.r(vf)};Z.prototype.getResolution=Z.prototype.a;function dg(a){var b=a.c(),c=a.a(),d=a.e()||0,e=a.d(),a=c*e.width/2,c=c*e.height/2,c=[new T(-a,-c),new T(-a,c),new T(a,-c),new T(a,c)];C(c,function(a){a.rotate(d);a.add(b)});return $c.apply(j,c)}
Z.prototype.e=function(){return this.r(Yf)||0};Z.prototype.getRotation=Z.prototype.e;Z.prototype.d=function(){return this.r(wf)};Z.prototype.getSize=Z.prototype.d;Z.prototype.Vb=function(){return this.r("userProjection")};Z.prototype.getUserProjection=Z.prototype.Vb;m=Z.prototype;m.ub=function(a,b){this.Kb(new cf(b||a.type,this,a))};m.tc=function(a){a.a.C(this)};m.uc=function(a){a.a.C(j)};m.Kb=function(a){var b=this.ib.a;if(P(this,a)!==l)for(var c=b.length-1;0<=c&&!(b[c].b(a),a.wa);c--);};m.yc=function(){Bg(this)};
m.Bc=function(){Bg(this)};m.vb=function(){this.lb(new Wc(this.qa.clientWidth,this.qa.clientHeight))};m.u=function(){var a;if(a=this.c()!=j)if(a=t(this.a()))a=this.d()!=j;return a};function Bg(a){var b=a.g(),c=a.Vb();b!=j&&c!=j?(a.jb=yd(b,c),a.bb=yd(c,b)):(a.jb=vd,a.bb=zd)}m.p=function(){1>this.l&&(0===this.oa?We(this):this.na=i)};
function We(a){var b=a.f.p();a.na=l;if(b!=a.Rb){if(b){if(1==++a.l){var c=w(a);c in Te||(Te[c]=a);Ve()}}else 0===--a.l&&(c=w(a),delete Te[c],Ia(Te)&&Ue&&Se(Ue));a.Rb=b}P(a,rg)}m.rotate=function(a,b){a=this.J.a(a,b);this.Ka(a)};m.Nc=function(a){this.set(Xf,a)};Z.prototype.setBackgroundColor=Z.prototype.Nc;Z.prototype.h=function(a){this.set(uf,a)};Z.prototype.setCenter=Z.prototype.h;Z.prototype.Zb=function(a){this.set(tf,a)};Z.prototype.setLayers=Z.prototype.Zb;
Z.prototype.e=function(){return this.r(Yf)||0};Z.prototype.getRotation=Z.prototype.e;Z.prototype.d=function(){return this.r(wf)};Z.prototype.getSize=Z.prototype.d;Z.prototype.Vb=function(){return this.r("userProjection")};Z.prototype.getUserProjection=Z.prototype.Vb;m=Z.prototype;m.ub=function(a,b){this.Kb(new cf(b||a.type,this,a))};m.tc=function(a){a.a.C(this)};m.uc=function(a){a.a.C(j)};m.Kb=function(a){var b=this.ib.a;if(P(this,a)!==l)for(var c=b.length-1;0<=c&&!(b[c].b(a),a.wa);c--);};m.yc=function(){Dg(this)};
m.Bc=function(){Dg(this)};m.vb=function(){this.lb(new Wc(this.qa.clientWidth,this.qa.clientHeight))};m.u=function(){var a;if(a=this.c()!=j)if(a=t(this.a()))a=this.d()!=j;return a};function Dg(a){var b=a.g(),c=a.Vb();b!=j&&c!=j?(a.jb=yd(b,c),a.bb=yd(c,b)):(a.jb=vd,a.bb=zd)}m.p=function(){1>this.l&&(0===this.oa?We(this):this.na=i)};
function We(a){var b=a.f.p();a.na=l;if(b!=a.Rb){if(b){if(1==++a.l){var c=w(a);c in Te||(Te[c]=a);Ve()}}else 0===--a.l&&(c=w(a),delete Te[c],Ia(Te)&&Ue&&Se(Ue));a.Rb=b}P(a,tg)}m.rotate=function(a,b){a=this.J.a(a,b);this.Ka(a)};m.Nc=function(a){this.set(Xf,a)};Z.prototype.setBackgroundColor=Z.prototype.Nc;Z.prototype.h=function(a){this.set(uf,a)};Z.prototype.setCenter=Z.prototype.h;Z.prototype.Zb=function(a){this.set(tf,a)};Z.prototype.setLayers=Z.prototype.Zb;
Z.prototype.Yb=function(a){this.set("projection",a)};Z.prototype.setProjection=Z.prototype.Yb;Z.prototype.v=function(a){this.set(vf,a)};Z.prototype.setResolution=Z.prototype.v;Z.prototype.Ka=function(a){this.set(Yf,a)};Z.prototype.setRotation=Z.prototype.Ka;Z.prototype.lb=function(a){this.set(wf,a)};Z.prototype.setSize=Z.prototype.lb;Z.prototype.$b=function(a){this.h(this.bb(a))};Z.prototype.setUserCenter=Z.prototype.$b;Z.prototype.ac=function(a){this.set("userProjection",a)};
Z.prototype.setUserProjection=Z.prototype.ac;function Jf(a,b,c){++a.oa;try{b.call(c)}finally{0===--a.oa&&(1>a.l&&a.na)&&We(a)}}Z.prototype.zoom=function(a,b){var c=this.J.resolution(this.a(),a);if(c!=j&&b!=j){var d=this.c(),e=this.a(),f=new T(b.x-c*(b.x-d.x)/e,b.y-c*(b.y-d.y)/e);Jf(this,function(){this.h(f);this.v(c)},this)}else this.v(c)};function Cg(a){var b=Bc("DIV",{"class":"ol-mouse-position"});nf.call(this,{element:b,map:a.map,target:a.target});this.h=a.projection;this.e=a.coordinateFormat;this.d=t(a.undefinedHtml)?a.undefinedHtml:"";this.c=zd;this.b=[];this.f()}A(Cg,nf);Cg.prototype.f=function(){Dg(this);this.element.innerHTML=this.d};Cg.prototype.l=function(a){var b=this.a,a=Fe(a,b.b),b=b.u()?ef(b.f,new bf(a.x,a.y)):j;b===j?b=this.d:(b=this.c(b),b=t(this.e)?this.e(b):b.toString());this.element.innerHTML=b};
Cg.prototype.m=function(){this.element.innerHTML=this.d};Cg.prototype.C=function(a){this.b!==j&&(C(this.b,L),this.b=j);Cg.i.C.call(this,a);if(a!==j){var b=a.b;this.s=[J(a,W("projection"),this.f,l,this),J(b,"mousemove",this.l,l,this),J(b,"mouseout",this.m,l,this)];Dg(this)}};function Dg(a){var b=a.a;b===j?a.c=zd:(b=b.g(),a.c=!t(b)||!t(a.h)?zd:yd(b,a.h))};function Eg(){this.a={}}A(Eg,yf);Eg.prototype.c=function(a,b){var c;for(c=0;c<a.length;++c)this.a[a.charCodeAt(c)]=b};Eg.prototype.b=function(a){if("key"==a.type){var b=this.a[a.a.ua];b&&(b(),a.t())}};function Fg(a){this.c=this.a=this.e=j;this.d=[Gg,Hg];this.f=[];t(a.coordinate)&&this.h(a.coordinate);t(a.element)&&Ig(this,a.element);t(a.map)&&this.g(a.map);t(a.positioning)&&(this.d=a.positioning,this.b())}Fg.prototype.h=function(a){this.e=a;this.b()};function Ig(a,b){a.a&&Ec(a.a);a.a=b;a.c&&(we(a.a,"position","absolute"),Dc(a.c.s,a.a));a.b()}Fg.prototype.l=ca("a");
Fg.prototype.g=function(a){this.c=a;C(this.f,L);this.a&&Ig(this,this.a);this.f=a?[J(a,W(uf),this.b,l,this),J(a,W(vf),this.b,l,this),J(a,W(Yf),this.b,l,this),J(a,W(wf),this.b,l,this)]:[];this.b()};Fg.prototype.b=function(){if(this.c!==j&&this.e!==j&&this.a!==j){var a=Hf(this.c,this.e),b=this.c.r(wf),c=Math.round(a.x);this.d[0]===Jg&&(c=b.width-c);a=Math.round(a.y);this.d[1]===Hg&&(a=b.height-a);we(this.a,this.d[0],c+"px");we(this.a,this.d[1],a+"px")}};var Gg="left",Jg="right",Hg="bottom";function Kg(a){var b=Pd;t(a.P)?b=a.P:t(a.Wc)?b=Od(za(a.Wc,Nd)):t(a.url)&&(b=Nd(a.url));var c=new Xd({z:a.z}),d=a.w,b=d!=j?Qd(function(b){if(a.z<b.j)return j;var f=1<<b.j,g=-b.y-1;if(0>g||f<=g)return j;f=tc(b.x,f);return!Yc(jd(c,new cd(b.j,f,b.y)),d)?j:new cd(b.j,f,g)},b):Qd(function(b){if(a.z<b.j)return j;var c=1<<b.j,d=-b.y-1;return 0>d||c<=d?j:new cd(b.j,tc(b.x,c),d)},b);Vd.call(this,{F:a.F,crossOrigin:a.crossOrigin,w:a.w,projection:wd("EPSG:3857"),K:c,P:b})}A(Kg,Vd);function Lg(){Kg.call(this,{F:[new Id('Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">'),new Id('Data &copy; <a href="http://www.openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA</a>')],z:28,url:"http://otile{1-4}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg"})}A(Lg,Kg);
function Mg(){Kg.call(this,{F:[new Id('Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">'),new Id("Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency")],z:18,url:"http://oatile{1-4}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg"})}A(Mg,Kg);function Ng(){Kg.call(this,{F:[new Id('&copy; <a href="http://www.openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA</a>')],z:18,url:"http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png"})}A(Ng,Kg);var Og={terrain:{type:"jpg",Gb:4,z:18},toner:{type:"png",Gb:0,z:20},watercolor:{type:"jpg",Gb:3,z:16}};
function Pg(a){var b=new Id('Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.'),c=a.Lc;t(a.ic)&&(c+="-"+a.ic);a=Og[a.Lc];Kg.call(this,{F:[b],z:a.z,url:"http://{a-d}.tile.stamen.com/"+c+"/{z}/{x}/{y}."+a.type})}A(Pg,Kg);var Qg=[];z("grid",function(a){Qg.push(a)});function Rg(a){Vd.call(this,{projection:wd("EPSG:3857")});this.c=l;a=this.e=Mc(a.uri,{nb:i});a.a.push([this.f,j,this]);a.R&&Ic(a)}A(Rg,Vd);
Rg.prototype.f=function(){var a=Qg.pop(),b=wd("EPSG:4326"),c,d;t(a.bounds)?(c=a.bounds,c=new Zc(c[0],c[1],c[2],c[3]),this.g=d=c.transform(yd(b,this.h))):d=c=j;var e=a.minzoom||0,f=a.maxzoom||22,g=new Xd({z:f});this.K=g;this.P=Qd(function(a){if(a.j<e||f<a.j)return j;var b=1<<a.j,c=-a.y-1;if(0>c||b<=c)return j;b=tc(a.x,b);return d!==j&&!Yc(jd(g,new cd(a.j,b,a.y)),d)?j:new cd(a.j,b,c)},Od(za(a.tiles,Nd)));t(a.attribution)&&(this.a=[new Id(a.attribution,[new od(g,c,e,f)],b)]);this.c=i;P(this,"load")};
Rg.prototype.V=ca("c");z("goog.require",s);z("ol.BingMapsStyle",Yd);Yd.AERIAL="Aerial";Yd.AERIAL_WITH_LABELS="AerialWithLabels";Yd.COLLINS_BART="CollinsBart";Yd.ORDNANCE_SURVEY="OrdnanceSurvey";Yd.ROAD="Road";z("ol.Collection",X);X.prototype.clear=X.prototype.clear;X.prototype.forEach=X.prototype.forEach;X.prototype.getArray=X.prototype.jc;X.prototype.getAt=X.prototype.kc;X.prototype.getLength=X.prototype.sb;X.prototype.insertAt=X.prototype.Ba;X.prototype.pop=X.prototype.Jb;X.prototype.push=X.prototype.push;
Z.prototype.setUserProjection=Z.prototype.ac;function Jf(a,b,c){++a.oa;try{b.call(c)}finally{0===--a.oa&&(1>a.l&&a.na)&&We(a)}}Z.prototype.zoom=function(a,b){var c=this.J.resolution(this.a(),a);if(c!=j&&b!=j){var d=this.c(),e=this.a(),f=new T(b.x-c*(b.x-d.x)/e,b.y-c*(b.y-d.y)/e);Jf(this,function(){this.h(f);this.v(c)},this)}else this.v(c)};function Eg(a){var b=Bc("DIV",{"class":"ol-mouse-position"});nf.call(this,{element:b,map:a.map,target:a.target});this.h=a.projection;this.e=a.coordinateFormat;this.d=t(a.undefinedHtml)?a.undefinedHtml:"";this.c=zd;this.b=[];this.f()}A(Eg,nf);Eg.prototype.f=function(){Fg(this);this.element.innerHTML=this.d};Eg.prototype.l=function(a){var b=this.a,a=Fe(a,b.b),b=b.u()?ef(b.f,new bf(a.x,a.y)):j;b===j?b=this.d:(b=this.c(b),b=t(this.e)?this.e(b):b.toString());this.element.innerHTML=b};
Eg.prototype.m=function(){this.element.innerHTML=this.d};Eg.prototype.C=function(a){this.b!==j&&(C(this.b,L),this.b=j);Eg.i.C.call(this,a);if(a!==j){var b=a.b;this.s=[J(a,W("projection"),this.f,l,this),J(b,"mousemove",this.l,l,this),J(b,"mouseout",this.m,l,this)];Fg(this)}};function Fg(a){var b=a.a;b===j?a.c=zd:(b=b.g(),a.c=!t(b)||!t(a.h)?zd:yd(b,a.h))};function Gg(){this.a={}}A(Gg,yf);Gg.prototype.c=function(a,b){var c;for(c=0;c<a.length;++c)this.a[a.charCodeAt(c)]=b};Gg.prototype.b=function(a){if("key"==a.type){var b=this.a[a.a.ua];b&&(b(),a.t())}};function Hg(a){this.c=this.a=this.e=j;this.d=[Ig,Jg];this.f=[];t(a.coordinate)&&this.h(a.coordinate);t(a.element)&&Kg(this,a.element);t(a.map)&&this.g(a.map);t(a.positioning)&&(this.d=a.positioning,this.b())}Hg.prototype.h=function(a){this.e=a;this.b()};function Kg(a,b){a.a&&Ec(a.a);a.a=b;a.c&&(we(a.a,"position","absolute"),Dc(a.c.s,a.a));a.b()}Hg.prototype.l=ca("a");
Hg.prototype.g=function(a){this.c=a;C(this.f,L);this.a&&Kg(this,this.a);this.f=a?[J(a,W(uf),this.b,l,this),J(a,W(vf),this.b,l,this),J(a,W(Yf),this.b,l,this),J(a,W(wf),this.b,l,this)]:[];this.b()};Hg.prototype.b=function(){if(this.c!==j&&this.e!==j&&this.a!==j){var a=Hf(this.c,this.e),b=this.c.r(wf),c=Math.round(a.x);this.d[0]===Lg&&(c=b.width-c);a=Math.round(a.y);this.d[1]===Jg&&(a=b.height-a);we(this.a,this.d[0],c+"px");we(this.a,this.d[1],a+"px")}};var Ig="left",Lg="right",Jg="bottom";function Mg(a){var b=Pd;t(a.P)?b=a.P:t(a.Wc)?b=Od(za(a.Wc,Nd)):t(a.url)&&(b=Nd(a.url));var c=new Xd({z:a.z}),d=a.w,b=d!=j?Qd(function(b){if(a.z<b.j)return j;var f=1<<b.j,g=-b.y-1;if(0>g||f<=g)return j;f=tc(b.x,f);return!Yc(jd(c,new cd(b.j,f,b.y)),d)?j:new cd(b.j,f,g)},b):Qd(function(b){if(a.z<b.j)return j;var c=1<<b.j,d=-b.y-1;return 0>d||c<=d?j:new cd(b.j,tc(b.x,c),d)},b);Vd.call(this,{F:a.F,crossOrigin:a.crossOrigin,w:a.w,projection:wd("EPSG:3857"),K:c,P:b})}A(Mg,Vd);function Ng(){Mg.call(this,{F:[new Id('Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">'),new Id('Data &copy; <a href="http://www.openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA</a>')],z:28,url:"http://otile{1-4}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg"})}A(Ng,Mg);
function Og(){Mg.call(this,{F:[new Id('Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">'),new Id("Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency")],z:18,url:"http://oatile{1-4}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg"})}A(Og,Mg);function Pg(){Mg.call(this,{F:[new Id('&copy; <a href="http://www.openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA</a>')],z:18,url:"http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png"})}A(Pg,Mg);var Qg={terrain:{type:"jpg",Gb:4,z:18},toner:{type:"png",Gb:0,z:20},watercolor:{type:"jpg",Gb:3,z:16}};
function Rg(a){var b=new Id('Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.'),c=a.Lc;t(a.ic)&&(c+="-"+a.ic);a=Qg[a.Lc];Mg.call(this,{F:[b],z:a.z,url:"http://{a-d}.tile.stamen.com/"+c+"/{z}/{x}/{y}."+a.type})}A(Rg,Mg);var Sg=[];z("grid",function(a){Sg.push(a)});function Tg(a){Vd.call(this,{projection:wd("EPSG:3857")});this.c=l;a=this.e=Mc(a.uri,{nb:i});a.a.push([this.f,j,this]);a.R&&Ic(a)}A(Tg,Vd);
Tg.prototype.f=function(){var a=Sg.pop(),b=wd("EPSG:4326"),c,d;t(a.bounds)?(c=a.bounds,c=new Zc(c[0],c[1],c[2],c[3]),this.g=d=c.transform(yd(b,this.h))):d=c=j;var e=a.minzoom||0,f=a.maxzoom||22,g=new Xd({z:f});this.K=g;this.P=Qd(function(a){if(a.j<e||f<a.j)return j;var b=1<<a.j,c=-a.y-1;if(0>c||b<=c)return j;b=tc(a.x,b);return d!==j&&!Yc(jd(g,new cd(a.j,b,a.y)),d)?j:new cd(a.j,b,c)},Od(za(a.tiles,Nd)));t(a.attribution)&&(this.a=[new Id(a.attribution,[new od(g,c,e,f)],b)]);this.c=i;P(this,"load")};
Tg.prototype.V=ca("c");z("goog.require",s);z("ol.BingMapsStyle",Yd);Yd.AERIAL="Aerial";Yd.AERIAL_WITH_LABELS="AerialWithLabels";Yd.COLLINS_BART="CollinsBart";Yd.ORDNANCE_SURVEY="OrdnanceSurvey";Yd.ROAD="Road";z("ol.Collection",X);X.prototype.clear=X.prototype.clear;X.prototype.forEach=X.prototype.forEach;X.prototype.getArray=X.prototype.jc;X.prototype.getAt=X.prototype.kc;X.prototype.getLength=X.prototype.sb;X.prototype.insertAt=X.prototype.Ba;X.prototype.pop=X.prototype.Jb;X.prototype.push=X.prototype.push;
X.prototype.removeAt=X.prototype.Nb;X.prototype.setAt=X.prototype.Mc;z("ol.Coordinate",T);z("ol.CoordinateFormat",ie);ie.hdms=ie.Dc;z("ol.Extent",Zc);
function Sg(a){Z.call(this,{center:a.center,controls:a.controls,doubleClickZoom:a.doubleClickZoom,dragPan:a.dragPan,interactions:a.interactions,keyboard:a.keyboard,keyboardPanOffset:a.keyboardPanOffset,layers:a.layers,maxResolution:a.maxResolution,mouseWheelZoom:a.mouseWheelZoom,mouseWheelZoomDelta:a.mouseWheelZoomDelta,numZoomLevels:a.numZoomLevels,projection:a.projection,renderer:a.renderer,renderers:a.renderers,resolution:a.resolution,resolutions:a.resolutions,rotate:a.rotate,shiftDragZoom:a.shiftDragZoom,
target:a.target,userProjection:a.userProjection,zoom:a.zoom,zoomDelta:a.zoomDelta,zoomFactor:a.zoomFactor})}A(Sg,Z);z("ol.Map",Sg);Z.prototype.getControls=Z.prototype.Wb;Z.prototype.getInteractions=Z.prototype.Xb;cf.prototype.getCoordinate=cf.prototype.c;z("ol.Object",V);V.prototype.bindTo=V.prototype.cc;V.prototype.changed=V.prototype.fc;V.prototype.get=V.prototype.r;V.prototype.notify=V.prototype.Ib;V.prototype.set=V.prototype.set;V.prototype.setOptions=V.prototype.Pb;V.prototype.setValues=V.prototype.Ya;
V.prototype.unbind=V.prototype.gb;V.prototype.unbindAll=V.prototype.Vc;z("ol.Projection",U);U.getFromCode=wd;U.getTransform=yd;U.getTransformFromCodes=Ad;U.transform=function(a,b,c){return yd(b,c)(a)};U.transformWithCodes=function(a,b,c){return Ad(b,c)(a)};U.prototype.getCode=U.prototype.d;U.prototype.getExtent=U.prototype.f;U.prototype.getUnits=U.prototype.e;z("ol.RendererHint",zg);zg.DOM="dom";zg.WEBGL="webgl";function Tg(a){of.call(this,{map:a.map,target:a.target})}A(Tg,of);
z("ol.control.Attribution",Tg);function Ug(a){Cg.call(this,{coordinateFormat:a.coordinateFormat,map:a.map,projection:a.projection,target:a.target,undefinedHtml:a.undefinedHtml})}A(Ug,Cg);z("ol.control.MousePosition",Ug);function Vg(a){xf.call(this,{delta:a.delta,map:a.map,target:a.target})}A(Vg,xf);z("ol.control.Zoom",Vg);z("ol.interaction.Keyboard",Eg);Eg.prototype.addCallback=Eg.prototype.c;
function Wg(a){Y.call(this,{brightness:a.brightness,contrast:a.contrast,hue:a.hue,opacity:a.opacity,saturation:a.saturation,source:a.source,visible:a.visible})}A(Wg,ag);z("ol.layer.TileLayer",Wg);function Xg(a){Fg.call(this,{coordinate:a.coordinate,element:a.element,map:a.map,positioning:a.positioning})}A(Xg,Fg);z("ol.overlay.Overlay",Xg);Fg.prototype.getElement=Fg.prototype.l;Fg.prototype.setCoordinate=Fg.prototype.h;Fg.prototype.setMap=Fg.prototype.g;z("ol.source.BingMaps",Zd);
z("ol.source.MapQuestOSM",Lg);z("ol.source.MapQuestOpenAerial",Mg);z("ol.source.OpenStreetMap",Ng);z("ol.source.Stamen",Pg);z("ol.source.TileJSON",Rg);})();
function Ug(a){Z.call(this,{center:a.center,controls:a.controls,doubleClickZoom:a.doubleClickZoom,dragPan:a.dragPan,interactions:a.interactions,keyboard:a.keyboard,keyboardPanOffset:a.keyboardPanOffset,layers:a.layers,maxResolution:a.maxResolution,mouseWheelZoom:a.mouseWheelZoom,mouseWheelZoomDelta:a.mouseWheelZoomDelta,numZoomLevels:a.numZoomLevels,projection:a.projection,renderer:a.renderer,renderers:a.renderers,resolution:a.resolution,resolutions:a.resolutions,rotate:a.rotate,shiftDragZoom:a.shiftDragZoom,
target:a.target,userProjection:a.userProjection,zoom:a.zoom,zoomDelta:a.zoomDelta,zoomFactor:a.zoomFactor})}A(Ug,Z);z("ol.Map",Ug);Z.prototype.getControls=Z.prototype.Wb;Z.prototype.getInteractions=Z.prototype.Xb;cf.prototype.getCoordinate=cf.prototype.c;z("ol.Object",V);V.prototype.bindTo=V.prototype.cc;V.prototype.changed=V.prototype.fc;V.prototype.get=V.prototype.r;V.prototype.notify=V.prototype.Ib;V.prototype.set=V.prototype.set;V.prototype.setOptions=V.prototype.Pb;V.prototype.setValues=V.prototype.Ya;
V.prototype.unbind=V.prototype.gb;V.prototype.unbindAll=V.prototype.Vc;z("ol.Projection",U);U.getFromCode=wd;U.getTransform=yd;U.getTransformFromCodes=Ad;U.transform=function(a,b,c){return yd(b,c)(a)};U.transformWithCodes=function(a,b,c){return Ad(b,c)(a)};U.prototype.getCode=U.prototype.d;U.prototype.getExtent=U.prototype.f;U.prototype.getUnits=U.prototype.e;z("ol.RendererHint",Bg);Bg.DOM="dom";Bg.WEBGL="webgl";function Vg(a){of.call(this,{map:a.map,target:a.target})}A(Vg,of);
z("ol.control.Attribution",Vg);function Wg(a){Eg.call(this,{coordinateFormat:a.coordinateFormat,map:a.map,projection:a.projection,target:a.target,undefinedHtml:a.undefinedHtml})}A(Wg,Eg);z("ol.control.MousePosition",Wg);function Xg(a){xf.call(this,{delta:a.delta,map:a.map,target:a.target})}A(Xg,xf);z("ol.control.Zoom",Xg);z("ol.interaction.Keyboard",Gg);Gg.prototype.addCallback=Gg.prototype.c;
function Yg(a){Y.call(this,{brightness:a.brightness,contrast:a.contrast,hue:a.hue,opacity:a.opacity,saturation:a.saturation,source:a.source,visible:a.visible})}A(Yg,ag);z("ol.layer.TileLayer",Yg);function Zg(a){Hg.call(this,{coordinate:a.coordinate,element:a.element,map:a.map,positioning:a.positioning})}A(Zg,Hg);z("ol.overlay.Overlay",Zg);Hg.prototype.getElement=Hg.prototype.l;Hg.prototype.setCoordinate=Hg.prototype.h;Hg.prototype.setMap=Hg.prototype.g;z("ol.source.BingMaps",Zd);
z("ol.source.MapQuestOSM",Ng);z("ol.source.MapQuestOpenAerial",Og);z("ol.source.OpenStreetMap",Pg);z("ol.source.Stamen",Rg);z("ol.source.TileJSON",Tg);})();

View File

@@ -2,6 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">

View File

@@ -0,0 +1 @@
<!doctype html><html><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta><link href="style.css" rel="stylesheet" type="text/css"><title>ol3 examples</title></head><body><h1>ol3 examples</h1><ul><li><a href="full-screen.html">full screen</a></li><li><a href="local.html">local</a></li><li><a href="overlay-and-popup.html">overlay and popup</a></li><li><a href="side-by-side.html">side by side</a></li><li><a href="two-layers.html">two layers</a></li></ul><script src="index.js" type="text/javascript"></script></body></html>

16
master/examples/index.js Normal file
View File

@@ -0,0 +1,16 @@
/**
* Loader to append the query string to every A element in the document.
*
* This is so that (for example) visiting
* /examples/index.html?mode=RAW&Debug=true
* will cause all links to automatically include the ?mode=RAW&Debug=true.
*/
(function() {
var as = document.getElementsByTagName('a');
var i, n = as.length;
for (i = 0; i < n; ++i) {
as[i].href += window.location.search;
}
})();

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
html, body, #map {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
</style>
<link rel="stylesheet" href="../css/ol.css" type="text/css">
<title>ol3 local demo</title>
</head>
<body>
<div id="map"></div>
<script src="loader.js?id=local" type="text/javascript"></script>
</body>
</html>

27
master/examples/local.js Normal file
View File

@@ -0,0 +1,27 @@
goog.require('goog.debug.Console');
goog.require('goog.debug.Logger');
goog.require('goog.debug.Logger.Level');
goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.Map');
goog.require('ol.source.MapQuestOpenAerial');
if (goog.DEBUG) {
goog.debug.Console.autoInstall();
goog.debug.Logger.getLogger('ol').setLevel(goog.debug.Logger.Level.INFO);
}
var layer = new ol.layer.TileLayer({
source: new ol.source.XYZ({
maxZoom: 8,
url: 'http://localhost:8080/tiles/0/tiles/{z}/{x}/{y}'
})
});
var map = new ol.Map({
center: new ol.Coordinate(0, 0),
layers: new ol.Collection([layer]),
target: 'map',
zoom: 2
});

View File

@@ -2,6 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">

View File

@@ -2,6 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
.map {

View File

@@ -2,6 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
.map {