From 1f8c98db8cfa5d21374e7f7b375dcefa86c6c6a3 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 18 Oct 2012 11:50:40 +0200 Subject: [PATCH] Update --- master/build/ol.js | 72 +++++++++++++------------- master/examples/full-screen.html | 1 + master/examples/index.html | 1 + master/examples/index.js | 16 ++++++ master/examples/local.html | 22 ++++++++ master/examples/local.js | 27 ++++++++++ master/examples/overlay-and-popup.html | 1 + master/examples/side-by-side.html | 1 + master/examples/two-layers.html | 1 + 9 files changed, 106 insertions(+), 36 deletions(-) create mode 100644 master/examples/index.html create mode 100644 master/examples/index.js create mode 100644 master/examples/local.html create mode 100644 master/examples/local.js diff --git a/master/build/ol.js b/master/build/ol.js index 7dfc5f31a5..905c67c3d0 100644 --- a/master/build/ol.js +++ b/master/build/ol.js @@ -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;pthis.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;cg||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.zd||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 MapQuest '),new Id('Data © OpenStreetMap contributors, CC BY-SA')],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 MapQuest '),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('© OpenStreetMap contributors, CC BY-SA')],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 Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.'),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.jc||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;cg||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.zd||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 MapQuest '),new Id('Data © OpenStreetMap contributors, CC BY-SA')],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 MapQuest '),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('© OpenStreetMap contributors, CC BY-SA')],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 Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.'),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.jc||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);})(); diff --git a/master/examples/full-screen.html b/master/examples/full-screen.html index a8ab852868..f4fb9d5b62 100644 --- a/master/examples/full-screen.html +++ b/master/examples/full-screen.html @@ -2,6 +2,7 @@ + + + ol3 local demo + + +
+ + + diff --git a/master/examples/local.js b/master/examples/local.js new file mode 100644 index 0000000000..6a30f4fce2 --- /dev/null +++ b/master/examples/local.js @@ -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 +}); diff --git a/master/examples/overlay-and-popup.html b/master/examples/overlay-and-popup.html index fd0d44eaee..37b6aa871b 100644 --- a/master/examples/overlay-and-popup.html +++ b/master/examples/overlay-and-popup.html @@ -2,6 +2,7 @@ +