[OpenLayers-Commits] r10958 - sandbox/camptocamp/ifremer/openlayers/build

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Sat Dec 11 11:12:26 EST 2010


Author: fvanderbiest
Date: 2010-12-11 08:12:26 -0800 (Sat, 11 Dec 2010)
New Revision: 10958

Modified:
   sandbox/camptocamp/ifremer/openlayers/build/OpenLayers.cc.js
   sandbox/camptocamp/ifremer/openlayers/build/ifremer.cfg
Log:
new build profile

Modified: sandbox/camptocamp/ifremer/openlayers/build/OpenLayers.cc.js
===================================================================
--- sandbox/camptocamp/ifremer/openlayers/build/OpenLayers.cc.js	2010-12-08 17:58:41 UTC (rev 10957)
+++ sandbox/camptocamp/ifremer/openlayers/build/OpenLayers.cc.js	2010-12-11 16:12:26 UTC (rev 10958)
@@ -135,6 +135,8 @@
 this.callbacks&&this.callbacks.eachStep&&this.callbacks.eachStep.call(this,a);this.time>this.duration&&this.stop()},CLASS_NAME:"OpenLayers.Tween"});OpenLayers.Easing={CLASS_NAME:"OpenLayers.Easing"};OpenLayers.Easing.Linear={easeIn:function(a,b,c,d){return c*a/d+b},easeOut:function(a,b,c,d){return c*a/d+b},easeInOut:function(a,b,c,d){return c*a/d+b},CLASS_NAME:"OpenLayers.Easing.Linear"};
 OpenLayers.Easing.Expo={easeIn:function(a,b,c,d){return a==0?b:c*Math.pow(2,10*(a/d-1))+b},easeOut:function(a,b,c,d){return a==d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b},easeInOut:function(a,b,c,d){if(a==0)return b;if(a==d)return b+c;if((a/=d/2)<1)return c/2*Math.pow(2,10*(a-1))+b;return c/2*(-Math.pow(2,-10*--a)+2)+b},CLASS_NAME:"OpenLayers.Easing.Expo"};
 OpenLayers.Easing.Quad={easeIn:function(a,b,c,d){return c*(a/=d)*a+b},easeOut:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},easeInOut:function(a,b,c,d){if((a/=d/2)<1)return c/2*a*a+b;return-c/2*(--a*(a-2)-1)+b},CLASS_NAME:"OpenLayers.Easing.Quad"};
+OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.map.events.un({removelayer:this.updateAttribution,addlayer:this.updateAttribution,changelayer:this.updateAttribution,changebaselayer:this.updateAttribution,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.map.events.on({changebaselayer:this.updateAttribution,
+changelayer:this.updateAttribution,addlayer:this.updateAttribution,removelayer:this.updateAttribution,scope:this});this.updateAttribution();return this.div},updateAttribution:function(){var a=[];if(this.map&&this.map.layers){for(var b=0,c=this.map.layers.length;b<c;b++){var d=this.map.layers[b];d.attribution&&d.getVisibility()&&OpenLayers.Util.indexOf(a,d.attribution)===-1&&a.push(d.attribution)}this.div.innerHTML=a.join(this.separator)}},CLASS_NAME:"OpenLayers.Control.Attribution"});
 OpenLayers.Event={observers:false,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(a){return a.target||a.srcElement},isLeftClick:function(a){return a.which&&a.which==1||a.button&&a.button==1},isRightClick:function(a){return a.which&&a.which==3||a.button&&a.button==2},stop:function(a,b){if(!b)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true},
 findElement:function(a,b){for(var c=OpenLayers.Event.element(a);c.parentNode&&(!c.tagName||c.tagName.toUpperCase()!=b.toUpperCase());)c=c.parentNode;return c},observe:function(a,b,c,d){a=OpenLayers.Util.getElement(a);d=d||false;if(b=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||a.attachEvent))b="keydown";if(!this.observers)this.observers={};if(!a._eventCacheID){var e="eventCacheID_";if(a.id)e=a.id+"_"+e;a._eventCacheID=OpenLayers.Util.createUniqueID(e)}e=a._eventCacheID;this.observers[e]||
 (this.observers[e]=[]);this.observers[e].push({element:a,name:b,observer:c,useCapture:d});if(a.addEventListener)a.addEventListener(b,c,d);else a.attachEvent&&a.attachEvent("on"+b,c)},stopObservingElement:function(a){a=OpenLayers.Util.getElement(a)._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[a])},_removeElementObservers:function(a){if(a)for(var b=a.length-1;b>=0;b--){var c=a[b];OpenLayers.Event.stopObserving.apply(this,[c.element,c.name,c.observer,c.useCapture])}},stopObserving:function(a,
@@ -365,6 +367,9 @@
 OpenLayers.Layer.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:false,initialize:function(a,b,c,d){var e=arguments;e=[a,d];OpenLayers.Layer.prototype.initialize.apply(this,e);this.url=b;this.params=OpenLayers.Util.extend({},c)},destroy:function(){this.params=this.url=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null)a=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.getOptions());
 return a=OpenLayers.Layer.prototype.clone.apply(this,[a])},setUrl:function(a){this.url=a},mergeNewParams:function(a){this.params=OpenLayers.Util.extend(this.params,a);a=this.redraw();this.map!=null&&this.map.events.triggerEvent("changelayer",{layer:this,property:"params"});return a},redraw:function(a){return a?this.mergeNewParams({_olSalt:Math.random()}):OpenLayers.Layer.prototype.redraw.apply(this,[])},selectUrl:function(a,b){for(var c=1,d=0,e=a.length;d<e;d++){c*=a.charCodeAt(d)*this.URL_HASH_FACTOR;
 c-=Math.floor(c)}return b[Math.floor(c*b.length)]},getFullRequestString:function(a,b){var c=b||this.url,d=OpenLayers.Util.extend({},this.params);d=OpenLayers.Util.extend(d,a);var e=OpenLayers.Util.getParameterString(d);if(c instanceof Array)c=this.selectUrl(e,c);e=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(c));for(var f in d)f.toUpperCase()in e&&delete d[f];e=OpenLayers.Util.getParameterString(d);return OpenLayers.Util.urlAppend(c,e)},CLASS_NAME:"OpenLayers.Layer.HTTPRequest"});
+OpenLayers.Layer.SphericalMercator={getExtent:function(){var a=null;return a=this.sphericalMercator?this.map.calculateBounds():OpenLayers.Layer.FixedZoomLevels.prototype.getExtent.apply(this)},getLonLatFromViewPortPx:function(){return OpenLayers.Layer.prototype.getLonLatFromViewPortPx.apply(this,arguments)},getViewPortPxFromLonLat:function(){return OpenLayers.Layer.prototype.getViewPortPxFromLonLat.apply(this,arguments)},initMercatorParameters:function(){this.RESOLUTIONS=[];for(var a=0;a<=this.MAX_ZOOM_LEVEL;++a)this.RESOLUTIONS[a]=
+156543.0339/Math.pow(2,a);this.units="m";this.projection=this.projection||"EPSG:900913"},forwardMercator:function(a,b){var c=a*2.003750834E7/180,d=Math.log(Math.tan((90+b)*Math.PI/360))/(Math.PI/180);d=d*2.003750834E7/180;return new OpenLayers.LonLat(c,d)},inverseMercator:function(a,b){var c=a/2.003750834E7*180,d=b/2.003750834E7*180;d=180/Math.PI*(2*Math.atan(Math.exp(d*Math.PI/180))-Math.PI/2);return new OpenLayers.LonLat(c,d)},projectForward:function(a){var b=OpenLayers.Layer.SphericalMercator.forwardMercator(a.x,
+a.y);a.x=b.lon;a.y=b.lat;return a},projectInverse:function(a){var b=OpenLayers.Layer.SphericalMercator.inverseMercator(a.x,a.y);a.x=b.lon;a.y=b.lat;return a}};(function(){var a=["EPSG:900913","EPSG:3857","EPSG:102113","EPSG:102100"],b=OpenLayers.Projection.addTransform,c=OpenLayers.Layer.SphericalMercator,d=OpenLayers.Projection.nullTransform,e,f,g,h,i;e=0;for(f=a.length;e<f;++e){g=a[e];b("EPSG:4326",g,c.projectForward);b(g,"EPSG:4326",c.projectInverse);for(i=e+1;i<f;++i){h=a[i];b(g,h,d);b(h,g,d)}}})();
 OpenLayers.Control.DrawFeature=OpenLayers.Class(OpenLayers.Control,{layer:null,callbacks:null,EVENT_TYPES:["featureadded"],multi:false,featureAdded:function(){},handlerOptions:null,initialize:function(a,b,c){this.EVENT_TYPES=OpenLayers.Control.DrawFeature.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[c]);this.callbacks=OpenLayers.Util.extend({done:this.drawFeature,modify:function(d,e){this.layer.events.triggerEvent("sketchmodified",
 {vertex:d,feature:e})},create:function(d,e){this.layer.events.triggerEvent("sketchstarted",{vertex:d,feature:e})}},this.callbacks);this.layer=a;this.handlerOptions=this.handlerOptions||{};if(!("multi"in this.handlerOptions))this.handlerOptions.multi=this.multi;if(a=this.layer.styleMap&&this.layer.styleMap.styles.temporary)this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":a})});this.handler=new b(this,this.callbacks,
 this.handlerOptions)},drawFeature:function(a){a=new OpenLayers.Feature.Vector(a);if(this.layer.events.triggerEvent("sketchcomplete",{feature:a})!==false){a.state=OpenLayers.State.INSERT;this.layer.addFeatures([a]);this.featureAdded(a);this.events.triggerEvent("featureadded",{feature:a})}},CLASS_NAME:"OpenLayers.Control.DrawFeature"});
@@ -403,10 +408,10 @@
 OpenLayers.Geometry.segmentsIntersect=function(a,b,c){var d=c&&c.point;c=c&&c.tolerance;var e=false,f=a.x1-b.x1,g=a.y1-b.y1,h=a.x2-a.x1,i=a.y2-a.y1,j=b.y2-b.y1,k=b.x2-b.x1,n=j*h-k*i;j=k*g-j*f;g=h*g-i*f;if(n==0){if(j==0&&g==0)e=true}else{f=j/n;n=g/n;if(f>=0&&f<=1&&n>=0&&n<=1)if(d){h=a.x1+f*h;n=a.y1+f*i;e=new OpenLayers.Geometry.Point(h,n)}else e=true}if(c)if(e){if(d){a=[a,b];b=0;a:for(;b<2;++b){f=a[b];for(i=1;i<3;++i){h=f["x"+i];n=f["y"+i];d=Math.sqrt(Math.pow(h-e.x,2)+Math.pow(n-e.y,2));if(d<c){e.x=
 h;e.y=n;break a}}}}}else{a=[a,b];b=0;a:for(;b<2;++b){h=a[b];n=a[(b+1)%2];for(i=1;i<3;++i){f={x:h["x"+i],y:h["y"+i]};g=OpenLayers.Geometry.distanceToSegment(f,n);if(g.distance<c){e=d?new OpenLayers.Geometry.Point(f.x,f.y):true;break a}}}}return e};
 OpenLayers.Geometry.distanceToSegment=function(a,b){var c=a.x,d=a.y,e=b.x1,f=b.y1,g=b.x2,h=b.y2,i=g-e,j=h-f,k=(i*(c-e)+j*(d-f))/(Math.pow(i,2)+Math.pow(j,2));if(k<=0){e=e;f=f}else if(k>=1){e=g;f=h}else{e=e+k*i;f=f+k*j}return{distance:Math.sqrt(Math.pow(e-c,2)+Math.pow(f-d,2)),x:e,y:f}};
-OpenLayers.Layer.WMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{service:"WMS",version:"1.1.1",request:"GetMap",styles:"",exceptions:"application/vnd.ogc.se_inimage",format:"image/jpeg"},reproject:false,isBaseLayer:true,encodeBBOX:false,noMagic:false,yx:{"EPSG:4326":true},initialize:function(a,b,c,d){var e=[];c=OpenLayers.Util.upperCaseObject(c);if(parseFloat(c.VERSION)>=1.3&&!c.EXCEPTIONS)c.EXCEPTIONS="INIMAGE";e.push(a,b,c,d);OpenLayers.Layer.Grid.prototype.initialize.apply(this,e);
-OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(!this.noMagic&&this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if(d==null||!d.isBaseLayer)this.isBaseLayer=false;if(this.params.FORMAT=="image/jpeg")this.params.FORMAT=OpenLayers.Util.alphaHack()?"image/gif":"image/png"}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments)},clone:function(a){if(a==null)a=new OpenLayers.Layer.WMS(this.name,
-this.url,this.params,this.getOptions());return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},reverseAxisOrder:function(){return parseFloat(this.params.VERSION)>=1.3&&!!this.yx[this.map.getProjectionObject().getCode()]},getURL:function(a){a=this.adjustBounds(a);var b=this.getImageSize(),c={},d=this.reverseAxisOrder();c.BBOX=this.encodeBBOX?a.toBBOX(null,d):a.toArray(d);c.WIDTH=b.w;c.HEIGHT=b.h;return this.getFullRequestString(c)},addTile:function(a,b){return new OpenLayers.Tile.Image(this,
-b,a,null,this.tileSize,this.tileOptions)},mergeNewParams:function(a){a=[OpenLayers.Util.upperCaseObject(a)];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,a)},getFullRequestString:function(){var a=this.map.getProjectionObject();a=this.projection.equals(a)?this.projection.getCode():a.getCode();a=a=="none"?null:a;if(parseFloat(this.params.VERSION)>=1.3)this.params.CRS=a;else this.params.SRS=a;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)},CLASS_NAME:"OpenLayers.Layer.WMS"});
+OpenLayers.Layer.XYZ=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,sphericalMercator:false,zoomOffset:0,serverResolutions:null,initialize:function(a,b,c){if(c&&c.sphericalMercator||this.sphericalMercator)c=OpenLayers.Util.extend({maxExtent:new OpenLayers.Bounds(-2.00375083392E7,-2.00375083392E7,2.00375083392E7,2.00375083392E7),maxResolution:156543.0339,numZoomLevels:19,units:"m",projection:"EPSG:900913"},c);b=b||this.url;a=a||this.name;OpenLayers.Layer.Grid.prototype.initialize.apply(this,
+[a,b,{},c])},clone:function(a){if(a==null)a=new OpenLayers.Layer.XYZ(this.name,this.url,this.getOptions());return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},getURL:function(a){var b=this.map.getResolution(),c=Math.round((a.left-this.maxExtent.left)/(b*this.tileSize.w));a=Math.round((this.maxExtent.top-a.top)/(b*this.tileSize.h));b=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,b):this.map.getZoom()+this.zoomOffset;var d=this.url,e=""+c+a+b;if(d instanceof
+Array)d=this.selectUrl(e,d);return OpenLayers.String.format(d,{x:c,y:a,z:b})},addTile:function(a,b){return new OpenLayers.Tile.Image(this,b,a,null,this.tileSize)},setMap:function(){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin)this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.bottom)},CLASS_NAME:"OpenLayers.Layer.XYZ"});
+OpenLayers.Layer.OSM=OpenLayers.Class(OpenLayers.Layer.XYZ,{name:"OpenStreetMap",attribution:"Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>",sphericalMercator:true,url:"http://tile.openstreetmap.org/${z}/${x}/${y}.png",clone:function(a){if(a==null)a=new OpenLayers.Layer.OSM(this.name,this.url,this.getOptions());return a=OpenLayers.Layer.XYZ.prototype.clone.apply(this,[a])},CLASS_NAME:"OpenLayers.Layer.OSM"});
 OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:true,initialize:function(a,b){this.styles={"default":new OpenLayers.Style(OpenLayers.Feature.Vector.style["default"]),select:new OpenLayers.Style(OpenLayers.Feature.Vector.style.select),temporary:new OpenLayers.Style(OpenLayers.Feature.Vector.style.temporary),"delete":new OpenLayers.Style(OpenLayers.Feature.Vector.style["delete"])};if(a instanceof OpenLayers.Style){this.styles["default"]=a;this.styles.select=a;this.styles.temporary=a;
 this.styles["delete"]=a}else if(typeof a=="object")for(var c in a)if(a[c]instanceof OpenLayers.Style)this.styles[c]=a[c];else if(typeof a[c]=="object")this.styles[c]=new OpenLayers.Style(a[c]);else{this.styles["default"]=new OpenLayers.Style(a);this.styles.select=new OpenLayers.Style(a);this.styles.temporary=new OpenLayers.Style(a);this.styles["delete"]=new OpenLayers.Style(a);break}OpenLayers.Util.extend(this,b)},destroy:function(){for(var a in this.styles)this.styles[a].destroy();this.styles=null},
 createSymbolizer:function(a,b){a||(a=new OpenLayers.Feature.Vector);this.styles[b]||(b="default");a.renderIntent=b;var c={};if(this.extendDefault&&b!="default")c=this.styles["default"].createSymbolizer(a);return OpenLayers.Util.extend(c,this.styles[b].createSymbolizer(a))},addUniqueValueRules:function(a,b,c,d){var e=[],f;for(f in c)e.push(new OpenLayers.Rule({symbolizer:c[f],context:d,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:b,value:f})}));this.styles[a].addRules(e)},

Modified: sandbox/camptocamp/ifremer/openlayers/build/ifremer.cfg
===================================================================
--- sandbox/camptocamp/ifremer/openlayers/build/ifremer.cfg	2010-12-08 17:58:41 UTC (rev 10957)
+++ sandbox/camptocamp/ifremer/openlayers/build/ifremer.cfg	2010-12-11 16:12:26 UTC (rev 10958)
@@ -14,9 +14,11 @@
 
 [include]
 OpenLayers/Map.js
-OpenLayers/Layer/WMS.js
+OpenLayers/Layer/XYZ.js
+OpenLayers/Layer/SphericalMercator.js
 OpenLayers/Filter/Spatial.js
 OpenLayers/Control/DragPan.js
+OpenLayers/Control/Attribution.js
 OpenLayers/Layer/Vector.js
 OpenLayers/Renderer/SVG.js
 OpenLayers/Renderer/VML.js



More information about the Commits mailing list