1var OpenLayers={VERSION_NUMBER:"Release 2.13 dev",singleFile:!0,_getScriptLocation:function(){for(var a=/(^|(.*?\/))(OpenLayers[^\/]*?\.js)(\?|$)/,b=document.getElementsByTagName("script"),c,d="",e=0,f=b.length;e<f;e++)if(c=b[e].getAttribute("src"))if(c=c.match(a)){d=c[1];break}return function(){return d}}(),ImgPath:""}; 2OpenLayers.Class=function(){var a=arguments.length,b=arguments[0],c=arguments[a-1],d="function"==typeof c.initialize?c.initialize:function(){b.prototype.initialize.apply(this,arguments)};1<a?(a=[d,b].concat(Array.prototype.slice.call(arguments).slice(1,a-1),c),OpenLayers.inherit.apply(null,a)):d.prototype=c;return d}; 3OpenLayers.inherit=function(a,b){var c=function(){};c.prototype=b.prototype;a.prototype=new c;var d,e;for(c=2,d=arguments.length;c<d;c++){e=arguments[c];if("function"===typeof e)e=e.prototype;OpenLayers.Util.extend(a.prototype,e)}};OpenLayers.Util=OpenLayers.Util||{};OpenLayers.Util.extend=function(a,b){a=a||{};if(b){for(var c in b){var d=b[c];void 0!==d&&(a[c]=d)}if(!("function"==typeof window.Event&&b instanceof window.Event)&&b.hasOwnProperty&&b.hasOwnProperty("toString"))a.toString=b.toString}return a}; 4OpenLayers.String={startsWith:function(a,b){return 0==a.indexOf(b)},contains:function(a,b){return-1!=a.indexOf(b)},trim:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(a){for(var a=a.split("-"),b=a[0],c=1,d=a.length;c<d;c++)var e=a[c],b=b+(e.charAt(0).toUpperCase()+e.substring(1));return b},format:function(a,b,c){b||(b=window);return a.replace(OpenLayers.String.tokenRegEx,function(a,e){for(var f,g=e.split(/\.+/),h=0;h<g.length;h++){0==h&&(f=b);if(void 0===f)break; 5f=f[g[h]]}"function"==typeof f&&(f=c?f.apply(null,c):f());return"undefined"==typeof f?"undefined":f})},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(a){return OpenLayers.String.numberRegEx.test(a)},numericIf:function(a,b){var c=a;!0===b&&null!=a&&a.replace&&(a=a.replace(/^\s*|\s*$/g,""));return OpenLayers.String.isNumeric(a)?parseFloat(a):c}}; 6OpenLayers.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(a,b){var c=0;0<b&&(c=parseFloat(a.toPrecision(b)));return c},format:function(a,b,c,d){b="undefined"!=typeof b?b:0;c="undefined"!=typeof c?c:OpenLayers.Number.thousandsSeparator;d="undefined"!=typeof d?d:OpenLayers.Number.decimalSeparator;null!=b&&(a=parseFloat(a.toFixed(b)));var e=a.toString().split(".");1==e.length&&null==b&&(b=0);a=e[0];if(c)for(var f=/(-?[0-9]+)([0-9]{3})/;f.test(a);)a=a.replace(f,"$1"+c+"$2"); 70==b?b=a:(c=1<e.length?e[1]:"0",null!=b&&(c+=Array(b-c.length+1).join("0")),b=a+d+c);return b},zeroPad:function(a,b,c){for(a=a.toString(c||10);a.length<b;)a="0"+a;return a}}; 8OpenLayers.Function={bind:function(a,b){var c=Array.prototype.slice.apply(arguments,[2]);return function(){var d=c.concat(Array.prototype.slice.apply(arguments,[0]));return a.apply(b,d)}},bindAsEventListener:function(a,b){return function(c){return a.call(b,c||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}}; 9OpenLayers.Array={filter:function(a,b,c){var d=[];if(Array.prototype.filter)d=a.filter(b,c);else{var e=a.length;if("function"!=typeof b)throw new TypeError;for(var f=0;f<e;f++)if(f in a){var g=a[f];b.call(c,g,f,a)&&d.push(g)}}return d}}; 10OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,centerLonLat:null,initialize:function(a,b,c,d){OpenLayers.Util.isArray(a)&&(d=a[3],c=a[2],b=a[1],a=a[0]);if(null!=a)this.left=OpenLayers.Util.toFloat(a);if(null!=b)this.bottom=OpenLayers.Util.toFloat(b);if(null!=c)this.right=OpenLayers.Util.toFloat(c);if(null!=d)this.top=OpenLayers.Util.toFloat(d)},clone:function(){return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top)},equals:function(a){var b=!1;null!= 11a&&(b=this.left==a.left&&this.right==a.right&&this.top==a.top&&this.bottom==a.bottom);return b},toString:function(){return[this.left,this.bottom,this.right,this.top].join()},toArray:function(a){return!0===a?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]},toBBOX:function(a,b){null==a&&(a=6);var c=Math.pow(10,a),d=Math.round(this.left*c)/c,e=Math.round(this.bottom*c)/c,f=Math.round(this.right*c)/c,c=Math.round(this.top*c)/c;return!0===b?e+","+d+","+c+","+f:d+ 12","+e+","+f+","+c},toGeometry:function(){return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(this.left,this.bottom),new OpenLayers.Geometry.Point(this.right,this.bottom),new OpenLayers.Geometry.Point(this.right,this.top),new OpenLayers.Geometry.Point(this.left,this.top)])])},getWidth:function(){return this.right-this.left},getHeight:function(){return this.top-this.bottom},getSize:function(){return new OpenLayers.Size(this.getWidth(),this.getHeight())}, 13getCenterPixel:function(){return new OpenLayers.Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)},getCenterLonLat:function(){if(!this.centerLonLat)this.centerLonLat=new OpenLayers.LonLat((this.left+this.right)/2,(this.bottom+this.top)/2);return this.centerLonLat},scale:function(a,b){null==b&&(b=this.getCenterLonLat());var c,d;"OpenLayers.LonLat"==b.CLASS_NAME?(c=b.lon,d=b.lat):(c=b.x,d=b.y);return new OpenLayers.Bounds((this.left-c)*a+c,(this.bottom-d)*a+d,(this.right-c)*a+c,(this.top-d)* 14a+d)},add:function(a,b){if(null==a||null==b)throw new TypeError("Bounds.add cannot receive null values");return new OpenLayers.Bounds(this.left+a,this.bottom+b,this.right+a,this.top+b)}
14,extend:function(a){if(a)switch(a.CLASS_NAME){case "OpenLayers.LonLat":this.extendXY(a.lon,a.lat);break;case "OpenLayers.Geometry.Point":this.extendXY(a.x,a.y);break;case "OpenLayers.Bounds":this.centerLonLat=null;if(null==this.left||a.left<this.left)this.left=a.left;if(null==this.bottom||a.bottom<this.bottom)this.bottom= 15a.bottom;if(null==this.right||a.right>this.right)this.right=a.right;if(null==this.top||a.top>this.top)this.top=a.top}},extendXY:function(a,b){this.centerLonLat=null;if(null==this.left||a<this.left)this.left=a;if(null==this.bottom||b<this.bottom)this.bottom=b;if(null==this.right||a>this.right)this.right=a;if(null==this.top||b>this.top)this.top=b},containsLonLat:function(a,b){"boolean"===typeof b&&(b={inclusive:b});var b=b||{},c=this.contains(a.lon,a.lat,b.inclusive),d=b.worldBounds;d&&!c&&(c=d.getWidth(), 16d=Math.round((a.lon-(d.left+d.right)/2)/c),c=this.containsLonLat({lon:a.lon-d*c,lat:a.lat},{inclusive:b.inclusive}));return c},containsPixel:function(a,b){return this.contains(a.x,a.y,b)},contains:function(a,b,c){null==c&&(c=!0);if(null==a||null==b)return!1;var a=OpenLayers.Util.toFloat(a),b=OpenLayers.Util.toFloat(b),d=!1;return d=c?a>=this.left&&a<=this.right&&b>=this.bottom&&b<=this.top:a>this.left&&a<this.right&&b>this.bottom&&b<this.top},intersectsBounds:function(a,b){"boolean"===typeof b&&(b= 17{inclusive:b});b=b||{};if(b.worldBounds)var c=this.wrapDateLine(b.worldBounds),a=a.wrapDateLine(b.worldBounds);else c=this;if(null==b.inclusive)b.inclusive=!0;var d=!1,e=c.left==a.right||c.right==a.left||c.top==a.bottom||c.bottom==a.top;if(b.inclusive||!e)var d=a.top>=c.bottom&&a.top<=c.top||c.top>a.bottom&&c.top<a.top,e=a.left>=c.left&&a.left<=c.right||c.left>=a.left&&c.left<=a.right,f=a.right>=c.left&&a.right<=c.right||c.right>=a.left&&c.right<=a.right,d=(a.bottom>=c.bottom&&a.bottom<=c.top||c.bottom>= 18a.bottom&&c.bottom<=a.top||d)&&(e||f);if(b.worldBounds&&!d){var g=b.worldBounds,e=g.getWidth(),f=!g.containsBounds(c),g=!g.containsBounds(a);f&&!g?(a=a.add(-e,0),d=c.intersectsBounds(a,{inclusive:b.inclusive})):g&&!f&&(c=c.add(-e,0),d=a.intersectsBounds(c,{inclusive:b.inclusive}))}return d},containsBounds:function(a,b,c){null==b&&(b=!1);null==c&&(c=!0);var d=this.contains(a.left,a.bottom,c),e=this.contains(a.right,a.bottom,c),f=this.contains(a.left,a.top,c),a=this.contains(a.right,a.top,c);return b? 19d||e||f||a:d&&e&&f&&a},determineQuadrant:function(a){var b="",c=this.getCenterLonLat(),b=b+(a.lat<c.lat?"b":"t");return b+=a.lon<c.lon?"l":"r"},transform:function(a,b){this.centerLonLat=null;var c=OpenLayers.Projection.transform({x:this.left,y:this.bottom},a,b),d=OpenLayers.Projection.transform({x:this.right,y:this.bottom},a,b),e=OpenLayers.Projection.transform({x:this.left,y:this.top},a,b),f=OpenLayers.Projection.transform({x:this.right,y:this.top},a,b);this.left=Math.min(c.x,e.x);this.bottom=Math.min(c.y, 20d.y);this.right=Math.max(d.x,f.x);this.top=Math.max(e.y,f.y);return this},wrapDateLine:function(a,b){var b=b||{},c=b.leftTolerance||0,d=b.rightTolerance||0,e=this.clone();if(a){for(var f=a.getWidth();e.left<a.left&&e.right-d<=a.left;)e=e.add(f,0);for(;e.left+c>=a.right&&e.right>a.right;)e=e.add(-f,0);c=e.left+c;c<a.right&&c>a.left&&e.right-d>a.right&&(e=e.add(-f,0))}return e},CLASS_NAME:"OpenLayers.Bounds"}); 21OpenLayers.Bounds.fromString=function(a,b){var c=a.split(",");return OpenLayers.Bounds.fromArray(c,b)};OpenLayers.Bounds.fromArray=function(a,b){return!0===b?new OpenLayers.Bounds(a[1],a[0],a[3],a[2]):new OpenLayers.Bounds(a[0],a[1],a[2],a[3])};OpenLayers.Bounds.fromSize=function(a){return new OpenLayers.Bounds(0,a.h,a.w,0)};OpenLayers.Bounds.oppositeQuadrant=function(a){var b;b=""+("t"==a.charAt(0)?"b":"t");return b+="l"==a.charAt(1)?"r":"l"}; 22OpenLayers.Element={visible:function(a){return"none"!=OpenLayers.Util.getElement(a).style.display},toggle:function(){for(var a=0,b=arguments.length;a<b;a++){var c=OpenLayers.Util.getElement(arguments[a]),d=OpenLayers.Element.visible(c)?"none":"";c.style.display=d}},remove:function(a){a=OpenLayers.Util.getElement(a);a.parentNode.removeChild(a)},getHeight:function(a){a=OpenLayers.Util.getElement(a);return a.offsetHeight},hasClass:function(a,b){var c=a.className;return!!c&&RegExp("(^|\\s)"+b+"(\\s|$)").test(c)}, 23addClass:function(a,b){OpenLayers.Element.hasClass(a,b)||(a.className+=(a.className?" ":"")+b);return a},removeClass:function(a,b){var c=a.className;if(c)a.className=OpenLayers.String.trim(c.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)")," "));return a},toggleClass:function(a,b){OpenLayers.Element.hasClass(a,b)?OpenLayers.Element.removeClass(a,b):OpenLayers.Element.addClass(a,b);return a},getStyle:function(a,b){var a=OpenLayers.Util.getElement(a),c=null;if(a&&a.style){c=a.style[OpenLayers.String.camelize(b)]; 24c||(document.defaultView&&document.defaultView.getComputedStyle?c=(c=document.defaultView.getComputedStyle(a,null))?c.getPropertyValue(b):null:a.currentStyle&&(c=a.currentStyle[OpenLayers.String.camelize(b)]));var d=["left","top","right","bottom"];window.opera&&-1!=OpenLayers.Util.indexOf(d,b)&&"static"==OpenLayers.Element.getStyle(a,"position")&&(c="auto")}return"auto"==c?null:c}}; 25OpenLayers.LonLat=OpenLayers.Class({lon:0,lat:0,initialize:function(a,b){OpenLayers.Util.isArray(a)&&(b=a[1],a=a[0]);this.lon=OpenLayers.Util.toFloat(a);this.lat=OpenLayers.Util.toFloat(b)}
25,toString:function(){return"lon="+this.lon+",lat="+this.lat},toShortString:function(){return this.lon+", "+this.lat},clone:function(){return new OpenLayers.LonLat(this.lon,this.lat)},add:function(a,b){if(null==a||null==b)throw new TypeError("LonLat.add cannot receive null values");return new OpenLayers.LonLat(this.lon+ 26OpenLayers.Util.toFloat(a),this.lat+OpenLayers.Util.toFloat(b))},equals:function(a){var b=!1;null!=a&&(b=this.lon==a.lon&&this.lat==a.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(a.lon)&&isNaN(a.lat));return b},transform:function(a,b){var c=OpenLayers.Projection.transform({x:this.lon,y:this.lat},a,b);this.lon=c.x;this.lat=c.y;return this},wrapDateLine:function(a){var b=this.clone();if(a){for(;b.lon<a.left;)b.lon+=a.getWidth();for(;b.lon>a.right;)b.lon-=a.getWidth()}return b},CLASS_NAME:"OpenLayers.LonLat"}); 27OpenLayers.LonLat.fromString=function(a){a=a.split(",");return new OpenLayers.LonLat(a[0],a[1])};OpenLayers.LonLat.fromArray=function(a){var b=OpenLayers.Util.isArray(a);return new OpenLayers.LonLat(b&&a[0],b&&a[1])}; 28OpenLayers.Pixel=OpenLayers.Class({x:0,y:0,initialize:function(a,b){this.x=parseFloat(a);this.y=parseFloat(b)},toString:function(){return"x="+this.x+",y="+this.y},clone:function(){return new OpenLayers.Pixel(this.x,this.y)},equals:function(a){var b=!1;null!=a&&(b=this.x==a.x&&this.y==a.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y));return b},distanceTo:function(a){return Math.sqrt(Math.pow(this.x-a.x,2)+Math.pow(this.y-a.y,2))},add:function(a,b){if(null==a||null==b)throw new TypeError("Pixel.add cannot receive null values"); 29return new OpenLayers.Pixel(this.x+a,this.y+b)},offset:function(a){var b=this.clone();a&&(b=this.add(a.x,a.y));return b},CLASS_NAME:"OpenLayers.Pixel"}); 30OpenLayers.Size=OpenLayers.Class({w:0,h:0,initialize:function(a,b){this.w=parseFloat(a);this.h=parseFloat(b)},toString:function(){return"w="+this.w+",h="+this.h},clone:function(){return new OpenLayers.Size(this.w,this.h)},equals:function(a){var b=!1;null!=a&&(b=this.w==a.w&&this.h==a.h||isNaN(this.w)&&isNaN(this.h)&&isNaN(a.w)&&isNaN(a.h));return b},CLASS_NAME:"OpenLayers.Size"}); 31OpenLayers.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(a){alert(a)},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){},CLASS_NAME:"OpenLayers.Console"}; 32(function(){for(var a=document.getElementsByTagName("script"),b=0,c=a.length;b<c;++b)if(-1!=a[b].src.indexOf("firebug.js")&&console){OpenLayers.Util.extend(OpenLayers.Console,console);break}})(); 33OpenLayers.Lang={code:null,defaultCode:"en",getCode:function(){OpenLayers.Lang.code||OpenLayers.Lang.setCode();return OpenLayers.Lang.code},setCode:function(a){var b;a||(a="msie"==OpenLayers.BROWSER_NAME?navigator.userLanguage:navigator.language);a=a.split("-");a[0]=a[0].toLowerCase();"object"==typeof OpenLayers.Lang[a[0]]&&(b=a[0]);if(a[1]){var c=a[0]+"-"+a[1].toUpperCase();"object"==typeof OpenLayers.Lang[c]&&(b=c)}if(!b)OpenLayers.Console.warn("Failed to find OpenLayers.Lang."+a.join("-")+" dictionary, falling back to default language"), 34b=OpenLayers.Lang.defaultCode;OpenLayers.Lang.code=b},translate:function(a,b){var c=OpenLayers.Lang[OpenLayers.Lang.getCode()];(c=c&&c[a])||(c=a);b&&(c=OpenLayers.String.format(c,b));return c}};OpenLayers.i18n=OpenLayers.Lang.translate;OpenLayers.Util=OpenLayers.Util||{};OpenLayers.Util.getElement=function(){for(var a=[],b=0,c=arguments.length;b<c;b++){var d=arguments[b];"string"==typeof d&&(d=document.getElementById(d));if(1==arguments.length)return d;a.push(d)}return a}; 35OpenLayers.Util.isElement=function(a){return!!(a&&1===a.nodeType)};OpenLayers.Util.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)};OpenLayers.Util.removeItem=function(a,b){for(var c=a.length-1;0<=c;c--)a[c]==b&&a.splice(c,1);return a};OpenLayers.Util.indexOf=function(a,b){if("function"==typeof a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;c<d;c++)if(a[c]==b)return c;return-1};OpenLayers.Util.dotless=/\./g; 36OpenLayers.Util.modifyDOMElement=function(a,b,c,d,e,f,g,h){if(b)a.id=b.replace(OpenLayers.Util.dotless,"_");if(c)a.style.left=c.x+"px",a.style.top=c.y+"px";if(d)a.style.width=d.w+"px",a.style.height=d.h+"px";if(e)a.style.position=e;if(f)a.style.border=f;if(g)a.style.overflow=g;if(0<=parseFloat(h)&&1>parseFloat(h))a.style.filter="alpha(opacity="+100*h+")",a.style.opacity=h;else if(1==parseFloat(h))a.style.filter="",a.style.opacity=""}; 37OpenLayers.Util.createDiv=function(a,b,c,d,e,f,g,h){var i=document.createElement("div");if(d)i.style.backgroundImage="url("+d+")";a||(a=OpenLayers.Util.createUniqueID("OpenLayersDiv"));e||(e="absolute");OpenLayers.Util.modifyDOMElement(i,a,b,c,e,f,g,h);return i}; 38OpenLayers.Util.createImage=function(a,b,c,d,e,f,g,h){var i=document.createElement("img");a||(a=OpenLayers.Util.createUniqueID("OpenLayersDiv"));e||(e="relative");OpenLayers.Util.modifyDOMElement(i,a,b,c,e,f,null,g);if(h)i.style.display="none",b=function(){i.style.display="";OpenLayers.Event.stopObservingElement(i)},OpenLayers.Event.observe(i,"load",b),OpenLayers.Event.observe(i,"error",b);i.style.alt=a;i.galleryImg="no";if(d)i.src=d;return i};OpenLayers.IMAGE_RELOAD_ATTEMPTS=0; 39OpenLayers.Util.alphaHackNeeded=null;OpenLayers.Util.alphaHack=function(){if(null==OpenLayers.Util.alphaHackNeeded){var a=navigator.appVersion.split("MSIE"),a=parseFloat(a[1]),b=!1;try{b=!!document.body.filters}catch(c){}OpenLayers.Util.alphaHackNeeded=b&&5.5<=a&&7>a}return OpenLayers.Util.alphaHackNeeded}; 40OpenLayers.Util.modifyAlphaImageDiv=function(a,b,c,d,e,f,g,h,i){OpenLayers.Util.modifyDOMElement(a,b,c,d,f,null,null,i);b=a.childNodes[0];if(e)b.src=e;OpenLayers.Util.modifyDOMElement(b,a.id+"_innerImage",null,d,"relative",g);
40if(OpenLayers.Util.alphaHack()){if("none"!=a.style.display)a.style.display="inline-block";null==h&&(h="scale");a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+b.src+"', sizingMethod='"+h+"')";0<=parseFloat(a.style.opacity)&&1>parseFloat(a.style.opacity)&& 41(a.style.filter+=" alpha(opacity="+100*a.style.opacity+")");b.style.filter="alpha(opacity=0)"}};OpenLayers.Util.createAlphaImageDiv=function(a,b,c,d,e,f,g,h,i){var j=OpenLayers.Util.createDiv(),i=OpenLayers.Util.createImage(null,null,null,null,null,null,null,i);i.className="olAlphaImg";j.appendChild(i);OpenLayers.Util.modifyAlphaImageDiv(j,a,b,c,d,e,f,g,h);return j};OpenLayers.Util.upperCaseObject=function(a){var b={},c;for(c in a)b[c.toUpperCase()]=a[c];return b}; 42OpenLayers.Util.applyDefaults=function(a,b){var a=a||{},c="function"==typeof window.Event&&b instanceof window.Event,d;for(d in b)if(void 0===a[d]||!c&&b.hasOwnProperty&&b.hasOwnProperty(d)&&!a.hasOwnProperty(d))a[d]=b[d];if(!c&&b&&b.hasOwnProperty&&b.hasOwnProperty("toString")&&!a.hasOwnProperty("toString"))a.toString=b.toString;return a}; 43OpenLayers.Util.getParameterString=function(a){var b=[],c;for(c in a){var d=a[c];if(null!=d&&"function"!=typeof d){if("object"==typeof d&&d.constructor==Array){for(var e=[],f,g=0,h=d.length;g<h;g++)f=d[g],e.push(encodeURIComponent(null===f||void 0===f?"":f));d=e.join(",")}else d=encodeURIComponent(d);b.push(encodeURIComponent(c)+"="+d)}}return b.join("&")};OpenLayers.Util.urlAppend=function(a,b){var c=a;if(b)var d=(a+" ").split(/[?&]/),c=c+(" "===d.pop()?b:d.length?"&"+b:"?"+b);return c}; 44OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||OpenLayers._getScriptLocation()+"img/"};OpenLayers.Util.getImageLocation=function(a){return OpenLayers.Util.getImagesLocation()+a};OpenLayers.Util.Try=function(){for(var a=null,b=0,c=arguments.length;b<c;b++){var d=arguments[b];try{a=d();break}catch(e){}}return a}; 45OpenLayers.Util.getXmlNodeValue=function(a){var b=null;OpenLayers.Util.Try(function(){b=a.text;if(!b)b=a.textContent;if(!b)b=a.firstChild.nodeValue},function(){b=a.textContent});return b};OpenLayers.Util.mouseLeft=function(a,b){for(var c=a.relatedTarget?a.relatedTarget:a.toElement;c!=b&&null!=c;)c=c.parentNode;return c!=b};OpenLayers.Util.DEFAULT_PRECISION=14; 46OpenLayers.Util.toFloat=function(a,b){if(null==b)b=OpenLayers.Util.DEFAULT_PRECISION;"number"!==typeof a&&(a=parseFloat(a));return 0===b?a:parseFloat(a.toPrecision(b))};OpenLayers.Util.rad=function(a){return a*Math.PI/180};OpenLayers.Util.deg=function(a){return 180*a/Math.PI};OpenLayers.Util.VincentyConstants={a:6378137,b:6356752.3142,f:1/298.257223563}; 47OpenLayers.Util.distVincenty=function(a,b){for(var c=OpenLayers.Util.VincentyConstants,d=c.a,e=c.b,c=c.f,f=OpenLayers.Util.rad(b.lon-a.lon),g=Math.atan((1-c)*Math.tan(OpenLayers.Util.rad(a.lat))),h=Math.atan((1-c)*Math.tan(OpenLayers.Util.rad(b.lat))),i=Math.sin(g),g=Math.cos(g),j=Math.sin(h),h=Math.cos(h),k=f,l=2*Math.PI,m=20;1.0E-12<Math.abs(k-l)&&0<--m;){var n=Math.sin(k),o=Math.cos(k),q=Math.sqrt(h*n*h*n+(g*j-i*h*o)*(g*j-i*h*o));if(0==q)return 0;var o=i*j+g*h*o,r=Math.atan2(q,o),s=Math.asin(g* 48h*n/q),t=Math.cos(s)*Math.cos(s),n=o-2*i*j/t,v=c/16*t*(4+c*(4-3*t)),l=k,k=f+(1-v)*c*Math.sin(s)*(r+v*q*(n+v*o*(-1+2*n*n)))}if(0==m)return NaN;d=t*(d*d-e*e)/(e*e);c=d/1024*(256+d*(-128+d*(74-47*d)));return(e*(1+d/16384*(4096+d*(-768+d*(320-175*d))))*(r-c*q*(n+c/4*(o*(-1+2*n*n)-c/6*n*(-3+4*q*q)*(-3+4*n*n))))).toFixed(3)/1E3}; 49OpenLayers.Util.destinationVincenty=function(a,b,c){for(var d=OpenLayers.Util,e=d.VincentyConstants,f=e.a,g=e.b,h=e.f,e=a.lon,a=a.lat,i=d.rad(b),b=Math.sin(i),i=Math.cos(i),a=(1-h)*Math.tan(d.rad(a)),j=1/Math.sqrt(1+a*a),k=a*j,l=Math.atan2(a,i),a=j*b,m=1-a*a,f=m*(f*f-g*g)/(g*g),n=1+f/16384*(4096+f*(-768+f*(320-175*f))),o=f/1024*(256+f*(-128+f*(74-47*f))),f=c/(g*n),q=2*Math.PI;1.0E-12<Math.abs(f-q);)var r=Math.cos(2*l+f),s=Math.sin(f),t=Math.cos(f),v=o*s*(r+o/4*(t*(-1+2*r*r)-o/6*r*(-3+4*s*s)*(-3+4* 50r*r))),q=f,f=c/(g*n)+v;c=k*s-j*t*i;g=Math.atan2(k*t+j*s*i,(1-h)*Math.sqrt(a*a+c*c));b=Math.atan2(s*b,j*t-k*s*i);i=h/16*m*(4+h*(4-3*m));r=b-(1-i)*h*a*(f+i*s*(r+i*t*(-1+2*r*r)));Math.atan2(a,-c);return new OpenLayers.LonLat(e+d.deg(r),d.deg(g))}; 51OpenLayers.Util.getParameters=function(a,b){var b=b||{},a=null===a||void 0===a?window.location.href:a,c="";if(OpenLayers.String.contains(a,"?"))var d=a.indexOf("?")+1,c=OpenLayers.String.contains(a,"#")?a.indexOf("#"):a.length,c=a.substring(d,c);for(var d={},c=c.split(/[&;]/),e=0,f=c.length;e<f;++e){var g=c[e].split("=");if(g[0]){var h=g[0];try{h=decodeURIComponent(h)}catch(i){h=unescape(h)}g=(g[1]||"").replace(/\+/g," ");try{g=decodeURIComponent(g)}catch(j){g=unescape(g)}!1!==b.splitArgs&&(g=g.split(",")); 521==g.length&&(g=g[0]);d[h]=g}}return d};OpenLayers.Util.lastSeqID=0;OpenLayers.Util.createUniqueID=function(a){a=null==a?"id_":a.replace(OpenLayers.Util.dotless,"_");OpenLayers.Util.lastSeqID+=1;return a+OpenLayers.Util.lastSeqID};OpenLayers.INCHES_PER_UNIT={inches:1,ft:12,mi:63360,m:39.37,km:39370,dd:4374754,yd:36};OpenLayers.INCHES_PER_UNIT["in"]=OpenLayers.INCHES_PER_UNIT.inches;OpenLayers.INCHES_PER_UNIT.degrees=OpenLayers.INCHES_PER_UNIT.dd;OpenLayers.INCHES_PER_UNIT.nmi=1852*OpenLayers.INCHES_PER_UNIT.m; 53OpenLayers.METERS_PER_INCH=0.0254000508001016; 54OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{Inch:OpenLayers.INCHES_PER_UNIT.inches,Meter:1/OpenLayers.METERS_PER_INCH,Foot:0.3048006096012192/OpenLayers.METERS_PER_INCH,IFoot:0.3048/OpenLayers.METERS_PER_INCH,ClarkeFoot:0.3047972651151/OpenLayers.METERS_PER_INCH,SearsFoot:0.30479947153867626/OpenLayers.METERS_PER_INCH,GoldCoastFoot:0.3047997101815088/OpenLayers.METERS_PER_INCH,IInch:0.0254/OpenLayers.METERS_PER_INCH,MicroInch:2.54E-5/OpenLayers.METERS_PER_INCH,Mil:2.54E-8/OpenLayers.METERS_PER_INCH, 55Centimeter:0.01/OpenLayers.METERS_PER_INCH,Kilometer:1E3/OpenLayers.METERS_PER_INCH,Yard:0.9144018288036576/OpenLayers.METERS_PER_INCH,SearsYard:0.914398414616029/OpenLayers.METERS_PER_INCH,IndianYard:0.9143985307444408/OpenLayers.METERS_PER_INCH,IndianYd37:0.91439523/OpenLayers.METERS_PER_INCH,IndianYd62:0.9143988/OpenLayers.METERS_PER_INCH,IndianYd75:0.9143985/OpenLayers.METERS_PER_INCH,IndianFoot:0.30479951/OpenLayers.METERS_PER_INCH,IndianFt37:0.30479841/Ope
55nLayers.METERS_PER_INCH,IndianFt62:0.3047996/ 56OpenLayers.METERS_PER_INCH,IndianFt75:0.3047995/OpenLayers.METERS_PER_INCH,Mile:1609.3472186944373/OpenLayers.METERS_PER_INCH,IYard:0.9144/OpenLayers.METERS_PER_INCH,IMile:1609.344/OpenLayers.METERS_PER_INCH,NautM:1852/OpenLayers.METERS_PER_INCH,"Lat-66":110943.31648893273/OpenLayers.METERS_PER_INCH,"Lat-83":110946.25736872235/OpenLayers.METERS_PER_INCH,Decimeter:0.1/OpenLayers.METERS_PER_INCH,Millimeter:0.0010/OpenLayers.METERS_PER_INCH,Dekameter:10/OpenLayers.METERS_PER_INCH,Decameter:10/OpenLayers.METERS_PER_INCH, 57Hectometer:100/OpenLayers.METERS_PER_INCH,GermanMeter:1.0000135965/OpenLayers.METERS_PER_INCH,CaGrid:0.999738/OpenLayers.METERS_PER_INCH,ClarkeChain:20.1166194976/OpenLayers.METERS_PER_INCH,GunterChain:20.11684023368047/OpenLayers.METERS_PER_INCH,BenoitChain:20.116782494375872/OpenLayers.METERS_PER_INCH,SearsChain:20.11676512155/OpenLayers.METERS_PER_INCH,ClarkeLink:0.201166194976/OpenLayers.METERS_PER_INCH,GunterLink:0.2011684023368047/OpenLayers.METERS_PER_INCH,BenoitLink:0.20116782494375873/OpenLayers.METERS_PER_INCH, 58SearsLink:0.2011676512155/OpenLayers.METERS_PER_INCH,Rod:5.02921005842012/OpenLayers.METERS_PER_INCH,IntnlChain:20.1168/OpenLayers.METERS_PER_INCH,IntnlLink:0.201168/OpenLayers.METERS_PER_INCH,Perch:5.02921005842012/OpenLayers.METERS_PER_INCH,Pole:5.02921005842012/OpenLayers.METERS_PER_INCH,Furlong:201.1684023368046/OpenLayers.METERS_PER_INCH,Rood:3.778266898/OpenLayers.METERS_PER_INCH,CapeFoot:0.3047972615/OpenLayers.METERS_PER_INCH,Brealey:375/OpenLayers.METERS_PER_INCH,ModAmFt:0.304812252984506/ 59OpenLayers.METERS_PER_INCH,Fathom:1.8288/OpenLayers.METERS_PER_INCH,"NautM-UK":1853.184/OpenLayers.METERS_PER_INCH,"50kilometers":5E4/OpenLayers.METERS_PER_INCH,"150kilometers":15E4/OpenLayers.METERS_PER_INCH}); 60OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{mm:OpenLayers.INCHES_PER_UNIT.Meter/1E3,cm:OpenLayers.INCHES_PER_UNIT.Meter/100,dm:100*OpenLayers.INCHES_PER_UNIT.Meter,km:1E3*OpenLayers.INCHES_PER_UNIT.Meter,kmi:OpenLayers.INCHES_PER_UNIT.nmi,fath:OpenLayers.INCHES_PER_UNIT.Fathom,ch:OpenLayers.INCHES_PER_UNIT.IntnlChain,link:OpenLayers.INCHES_PER_UNIT.IntnlLink,"us-in":OpenLayers.INCHES_PER_UNIT.inches,"us-ft":OpenLayers.INCHES_PER_UNIT.Foot,"us-yd":OpenLayers.INCHES_PER_UNIT.Yard,"us-ch":OpenLayers.INCHES_PER_UNIT.GunterChain, 61"us-mi":OpenLayers.INCHES_PER_UNIT.Mile,"ind-yd":OpenLayers.INCHES_PER_UNIT.IndianYd37,"ind-ft":OpenLayers.INCHES_PER_UNIT.IndianFt37,"ind-ch":20.11669506/OpenLayers.METERS_PER_INCH});OpenLayers.DOTS_PER_INCH=72;OpenLayers.Util.normalizeScale=function(a){return 1<a?1/a:a};OpenLayers.Util.getResolutionFromScale=function(a,b){var c;a&&(null==b&&(b="degrees"),c=1/(OpenLayers.Util.normalizeScale(a)*OpenLayers.INCHES_PER_UNIT[b]*OpenLayers.DOTS_PER_INCH));return c}; 62OpenLayers.Util.getScaleFromResolution=function(a,b){null==b&&(b="degrees");return a*OpenLayers.INCHES_PER_UNIT[b]*OpenLayers.DOTS_PER_INCH}; 63OpenLayers.Util.pagePosition=function(a){var b=[0,0],c=OpenLayers.Util.getViewportElement();if(!a||a==window||a==c)return b;var d=OpenLayers.IS_GECKO&&document.getBoxObjectFor&&"absolute"==OpenLayers.Element.getStyle(a,"position")&&(""==a.style.top||""==a.style.left),e=null;if(a.getBoundingClientRect)a=a.getBoundingClientRect(),e=window.pageYOffset||c.scrollTop,b[0]=a.left+(window.pageXOffset||c.scrollLeft),b[1]=a.top+e;else if(document.getBoxObjectFor&&!d)a=document.getBoxObjectFor(a),c=document.getBoxObjectFor(c), 64b[0]=a.screenX-c.screenX,b[1]=a.screenY-c.screenY;else{b[0]=a.offsetLeft;b[1]=a.offsetTop;e=a.offsetParent;if(e!=a)for(;e;)b[0]+=e.offsetLeft,b[1]+=e.offsetTop,e=e.offsetParent;c=OpenLayers.BROWSER_NAME;if("opera"==c||"safari"==c&&"absolute"==OpenLayers.Element.getStyle(a,"position"))b[1]-=document.body.offsetTop;for(e=a.offsetParent;e&&e!=document.body;){b[0]-=e.scrollLeft;if("opera"!=c||"TR"!=e.tagName)b[1]-=e.scrollTop;e=e.offsetParent}}return b}; 65OpenLayers.Util.getViewportElement=function(){var a=arguments.callee.viewportElement;if(void 0==a)a="msie"==OpenLayers.BROWSER_NAME&&"CSS1Compat"!=document.compatMode?document.body:document.documentElement,arguments.callee.viewportElement=a;return a}; 66OpenLayers.Util.isEquivalentUrl=function(a,b,c){c=c||{};OpenLayers.Util.applyDefaults(c,{ignoreCase:!0,ignorePort80:!0,ignoreHash:!0,splitArgs:!1});
66var a=OpenLayers.Util.createUrlObject(a,c),b=OpenLayers.Util.createUrlObject(b,c),d;for(d in a)if("args"!==d&&a[d]!=b[d])return!1;for(d in a.args){if(a.args[d]!=b.args[d])return!1;delete b.args[d]}for(d in b.args)return!1;return!0}; 67OpenLayers.Util.createUrlObject=function(a,b){b=b||{};if(!/^\w+:\/\//.test(a)){var c=window.location,d=c.port?":"+c.port:"",d=c.protocol+"//"+c.host.split(":").shift()+d;0===a.indexOf("/")?a=d+a:(c=c.pathname.split("/"),c.pop(),a=d+c.join("/")+"/"+a)}b.ignoreCase&&(a=a.toLowerCase());c=document.createElement("a");c.href=a;d={};d.host=c.host.split(":").shift();d.protocol=c.protocol;d.port=b.ignorePort80?"80"==c.port||"0"==c.port?"":c.port:""==c.port||"0"==c.port?"80":c.port;d.hash=b.ignoreHash||"#"=== 68c.hash?"":c.hash;var e=c.search;e||(e=a.indexOf("?"),e=-1!=e?a.substr(e):"");d.args=OpenLayers.Util.getParameters(e,{splitArgs:b.splitArgs});d.pathname="/"==c.pathname.charAt(0)?c.pathname:"/"+c.pathname;return d};OpenLayers.Util.removeTail=function(a){var b=null,b=a.indexOf("?"),c=a.indexOf("#");return b=-1==b?-1!=c?a.substr(0,c):a:-1!=c?a.substr(0,Math.min(b,c)):a.substr(0,b)};OpenLayers.IS_GECKO=function(){var a=navigator.userAgent.toLowerCase();return-1==a.indexOf("webkit")&&-1!=a.indexOf("gecko")}(); 69OpenLayers.CANVAS_SUPPORTED=function(){var a=document.createElement("canvas");return!(!a.getContext||!a.getContext("2d"))}();OpenLayers.BROWSER_NAME=function(){var a="",b=navigator.userAgent.toLowerCase();-1!=b.indexOf("opera")?a="opera":-1!=b.indexOf("msie")?a="msie":-1!=b.indexOf("safari")?a="safari":-1!=b.indexOf("mozilla")&&(a=-1!=b.indexOf("firefox")?"firefox":"mozilla");return a}();OpenLayers.Util.getBrowserName=function(){return OpenLayers.BROWSER_NAME}; 70OpenLayers.Util.getRenderedDimensions=function(a,b,c){var d,e,f=document.createElement("div");f.style.visibility="hidden";for(var g=c&&c.containerElement?c.containerElement:document.body,h=!1,i=null,j=g;j&&"body"!=j.tagName.toLowerCase();){var k=OpenLayers.Element.getStyle(j,"position");if("absolute"==k){h=!0;break}else if(k&&"static"!=k)break;j=j.parentNode}if(h&&(0===g.clientHeight||0===g.clientWidth))i=document.createElement("div"),i.style.visibility="hidden",i.style.position="absolute",i.style.overflow= 71"visible",i.style.width=document.body.clientWidth+"px",i.style.height=document.body.clientHeight+"px",i.appendChild(f);f.style.position="absolute";
71if(b)if(b.w)d=b.w,f.style.width=d+"px";else if(b.h)e=b.h,f.style.height=e+"px";if(c&&c.displayClass)f.className=c.displayClass;b=document.createElement("div");b.innerHTML=a;b.style.overflow="visible";if(b.childNodes){a=0;for(c=b.childNodes.length;a<c;a++)if(b.childNodes[a].style)b.childNodes[a].style.overflow="visible"}f.appendChild(b);i?g.appendChild(i): 72g.appendChild(f);if(!d)d=parseInt(b.scrollWidth),f.style.width=d+"px";e||(e=parseInt(b.scrollHeight));f.removeChild(b);i?(i.removeChild(f),g.removeChild(i)):g.removeChild(f);return new OpenLayers.Size(d,e)}; 73OpenLayers.Util.getScrollbarWidth=function(){var a=OpenLayers.Util._scrollbarWidth;if(null==a){var b=null,c=null,b=a=0,b=document.createElement("div");b.style.position="absolute";b.style.top="-1000px";b.style.left="-1000px";b.style.width="100px";b.style.height="50px";b.style.overflow="hidden";c=document.createElement("div");c.style.width="100%";c.style.height="200px";b.appendChild(c);document.body.appendChild(b);a=c.offsetWidth;b.style.overflow="scroll";b=c.offsetWidth;document.body.removeChild(document.body.lastChild); 74OpenLayers.Util._scrollbarWidth=a-b;a=OpenLayers.Util._scrollbarWidth}return a}; 75OpenLayers.Util.getFormattedLonLat=function(a,b,c){c||(c="dms");var a=(a+540)%360-180,d=Math.abs(a),e=Math.floor(d),f=d=(d-e)/(1/60),d=Math.floor(d),f=Math.round(10*((f-d)/(1/60))),f=f/10;60<=f&&(f-=60,d+=1,60<=d&&(d-=60,e+=1));10>e&&(e="0"+e);e+="\u00b0";0<=c.indexOf("dm")&&(10>d&&(d="0"+d),e+=d+"'",0<=c.indexOf("dms")&&(10>f&&(f="0"+f),e+=f+'"'));return e="lon"==b?e+(0>a?OpenLayers.i18n("W"):OpenLayers.i18n("E")):e+(0>a?OpenLayers.i18n("S"):OpenLayers.i18n("N"))}; 76OpenLayers.Util.getConstructor=function(a){for(var b=a.split("."),a="OpenLayers"===b[0]?OpenLayers:window[b[0]],c=1,d=b.length;c<d;++c)a=a[b[c]];return a};OpenLayers.Util=OpenLayers.Util||{}; 77OpenLayers.Util.vendorPrefix=function(){function a(a){return!a?null:a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()}).replace(/^ms-/,"-ms-")}function b(a,b){if(void 0===g[b]){var c,e=0,f=d.length,m="undefined"!==typeof a.cssText;for(g[b]=null;e<f;e++)if((c=d[e])?(m||(c=c.toLowerCase()),c=c+b.charAt(0).toUpperCase()+b.slice(1)):c=b,void 0!==a[c]){g[b]=c;break}}return g[b]}function c(a){return b(e,a)}var d=["","O","ms","Moz","Webkit"],e=document.createElement("div").style,f={},g={};return{css:function(b){if(void 0=== 78f[b]){var d=b.replace(/(-[\s\S])/g,function(a){return a.charAt(1).toUpperCase()}),d=c(d);f[b]=a(d)}return f[b]},js:b,style:c,cssCache:f,jsCache:g}}(); 79OpenLayers.Event={observers:!1,KEY_SPACE:32,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},isSingleTouch:function(a){return a.touches&&1==a.touches.length},isMultiTouch:function(a){return a.touches&&1<a.touches.length},isLeftClick:function(a){return a.which&&1==a.which||a.button&&1==a.button},isRightClick:function(a){return a.which&&3==a.which||a.button&&2==a.button},stop:function(a, 80b){b||OpenLayers.Event.preventDefault(a);a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},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||!1;if("keypress"==b&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||a.attachEvent))b="keydown"; 81if(!this.observers)this.observers={};if(!a._eventCacheID){var e="eventCacheID_";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});a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},stopObservingElement:function(a){a=OpenLayers.Util.getElement(a)._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[a])}, 82_removeElementObservers:function(a){if(a)for(var b=a.length-1;0<=b;b--){var c=a[b];OpenLayers.Event.stopObserving.apply(this,[c.element,c.name,c.observer,c.useCapture])}},stopObserving:function(a,b,c,d){var d=d||!1,a=OpenLayers.Util.getElement(a),e=a._eventCacheID;if("keypress"==b&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||a.detachEvent))b="keydown";var f=!1,g=OpenLayers.Event.observers[e];if(g)for(var h=0;!f&&h<g.length;){var i=g[h];if(i.name==b&&i.observer==c&&i.useCapture==d){g.splice(h, 831);0==g.length&&delete OpenLayers.Event.observers[e];f=!0;break}h++}f&&(a.removeEventListener?a.removeEventListener(b,c,d):a&&a.detachEvent&&a.detachEvent("on"+b,c));return f},unloadCache:function(){if(OpenLayers.Event&&OpenLayers.Event.observers){for(var a in OpenLayers.Event.observers)OpenLayers.Event._removeElementObservers.apply(this,[OpenLayers.Event.observers[a]]);OpenLayers.Event.observers=!1}},CLASS_NAME:"OpenLayers.Event"}; 84OpenLayers.Event.observe(window,"unload",OpenLayers.Event.unloadCache,!1); 85OpenLayers.Events=OpenLayers.Class({BROWSER_EVENTS:"mouseover,mouseout,mousedown,mouseup,mousemove,click,dblclick,rightclick,dblrightclick,resize,focus,blur,touchstart,touchmove,touchend,keydown".split(","),listeners:null,object:null,element:null,eventHandler:null,fallThrough:null,includeXY:!1,extensions:null,extensionCount:null,clearMouseListener:null,initialize:function(a,b,c,d,e){OpenLayers.Util.extend(this,e);this.object=a;this.fallThrough=d;this.listeners={};this.extensions={};this.extensionCount= 86{};this._msTouches=[];null!=b&&this.attachToElement(b)},destroy:function(){for(var a in this.extensions)"boolean"!==typeof this.extensions[a]&&this.extensions[a].destroy();this.extensions=null;this.element&&(OpenLayers.Event.stopObservingElement(this.element),this.element.hasScrollEvent&&OpenLayers.Event.stopObserving(window,"scroll",this.clearMouseListener));this.eventHandler=this.fallThrough=this.object=this.listeners=this.element=null},addEventType:function(){},attachToElement:function(a){this.element? 87OpenLayers.Event.stopObservingElement(this.element):(this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=Ope
87nLayers.Function.bind(this.clearMouseCache,this));this.element=a;for(var b=!!window.navigator.msMaxTouchPoints,c,d=0,e=this.BROWSER_EVENTS.length;d<e;d++)c=this.BROWSER_EVENTS[d],OpenLayers.Event.observe(a,c,this.eventHandler),b&&0===c.indexOf("touch")&&this.addMsTouchListener(a,c,this.eventHandler);OpenLayers.Event.observe(a,"dragstart", 88OpenLayers.Event.stop)},on:function(a){for(var b in a)"scope"!=b&&a.hasOwnProperty(b)&&this.register(b,a.scope,a[b])},register:function(a,b,c,d){a in OpenLayers.Events&&!this.extensions[a]&&(this.extensions[a]=new OpenLayers.Events[a](this));if(null!=c){if(null==b)b=this.object;var e=this.listeners[a];e||(e=[],this.listeners[a]=e,this.extensionCount[a]=0);b={obj:b,func:c};d?(e.splice(this.extensionCount[a],0,b),"object"===typeof d&&d.extension&&this.extensionCount[a]++):e.push(b)}},registerPriority:function(a, 89b,c){this.register(a,b,c,!0)},un:function(a){for(var b in a)"scope"!=b&&a.hasOwnProperty(b)&&this.unregister(b,a.scope,a[b])},unregister:function(a,b,c){if(null==b)b=this.object;a=this.listeners[a];if(null!=a)for(var d=0,e=a.length;d<e;d++)if(a[d].obj==b&&a[d].func==c){a.splice(d,1);break}},remove:function(a){null!=this.listeners[a]&&(this.listeners[a]=[])},triggerEvent:function(a,b){var c=this.listeners[a];if(c&&0!=c.length){null==b&&(b={});b.object=this.object;b.element=this.element;if(!b.type)b.type= 90a;for(var c=c.slice(),d,e=0,f=c.length;e<f&&!(d=c[e],d=d.func.apply(d.obj,[b]),void 0!=d&&!1==d);e++);this.fallThrough||OpenLayers.Event.stop(b,!0);return d}},handleBrowserEvent:function(a){var b=a.type,c=this.listeners[b];if(c&&0!=c.length){if((c=a.touches)&&c[0]){for(var d=0,e=0,f=c.length,g,h=0;h<f;++h)g=this.getTouchClientXY(c[h]),d+=g.clientX,e+=g.clientY;a.clientX=d/f;a.clientY=e/f}if(this.includeXY)a.xy=this.getMousePosition(a);this.triggerEvent(b,a)}},getTouchClientXY:function(a){var b=window.olMockWin|| 91window,c=b.pageXOffset,b=b.pageYOffset,d=a.clientX,e=a.clientY;if(0===a.pageY&&Math.floor(e)>Math.floor(a.pageY)||0===a.pageX&&Math.floor(d)>Math.floor(a.pageX))d-=c,e-=b;else if(e<a.pageY-b||d<a.pageX-c)d=a.pageX-c,e=a.pageY-b;a.olClientX=d;a.olClientY=e;return{clientX:d,clientY:e}},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;this.element.offsets=null},getMousePosition:function(a){if(this.includeXY){if(!this.element.hasScrollEvent)OpenLayers.Event.observe(window, 92"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0}else this.clearMouseCache();
92if(!this.element.scrolls){var b=OpenLayers.Util.getViewportElement();this.element.scrolls=[window.pageXOffset||b.scrollLeft,window.pageYOffset||b.scrollTop]}if(!this.element.lefttop)this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0];if(!this.element.offsets)this.element.offsets=OpenLayers.Util.pagePosition(this.element);return new OpenLayers.Pixel(a.clientX+ 93this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],a.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])},addMsTouchListener:function(a,b,c){function d(a){c(OpenLayers.Util.applyDefaults({stopPropagation:function(){for(var a=e.length-1;0<=a;--a)e[a].stopPropagation()},preventDefault:function(){for(var a=e.length-1;0<=a;--a)e[a].preventDefault()},type:b},a))}var e=this._msTouches;switch(b){case "touchstart":return this.addMsTouchListenerStart(a,b,d); 94case "touchend":return this.addMsTouchListenerEnd(a,b,d);case "touchmove":return this.addMsTouchListenerMove(a,b,d);default:throw"Unknown touch event type";}},addMsTouchListenerStart:function(a,b,c){var d=this._msTouches;OpenLayers.Event.observe(a,"MSPointerDown",function(a){for(var b=!1,g=0,h=d.length;g<h;++g)if(d[g].pointerId==a.pointerId){b=!0;break}b||d.push(a);a.touches=d.slice();c(a)});OpenLayers.Event.observe(a,"MSPointerUp",function(a){for(var b=0,c=d.length;b<c;++b)if(d[b].pointerId==a.pointerId){d.splice(b, 951);break}})},addMsTouchListenerMove:function(a,b,c){var d=this._msTouches;OpenLayers.Event.observe(a,"MSPointerMove",function(a){if(!(a.pointerType==a.MSPOINTER_TYPE_MOUSE&&0==a.buttons||1==d.length&&d[0].pageX==a.pageX&&d[0].pageY==a.pageY)){for(var b=0,g=d.length;b<g;++b)if(d[b].pointerId==a.pointerId){d[b]=a;break}a.touches=d.slice();c(a)}})},addMsTouchListenerEnd:function(a,b,c){var d=this._msTouches;OpenLayers.Event.observe(a,"MSPointerUp",function(a){for(var b=0,g=d.length;b<g;++b)if(d[b].pointerId== 96a.pointerId){d.splice(b,1);break}a.touches=d.slice();c(a)})},CLASS_NAME:"OpenLayers.Events"});
97OpenLayers.Animation=function(a){var b=OpenLayers.Util.vendorPrefix.js(a,"requestAnimationFrame"),c=!!b,d=function(){var c=a[b]||function(b){a.setTimeout(b,16)};return function(b,d){c.apply(a,[b,d])}}(),e=0,f={};return{isNative:c,requestFrame:d,start:function(a,b,c){var b=0<b?b:Number.POSITIVE_INFINITY,j=++e,k=+new Date;f[j]=function(){f[j]&&+new Date-k<=b?(a(),f[j]&&d(f[j],c)):delete f[j]};d(f[j],c);return j},stop:function(a){delete f[a]}}}(window); 98OpenLayers.Tween=OpenLayers.Class({easing:null,begin:null,finish:null,duration:null,callbacks:null,time:null,minFrameRate:null,startTime:null,animationId:null,playing:!1,initialize:function(a){this.easing=a?a:OpenLayers.Easing.Expo.easeOut},start:function(a,b,c,d){this.playing=!0;this.begin=a;this.finish=b;this.duration=c;this.callbacks=d.callbacks;this.minFrameRate=d.minFrameRate||30;this.time=0;this.startTime=(new Date).getTime();OpenLayers.Animation.stop(this.animationId);this.animationId=null; 99this.callbacks&&this.callbacks.start&&this.callbacks.start.call(this,this.begin);this.animationId=OpenLayers.Animation.start(OpenLayers.Function.bind(this.play,this))},stop:function(){if(this.playing)this.callbacks&&this.callbacks.done&&this.callbacks.done.call(this,this.finish),OpenLayers.Animation.stop(this.animationId),this.animationId=null,this.playing=!1},play:function(){var a={},b;for(b in this.begin){var c=this.begin[b],d=this.finish[b];if(null==c||null==d||isNaN(c)||isNaN(d))throw new TypeError("invalid value for Tween"); 100a[b]=this.easing.apply(this,[this.time,c,d-c,this.duration])}this.time++;this.callbacks&&this.callbacks.eachStep&&((new Date).getTime()-this.startTime)/this.time<=1E3/this.minFrameRate&&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"}; 101OpenLayers.Easing.Expo={easeIn:function(a,b,c,d){return 0==a?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){return 0==a?b:a==d?b+c:1>(a/=d/2)?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b},CLASS_NAME:"OpenLayers.Easing.Expo"}; 102OpenLayers.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){return 1>(a/=d/2)?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b},CLASS_NAME:"OpenLayers.Easing.Quad"}; 103OpenLayers.Projection=OpenLayers.Class({proj:null,projCode:null,titleRegEx:/\+title=[^\+]*/,initialize:function(a,b){OpenLayers.Util.extend(this,b);this.projCode=a;if("object"==typeof Proj4js)this.proj=new Proj4js.Proj(a)},getCode:function(){return this.proj?this.proj.srsCode:this.projCode},getUnits:function(){return this.proj?this.proj.units:null},toString:function(){return this.getCode()},equals:function(a){var b=!1;a&&(a instanceof OpenLayers.Projection||(a=new OpenLayers.Projection(a)),"object"== 104typeof Proj4js&&this.proj.defData&&a.proj.defData?b=this.proj.defData.replace(this.titleRegEx,"")==a.proj.defData.replace(this.titleRegEx,""):a.getCode&&(b=this.getCode(),a=a.getCode(),b=b==a||!!OpenLayers.Projection.transforms[b]&&OpenLayers.Projection.transforms[b][a]===OpenLayers.Projection.nullTransform));return b},destroy:function(){delete this.proj;delete this.projCode},CLASS_NAME:"OpenLayers.Projection"});OpenLayers.Projection.transforms={}; 105OpenLayers.Projection.defaults={"EPSG:4326":{units:"degrees",maxExtent:[-180,-90,180,90],yx:!0},"CRS:84":{units:"degrees",maxExtent:[-180,-90,180,90]},"EPSG:900913":{units:"m",maxExtent:[-2.003750834E7,-2.003750834E7,2.003750834E7,2.003750834E7]}}; 106OpenLayers.Projection.addTransform=function(a,b,c){if(c===OpenLayers.Projection.nullTransform){var d=OpenLayers.Projection.defaults[a];d&&!OpenLayers.Projection.defaults[b]&&(OpenLayers.Projection.defaults[b]=d)}OpenLayers.Projection.transforms[a]||(OpenLayers.Projection.transforms[a]={});OpenLayers.Projection.transforms[a][b]=c}; 107OpenLayers.Projection.transform=function(a,b,c){if(b&&c)if(b instanceof OpenLayers.Projection||(b=new OpenLayers.Projection(b)),c instanceof OpenLayers.Projection||(c=new OpenLayers.Projection(c)),b.proj&&c.proj)a=Proj4js.transform(b.proj,c.proj,a);else{var b=b.getCode(),c=c.getCode(),d=OpenLayers.Projection.transforms;if(d[b]&&d[b][c])d[b][c](a)}return a};OpenLayers.Projection.nullTransform=function(a){return a}; 108(function(){function a(a){a.x=180*a.x/d;a.y=180/Math.PI*(2*Math.atan(Math.exp(a.y/d*Math.PI))-Math.PI/2);return a}function b(a){a.x=a.x*d/180;var b=Math.log(Math.tan((90+a.y)*Math.PI/360))/Math.PI*d;a.y=Math.max(-2.003750834E7,Math.min(b,2.003750834E7));return a}function c(c,d){var e=OpenLayers.Projection.addTransform,f=OpenLayers.Projection.nullTransform,g,m,n,o,q;for(g=0,m=d.length;g<m;++g){n=d[g];e(c,n,b);e(n,c,a);for(q=g+1;q<m;++q)o=d[q],e(n,o,f),e(o,n,f)}}var d=2.003750834E7,e=["EPSG:900913", 109"EPSG:3857","EPSG:102113","EPSG:102100","OSGEO:41001"],f=["CRS:84","urn:ogc:def:crs:EPSG:6.6:4326","EPSG:4326"],g;for(g=e.length-1;0<=g;--g)c(e[g],f);for(g=f.length-1;0<=g;--g)c(f[g],e)})(); 110OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Feature:725,Popup:750,Control:1E3},id:null,fractionalZoom:!1,events:null,allOverlays:!1,div:null,dragging:!1,size:null,viewPortDiv:null,layerContainerOrigin:null,layerContainerDiv:null,layers:null,controls:null,popups:null,baseLayer:null,center:null,resolution:null,zoom:0,panRatio:1.5,options:null,tileSize:null,projection:"EPSG:4326",units:null,resolutions:null,maxResolution:null,minResolution:null,maxScale:null,minScale:null, 111maxExtent:null,minExtent:null,restrictedExtent:null,numZoomLevels:16,theme:null,displayProjection:null,fallThrough:!1,autoUpdateSize:!0,eventListeners:null,panTween:null,panMethod:OpenLayers.Easing.Expo.easeOut,panDuration:50,zoomTween:null,zoomMethod:OpenLayers.Easing.Quad.easeOut,zoomDuration:20,paddingForPopups:null,layerContainerOriginPx:null,minPx:null,maxPx:null,initialize:function(a,b){1===arguments.length&&"object"===typeof a&&(a=(b=a)&&b.div);
111this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH, 112OpenLayers.Map.TILE_HEIGHT);this.paddingForPopups=new OpenLayers.Bounds(15,15,15,15);this.theme=OpenLayers._getScriptLocation()+"theme/default/style.css";this.options=OpenLayers.Util.extend({},b);OpenLayers.Util.extend(this,b);OpenLayers.Util.applyDefaults(this,OpenLayers.Projection.defaults[this.projection instanceof OpenLayers.Projection?this.projection.projCode:this.projection]);if(this.maxExtent&&!(this.maxExtent instanceof OpenLayers.Bounds))this.maxExtent=new OpenLayers.Bounds(this.maxExtent); 113if(this.minExtent&&!(this.minExtent instanceof OpenLayers.Bounds))this.minExtent=new OpenLayers.Bounds(this.minExtent);if(this.restrictedExtent&&!(this.restrictedExtent instanceof OpenLayers.Bounds))this.restrictedExtent=new OpenLayers.Bounds(this.restrictedExtent);if(this.center&&!(this.center instanceof OpenLayers.LonLat))this.center=new OpenLayers.LonLat(this.center);this.layers=[];this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(a);if(!this.div)this.div= 114document.createElement("div"),this.div.style.height="1px",this.div.style.width="1px";OpenLayers.Element.addClass(this.div,"olMap");var c=this.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(c,null,null,null,"relative",null,"hidden");this.viewPortDiv.style.width="100%";this.viewPortDiv.style.height="100%";this.viewPortDiv.className="olMapViewport";this.div.appendChild(this.viewPortDiv);this.events=new OpenLayers.Events(this,this.viewPortDiv,null,this.fallThrough,{includeXY:!0}); 115if(OpenLayers.TileManager&&null!==this.tileManager){if(!(this.tileManager instanceof OpenLayers.TileManager))this.tileManager=new OpenLayers.TileManager(this.tileManager);this.tileManager.addMap(this)}c=this.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(c);this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE.Popup-1;this.layerContainerOriginPx={x:0,y:0};this.applyTransform();this.viewPortDiv.appendChild(this.layerContainerDiv);this.updateSize();if(this.eventListeners instanceof 116Object)this.events.on(this.eventListeners);if(!0===this.autoUpdateSize)this.updateSizeDestroy=OpenLayers.Function.bind(this.updateSize,this),OpenLayers.Event.observe(window,"resize",this.updateSizeDestroy);if(this.theme){for(var c=!0,d=document.getElementsByTagName("link"),e=0,f=d.length;e<f;++e)if(OpenLayers.Util.isEquivalentUrl(d.item(e).href,this.theme)){c=!1;break}c&&(c=document.createElement("link"),c.setAttribute("rel","stylesheet"),c.setAttribute("type","text/css"),c.setAttribute("href",this.theme), 117document.getElementsByTagName("head")[0].appendChild(c))}if(null==this.controls)this.controls=[],null!=OpenLayers.Control&&(OpenLayers.Control.Navigation?this.controls.push(new OpenLayers.Control.Navigation):OpenLayers.Control.TouchNavigation&&this.controls.push(new OpenLayers.Control.TouchNavigation),OpenLayers.Control.Zoom?this.controls.push(new OpenLayers.Control.Zoom):OpenLayers.Control.PanZoom&&this.controls.push(new OpenLayers.Control.PanZoom),OpenLayers.Control.ArgParser&&this.controls.push(new OpenLayers.Control.ArgParser), 118OpenLayers.Control.Attribution&&this.controls.push(new OpenLayers.Control.Attribution));e=0;for(f=this.controls.length;e<f;e++)this.addControlToMap(this.controls[e]);this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,"unload",this.unloadDestroy);b&&b.layers&&(delete this.center,delete this.zoom,this.addLayers(b.layers),b.center&&!this.getCenter()&&this.setCenter(b.center,b.zoom));if(this.panMethod)this.panTween=new OpenLayers.Tween(this.panMethod); 119if(this.zoomMethod&&this.applyTransform.transform)this.zoomTween=new OpenLayers.Tween(this.zoomMethod)},getViewport:function(){return this.viewPortDiv},render:function(a){this.div=OpenLayers.Util.getElement(a);OpenLayers.Element.addClass(this.div,"olMap");this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);this.div.appendChild(this.viewPortDiv);this.updateSize()},unloadDestroy:null,updateSizeDestroy:null,destroy:function(){if(!this.unloadDestroy)return!1;if(this.panTween)this.panTween.stop(), 120this.panTween=null;if(this.zoomTween)this.zoomTween.stop(),this.zoomTween=null;OpenLayers.Event.stopObserving(window,"unload",this.unloadDestroy);this.unloadDestroy=null;this.updateSizeDestroy&&OpenLayers.Event.stopObserving(window,"resize",this.updateSizeDestroy);this.paddingForPopups=null;if(null!=this.controls){for(var a=this.controls.length-1;0<=a;--a)this.controls[a].destroy();this.controls=null}if(null!=this.layers){for(a=this.layers.length-1;0<=a;--a)this.layers[a].destroy(!1);this.layers= 121null}this.viewPortDiv&&this.viewPortDiv.parentNode&&this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);
121this.viewPortDiv=null;if(this.tileManager)this.tileManager.removeMap(this),this.tileManager=null;if(this.eventListeners)this.events.un(this.eventListeners),this.eventListeners=null;this.events.destroy();this.options=this.events=null},setOptions:function(a){var b=this.minPx&&a.restrictedExtent!=this.restrictedExtent;OpenLayers.Util.extend(this,a);b&&this.moveTo(this.getCachedCenter(),this.zoom, 122{forceZoomChange:!0})},getTileSize:function(){return this.tileSize},getBy:function(a,b,c){var d="function"==typeof c.test;return OpenLayers.Array.filter(this[a],function(a){return a[b]==c||d&&c.test(a[b])})},getLayersBy:function(a,b){return this.getBy("layers",a,b)},getLayersByName:function(a){return this.getLayersBy("name",a)},getLayersByClass:function(a){return this.getLayersBy("CLASS_NAME",a)},getControlsBy:function(a,b){return this.getBy("controls",a,b)},getControlsByClass:function(a){return this.getControlsBy("CLASS_NAME", 123a)},getLayer:function(a){for(var b=null,c=0,d=this.layers.length;c<d;c++){var e=this.layers[c];if(e.id==a){b=e;break}}return b},setLayerZIndex:function(a,b){a.setZIndex(this.Z_INDEX_BASE[a.isBaseLayer?"BaseLayer":"Overlay"]+5*b)},resetLayersZIndex:function(){for(var a=0,b=this.layers.length;a<b;a++)this.setLayerZIndex(this.layers[a],a)},addLayer:function(a){for(var b=0,c=this.layers.length;b<c;b++)if(this.layers[b]==a)return!1;if(!1===this.events.triggerEvent("preaddlayer",{layer:a}))return!1;if(this.allOverlays)a.isBaseLayer= 124!1;a.div.className="olLayerDiv";a.div.style.overflow="";this.setLayerZIndex(a,this.layers.length);a.isFixed?this.viewPortDiv.appendChild(a.div):this.layerContainerDiv.appendChild(a.div);this.layers.push(a);a.setMap(this);a.isBaseLayer||this.allOverlays&&!this.baseLayer?null==this.baseLayer?this.setBaseLayer(a):a.setVisibility(!1):a.redraw();this.events.triggerEvent("addlayer",{layer:a});a.events.triggerEvent("added",{map:this,layer:a});a.afterAdd();return!0},addLayers:function(a){for(var b=0,c=a.length;b< 125c;b++)this.addLayer(a[b])},removeLayer:function(a,b){if(!1!==this.events.triggerEvent("preremovelayer",{layer:a})){null==b&&(b=!0);a.isFixed?this.viewPortDiv.removeChild(a.div):this.layerContainerDiv.removeChild(a.div);OpenLayers.Util.removeItem(this.layers,a);a.removeMap(this);a.map=null;if(this.baseLayer==a&&(this.baseLayer=null,b))for(var c=0,d=this.layers.length;c<d;c++){var e=this.layers[c];if(e.isBaseLayer||this.allOverlays){this.setBaseLayer(e);break}}this.resetLayersZIndex();this.events.triggerEvent("removelayer", 126{layer:a});a.events.triggerEvent("removed",{map:this,layer:a})}},getNumLayers:function(){return this.layers.length},getLayerIndex:function(a){return OpenLayers.Util.indexOf(this.layers,a)},setLayerIndex:function(a,b){var c=this.getLayerIndex(a);if(0>b)b=0;else if(b>this.layers.length)b=this.layers.length;if(c!=b){this.layers.splice(c,1);this.layers.splice(b,0,a);for(var c=0,d=this.layers.length;c<d;c++)this.setLayerZIndex(this.layers[c],c);this.events.triggerEvent("changelayer",{layer:a,property:"order"}); 127this.allOverlays&&(0===b?this.setBaseLayer(a):this.baseLayer!==this.layers[0]&&this.setBaseLayer(this.layers[0]))}},raiseLayer:function(a,b){var c=this.getLayerIndex(a)+b;this.setLayerIndex(a,c)},setBaseLayer:function(a){if(a!=this.baseLayer&&-1!=OpenLayers.Util.indexOf(this.layers,a)){var b=this.getCachedCenter(),c=OpenLayers.Util.getResolutionFromScale(this.getScale(),a.units);null!=this.baseLayer&&!this.allOverlays&&this.baseLayer.setVisibility(!1);this.baseLayer=a;if(!this.allOverlays||this.baseLayer.visibility)this.baseLayer.setVisibility(!0), 128!1===this.baseLayer.inRange&&this.baseLayer.redraw();null!=b&&(a=this.getZoomForResolution(c||this.resolution,!0),this.setCenter(b,a,!1,!0));this.events.triggerEvent("changebaselayer",{layer:this.baseLayer})}},addControl:function(a,b){this.controls.push(a);this.addControlToMap(a,b)},addControls:function(a,b){for(var c=1===arguments.length?[]:b,d=0,e=a.length;d<e;d++)this.addControl(a[d],c[d]?c[d]:null)},addControlToMap:function(a,b){a.outsideViewport=null!=a.div;if(this.displayProjection&&!a.displayProjection)a.displayProjection= 129this.displayProjection;a.setMap(this);var c=a.draw(b);if(c&&!a.outsideViewport)c.style.zIndex=this.Z_INDEX_BASE.Control+this.controls.length,this.viewPortDiv.appendChild(c);a.autoActivate&&a.activate()},getControl:function(a){for(var b=null,c=0,d=this.controls.length;c<d;c++){var e=this.controls[c];if(e.id==a){b=e;break}}return b},removeControl:function(a){a&&a==this.getControl(a.id)&&(a.div&&a.div.parentNode==this.viewPortDiv&&this.viewPortDiv.removeChild(a.div),OpenLayers.Util.removeItem(this.controls, 130a))},addPopup:function(a,b){if(b)for(var c=this.popups.length-1;0<=c;--c)this.removePopup(this.popups[c]);a.map=this;this.popups.push(a);if(c=a.draw())c.style.zIndex=this.Z_INDEX_BASE.Popup+this.popups.length,this.layerContainerDiv.appendChild(c)},removePopup:function(a){OpenLayers.Util.removeItem(this.popups,a);if(a.div)try{this.layerContainerDiv.removeChild(a.div)}catch(b){}a.map=null},getSize:function(){var a=null;null!=this.size&&(a=this.size.clone());return a},updateSize:function(){var a=this.getCurrentSize();
131if(a&&!isNaN(a.h)&&!isNaN(a.w)){this.events.clearMouseCache();var b=this.getSize();if(null==b)this.size=b=a;if(!a.equals(b)){this.size=a;a=0;for(b=this.layers.length;a<b;a++)this.layers[a].onMapResize();a=this.getCachedCenter();if(null!=this.baseLayer&&null!=a)b=this.getZoom(),this.zoom=null,this.setCenter(a,b)}}this.events.triggerEvent("updatesize")},getCurrentSize:function(){var a=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(0==a.w&&0==a.h||isNaN(a.w)&&isNaN(a.h))a.w=this.div.offsetWidth, 132a.h=this.div.offsetHeight;if(0==a.w&&0==a.h||isNaN(a.w)&&isNaN(a.h))a.w=parseInt(this.div.style.width),a.h=parseInt(this.div.style.height);return a},calculateBounds:function(a,b){var c=null;null==a&&(a=this.getCachedCenter());null==b&&(b=this.getResolution());if(null!=a&&null!=b)var c=this.size.w*b/2,d=this.size.h*b/2,c=new OpenLayers.Bounds(a.lon-c,a.lat-d,a.lon+c,a.lat+d);return c},getCenter:function(){var a=null,b=this.getCachedCenter();b&&(a=b.clone());return a},getCachedCenter:function(){if(!this.center&& 133this.size)this.center=this.getLonLatFromViewPortPx({x:this.size.w/2,y:this.size.h/2});return this.center},getZoom:function(){return this.zoom},pan:function(a,b,c){c=OpenLayers.Util.applyDefaults(c,{animate:!0,dragging:!1});if(c.dragging)(0!=a||0!=b)&&this.moveByPx(a,b);else{var d=this.getViewPortPxFromLonLat(this.getCachedCenter()),a=d.add(a,b);if(this.dragging||!a.equals(d))if(d=this.getLonLatFromViewPortPx(a),c.animate)this.panTo(d);else if(this.moveTo(d),this.dragging)this.dragging=!1,this.events.triggerEvent("moveend")}}, 134panTo:function(a){if(this.panTween&&this.getExtent().scale(this.panRatio).containsLonLat(a)){var b=this.getCachedCenter();if(!a.equals(b)){var b=this.getPixelFromLonLat(b),c=this.getPixelFromLonLat(a),d=0,e=0;this.panTween.start({x:0,y:0},{x:c.x-b.x,y:c.y-b.y},this.panDuration,{callbacks:{eachStep:OpenLayers.Function.bind(function(a){this.moveByPx(a.x-d,a.y-e);d=Math.round(a.x);e=Math.round(a.y)},this),done:OpenLayers.Function.bind(function(){this.moveTo(a);this.dragging=!1;this.events.triggerEvent("moveend")}, 135this)}})}}else this.setCenter(a)},setCenter:function(a,b,c,d){this.panTween&&this.panTween.stop();this.zoomTween&&this.zoomTween.stop();this.moveTo(a,b,{dragging:c,forceZoomChange:d})},moveByPx:function(a,b){var c=this.size.w/2,d=this.size.h/2,e=c+a,f=d+b,g=this.baseLayer.wrapDateLine,h=0,i=0;this.restrictedExtent&&(h=c,i=d,g=!1);a=g||e<=this.maxPx.x-h&&e>=this.minPx.x+h?Math.round(a):0;b=f<=this.maxPx.y-i&&f>=this.minPx.y+i?Math.round(b):0;if(a||b){if(!this.dragging)this.dragging=!0,this.events.triggerEvent("movestart"); 136this.center=null;a&&(this.layerContainerOriginPx.x-=a,this.minPx.x-=a,this.maxPx.x-=a);b&&(this.layerContainerOriginPx.y-=b,this.minPx.y-=b,this.maxPx.y-=b);this.applyTransform();for(d=0,e=this.layers.length;d<e;++d)if(c=this.layers[d],c.visibility&&(c===this.baseLayer||c.inRange))c.moveByPx(a,b),c.events.triggerEvent("move");this.events.triggerEvent("move")}},adjustZoom:function(a){if(this.baseLayer&&this.baseLayer.wrapDateLine){var b=this.baseLayer.resolutions,c=this.getMaxExtent().getWidth()/this.size.w; 137if(this.getResolutionForZoom(a)>c)if(this.fractionalZoom)a=this.getZoomForResolution(c);else for(var d=a|0,e=b.length;d<e;++d)if(b[d]<=c){a=d;break}}return a},getMinZoom:function(){return this.adjustZoom(0)},moveTo:function(a,b,c){null!=a&&!(a instanceof OpenLayers.LonLat)&&(a=new OpenLayers.LonLat(a));c||(c={});null!=b&&(b=parseFloat(b),this.fractionalZoom||(b=Math.round(b)));var d=b,b=this.adjustZoom(b);b!==d&&(a=this.getCenter());var d=c.dragging||this.dragging,e=c.forceZoomChange;if(!this.getCachedCenter()&& 138!this.isValidLonLat(a))a=this.maxExtent.getCenterLonLat(),this.center=a.clone();if(null!=this.restrictedExtent){if(null==a)a=this.center;null==b&&(b=this.getZoom());var f=this.getResolutionForZoom(b),f=this.calculateBounds(a,f);if(!this.restrictedExtent.containsBounds(f)){var g=this.restrictedExtent.getCenterLonLat();f.getWidth()>this.restrictedExtent.getWidth()?a=new OpenLayers.LonLat(g.lon,a.lat):f.left<this.restrictedExtent.left?a=a.add(this.restrictedExtent.left-f.left,0):f.right>this.restrictedExtent.right&& 139(a=a.add(this.restrictedExtent.right-f.right,0));f.getHeight()>this.restrictedExtent.getHeight()?a=new OpenLayers.LonLat(a.lon,g.lat):f.bottom<this.restrictedExtent.bottom?a=a.add(0,this.restrictedExtent.bottom-f.bottom):f.top>this.restrictedExtent.top&&(a=a.add(0,this.restrictedExtent.top-f.to
139p))}}e=e||this.isValidZoomLevel(b)&&b!=this.getZoom();f=this.isValidLonLat(a)&&!a.equals(this.center);if(e||f||d){d||this.events.triggerEvent("movestart",{zoomChanged:e});if(f)!e&&this.center&&this.centerLayerContainer(a), 140this.center=a.clone();a=e?this.getResolutionForZoom(b):this.getResolution();if(e||null==this.layerContainerOrigin){this.layerContainerOrigin=this.getCachedCenter();this.layerContainerOriginPx.x=0;this.layerContainerOriginPx.y=0;this.applyTransform();var f=this.getMaxExtent({restricted:!0}),h=f.getCenterLonLat(),g=this.center.lon-h.lon,h=h.lat-this.center.lat,i=Math.round(f.getWidth()/a),j=Math.round(f.getHeight()/a);this.minPx={x:(this.size.w-i)/2-g/a,y:(this.size.h-j)/2-h/a};this.maxPx={x:this.minPx.x+ 141Math.round(f.getWidth()/a),y:this.minPx.y+Math.round(f.getHeight()/a)}}if(e)this.zoom=b,this.resolution=a;a=this.getExtent();this.baseLayer.visibility&&(this.baseLayer.moveTo(a,e,c.dragging),c.dragging||this.baseLayer.events.triggerEvent("moveend",{zoomChanged:e}));a=this.baseLayer.getExtent();for(b=this.layers.length-1;0<=b;--b)if(f=this.layers[b],f!==this.baseLayer&&!f.isBaseLayer){g=f.calculateInRange();if(f.inRange!=g)(f.inRange=g)||f.display(!1),this.events.triggerEvent("changelayer",{layer:f, 142property:"visibility"});g&&f.visibility&&(f.moveTo(a,e,c.dragging),c.dragging||f.events.triggerEvent("moveend",{zoomChanged:e}))}this.events.triggerEvent("move");d||this.events.triggerEvent("moveend");if(e){b=0;for(c=this.popups.length;b<c;b++)this.popups[b].updatePosition();this.events.triggerEvent("zoomend")}}},centerLayerContainer:function(a){var b=this.getViewPortPxFromLonLat(this.layerContainerOrigin),c=this.getViewPortPxFromLonLat(a);if(null!=b&&null!=c){var d=this.layerContainerOriginPx.x, 143a=this.layerContainerOriginPx.y,e=Math.round(b.x-c.x),b=Math.round(b.y-c.y);this.applyTransform(this.layerContainerOriginPx.x=e,this.layerContainerOriginPx.y=b);d-=e;a-=b;this.minPx.x-=d;this.maxPx.x-=d;this.minPx.y-=a;this.maxPx.y-=a}},isValidZoomLevel:function(a){return null!=a&&0<=a&&a<this.getNumZoomLevels()},isValidLonLat:function(a){var b=!1;null!=a&&(b=this.getMaxExtent(),b=b.containsLonLat(a,{worldBounds:this.baseLayer.wrapDateLine&&b}));return b},getProjection:function(){var a=this.getProjectionObject(); 144return a?a.getCode():null},getProjectionObject:function(){var a=null;if(null!=this.baseLayer)a=this.baseLayer.projection;return a},getMaxResolution:function(){var a=null;if(null!=this.baseLayer)a=this.baseLayer.maxResolution;return a},getMaxExtent:function(a){var b=null;if(a&&a.restricted&&this.restrictedExtent)b=this.restrictedExtent;else if(null!=this.baseLayer)b=this.baseLayer.maxExtent;return b},getNumZoomLevels:function(){var a=null;if(null!=this.baseLayer)a=this.baseLayer.numZoomLevels;return a}, 145getExtent:function(){var a=null;null!=this.baseLayer&&(a=this.baseLayer.getExtent());return a},getResolution:function(){var a=null;null!=this.baseLayer?a=this.baseLayer.getResolution():!0===this.allOverlays&&0<this.layers.length&&(a=this.layers[0].getResolution());return a},getUnits:function(){var a=null;if(null!=this.baseLayer)a=this.baseLayer.units;return a},getScale:function(){var a=null;null!=this.baseLayer&&(a=this.getResolution(),a=OpenLayers.Util.getScaleFromResolution(a,this.baseLayer.units)); 146return a},getZoomForExtent:function(a,b){var c=null;null!=this.baseLayer&&(c=this.baseLayer.getZoomForExtent(a,b));return c},getResolutionForZoom:function(a){var b=null;this.baseLayer&&(b=this.baseLayer.getResolutionForZoom(a));return b},getZoomForResolution:function(a,b){var c=null;null!=this.baseLayer&&(c=this.baseLayer.getZoomForResolution(a,b));return c},zoomTo:function(a,b){var c=this;if(c.isValidZoomLevel(a))if(c.baseLayer.wrapDateLine&&(a=c.adjustZoom(a)),c.zoomTween){var d=c.getResolution(), 147e=c.getResolutionForZoom(a),f={scale:1},d={scale:d/e};c.zoomTween.playing&&c.zoomTween.duration<3*c.zoomDuration?c.zoomTween.finish={scale:c.zoomTween.finish.scale*d.scale}:(b||(e=c.getSize(),b={x:e.w/2,y:e.h/2}),c.zoomTween.start(f,d,c.zoomDuration,{minFrameRate:50,callbacks:{eachStep:function(a){var d=c.layerContainerOriginPx,a=a.scale;c.applyTransform(d.x+((a-1)*(d.x-b.x)|0),d.y+((a-1)*(d.y-b.y)|0),a)},done:function(a){c.applyTransform();var a=c.getResolution()/a.scale,d=c.getZoomForResolution(a, 148!0);c.moveTo(c.getZoomTargetCenter(b,a),d,!0)}}}))}else f=b?c.getZoomTargetCenter(b,c.getResolutionForZoom(a)):null,c.setCenter(f,a)},zoomIn:function(){this.zoomTo(this.getZoom()+1)},zoomOut:function(){this.zoomTo(this.getZoom()-1)},zoomToExtent:function(a,b){a instanceof OpenLayers.Bounds||(a=new OpenLayers.Bounds(a));var c=a.getCenterLonLat();if(this.baseLayer.wrapDateLine){c=this.getMaxExtent();for(a=a.clone();a.right<a.left;)a.right+=c.getWidth();c=a.getCenterLonLat().wrapDateLine(c)}this.setCenter(c, 149this.getZoomForExtent(a,b))},zoomToMaxExtent:function(a){this.zoomToExtent(this.getMaxExtent({restricted:a?a.restricted:!0}))},zoomToScale:function(a,b){var c=OpenLayers.Util.getResolutionFromScale(a,this.baseLayer.units),d=this.size.w*c/2,c=this.size.h*c/2,e=this.getCachedCenter();this.zoomToExtent(new OpenLayers.Bounds(e.lon-d,e.lat-c,e.lon+d,e.lat+c),b)}
149,getLonLatFromViewPortPx:function(a){var b=null;null!=this.baseLayer&&(b=this.baseLayer.getLonLatFromViewPortPx(a));return b},getViewPortPxFromLonLat:function(a){var b= 150null;null!=this.baseLayer&&(b=this.baseLayer.getViewPortPxFromLonLat(a));return b},getZoomTargetCenter:function(a,b){var c=null,d=this.getSize(),e=d.w/2-a.x,d=a.y-d.h/2,f=this.getLonLatFromPixel(a);f&&(c=new OpenLayers.LonLat(f.lon+e*b,f.lat+d*b));return c},getLonLatFromPixel:function(a){return this.getLonLatFromViewPortPx(a)},getPixelFromLonLat:function(a){a=this.getViewPortPxFromLonLat(a);a.x=Math.round(a.x);a.y=Math.round(a.y);return a},getGeodesicPixelSize:function(a){var b=a?this.getLonLatFromPixel(a): 151this.getCachedCenter()||new OpenLayers.LonLat(0,0),c=this.getResolution(),a=b.add(-c/2,0),d=b.add(c/2,0),e=b.add(0,-c/2),b=b.add(0,c/2),c=new OpenLayers.Projection("EPSG:4326"),f=this.getProjectionObject()||c;f.equals(c)||(a.transform(f,c),d.transform(f,c),e.transform(f,c),b.transform(f,c));return new OpenLayers.Size(OpenLayers.Util.distVincenty(a,d),OpenLayers.Util.distVincenty(e,b))},getViewPortPxFromLayerPx:function(a){var b=null;null!=a&&(b=a.add(this.layerContainerOriginPx.x,this.layerContainerOriginPx.y)); 152return b},getLayerPxFromViewPortPx:function(a){var b=null;if(null!=a&&(b=a.add(-this.layerContainerOriginPx.x,-this.layerContainerOriginPx.y),isNaN(b.x)||isNaN(b.y)))b=null;return b},getLonLatFromLayerPx:function(a){a=this.getViewPortPxFromLayerPx(a);return this.getLonLatFromViewPortPx(a)},getLayerPxFromLonLat:function(a){return this.getLayerPxFromViewPortPx(this.getPixelFromLonLat(a))},applyTransform:function(a,b,c){var c=c||1,d=this.layerContainerOriginPx,e=1!==c,a=a||d.x,b=b||d.y,f=this.layerContainerDiv.style, 153g=this.applyTransform.transform,h=this.applyTransform.template;if(void 0===g&&(g=OpenLayers.Util.vendorPrefix.style("transform"),this.applyTransform.transform=g)){var i=OpenLayers.Element.getStyle(this.viewPortDiv,OpenLayers.Util.vendorPrefix.css("transform"));if(!i||"none"!==i)h=["translate3d(",",0) ","scale3d(",",1)"],f[g]=[h[0],"0,0",h[1]].join("");if(!h||!~f[g].indexOf(h[0]))h=["translate(",") ","scale(",")"];this.applyTransform.template=h}if(null!==g&&("translate3d("===h[0]||!0===e)){if(!0=== 154e&&"translate("===h[0])a-=d.x,b-=d.y,f.left=d.x+"px",f.top=d.y+"px";f[g]=[h[0],a,"px,",b,"px",h[1],h[2],c,",",c,h[3]].join("")}else f.left=a+"px",f.top=b+"px",null!==g&&(f[g]="")},CLASS_NAME:"OpenLayers.Map"});OpenLayers.Map.TILE_WIDTH=256;OpenLayers.Map.TILE_HEIGHT=256; 155OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:null,popup:null,initialize:function(a,b,c){this.layer=a;this.lonlat=b;this.data=null!=c?c:{};this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){null!=this.layer&&null!=this.layer.map&&null!=this.popup&&this.layer.map.removePopup(this.popup);null!=this.layer&&null!=this.marker&&this.layer.removeMarker(this.marker);this.data=this.lonlat=this.id=this.layer=null;if(null!=this.marker)this.destroyMarker(this.marker), 156this.marker=null;if(null!=this.popup)this.destroyPopup(this.popup),this.popup=null},onScreen:function(){var a=!1;null!=this.layer&&null!=this.layer.map&&(a=this.layer.map.getExtent().containsLonLat(this.lonlat));return a},createMarker:function(){if(null!=this.lonlat)this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);return this.marker},destroyMarker:function(){this.marker.destroy()},createPopup:function(a){if(null!=this.lonlat){if(!this.popup)this.popup=new (this.popupClass?this.popupClass: 157OpenLayers.Popup.Anchored)(this.id+"_popup",this.lonlat,this.data.popupSize,this.data.popupContentHTML,this.marker?this.marker.icon:null,a);if(null!=this.data.overflow)this.popup.contentDiv.style.overflow=this.data.overflow;this.popup.feature=this}return this.popup},destroyPopup:function(){if(this.popup)this.popup.feature=null,this.popup.destroy(),this.popup=null},CLASS_NAME:"OpenLayers.Feature"});OpenLayers.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"}; 158OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,bounds:null,state:null,style:null,url:null,renderIntent:"default",modified:null,initialize:function(a,b,c){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,b]);this.lonlat=null;this.geometry=a?a:null;this.state=null;this.attributes={};if(b)this.attributes=OpenLayers.Util.extend(this.attributes,b);this.style=c?c:null},destroy:function(){if(this.layer)this.layer.removeFeatures(this),this.layer= 159null;this.modified=this.geometry=null;OpenLayers.Feature.prototype.destroy.apply(this,arguments)},clone:function(){return new OpenLayers.Feature.Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style)},onScreen:function(a){var b=!1;this.layer&&this.layer.map&&(b=this.layer.map.getExtent(),a?(a=this.geometry.getBounds(),b=b.intersectsBounds(a)):b=b.toGeometry().intersects(this.geometry));return b},getVisibility:function(){return!(this.style&&"none"==this.style.display||!this.layer|| 160this.layer&&this.layer.styleMap&&"none"==this.layer.styleMap.createSymbolizer(this,this.renderIntent).display||this.layer&&!this.layer.getVisibility())},createMarker:function(){return null},destroyMarker:function(){},createPopup:function(){return null},atPoint:function(a,b,c){var d=!1;this.geometry&&(d=this.geometry.atPoint(a,b,c));return d},destroyPopup:function(){}
160,move:function(a){if(this.layer&&this.geometry.move){var a="OpenLayers.LonLat"==a.CLASS_NAME?this.layer.getViewPortPxFromLonLat(a):a, 161b=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat()),c=this.layer.map.getResolution();this.geometry.move(c*(a.x-b.x),c*(b.y-a.y));this.layer.drawFeature(this);return b}},toState:function(a){if(a==OpenLayers.State.UPDATE)switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.DELETE:this.state=a}else if(a==OpenLayers.State.INSERT)switch(this.state){case OpenLayers.State.UNKNOWN:break;default:this.state=a}else if(a==OpenLayers.State.DELETE)switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.UPDATE:this.state= 162a}else if(a==OpenLayers.State.UNKNOWN)this.state=a},CLASS_NAME:"OpenLayers.Feature.Vector"}); 163OpenLayers.Feature.Vector.style={"default":{fillColor:"#ee9900",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},select:{fillColor:"blue",fillOpacity:0.4, 164hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},temporary:{fillColor:"#66cccc",fillOpacity:0.2,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#66cccc",strokeOpacity:1, 165strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},"delete":{display:"none"}}; 166OpenLayers.Style=OpenLayers.Class({id:null,name:null,title:null,description:null,layerName:null,isDefault:!1,rules:null,context:null,defaultStyle:null,defaultsPerSymbolizer:!1,propertyStyles:null,initialize:function(a,b){OpenLayers.Util.extend(this,b);this.rules=[];b&&b.rules&&this.addRules(b.rules);this.setDefaultStyle(a||OpenLayers.Feature.Vector.style["default"]);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var a=0,b=this.rules.length;a<b;a++)this.rules[a].destroy(), 167this.rules[a]=null;this.defaultStyle=this.rules=null},createSymbolizer:function(a){for(var b=this.defaultsPerSymbolizer?{}:this.createLiterals(OpenLayers.Util.extend({},this.defaultStyle),a),c=this.rules,d,e=[],f=!1,g=0,h=c.length;g<h;g++)d=c[g],d.evaluate(a)&&(d instanceof OpenLayers.Rule&&d.elseFilter?e.push(d):(f=!0,this.applySymbolizer(d,b,a)));if(!1==f&&0<e.length){f=!0;g=0;for(h=e.length;g<h;g++)this.applySymbolizer(e[g],b,a)}if(0<c.length&&!1==f)b.display="none";if(null!=b.label&&"string"!== 168typeof b.label)b.label=""+b.label;return b},applySymbolizer:function(a,b,c){var d=c.geometry?this.getSymbolizerPrefix(c.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0],a=a.symbolizer[d]||a.symbolizer;if(!0===this.defaultsPerSymbolizer)d=this.defaultStyle,OpenLayers.Util.applyDefaults(a,{pointRadius:d.pointRadius}),(!0===a.stroke||!0===a.graphic)&&OpenLayers.Util.applyDefaults(a,{strokeWidth:d.strokeWidth,strokeColor:d.strokeColor,strokeOpacity:d.strokeOpacity,strokeDashstyle:d.strokeDashstyle,strokeLinecap:d.strokeLinecap}), 169(!0===a.fill||!0===a.graphic)&&OpenLayers.Util.applyDefaults(a,{fillColor:d.fillColor,fillOpacity:d.fillOpacity}),!0===a.graphic&&OpenLayers.Util.applyDefaults(a,{pointRadius:this.defaultStyle.pointRadius,externalGraphic:this.defaultStyle.externalGraphic,graphicName:this.defaultStyle.graphicName,graphicOpacity:this.defaultStyle.graphicOpacity,graphicWidth:this.defaultStyle.graphicWidth,graphicHeight:this.defaultStyle.graphicHeight,graphicXOffset:this.defaultStyle.graphicXOffset,graphicYOffset:this.defaultStyle.graphicYOffset}); 170return this.createLiterals(OpenLayers.Util.extend(b,a),c)},createLiterals:function(a,b){var c=OpenLayers.Util.extend({},b.attributes||b.data);OpenLayers.Util.extend(c,this.context);for(var d in this.propertyStyles)a[d]=OpenLayers.Style.createLiteral(a[d],c,b,d);return a},findPropertyStyles:function(){var a={};this.addPropertyStyles(a,this.defaultStyle);for(var b=this.rules,c,d,e=0,f=b.length;e<f;e++){c=b[e].symbolizer;for(var g in c)if(d=c[g],"object"==typeof d)this.addPropertyStyles(a,d);else{this.addPropertyStyles(a, 171c);break}}return a},addPropertyStyles:function(a,b){var c,d;for(d in b)c=b[d],"string"==typeof c&&c.match(/\$\{\w+\}/)&&(a[d]=!0);return a},addRules:function(a){Array.prototype.push.apply(this.rules,a);this.propertyStyles=this.findPropertyStyles()},setDefaultStyle:function(a){this.defaultStyle=a;this.propertyStyles=this.findPropertyStyles()}
171,getSymbolizerPrefix:function(a){for(var b=OpenLayers.Style.SYMBOLIZER_PREFIXES,c=0,d=b.length;c<d;c++)if(-1!=a.CLASS_NAME.indexOf(b[c]))return b[c]},clone:function(){var a= 172OpenLayers.Util.extend({},this);if(this.rules){a.rules=[];for(var b=0,c=this.rules.length;b<c;++b)a.rules.push(this.rules[b].clone())}a.context=this.context&&OpenLayers.Util.extend({},this.context);b=OpenLayers.Util.extend({},this.defaultStyle);return new OpenLayers.Style(b,a)},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(a,b,c,d){"string"==typeof a&&-1!=a.indexOf("${")&&(a=OpenLayers.String.format(a,b,[c,d]),a=isNaN(a)||!a?a:parseFloat(a));return a}; 173OpenLayers.Style.SYMBOLIZER_PREFIXES=["Point","Line","Polygon","Text","Raster"]; 174OpenLayers.Rule=OpenLayers.Class({id:null,name:null,title:null,description:null,context:null,filter:null,elseFilter:!1,symbolizer:null,symbolizers:null,minScaleDenominator:null,maxScaleDenominator:null,initialize:function(a){this.symbolizer={};OpenLayers.Util.extend(this,a);this.symbolizers&&delete this.symbolizer;this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var a in this.symbolizer)this.symbolizer[a]=null;this.symbolizer=null;delete this.symbolizers},evaluate:function(a){var b= 175this.getContext(a),c=!0;if(this.minScaleDenominator||this.maxScaleDenominator)var d=a.layer.map.getScale();this.minScaleDenominator&&(c=d>=OpenLayers.Style.createLiteral(this.minScaleDenominator,b));c&&this.maxScaleDenominator&&(c=d<OpenLayers.Style.createLiteral(this.maxScaleDenominator,b));c&&this.filter&&(c="OpenLayers.Filter.FeatureId"==this.filter.CLASS_NAME?this.filter.evaluate(a):this.filter.evaluate(b));return c},getContext:function(a){var b=this.context;b||(b=a.attributes||a.data);"function"== 176typeof this.context&&(b=this.context(a));return b},clone:function(){var a=OpenLayers.Util.extend({},this);if(this.symbolizers){var b=this.symbolizers.length;a.symbolizers=Array(b);for(var c=0;c<b;++c)a.symbolizers[c]=this.symbolizers[c].clone()}else{a.symbolizer={};for(var d in this.symbolizer)b=this.symbolizer[d],c=typeof b,"object"===c?a.symbolizer[d]=OpenLayers.Util.extend({},b):"string"===c&&(a.symbolizer[d]=b)}a.filter=this.filter&&this.filter.clone();a.context=this.context&&OpenLayers.Util.extend({}, 177this.context);return new OpenLayers.Rule(a)},CLASS_NAME:"OpenLayers.Rule"});OpenLayers.Symbolizer=OpenLayers.Class({zIndex:0,initialize:function(a){OpenLayers.Util.extend(this,a)},clone:function(){return new (OpenLayers.Util.getConstructor(this.CLASS_NAME))(OpenLayers.Util.extend({},this))},CLASS_NAME:"OpenLayers.Symbolizer"});OpenLayers.Symbolizer.Point=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Point"}); 178OpenLayers.Symbolizer.Line=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Line"});OpenLayers.Symbolizer.Polygon=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Polygon"}); 179OpenLayers.Symbolizer.Text=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Text"});OpenLayers.Symbolizer.Raster=OpenLayers.Class(OpenLayers.Symbolizer,{initialize:function(a){OpenLayers.Symbolizer.prototype.initialize.apply(this,arguments)},CLASS_NAME:"OpenLayers.Symbolizer.Raster"}); 180OpenLayers.Style2=OpenLayers.Class({id:null,name:null,title:null,description:null,layerName:null,isDefault:!1,rules:null,initialize:function(a){OpenLayers.Util.extend(this,a);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){for(var a=0,b=this.rules.length;a<b;a++)this.rules[a].destroy();delete this.rules},clone:function(){var a=OpenLayers.Util.extend({},this);if(this.rules){a.rules=[];for(var b=0,c=this.rules.length;b<c;++b)a.rules.push(this.rules[b].clone())}return new OpenLayers.Style2(a)}, 181CLASS_NAME:"OpenLayers.Style2"});OpenLayers.Format=OpenLayers.Class({options:null,externalProjection:null,internalProjection:null,data:null,keepData:!1,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a},destroy:function(){},read:function(){throw Error("Read not implemented.");},write:function(){throw Error("Write not implemented.");},CLASS_NAME:"OpenLayers.Format"}); 182OpenLayers.Format.XML=OpenLayers.Class(OpenLayers.Format,{namespaces:null,namespaceAlias:null,defaultPrefix:null,readers:{},writers:{}
182,xmldom:null,initialize:function(a){if(window.ActiveXObject)this.xmldom=new ActiveXObject("Microsoft.XMLDOM");OpenLayers.Format.prototype.initialize.apply(this,[a]);this.namespaces=OpenLayers.Util.extend({},this.namespaces);this.namespaceAlias={};for(var b in this.namespaces)this.namespaceAlias[this.namespaces[b]]=b},destroy:function(){this.xmldom=null;OpenLayers.Format.prototype.destroy.apply(this, 183arguments)},setNamespace:function(a,b){this.namespaces[a]=b;this.namespaceAlias[b]=a},read:function(a){var b=a.indexOf("<");0<b&&(a=a.substring(b));b=OpenLayers.Util.Try(OpenLayers.Function.bind(function(){var b;b=window.ActiveXObject&&!this.xmldom?new ActiveXObject("Microsoft.XMLDOM"):this.xmldom;b.loadXML(a);return b},this),function(){return(new DOMParser).parseFromString(a,"text/xml")},function(){var b=new XMLHttpRequest;b.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(a),!1);b.overrideMimeType&& 184b.overrideMimeType("text/xml");b.send(null);return b.responseXML});if(this.keepData)this.data=b;return b},write:function(a){if(this.xmldom)a=a.xml;else{var b=new XMLSerializer;if(1==a.nodeType){var c=document.implementation.createDocument("","",null);c.importNode&&(a=c.importNode(a,!0));c.appendChild(a);a=b.serializeToString(c)}else a=b.serializeToString(a)}return a},createElementNS:function(a,b){return this.xmldom?"string"==typeof a?this.xmldom.createNode(1,b,a):this.xmldom.createNode(1,b,""):document.createElementNS(a, 185b)},createDocumentFragment:function(){return this.xmldom?this.xmldom.createDocumentFragment():document.createDocumentFragment()},createTextNode:function(a){"string"!==typeof a&&(a=""+a);return this.xmldom?this.xmldom.createTextNode(a):document.createTextNode(a)},getElementsByTagNameNS:function(a,b,c){var d=[];if(a.getElementsByTagNameNS)d=a.getElementsByTagNameNS(b,c);else for(var a=a.getElementsByTagName("*"),e,f,g=0,h=a.length;g<h;++g)if(e=a[g],f=e.prefix?e.prefix+":"+c:c,"*"==c||f==e.nodeName)("*"== 186b||b==e.namespaceURI)&&d.push(e);return d},getAttributeNodeNS:function(a,b,c){var d=null;if(a.getAttributeNodeNS)d=a.getAttributeNodeNS(b,c);else for(var a=a.attributes,e,f,g=0,h=a.length;g<h;++g)if(e=a[g],e.namespaceURI==b&&(f=e.prefix?e.prefix+":"+c:c,f==e.nodeName)){d=e;break}return d},getAttributeNS:function(a,b,c){var d="";if(a.getAttributeNS)d=a.getAttributeNS(b,c)||"";else if(a=this.getAttributeNodeNS(a,b,c))d=a.nodeValue;return d},getChildValue:function(a,b){var c=b||"";if(a)for(var d=a.firstChild;d;d= 187d.nextSibling)switch(d.nodeType){case 3:case 4:c+=d.nodeValue}return c},isSimpleContent:function(a){for(var b=!0,a=a.firstChild;a;a=a.nextSibling)if(1===a.nodeType){b=!1;break}return b},contentType:function(a){for(var b=!1,c=!1,d=OpenLayers.Format.XML.CONTENT_TYPE.EMPTY,a=a.firstChild;a;a=a.nextSibling){switch(a.nodeType){case 1:c=!0;break;case 8:break;default:b=!0}if(c&&b)break}if(c&&b)d=OpenLayers.Format.XML.CONTENT_TYPE.MIXED;else{if(c)return OpenLayers.Format.XML.CONTENT_TYPE.COMPLEX;if(b)return OpenLayers.Format.XML.CONTENT_TYPE.SIMPLE}return d}, 188hasAttributeNS:function(a,b,c){var d=!1;return d=a.hasAttributeNS?a.hasAttributeNS(b,c):!!this.getAttributeNodeNS(a,b,c)},setAttributeNS:function(a,b,c,d){if(a.setAttributeNS)a.setAttributeNS(b,c,d);else if(this.xmldom)b?(b=a.ownerDocument.createNode(2,c,b),b.nodeValue=d,a.setAttributeNode(b)):a.setAttribute(c,d);else throw"setAttributeNS not implemented";},createElementNSPlus:function(a,b){var b=b||{},c=b.uri||this.namespaces[b.prefix];c||(c=a.indexOf(":"),c=this.namespaces[a.substring(0,c)]);c|| 189(c=this.namespaces[this.defaultPrefix]);c=this.createElementNS(c,a);b.attributes&&this.setAttributes(c,b.attributes);var d=b.value;null!=d&&c.appendChild(this.createTextNode(d));return c},setAttributes:function(a,b){var c,d,e;for(e in b)null!=b[e]&&b[e].toString&&(c=b[e].toString(),d=this.namespaces[e.substring(0,e.indexOf(":"))]||null,this.setAttributeNS(a,d,e,c))},readNode:function(a,b){b||(b={});var c=this.readers[a.namespaceURI?this.namespaceAlias[a.namespaceURI]:this.defaultPrefix];if(c){var d= 190a.localName||a.nodeName.split(":").pop();(c=c[d]||c["*"])&&c.apply(this,[a,b])}return b},readChildNodes:function(a,b){b||(b={});for(var c=a.childNodes,d,e=0,f=c.length;e<f;++e)d=c[e],1==d.nodeType&&this.readNode(d,b);return b},writeNode:function(a,b,c){var d,e=a.indexOf(":");0<e?(d=a.substring(0,e),a=a.substring(e+1)):d=c?this.namespaceAlias[c.namespaceURI]:this.defaultPrefix;b=this.writers[d][a].apply(this,[b]);c&&c.appendChild(b);return b},getChildEl:function(a,b,c){return a&&this.getThisOrNextEl(a.firstChild, 191b,c)},getNextEl:function(a,b,c){return a&&this.getThisOrNextEl(a.nextSibling,b,c)},getThisOrNextEl:function(a,b,c){a:for(;a;a=a.nextSibling)switch(a.nodeType){case 1:if((!b||b===(a.localName||a.nodeName.split(":").pop()))&&(!c||c===a.namespaceURI))break a;a=null;break a;case 3:if(/^\s*$/.test(a.nodeValue))break;case 4:case 6:case 12:case 10:case 11:a=null;break a}return a||null},lookupNamespaceURI:function(a,b){var c=null;if(a)if(a.lookupNamespaceURI)c=a.lookupNamespaceURI(b);else a:switch(a.nodeType){case 1:if(null!== 192a.namespaceURI&&a.prefix===b){c=a.namespaceURI;break a}if(c=a.attributes.length)for(var d,e=0;e<c;++e)if(d=a.attributes[e],"xmlns"===d.prefix&&d.name==="xmlns:"+b){c=d.value||null;break a}else if("xmlns"===d.name&&null===b){c=d.value||null;break a}c=this.lookupNamespaceURI(a.parentNode,b);break a;case 2:c=this.lookupNamespaceURI(a.ownerElement,b);break a;case 9:c=this.lookupNamespaceURI(a.documentElement,b);break a;case 6:case 12:case 10:case 11:break a;default:c=this.lookupNamespaceURI(a.parentNode, 193b)}return c},getXMLDoc:function(){if(!OpenLayers.Format.XML.document&&!this.xmldom)if(document.implementation&&document.implementation.createDocument)OpenLayers.Format.XML.document=document.implementation.createDocument("","",null);else if(!this.xmldom&&window.ActiveXObject)this.xmldom=new ActiveXObject("Microsoft.XMLDOM");return OpenLayers.Format.XML.document||this.xmldom},CLASS_NAME:"OpenLayers.Format.XML"});OpenLayers.Format.XML.CONTENT_TYPE={EMPTY:0,SIMPLE:1,COMPLEX:2,MIXED:3}; 194OpenLayers.Format.XML.lookupNamespaceURI=OpenLayers.Function.bind(OpenLayers.Format.XML.prototype.lookupNamespaceURI,OpenLayers.Format.XML.prototype);OpenLayers.Format.XML.document=null; 195OpenLayers.Geometry=OpenLayers.Class({id:null,parent:null,bounds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},destroy:function(){this.bounds=this.id=null},clone:function(){return new OpenLayers.Geometry}
195,setBounds:function(a){if(a)this.bounds=a.clone()},clearBounds:function(){this.bounds=null;this.parent&&this.parent.clearBounds()},extendBounds:function(a){this.getBounds()?this.bounds.extend(a):this.setBounds(a)},getBounds:function(){null==this.bounds&&this.calculateBounds(); 196return this.bounds},calculateBounds:function(){},distanceTo:function(){},getVertices:function(){},atPoint:function(a,b,c){var d=!1;null!=this.getBounds()&&null!=a&&(b=null!=b?b:0,c=null!=c?c:0,d=(new OpenLayers.Bounds(this.bounds.left-b,this.bounds.bottom-c,this.bounds.right+b,this.bounds.top+c)).containsLonLat(a));return d},getLength:function(){return 0},getArea:function(){return 0},getCentroid:function(){return null},toString:function(){return OpenLayers.Format&&OpenLayers.Format.WKT?OpenLayers.Format.WKT.prototype.write(new OpenLayers.Feature.Vector(this)): 197Object.prototype.toString.call(this)},CLASS_NAME:"OpenLayers.Geometry"});OpenLayers.Geometry.fromWKT=function(a){var b;if(OpenLayers.Format&&OpenLayers.Format.WKT){var c=OpenLayers.Geometry.fromWKT.format;if(!c)c=new OpenLayers.Format.WKT,OpenLayers.Geometry.fromWKT.format=c;a=c.read(a);if(a instanceof OpenLayers.Feature.Vector)b=a.geometry;else if(OpenLayers.Util.isArray(a)){b=a.length;for(var c=Array(b),d=0;d<b;++d)c[d]=a[d].geometry;b=new OpenLayers.Geometry.Collection(c)}}return b}; 198OpenLayers.Geometry.segmentsIntersect=function(a,b,c){var d=c&&c.point,c=c&&c.tolerance,e=!1,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,l=j*h-k*i,j=k*g-j*f,g=h*g-i*f;0==l?0==j&&0==g&&(e=!0):(f=j/l,l=g/l,0<=f&&1>=f&&0<=l&&1>=l&&(d?(h=a.x1+f*h,l=a.y1+f*i,e=new OpenLayers.Geometry.Point(h,l)):e=!0));if(c)if(e){if(d){a=[a,b];b=0;a:for(;2>b;++b){f=a[b];for(i=1;3>i;++i)if(h=f["x"+i],l=f["y"+i],d=Math.sqrt(Math.pow(h-e.x,2)+Math.pow(l-e.y,2)),d<c){e.x=h;e.y=l;break a}}}}else{a= 199[a,b];b=0;a:for(;2>b;++b){h=a[b];l=a[(b+1)%2];for(i=1;3>i;++i)if(f={x:h["x"+i],y:h["y"+i]},g=OpenLayers.Geometry.distanceToSegment(f,l),g.distance<c){e=d?new OpenLayers.Geometry.Point(f.x,f.y):!0;break a}}}return e};OpenLayers.Geometry.distanceToSegment=function(a,b){var c=OpenLayers.Geometry.distanceSquaredToSegment(a,b);c.distance=Math.sqrt(c.distance);return c}; 200OpenLayers.Geometry.distanceSquaredToSegment=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));0>=k||(1<=k?(e=g,f=h):(e+=k*i,f+=k*j));return{distance:Math.pow(e-c,2)+Math.pow(f-d,2),x:e,y:f,along:k}}; 201OpenLayers.Geometry.Point=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,initialize:function(a,b){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(a);this.y=parseFloat(b)},clone:function(a){null==a&&(a=new OpenLayers.Geometry.Point(this.x,this.y));OpenLayers.Util.applyDefaults(a,this);return a},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y)},distanceTo:function(a,b){var c=!(b&&!1===b.edge)&&b&&b.details,d,e,f,g,h;a instanceof 202OpenLayers.Geometry.Point?(e=this.x,f=this.y,g=a.x,h=a.y,d=Math.sqrt(Math.pow(e-g,2)+Math.pow(f-h,2)),d=!c?d:{x0:e,y0:f,x1:g,y1:h,distance:d}):(d=a.distanceTo(this,b),c&&(d={x0:d.x1,y0:d.y1,x1:d.x0,y1:d.y0,distance:d.distance}));return d},equals:function(a){var b=!1;null!=a&&(b=this.x==a.x&&this.y==a.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y));return b},toShortString:function(){return this.x+", "+this.y},move:function(a,b){this.x+=a;this.y+=b;this.clearBounds()},rotate:function(a,b){var a= 203a*(Math.PI/180),c=this.distanceTo(b),d=a+Math.atan2(this.y-b.y,this.x-b.x);this.x=b.x+c*Math.cos(d);this.y=b.y+c*Math.sin(d);this.clearBounds()},getCentroid:function(){return new OpenLayers.Geometry.Point(this.x,this.y)},resize:function(a,b,c){this.x=b.x+a*(void 0==c?1:c)*(this.x-b.x);this.y=b.y+a*(this.y-b.y);this.clearBounds();return this},intersects:function(a){var b=!1;return b="OpenLayers.Geometry.Point"==a.CLASS_NAME?this.equals(a):a.intersects(this)},transform:function(a,b){if(a&&b)OpenLayers.Projection.transform(this, 204a,b),this.bounds=null;return this},getVertices:function(){return[this]},CLASS_NAME:"OpenLayers.Geometry.Point"}); 205OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(a){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];null!=a&&this.addComponents(a)},destroy:function(){this.components.length=0;this.components=null;OpenLayers.Geometry.prototype.destroy.apply(this,arguments)},clone:function(){for(var a=new (OpenLayers.Util.getConstructor(this.CLASS_NAME)),b=0,c=this.components.length;b<c;b++)a.addComponent(this.components[b].clone()); 206OpenLayers.Util.applyDefaults(a,this);return a},getComponentsString:function(){for(var a=[],b=0,c=this.components.length;b<c;b++)a.push(this.components[b].toShortString());return a.join(",")},calculateBounds:function(){this.bounds=null;var a=new OpenLayers.Bounds,b=this.components;if(b)for(var c=0,d=b.length;c<d;c++)a.extend(b[c].getBounds());null!=a.left&&null!=a.bottom&&null!=a.right&&null!=a.top&&this.setBounds(a)}
206,addComponents:function(a){OpenLayers.Util.isArray(a)||(a=[a]);for(var b=0,c=a.length;b< 207c;b++)this.addComponent(a[b])},addComponent:function(a,b){var c=!1;if(a&&(null==this.componentTypes||-1<OpenLayers.Util.indexOf(this.componentTypes,a.CLASS_NAME))){if(null!=b&&b<this.components.length){var c=this.components.slice(0,b),d=this.components.slice(b,this.components.length);c.push(a);this.components=c.concat(d)}else this.components.push(a);a.parent=this;this.clearBounds();c=!0}return c},removeComponents:function(a){var b=!1;OpenLayers.Util.isArray(a)||(a=[a]);for(var c=a.length-1;0<=c;--c)b= 208this.removeComponent(a[c])||b;return b},removeComponent:function(a){OpenLayers.Util.removeItem(this.components,a);this.clearBounds();return!0},getLength:function(){for(var a=0,b=0,c=this.components.length;b<c;b++)a+=this.components[b].getLength();return a},getArea:function(){for(var a=0,b=0,c=this.components.length;b<c;b++)a+=this.components[b].getArea();return a},getGeodesicArea:function(a){for(var b=0,c=0,d=this.components.length;c<d;c++)b+=this.components[c].getGeodesicArea(a);return b},getCentroid:function(a){if(!a)return this.components.length&& 209this.components[0].getCentroid();a=this.components.length;if(!a)return!1;for(var b=[],c=[],d=0,e=Number.MAX_VALUE,f,g=0;g<a;++g){f=this.components[g];var h=f.getArea();f=f.getCentroid(!0);!isNaN(h)&&!isNaN(f.x)&&!isNaN(f.y)&&(b.push(h),d+=h,e=h<e&&0<h?h:e,c.push(f))}a=b.length;if(0===d){for(g=0;g<a;++g)b[g]=1;d=b.length}else{for(g=0;g<a;++g)b[g]/=e;d/=e}for(var i=e=0,g=0;g<a;++g)f=c[g],h=b[g],e+=f.x*h,i+=f.y*h;return new OpenLayers.Geometry.Point(e/d,i/d)},getGeodesicLength:function(a){for(var b= 2100,c=0,d=this.components.length;c<d;c++)b+=this.components[c].getGeodesicLength(a);return b},move:function(a,b){for(var c=0,d=this.components.length;c<d;c++)this.components[c].move(a,b)},rotate:function(a,b){for(var c=0,d=this.components.length;c<d;++c)this.components[c].rotate(a,b)},resize:function(a,b,c){for(var d=0;d<this.components.length;++d)this.components[d].resize(a,b,c);return this},distanceTo:function(a,b){for(var c=!(b&&!1===b.edge)&&b&&b.details,d,e,f,g=Number.POSITIVE_INFINITY,h=0,i=this.components.length;h< 211i&&!(d=this.components[h].distanceTo(a,b),f=c?d.distance:d,f<g&&(g=f,e=d,0==g));++h);return e},equals:function(a){var b=!0;if(!a||!a.CLASS_NAME||this.CLASS_NAME!=a.CLASS_NAME)b=!1;else if(!OpenLayers.Util.isArray(a.components)||a.components.length!=this.components.length)b=!1;else for(var c=0,d=this.components.length;c<d;++c)if(!this.components[c].equals(a.components[c])){b=!1;break}return b},transform:function(a,b){if(a&&b){for(var c=0,d=this.components.length;c<d;c++)this.components[c].transform(a, 212b);this.bounds=null}return this},intersects:function(a){for(var b=!1,c=0,d=this.components.length;c<d&&!(b=a.intersects(this.components[c]));++c);return b},getVertices:function(a){for(var b=[],c=0,d=this.components.length;c<d;++c)Array.prototype.push.apply(b,this.components[c].getVertices(a));return b},CLASS_NAME:"OpenLayers.Geometry.Collection"}); 213OpenLayers.Geometry.MultiPoint=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Point"],addPoint:function(a,b){this.addComponent(a,b)},removePoint:function(a){this.removeComponent(a)},CLASS_NAME:"OpenLayers.Geometry.MultiPoint"}); 214OpenLayers.Geometry.Curve=OpenLayers.Class(OpenLayers.Geometry.MultiPoint,{componentTypes:["OpenLayers.Geometry.Point"],getLength:function(){var a=0;if(this.components&&1<this.components.length)for(var b=1,c=this.components.length;b<c;b++)a+=this.components[b-1].distanceTo(this.components[b]);return a},getGeodesicLength:function(a){var b=this;if(a){var c=new OpenLayers.Projection("EPSG:4326");c.equals(a)||(b=this.clone().transform(a,c))}a=0;if(b.components&&1<b.components.length)for(var d,e=1,f=b.components.length;e< 215f;e++)c=b.components[e-1],d=b.components[e],a+=OpenLayers.Util.distVincenty({lon:c.x,lat:c.y},{lon:d.x,lat:d.y});return 1E3*a},CLASS_NAME:"OpenLayers.Geometry.Curve"}); 216OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{removeComponent:function(a){var b=this.components&&2<this.components.length;b&&OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);return b},intersects:function(a){var b=!1,c=a.CLASS_NAME;if("OpenLayers.Geometry.LineString"==c||"OpenLayers.Geometry.LinearRing"==c||"OpenLayers.Geometry.Point"==c){var d=this.getSortedSegments(),a="OpenLayers.Geometry.Point"==c?[{x1:a.x,y1:a.y,x2:a.x,y2:a.y}]:a.getSortedSegments(), 217e,f,g,h,i,j,k,l=0,m=d.length;a:for(;l<m;++l){c=d[l];e=c.x1;f=c.x2;g=c.y1;h=c.y2;var n=0,o=a.length;for(;n<o;++n){i=a[n];if(i.x1>f)break;
217if(!(i.x2<e)&&(j=i.y1,k=i.y2,!(Math.min(j,k)>Math.max(g,h))&&!(Math.max(j,k)<Math.min(g,h))&&OpenLayers.Geometry.segmentsIntersect(c,i))){b=!0;break a}}}}else b=a.intersects(this);return b},getSortedSegments:function(){for(var a=this.components.length-1,b=Array(a),c,d,e=0;e<a;++e)c=this.components[e],d=this.components[e+1],b[e]=c.x<d.x?{x1:c.x,y1:c.y,x2:d.x,y2:d.y}: 218{x1:d.x,y1:d.y,x2:c.x,y2:c.y};return b.sort(function(a,b){return a.x1-b.x1})},splitWithSegment:function(a,b){for(var c=!(b&&!1===b.edge),d=b&&b.tolerance,e=[],f=this.getVertices(),g=[],h=[],i=!1,j,k,l,m={point:!0,tolerance:d},n=null,o=0,q=f.length-2;o<=q;++o)if(d=f[o],g.push(d.clone()),j=f[o+1],k={x1:d.x,y1:d.y,x2:j.x,y2:j.y},k=OpenLayers.Geometry.segmentsIntersect(a,k,m),k instanceof OpenLayers.Geometry.Point&&((l=k.x===a.x1&&k.y===a.y1||k.x===a.x2&&k.y===a.y2||k.equals(d)||k.equals(j)?!0:!1)||c))k.equals(h[h.length- 2191])||h.push(k.clone()),!(0===o&&k.equals(d))&&!k.equals(j)&&(i=!0,k.equals(d)||g.push(k),e.push(new OpenLayers.Geometry.LineString(g)),g=[k.clone()]);i&&(g.push(j.clone()),e.push(new OpenLayers.Geometry.LineString(g)));if(0<h.length)var r=a.x1<a.x2?1:-1,s=a.y1<a.y2?1:-1,n={lines:e,points:h.sort(function(a,b){return r*a.x-r*b.x||s*a.y-s*b.y})};return n},split:function(a,b){var c=null,d=b&&b.mutual,e,f,g,h;if(a instanceof OpenLayers.Geometry.LineString){var i=this.getVertices(),j,k,l,m,n,o=[];g=[]; 220for(var q=0,r=i.length-2;q<=r;++q){j=i[q];k=i[q+1];l={x1:j.x,y1:j.y,x2:k.x,y2:k.y};h=h||[a];d&&o.push(j.clone());for(var s=0;s<h.length;++s)if(m=h[s].splitWithSegment(l,b))if(n=m.lines,0<n.length&&(n.unshift(s,1),Array.prototype.splice.apply(h,n),s+=n.length-2),d)for(var t=0,v=m.points.length;t<v;++t)n=m.points[t],n.equals(j)||(o.push(n),g.push(new OpenLayers.Geometry.LineString(o)),o=n.equals(k)?[]:[n.clone()])}d&&0<g.length&&0<o.length&&(o.push(k.clone()),g.push(new OpenLayers.Geometry.LineString(o)))}else c= 221a.splitWith(this,b);h&&1<h.length?f=!0:h=[];g&&1<g.length?e=!0:g=[];if(f||e)c=d?[g,h]:h;return c},splitWith:function(a,b){return a.split(this,b)},getVertices:function(a){return!0===a?[this.components[0],this.components[this.components.length-1]]:!1===a?this.components.slice(1,this.components.length-1):this.components.slice()},distanceTo:function(a,b){var c=!(b&&!1===b.edge)&&b&&b.details,d,e={},f=Number.POSITIVE_INFINITY;if(a instanceof OpenLayers.Geometry.Point){for(var g=this.getSortedSegments(), 222h=a.x,i=a.y,j,k=0,l=g.length;k<l;++k)if(j=g[k],d=OpenLayers.Geometry.distanceToSegment(a,j),d.distance<f){if(f=d.distance,e=d,0===f)break}else if(j.x2>h&&(i>j.y1&&i<j.y2||i<j.y1&&i>j.y2))break;e=c?{distance:e.distance,x0:e.x,y0:e.y,x1:h,y1:i}:e.distance}else if(a instanceof OpenLayers.Geometry.LineString){var g=this.getSortedSegments(),h=a.getSortedSegments(),m,n,o=h.length,q={point:!0},k=0,l=g.length;a:for(;k<l;++k){i=g[k];j=i.x1;n=i.y1;for(var r=0;r<o;++r)if(d=h[r],m=OpenLayers.Geometry.segmentsIntersect(i, 223d,q)){f=0;e={distance:0,x0:m.x,y0:m.y,x1:m.x,y1:m.y};break a}else if(d=OpenLayers.Geometry.distanceToSegment({x:j,y:n},d),d.distance<f)f=d.distance,e={distance:f,x0:j,y0:n,x1:d.x,y1:d.y}}if(!c)e=e.distance;0!==f&&i&&(d=a.distanceTo(new OpenLayers.Geometry.Point(i.x2,i.y2),b),k=c?d.distance:d,k<f&&(e=c?{distance:f,x0:d.x1,y0:d.y1,x1:d.x0,y1:d.y0}:k))}else e=a.distanceTo(this,b),c&&(e={distance:e.distance,x0:e.x1,y0:e.y1,x1:e.x0,y1:e.y0});return e},simplify:function(a){if(this&&null!==this){var b=this.getVertices(); 224if(3>b.length)return this;var c=function(a,b,d,i){for(var j=0,k=0,l=b,m;l<d;l++){m=a[b];var n=a[d],o=a[l],o=Math.abs(0.5*(m.x*n.y+n.x*o.y+o.x*m.y-n.x*m.y-o.x*n.y-m.x*o.y));m=Math.sqrt(Math.pow(m.x-n.x,2)+Math.pow(m.y-n.y,2));m=2*(o/m);m>j&&(j=m,k=l)}j>i&&k!=b&&(e.push(k),c(a,b,k,i),c(a,k,d,i))},d=b.length-1,e=[];e.push(0);for(e.push(d);b[0].equals(b[d]);)d--,e.push(d);c(b,0,d,a);a=[];e.sort(function(a,b){return a-b});for(d=0;d<e.length;d++)a.push(b[e[d]]);return new OpenLayers.Geometry.LineString(a)}return this}, 225CLASS_NAME:"OpenLayers.Geometry.LineString"}); 226OpenLayers.Geometry.MultiLineString=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LineString"],split:function(a,b){for(var c=null,d=b&&b.mutual,e,f,g,h,i=[],j=[a],k=0,l=this.components.length;k<l;++k){f=this.components[k];g=!1;for(var m=0;m<j.length;
226++m)if(e=f.split(j[m],b)){if(d){g=e[0];for(var n=0,o=g.length;n<o;++n)0===n&&i.length?i[i.length-1].addComponent(g[n]):i.push(new OpenLayers.Geometry.MultiLineString([g[n]]));g=!0;e=e[1]}if(e.length){e.unshift(m, 2271);Array.prototype.splice.apply(j,e);break}}g||(i.length?i[i.length-1].addComponent(f.clone()):i=[new OpenLayers.Geometry.MultiLineString(f.clone())])}i&&1<i.length?g=!0:i=[];j&&1<j.length?h=!0:j=[];if(g||h)c=d?[i,j]:j;return c},splitWith:function(a,b){var c=null,d=b&&b.mutual,e,f,g,h,i,j;if(a instanceof OpenLayers.Geometry.LineString){j=[];i=[a];for(var k=0,l=this.components.length;k<l;++k){g=!1;f=this.components[k];for(var m=0;m<i.length;++m)if(e=i[m].split(f,b)){d&&(g=e[0],g.length&&(g.unshift(m, 2281),Array.prototype.splice.apply(i,g),m+=g.length-2),e=e[1],0===e.length&&(e=[f.clone()]));g=0;for(var n=e.length;g<n;++g)0===g&&j.length?j[j.length-1].addComponent(e[g]):j.push(new OpenLayers.Geometry.MultiLineString([e[g]]));g=!0}g||(j.length?j[j.length-1].addComponent(f.clone()):j=[new OpenLayers.Geometry.MultiLineString([f.clone()])])}}else c=a.split(this);i&&1<i.length?h=!0:i=[];j&&1<j.length?g=!0:j=[];if(h||g)c=d?[i,j]:j;return c},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"}); 229OpenLayers.Geometry.LinearRing=OpenLayers.Class(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],addComponent:function(a,b){var c=!1,d=this.components.pop();if(null!=b||!a.equals(d))c=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments);OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[this.components[0]]);return c},removeComponent:function(a){var b=this.components&&3<this.components.length;b&&(this.components.pop(),OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, 230arguments),OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[this.components[0]]));return b},move:function(a,b){for(var c=0,d=this.components.length;c<d-1;c++)this.components[c].move(a,b)},rotate:function(a,b){for(var c=0,d=this.components.length;c<d-1;++c)this.components[c].rotate(a,b)},resize:function(a,b,c){for(var d=0,e=this.components.length;d<e-1;++d)this.components[d].resize(a,b,c);return this},transform:function(a,b){if(a&&b){for(var c=0,d=this.components.length;c<d-1;c++)this.components[c].transform(a, 231b);this.bounds=null}return this},getCentroid:function(){if(this.components){var a=this.components.length;if(0<a&&2>=a)return this.components[0].clone();if(2<a){var b=0,c=0,d=this.components[0].x,e=this.components[0].y,f=-1*this.getArea();if(0!=f){for(var g=0;g<a-1;g++)var h=this.components[g],i=this.components[g+1],b=b+(h.x+i.x-2*d)*((h.x-d)*(i.y-e)-(i.x-d)*(h.y-e)),c=c+(h.y+i.y-2*e)*((h.x-d)*(i.y-e)-(i.x-d)*(h.y-e));b=d+b/(6*f);a=e+c/(6*f)}else{for(g=0;g<a-1;g++)b+=this.components[g].x,c+=this.components[g].y; 232b/=a-1;a=c/(a-1)}return new OpenLayers.Geometry.Point(b,a)}return null}},getArea:function(){var a=0;if(this.components&&2<this.components.length){for(var b=a=0,c=this.components.length;b<c-1;b++)var d=this.components[b],e=this.components[b+1],a=a+(d.x+e.x)*(e.y-d.y);a=-a/2}return a},getGeodesicArea:function(a){var b=this;if(a){var c=new OpenLayers.Projection("EPSG:4326");c.equals(a)||(b=this.clone().transform(a,c))}a=0;c=b.components&&b.components.length;if(2<c){for(var d,e,f=0;f<c-1;f++)d=b.components[f], 233e=b.components[f+1],a+=OpenLayers.Util.rad(e.x-d.x)*(2+Math.sin(OpenLayers.Util.rad(d.y))+Math.sin(OpenLayers.Util.rad(e.y)));a=40680631590769*a/2}return a},containsPoint:function(a){for(var b=OpenLayers.Number.limitSigDigs,c=b(a.x,14),a=b(a.y,14),d=this.components.length-1,e,f,g,h,i,j=0,k=0;k<d;++k)if(e=this.components[k],g=b(e.x,14),e=b(e.y,14),f=this.components[k+1],h=b(f.x,14),f=b(f.y,14),e==f){if(a==e&&(g<=h&&c>=g&&c<=h||g>=h&&c<=g&&c>=h)){j=-1;break}}else{i=b((a-f)*((h-g)/(f-e))+h,14);if(i== 234c&&(e<f&&a>=e&&a<=f||e>f&&a<=e&&a>=f)){j=-1;break}i<=c||g!=h&&(i<Math.min(g,h)||i>Math.max(g,h))||(e<f&&a>=e&&a<f||e>f&&a<e&&a>=f)&&++j}return-1==j?1:!!(j&1)},intersects:function(a){var b=!1;if("OpenLayers.Geometry.Point"==a.CLASS_NAME)b=this.containsPoint(a);else if("OpenLayers.Geometry.LineString"==a.CLASS_NAME)b=a.intersects(this);else if("OpenLayers.Geometry.LinearRing"==a.CLASS_NAME)b=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[a]);else for(var c=0,d=a.components.length;c< 235d&&!(b=a.components[c].intersects(this));++c);return b},getVertices:function(a){return!0===a?[]:this.components.slice(0,this.components.length-1)},CLASS_NAME:"OpenLayers.Geometry.LinearRing"}); 236OpenLayers.Geometry.Polygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LinearRing"],getArea:function(){var a=0;if(this.components&&0<this.components.length)for(var a=a+Math.abs(this.components[0].getArea()),b=1,c=this.components.length;b<c;b++)a-=Math.abs(this.components[b].getArea());return a},getGeodesicArea:function(a){var b=0;if(this.components&&0<this.components.length)for(var b=b+Math.abs(this.components[0].getGeodesicArea(a)),c=1,d=this.components.length;c< 237d;c++)b-=Math.abs(this.components[c].getGeodesicArea(a));return b},containsPoint:function(a){var b=this.components.length,c=!1;if(0<b&&(c=this.components[0].containsPoint(a),1!==c&&c&&1<b))for(var d,e=1;e<b;++e)if(d=this.components[e].containsPoint(a)){c=1===d?1:!1;break}return c},intersects:function(a){var b=!1,c,d;if("OpenLayers.Geometry.Point"==a.CLASS_NAME)b=this.containsPoint(a);else if("OpenLayers.Geometry.LineString"==a.CLASS_NAME||"OpenLayers.Geometry.LinearRing"==a.CLASS_NAME){for(c=0,d= 238this.components.length;c<d&&!(b=a.intersects(this.components[c]));++c);if(!b)for(c=0,d=a.components.length;c<d&&!(b=this.containsPoint(a.components[c]));++c);}else for(c=0,d=a.components.length;c<d&&!(b=this.intersects(a.components[c]));++c);if(!b&&"OpenLayers.Geometry.Polygon"==a.CLASS_NAME){var e=this.components[0];for(c=0,d=e.components.length;c<d&&!(b=a.containsPoint(e.components[c]));++c);}return b},distanceTo:function(a,b){return b&&!1===b.edge&&this.intersects(a)?0:OpenLayers.Geometry.Collection.prototype.distanceTo.apply(this, 239[a,b])},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Geometry.Polygon.createRegularPolygon=function(a,b,c,d){var e=Math.PI*(1/c-0.5);d&&(e+=d/180*Math.PI);for(var f,g=[],h=0;h<c;++h)f=e+2*h*Math.PI/c,d=a.x+b*Math.cos(f),f=a.y+b*Math.sin(f),g.push(new OpenLayers.Geometry.Point(d,f));a=new OpenLayers.Geometry.LinearRing(g);return new OpenLayers.Geometry.Polygon([a])}; 240OpenLayers.Geometry.MultiPolygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Polygon"],CLASS_NAME:"OpenLayers.Geometry.MultiPolygon"}); 241OpenLayers.Format.GML=OpenLayers.Class(OpenLayers.Format.XML,{featureNS:"http://mapserver.gis.umn.edu/mapserver",featurePrefix:"feature",featureName:"featureMember",layerName:"features",geometryName:"geometry",collectionName:"FeatureCollection",gmlns:"http://www.opengis.net/gml",extractAttributes:!0,xy:!0,initialize:function(a){this.regExes={trimSpace
241:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g};OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){"string"== 242typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));for(var a=this.getElementsByTagNameNS(a.documentElement,this.gmlns,this.featureName),b=[],c=0;c<a.length;c++){var d=this.parseFeature(a[c]);d&&b.push(d)}return b},parseFeature:function(a){for(var b="MultiPolygon,Polygon,MultiLineString,LineString,MultiPoint,Point,Envelope".split(","),c,d,e,f=0;f<b.length;++f)if(c=b[f],d=this.getElementsByTagNameNS(a,this.gmlns,c),0<d.length){if(e=this.parseGeometry[c.toLowerCase()])e=e.apply(this, 243[d[0]]),this.internalProjection&&this.externalProjection&&e.transform(this.externalProjection,this.internalProjection);else throw new TypeError("Unsupported geometry type: "+c);break}var g;c=this.getElementsByTagNameNS(a,this.gmlns,"Box");for(f=0;f<c.length;++f)b=c[f],d=this.parseGeometry.box.apply(this,[b]),b=b.parentNode,"boundedBy"===(b.localName||b.nodeName.split(":").pop())?g=d:e=d.toGeometry();var h;this.extractAttributes&&(h=this.parseAttributes(a));h=new OpenLayers.Feature.Vector(e,h);h.bounds= 244g;h.gml={featureType:a.firstChild.nodeName.split(":")[1],featureNS:a.firstChild.namespaceURI,featureNSPrefix:a.firstChild.prefix};for(var a=a.firstChild,i;a&&!(1==a.nodeType&&(i=a.getAttribute("fid")||a.getAttribute("id")));)a=a.nextSibling;h.fid=i;return h},parseGeometry:{point:function(a){var b,c;c=[];b=this.getElementsByTagNameNS(a,this.gmlns,"pos");if(0<b.length)c=b[0].firstChild.nodeValue,c=c.replace(this.regExes.trimSpace,""),c=c.split(this.regExes.splitSpace);if(0==c.length&&(b=this.getElementsByTagNameNS(a, 245this.gmlns,"coordinates"),0<b.length))c=b[0].firstChild.nodeValue,c=c.replace(this.regExes.removeSpace,""),c=c.split(",");0==c.length&&(b=this.getElementsByTagNameNS(a,this.gmlns,"coord"),0<b.length&&(a=this.getElementsByTagNameNS(b[0],this.gmlns,"X"),b=this.getElementsByTagNameNS(b[0],this.gmlns,"Y"),0<a.length&&0<b.length&&(c=[a[0].firstChild.nodeValue,b[0].firstChild.nodeValue])));2==c.length&&(c[2]=null);return this.xy?new OpenLayers.Geometry.Point(c[0],c[1],c[2]):new OpenLayers.Geometry.Point(c[1], 246c[0],c[2])},multipoint:function(a){var a=this.getElementsByTagNameNS(a,this.gmlns,"Point"),b=[];if(0<a.length)for(var c,d=0;d<a.length;++d)(c=this.parseGeometry.point.apply(this,[a[d]]))&&b.push(c);return new OpenLayers.Geometry.MultiPoint(b)},linestring:function(a,b){var c,d;d=[];var e=[];c=this.getElementsByTagNameNS(a,this.gmlns,"posList");if(0<c.length){d=this.getChildValue(c[0]);d=d.replace(this.regExes.trimSpace,"");d=d.split(this.regExes.splitSpace);var f=parseInt(c[0].getAttribute("dimension")), 247g,h,i;for(c=0;c<d.length/f;++c)g=c*f,h=d[g],i=d[g+1],g=2==f?null:d[g+2],this.xy?e.push(new OpenLayers.Geometry.Point(h,i,g)):e.push(new OpenLayers.Geometry.Point(i,h,g))}if(0==d.length&&(c=this.getElementsByTagNameNS(a,this.gmlns,"coordinates"),0<c.length)){d=this.getChildValue(c[0]);d=d.replace(this.regExes.trimSpace,"");d=d.replace(this.regExes.trimComma,",");f=d.split(this.regExes.splitSpace);for(c=0;c<f.length;++c)d=f[c].split(","),2==d.length&&(d[2]=null),this.xy?e.push(new OpenLayers.Geometry.Point(d[0], 248d[1],d[2])):e.push(new OpenLayers.Geometry.Point(d[1],d[0],d[2]))}d=null;0!=e.length&&(d=b?new OpenLayers.Geometry.LinearRing(e):new OpenLayers.Geometry.LineString(e));return d},multilinestring:function(a){var a=this.getElementsByTagNameNS(a,this.gmlns,"LineString"),b=[];if(0<a.length)for(var c,d=0;d<a.length;++d)(c=this.parseGeometry.linestring.apply(this,[a[d]]))&&b.push(c);return new OpenLayers.Geometry.MultiLineString(b)},polygon:function(a){var a=this.getElementsByTagNameNS(a,this.gmlns,"LinearRing"), 249b=[];if(0<a.length)for(var c,d=0;d<a.length;++d)(c=this.parseGeometry.linestring.apply(this,[a[d],!0]))&&b.push(c);return new OpenLayers.Geometry.Polygon(b)},multipolygon:function(a){var a=this.getElementsByTagNameNS(a,this.gmlns,"Polygon"),b=[];if(0<a.length)for(var c,d=0;d<a.length;++d)(c=this.parseGeometry.polygon.apply(this,[a[d]]))&&b.push(c);return new OpenLayers.Geometry.MultiPolygon(b)},envelope:function(a){var b=[],c,d,e=this.getElementsByTagNameNS(a,this.gmlns,"lowerCorner");if(0<e.length){c= 250[];if(0<e.length)c=e[0].firstChild.nodeValue,c=c.replace(this.regExes.trimSpace,""),c=c.split(this.regExes.splitSpace);2==c.length&&(c[2]=null);var f=this.xy?new OpenLayers.Geometry.Point(c[0],c[1],c[2]):new OpenLayers.Geometry.Point(c[1],c[0],c[2])}a=this.getElementsByTagNameNS(a,this.gmlns,"upperCorner");if(0<a.length){c=[];if(0<a.length)c=a[0].firstChild.nodeValue,c=c.replace(this.regExes.trimSpace,""),c=c.split(this.regExes.splitSpace);2==c.length&&(c[2]=null);var g=this.xy?new OpenLayers.Geometry.Point(c[0], 251c[1],c[2]):new OpenLayers.Geometry.Point(c[1],c[0],c[2])}
251f&&g&&(b.push(new OpenLayers.Geometry.Point(f.x,f.y)),b.push(new OpenLayers.Geometry.Point(g.x,f.y)),b.push(new OpenLayers.Geometry.Point(g.x,g.y)),b.push(new OpenLayers.Geometry.Point(f.x,g.y)),b.push(new OpenLayers.Geometry.Point(f.x,f.y)),b=new OpenLayers.Geometry.LinearRing(b),d=new OpenLayers.Geometry.Polygon([b]));return d},box:function(a){var b=this.getElementsByTagNameNS(a,this.gmlns,"coordinates"),c=a=null;if(0<b.length)b=b[0].firstChild.nodeValue, 252b=b.split(" "),2==b.length&&(a=b[0].split(","),c=b[1].split(","));if(null!==a&&null!==c)return new OpenLayers.Bounds(parseFloat(a[0]),parseFloat(a[1]),parseFloat(c[0]),parseFloat(c[1]))}},parseAttributes:function(a){for(var b={},a=a.firstChild,c,d,e;a;){if(1==a.nodeType){a=a.childNodes;for(c=0;c<a.length;++c)if(d=a[c],1==d.nodeType)if(e=d.childNodes,1==e.length){if(e=e[0],3==e.nodeType||4==e.nodeType)d=d.prefix?d.nodeName.split(":")[1]:d.nodeName,e=e.nodeValue.replace(this.regExes.trimSpace,""),b[d]= 253e}else b[d.nodeName.split(":").pop()]=null;break}a=a.nextSibling}return b},write:function(a){OpenLayers.Util.isArray(a)||(a=[a]);for(var b=this.createElementNS("http://www.opengis.net/wfs","wfs:"+this.collectionName),c=0;c<a.length;c++)b.appendChild(this.createFeatureXML(a[c]));return OpenLayers.Format.XML.prototype.write.apply(this,[b])},createFeatureXML:function(a){var b=this.buildGeometryNode(a.geometry),c=this.createElementNS(this.featureNS,this.featurePrefix+":"+this.geometryName);c.appendChild(b); 254var b=this.createElementNS(this.gmlns,"gml:"+this.featureName),d=this.createElementNS(this.featureNS,this.featurePrefix+":"+this.layerName);d.setAttribute("fid",a.fid||a.id);d.appendChild(c);for(var e in a.attributes){var c=this.createTextNode(a.attributes[e]),f=this.createElementNS(this.featureNS,this.featurePrefix+":"+e.substring(e.lastIndexOf(":")+1));f.appendChild(c);d.appendChild(f)}b.appendChild(d);return b},buildGeometryNode:function(a){this.externalProjection&&this.internalProjection&&(a= 255a.clone(),a.transform(this.internalProjection,this.externalProjection));var b=a.CLASS_NAME;return this.buildGeometry[b.substring(b.lastIndexOf(".")+1).toLowerCase()].apply(this,[a])},buildGeometry:{point:function(a){var b=this.createElementNS(this.gmlns,"gml:Point");b.appendChild(this.buildCoordinatesNode(a));return b},multipoint:function(a){for(var b=this.createElementNS(this.gmlns,"gml:MultiPoint"),a=a.components,c,d,e=0;e<a.length;e++)c=this.createElementNS(this.gmlns,"gml:pointMember"),d=this.buildGeometry.point.apply(this, 256[a[e]]),c.appendChild(d),b.appendChild(c);return b},linestring:function(a){var b=this.createElementNS(this.gmlns,"gml:LineString");b.appendChild(this.buildCoordinatesNode(a));return b},multilinestring:function(a){for(var b=this.createElementNS(this.gmlns,"gml:MultiLineString"),a=a.components,c,d,e=0;e<a.length;++e)c=this.createElementNS(this.gmlns,"gml:lineStringMember"),d=this.buildGeometry.linestring.apply(this,[a[e]]),c.appendChild(d),b.appendChild(c);return b},linearring:function(a){var b=this.createElementNS(this.gmlns, 257"gml:LinearRing");b.appendChild(this.buildCoordinatesNode(a));return b},polygon:function(a){for(var b=this.createElementNS(this.gmlns,"gml:Polygon"),a=a.components,c,d,e=0;e<a.length;++e)c=0==e?"outerBoundaryIs":"innerBoundaryIs",c=this.createElementNS(this.gmlns,"gml:"+c),d=this.buildGeometry.linearring.apply(this,[a[e]]),c.appendChild(d),b.appendChild(c);return b},multipolygon:function(a){for(var b=this.createElementNS(this.gmlns,"gml:MultiPolygon"),a=a.components,c,d,e=0;e<a.length;++e)c=this.createElementNS(this.gmlns, 258"gml:polygonMember"),d=this.buildGeometry.polygon.apply(this,[a[e]]),c.appendChild(d),b.appendChild(c);return b},bounds:function(a){var b=this.createElementNS(this.gmlns,"gml:Box");b.appendChild(this.buildCoordinatesNode(a));return b}},buildCoordinatesNode:function(a){var b=this.createElementNS(this.gmlns,"gml:coordinates");b.setAttribute("decimal",".");b.setAttribute("cs",",");b.setAttribute("ts"," ");var c=[];if(a instanceof OpenLayers.Bounds)c.push(a.left+","+a.bottom),c.push(a.right+","+a.top); 259else for(var a=a.components?a.components:[a],d=0;d<a.length;d++)c.push(a[d].x+","+a[d].y);c=this.createTextNode(c.join(" "));b.appendChild(c);return b},CLASS_NAME:"OpenLayers.Format.GML"});if(!OpenLayers.Format.GML)OpenLayers.Format.GML={}; 260OpenLayers.Format.GML.Base=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",wfs:"http://www.opengis.net/wfs"},defaultPrefix:"gml",schemaLocation:null,featureType:null,featureNS:null,geometryName:"geometry",extractAttributes:!0,srsName:null,xy:!0,geometryTypes:null,
260singleFeatureType:null,regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g,featureMember:/^(.*:)?featureMembers?$/}, 261initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);this.setGeometryTypes();a&&a.featureNS&&this.setNamespace("feature",a.featureNS);this.singleFeatureType=!a||"string"===typeof a.featureType},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b=[];this.readNode(a,{features:b},!0);if(0==b.length){var c=this.getElementsByTagNameNS(a,this.namespaces.gml,"featureMember");if(c.length)for(var a= 2620,d=c.length;a<d;++a)this.readNode(c[a],{features:b},!0);else c=this.getElementsByTagNameNS(a,this.namespaces.gml,"featureMembers"),c.length&&this.readNode(c[0],{features:b},!0)}return b},readNode:function(a,b,c){if(!0===c&&!0===this.autoConfig)this.featureType=null,delete this.namespaceAlias[this.featureNS],delete this.namespaces.feature,this.featureNS=null;if(!this.featureNS&&!(a.prefix in this.namespaces)&&a.parentNode.namespaceURI==this.namespaces.gml&&this.regExes.featureMember.test(a.parentNode.nodeName))this.featureType= 263a.nodeName.split(":").pop(),this.setNamespace("feature",a.namespaceURI),this.featureNS=a.namespaceURI,this.autoConfig=!0;return OpenLayers.Format.XML.prototype.readNode.apply(this,[a,b])},readers:{gml:{_inherit:function(){},featureMember:function(a,b){this.readChildNodes(a,b)},featureMembers:function(a,b){this.readChildNodes(a,b)},name:function(a,b){b.name=this.getChildValue(a)},boundedBy:function(a,b){var c={};this.readChildNodes(a,c);if(c.components&&0<c.components.length)b.bounds=c.components[0]}, 264Point:function(a,b){var c={points:[]};this.readChildNodes(a,c);if(!b.components)b.components=[];b.components.push(c.points[0])},coordinates:function(a,b){for(var c=this.getChildValue(a).replace(this.regExes.trimSpace,""),c=c.replace(this.regExes.trimComma,","),c=c.split(this.regExes.splitSpace),d,e=c.length,f=Array(e),g=0;g<e;++g)d=c[g].split(","),f[g]=this.xy?new OpenLayers.Geometry.Point(d[0],d[1],d[2]):new OpenLayers.Geometry.Point(d[1],d[0],d[2]);b.points=f},coord:function(a,b){var c={};this.readChildNodes(a, 265c);if(!b.points)b.points=[];b.points.push(new OpenLayers.Geometry.Point(c.x,c.y,c.z))},X:function(a,b){b.x=this.getChildValue(a)},Y:function(a,b){b.y=this.getChildValue(a)},Z:function(a,b){b.z=this.getChildValue(a)},MultiPoint:function(a,b){var c={components:[]};this.readers.gml._inherit.apply(this,[a,c,b]);this.readChildNodes(a,c);b.components=[new OpenLayers.Geometry.MultiPoint(c.components)]},pointMember:function(a,b){this.readChildNodes(a,b)},LineString:function(a,b){var c={};this.readers.gml._inherit.apply(this, 266[a,c,b]);this.readChildNodes(a,c);if(!b.components)b.components=[];b.components.push(new OpenLayers.Geometry.LineString(c.points))},MultiLineString:function(a,b){var c={components:[]};this.readers.gml._inherit.apply(this,[a,c,b]);this.readChildNodes(a,c);b.components=[new OpenLayers.Geometry.MultiLineString(c.components)]},lineStringMember:function(a,b){this.readChildNodes(a,b)},Polygon:function(a,b){var c={outer:null,inner:[]};this.readers.gml._inherit.apply(this,[a,c,b]);this.readChildNodes(a,c); 267c.inner.unshift(c.outer);if(!b.components)b.components=[];b.components.push(new OpenLayers.Geometry.Polygon(c.inner))},LinearRing:function(a,b){var c={};this.readers.gml._inherit.apply(this,[a,c]);this.readChildNodes(a,c);b.components=[new OpenLayers.Geometry.LinearRing(c.points)]},MultiPolygon:function(a,b){var c={components:[]};this.readers.gml._inherit.apply(this,[a,c,b]);this.readChildNodes(a,c);b.components=[new OpenLayers.Geometry.MultiPolygon(c.components)]},polygonMember:function(a,b){this.readChildNodes(a, 268b)},GeometryCollection:function(a,b){var c={components:[]};this.readers.gml._inherit.apply(this,[a,c,b]);this.readChildNodes(a,c);b.components=[new OpenLayers.Geometry.Collection(c.components)]},geometryMember:function(a,b){this.readChildNodes(a,b)}},feature:{"*":function(a,b){var c,d=a.localName||a.nodeName.split(":").pop();b.features?!this.singleFeatureType&&-1!==OpenLayers.Util.indexOf(this.featureType,d)?c="_typeName":d===this.featureType&&(c="_typeName"):0==a.childNodes.length||1==a.childNodes.length&& 2693==a.firstChild.nodeType?this.extractAttributes&&(c="_attribute"):c="_geometry";c&&this.readers.feature[c].apply(this,[a,b])},_typeName:function(a,b){var c={components:[],attributes:{}};this.readChildNodes(a,c);if(c.name)c.attributes.name=c.name;var d=new OpenLayers.Feature.Vector(c.components[0],c.attributes);if(!this.singleFeatureType)d.type=a.nodeName.split(":").pop(),d.namespace=a.namespaceURI;var e=a.getAttribute("fid")||this.getAttributeNS(a,this.namespaces.gml,"id");if(e)d.fid=e;this.internalProjection&& 270this.externalProjection&&d.geometry&&d.geometry.transform(this.externalProjection,this.internalProjection);if(c.bounds)d.bounds=c.bounds;b.features.push(d)},_geometry:function(a,b){if(!this.geometryName)this.geometryName=a.nodeName.split(":").pop();this.readChildNodes(a,b)},_attribute:function(a,b){var c=a.localName||a.nodeName.split(":").pop(),d=this.getChildValue(a);b.attributes[c]=d}},wfs:{FeatureCollection:function(a,b){this.readChildNodes(a,b)}}},write:function(a){a=this.writeNode("gml:"+(OpenLayers.Util.isArray(a)? 271"featureMembers":"featureMember"),a);this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[a])},writers:{gml:{featureMember:function(a){var b=this.createElementNSPlus("gml:featureMember");this.writeNode("feature:_typeName",a,b);return b},MultiPoint:function(a){for(var b=this.createElementNSPlus("gml:MultiPoint"),a=a.components||[a],c=0,d=a.length;c<d;++c)this.writeNode("pointMember",a[c],b);return b},pointMember:function(a){var b= 272this.createElementNSPlus("gml:pointMember");this.writeNode("Point",a,b);return b},MultiLineString:function(a){for(var b=this.createElementNSPlus("gml:MultiLineString"),a=a.components||[a],c=0,d=a.length;c<d;++c)this.writeNode("lineStringMember",a[c],b);return b},lineStringMember:function(a){var b=this.createElementNSPlus("gml:lineStringMember");this.writeNode("LineString",a,b);return b},MultiPolygon:function(a){for(var b=this.createElementNSPlus("gml:MultiPolygon"),a=a.components||[a],c=0,d=a.length;c< 273d;++c)this.writeNode("polygonMember",a[c],b);return b},polygonMember:function(a){var b=this.createElementNSPlus("gml:polygonMember");this.writeNode("Polygon",a,b);return b},GeometryCollection:function(a){for(var b=this.createElementNSPlus("gml:GeometryCollection"),c=0,d=a.components.length;c<d;++c)this.writeNode("geometryMember",a.components[c],b);return b},geometryMember:function(a){var b=this.createElementNSPlus("gml:geometryMember"),a=this.writeNode("feature:_geometry",a);b.appendChild(a.firstChild); 274return b}},feature:{_typeName:function(a){var b=this.createElementNSPlus("feature:"+this.featureType,{attributes:{fid:a.fid}});a.geometry&&this.writeNode("feature:_geometry",a.geometry,b);for(var c in a.attributes){var d=a.attributes[c];null!=d&&this.writeNode("feature:_attribute",{name:c,value:d},b)}return b},_geometry:function(a){this.externalProjection&&this.internalProjection&&(a=a.clone().transform(this.internalProjection,this.externalProjection));var b=this.createElementNSPlus("feature:"+this.geometryName), 275a=this.writeNode("gml:"+this.geometryTypes[a.CLASS_NAME],a,b);this.srsName&&a.setAttribute("srsName",this.srsName);return b},_attribute:function(a){return this.createElementNSPlus("feature:"+a.name,{value:a.value})}},wfs:{FeatureCollection:function(a){for(var b=this.createElementNSPlus("wfs:FeatureCollection"),c=0,d=a.length;c<d;++c)this.writeNode("gml:featureMember",a[c],b);return b}}},setGeometryTypes:function(){this.geometryTypes={"OpenLayers.Geometry.Point":"Point","OpenLayers.Geometry.MultiPoint":"MultiPoint", 276"OpenLayers.Geometry.LineString":"LineString","OpenLayers.Geometry.MultiLineString":"MultiLineString","OpenLayers.Geometry.Polygon":"Polygon","OpenLayers.Geometry.MultiPolygon":"MultiPolygon","OpenLayers.Geometry.Collection":"GeometryCollection"}},CLASS_NAME:"OpenLayers.Format.GML.Base"}); 277OpenLayers.Format.GML.v2=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",initialize:function(a){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[a])},readers:{gml:OpenLayers.Util.applyDefaults({outerBoundaryIs:function(a,b){var c={};this.readChildNodes(a,c);b.outer=c.components[0]},innerBoundaryIs:function(a,b){var c={};this.readChildNodes(a,c);b.inner.push(c.components[0])},Box:function(a,b){var c= 278{};this.readChildNodes(a,c);if(!b.components)b.components=[];var d=c.points[0],c=c.points[1];b.components.push(new OpenLayers.Bounds(d.x,d.y,c.x,c.y))}},OpenLayers.Format.GML.Base.prototype.readers.gml),feature:OpenLayers.Format.GML.Base.prototype.readers.feature,wfs:OpenLayers.Format.GML.Base.prototype.readers.wfs},write:function(a){a=this.writeNode(OpenLayers.Util.isArray(a)?"wfs:FeatureCollection":"gml:featureMember",a);this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation); 279return OpenLayers.Format.XML.prototype.write.apply(this,[a])},writers:{gml:OpenLayers.Util.applyDefaults({Point:function(a){var b=this.createElementNSPlus("gml:Point");this.writeNode("coordinates",[a],b);return b},coordinates:function(a){for(var b=a.length,c=Array(b),d,e=0;e<b;++e)d=a[e],c[e]=this.xy?d.x+","+d.y:d.y+","+d.x,void 0!=d.z&&(c[e]+=","+d.z);return this.createElementNSPlus("gml:coordinates",{attributes:{decimal:".",cs:",",ts:" "},value:1==b?c[0]:c.join(" ")})},LineString:function(a){var b= 280this.createElementNSPlus("gml:LineString");this.writeNode("coordinates",a.components,b);return b},Polygon:function(a){var b=this.createElementNSPlus("gml:Polygon");this.writeNode("outerBoundaryIs",a.components[0],b);for(var c=1;c<a.components.length;++c)this.writeNode("innerBoundaryIs",a.components[c],b);return b},outerBoundaryIs:function(a){var b=this.createElementNSPlus("gml:outerBoundaryIs");this.writeNode("LinearRing",a,b);return b},innerBoundaryIs:function(a){var b=this.createElementNSPlus("gml:innerBoundaryIs"); 281this.writeNode("LinearRing",a,b);return b},LinearRing:function(a){var b=this.createElementNSPlus("gml:LinearRing");this.writeNode("coordinates",a.components,b);return b},Box:function(a){var b=this.createElementNSPlus("gml:Box");this.writeNode("coordinates",[{x:a.left,y:a.bottom},{x:a.right,y:a.top}],b);this.srsName&&b.setAttribute("srsName",this.srsName);return b}},OpenLayers.Format.GML.Base.prototype.writers.gml),feature:OpenLayers.Format.GML.Base.prototype.writers.feature,wfs:OpenLayers.Format.GML.Base.prototype.writers.wfs}, 282CLASS_NAME:"OpenLayers.Format.GML.v2"}); 283OpenLayers.Format.GML.v3=OpenLayers.Class(OpenLayers.Format.GML.Base,{schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",curve:!1,multiCurve:!0,surface:!1,multiSurface:!0,initialize:function(a){OpenLayers.Format.GML.Base.prototype.initialize.apply(this,[a])},readers:{gml:OpenLayers.Util.applyDefaults({_inherit:function(a,b,c){if(a=parseInt(a.getAttribute("srsDimension"),10)||c&&c.srsDimension)b.srsDimension=a},featureMembers:function(a, 284b){this.readChildNodes(a,b)},Curve:function(a,b){var c={points:[]};this.readers.gml._inherit.apply(this,[a,c,b]);this.readChildNodes(a,c);if(!b.components)b.components=[];b.components.push(new OpenLayers.Geometry.LineString(c.points))},segments:function(a,b){this.readChildNodes(a,b)},LineStringSegment:function(a,b){var c={};this.readChildNodes(a,c);c.points&&Array.prototype.push.apply(b.points,c.points)},pos:function(a,b){var c=this.getChildValue(a).replace(this.regExes.trimSpace,"").split(this.regExes.splitSpace), 285c=this.xy?new OpenLayers.Geometry.Point(c[0],c[1],c[2]):new OpenLayers.Geometry.Point(c[1],c[0],c[2]);b.points=[c]},posList:function(a,b){for(var c=this.getChildValue(a).replace(this.regExes.trimSpace,"").split(this.regExes.splitSpace),d=b.srsDimension||parseInt(a.getAttribute("srsDimension")||a.getAttribute("dimension"),10)||2,e,f,g,h=Array(c.length/d),i=0,j=c.length;i<j;i+=d)e=c[i],f=c[i+1],g=2==d?void 0:c[i+2],h[i/d]=this.xy?new OpenLayers.Geometry.Point(e,f,g):new OpenLayers.Geometry.Point(f, 286e,g);b.points=h},Surface:function(a,b){this.readChildNodes(a,b)},patches:function(a,b){this.readChildNodes(a,b)},PolygonPatch:function(a,b){this.readers.gml.Polygon.apply(this,[a,b])},exterior:function(a,b){var c={};this.readChildNodes(a,c);b.outer=c.components[0]},interior:function(a,b){var c={};this.readChildNodes(a,c);b.inner.push(c.components[0])},MultiCurve:function(a,b){var c={components:[]};this.readers.gml._inherit.apply(this,[a,c,b]);this.readChildNodes(a,c);if(0<c.components.length)b.components= 287[new OpenLayers.Geometry.MultiLineString(c.components)]},curveMember:function(a,b){this.readChildNodes(a,b)},MultiSurface:function(a,b){var c={components:[]};this.readers.gml._inherit.apply(this,[a,c,b]);this.readChildNodes(a,c);if(0<c.components.length)b.components=[new OpenLayers.Geometry.MultiPolygon(c.components)]},surfaceMember:function(a,b){this.readChildNodes(a,b)},surfaceMembers:function(a,b){this.readChildNodes(a,b)},pointMembers:function(a,b){this.readChildNodes(a,b)},lineStringMembers:function(a, 288b){this.readChildNodes(a,b)},polygonMembers:function(a,b){this.readChildNodes(a,b)},geometryMembers:function(a,b){this.readChildNodes(a,b)},Envelope:function(a,b){var c={points:Array(2)};this.readChildNodes(a,c);if(!b.components)b.components=[];var d=c.points[0],c=c.points[1];b.components.push(new OpenLayers.Bounds(d.x,d.y,c.x,c.y))},lowerCorner:function(a,b){var c={};this.readers.gml.pos.apply(this,[a,c]);b.points[0]=c.points[0]},upperCorner:function(a,b){var c={};this.readers.gml.pos.apply(this, 289[a,c]);b.points[1]=c.points[0]}},OpenLayers.Format.GML.Base.prototype.readers.gml),feature:OpenLayers.Format.GML.Base.prototype.readers.feature,wfs:OpenLayers.Format.GML.Base.prototype.readers.wfs},write:function(a){a=this.writeNode("gml:"+(OpenLayers.Util.isArray(a)?"featureMembers":"featureMember"),a);this.setAttributeNS(a,this.namespaces.xsi,"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[a])},writers:{gml:OpenLayers.Util.applyDefaults({featureMembers:function(a){for(var b= 290this.createElementNSPlus("gml:featureMembers"),c=0,d=a.length;c<d;++c)this.writeNode("feature:_typeName",a[c],b);return b},Point:function(a){var b=this.createElementNSPlus("gml:Point");this.writeNode("pos",a,b);return b},pos:function(a){return this.createElementNSPlus("gml:pos",{value:this.xy?a.x+" "+a.y:a.y+" "+a.x})},LineString:function(a){var b=this.createElementNSPlus("gml:LineString");this.writeNode("posList",a.components,b);return b},Curve:function(a){var b=this.createElementNSPlus("gml:Curve"); 291this.writeNode("segments",a,b);return b},segments:function(a){var b=this.createElementNSPlus("gml:segments");this.writeNode("LineStringSegment",a,b);return b},LineStringSegment:function(a){var b=this.createElementNSPlus("gml:LineStringSegment");this.writeNode("posList",a.components,b);return b},posList:function(a){for(var b=a.length,c=Array(b),d,e=0;e<b;++e)d=a[e],c[e]=this.xy?d.x+" "+d.y:d.y+" "+d.x;return this.createElementNSPlus("gml:posList",{value:c.join(" ")})},Surface:function(a){var b=this.createElementNSPlus("gml:Surface"); 292this.writeNode("patches",a,b);return b},patches:function(a){var b=this.createElementNSPlus("gml:patches");this.writeNode("PolygonPatch",a,b);return b},PolygonPatch:function(a){var b=this.createElementNSPlus("gml:PolygonPatch",{attributes:{interpolation:"planar"}});this.writeNode("exterior",a.components[0],b);for(var c=1,d=a.components.length;c<d;++c)this.writeNode("interior",a.components[c],b);return b},Polygon:function(a){var b=this.createElementNSPlus("gml:Polygon");this.writeNode("exterior",a.components[0], 293b);for(var c=1,d=a.components.length;c<d;++c)this.writeNode("interior",a.components[c],b);return b},exterior:function(a){var b=this.createElementNSPlus("gml:exterior");this.writeNode("LinearRing",a,b);return b},interior:function(a){var b=this.createElementNSPlus("gml:interior");this.writeNode("LinearRing",a,b);return b},LinearRing:function(a){var b=this.createElementNSPlus("gml:LinearRing");this.writeNode("
293posList",a.components,b);return b},MultiCurve:function(a){for(var b=this.createElementNSPlus("gml:MultiCurve"), 294a=a.components||[a],c=0,d=a.length;c<d;++c)this.writeNode("curveMember",a[c],b);return b},curveMember:function(a){var b=this.createElementNSPlus("gml:curveMember");this.curve?this.writeNode("Curve",a,b):this.writeNode("LineString",a,b);return b},MultiSurface:function(a){for(var b=this.createElementNSPlus("gml:MultiSurface"),a=a.components||[a],c=0,d=a.length;c<d;++c)this.writeNode("surfaceMember",a[c],b);return b},surfaceMember:function(a){var b=this.createElementNSPlus("gml:surfaceMember");this.surface? 295this.writeNode("Surface",a,b):this.writeNode("Polygon",a,b);return b},Envelope:function(a){var b=this.createElementNSPlus("gml:Envelope");this.writeNode("lowerCorner",a,b);this.writeNode("upperCorner",a,b);this.srsName&&b.setAttribute("srsName",this.srsName);return b},lowerCorner:function(a){return this.createElementNSPlus("gml:lowerCorner",{value:this.xy?a.left+" "+a.bottom:a.bottom+" "+a.left})},upperCorner:function(a){return this.createElementNSPlus("gml:upperCorner",{value:this.xy?a.right+" "+ 296a.top:a.top+" "+a.right})}},OpenLayers.Format.GML.Base.prototype.writers.gml),feature:OpenLayers.Format.GML.Base.prototype.writers.feature,wfs:OpenLayers.Format.GML.Base.prototype.writers.wfs},setGeometryTypes:function(){this.geometryTypes={"OpenLayers.Geometry.Point":"Point","OpenLayers.Geometry.MultiPoint":"MultiPoint","OpenLayers.Geometry.LineString":!0===this.curve?"Curve":"LineString","OpenLayers.Geometry.MultiLineString":!1===this.multiCurve?"MultiLineString":"MultiCurve","OpenLayers.Geometry.Polygon":!0=== 297this.surface?"Surface":"Polygon","OpenLayers.Geometry.MultiPolygon":!1===this.multiSurface?"MultiPolygon":"MultiSurface","OpenLayers.Geometry.Collection":"GeometryCollection"}},CLASS_NAME:"OpenLayers.Format.GML.v3"}); 298OpenLayers.Format.OGCExceptionReport=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ogc:"http://www.opengis.net/ogc"},regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g},defaultPrefix:"ogc",read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b={exceptionReport:null};a.documentElement&&(this.readChildNodes(a,b),null===b.exceptionReport&&(b=(new OpenLayers.Format.OWSCommon).read(a)));return b},readers:{ogc:{ServiceExceptionReport:function(a, 299b){b.exceptionReport={exceptions:[]};this.readChildNodes(a,b.exceptionReport)},ServiceException:function(a,b){var c={code:a.getAttribute("code"),locator:a.getAttribute("locator"),text:this.getChildValue(a)};b.exceptions.push(c)}}},CLASS_NAME:"OpenLayers.Format.OGCExceptionReport"}); 300OpenLayers.Format.XML.VersionedOGC=OpenLayers.Class(OpenLayers.Format.XML,{defaultVersion:null,version:null,profile:null,allowFallback:!1,name:null,stringifyOutput:!1,parser:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a]);a=this.CLASS_NAME;this.name=a.substring(a.lastIndexOf(".")+1)},getVersion:function(a,b){var c;if(a){if(c=this.version,!c&&(c=a.getAttribute("version"),!c))c=this.defaultVersion}else c=b&&b.version||this.version||this.defaultVersion;return c}, 301getParser:function(a){var a=a||this.defaultVersion,b=this.profile?"_"+this.profile:"";if(!this.parser||this.parser.VERSION!=a){var c=OpenLayers.Format[this.name]["v"+a.replace(/\./g,"_")+b];if(!c&&(""!==b&&this.allowFallback&&(b="",c=OpenLayers.Format[this.name]["v"+a.replace(/\./g,"_")]),!c))throw"Can't find a "+this.name+" parser for version "+a+b;this.parser=new c(this.options)}return this.parser},write:function(a,b){this.parser=this.getParser(this.getVersion(null,b));var c=this.parser.write(a, 302b);return!1===this.stringifyOutput?c:OpenLayers.Format.XML.prototype.write.apply(this,[c])},read:function(a,b){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var c=this.getVersion(a.documentElement);this.parser=this.getParser(c);var d=this.parser.read(a,b),e=this.parser.errorProperty||null;if(null!==e&&void 0===d[e])e=new OpenLayers.Format.OGCExceptionReport,d.error=e.read(a);d.version=c;return d},CLASS_NAME:"OpenLayers.Format.XML.VersionedOGC"}); 303OpenLayers.Format.WMSDescribeLayer=OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC,{defaultVersion:"1.1.1",CLASS_NAME:"OpenLayers.Format.WMSDescribeLayer"}); 304OpenLayers.Format.WMSDescribeLayer.v1_1_1=OpenLayers.Class(OpenLayers.Format.WMSDescribeLayer,{initialize:function(a){OpenLayers.Format.WMSDescribeLayer.prototype.initialize.apply(this,[a])},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));for(var b=a.documentElement.childNodes,c={layerDescriptions:[]},d,e,f=0;f<b.length;++f)if(d=b[f],e=d.nodeName,"LayerDescription"==e){e=d.getAttribute("name");var g="",h="",i="";d.getAttribute("owsType")?(g=d.getAttribute("owsType"), 305h=d.getAttribute("owsURL")):""!=d.getAttribute("wfs")?(g="WFS",h=d.getAttribute("wfs")):""!=d.getAttribute("wcs")&&(g="WCS",h=d.getAttribute("wcs"));d=d.getElementsByTagName("Query");0<d.length&&((i=d[0].getAttribute("typeName"))||(i=d[0].getAttribute("typename")));d={layerName:e,owsType:g,owsURL:h,typeName:i};c.layerDescriptions.push(d);c.length=c.layerDescriptions.length;c[c.length-1]=d}else if("ServiceException"==e)return{error:(new OpenLayers.Format.OGCExceptionReport).read(a)};return c},CLASS_NAME:"OpenLayers.Format.WMSDescribeLayer.v1_1_1"}); 306OpenLayers.Format.WMSDescribeLayer.v1_1_0=OpenLayers.Format.WMSDescribeLayer.v1_1_1; 307OpenLayers.Format.WFSDescribeFeatureType=OpenLayers.Class(OpenLayers.Format.XML,{regExes:{trimSpace
307:/^\s*|\s*$/g},namespaces:{xsd:"http://www.w3.org/2001/XMLSchema"},readers:{xsd:{schema:function(a,b){var c=[],d={},e,f;this.readChildNodes(a,{complexTypes:c,customTypes:d});var g=a.attributes,h,i;for(e=0,f=g.length;e<f;++e)h=g[e],i=h.name,0===i.indexOf("xmlns")?this.setNamespace(i.split(":")[1]||"",h.value):b[i]=h.value;b.featureTypes=c;b.targetPrefix=this.namespaceAlias[b.targetNamespace];for(e=0, 308f=c.length;e<f;++e)if(g=c[e],h=d[g.typeName],d[g.typeName])g.typeName=h.name},complexType:function(a,b){var c={typeName:a.getAttribute("name")};this.readChildNodes(a,c);b.complexTypes.push(c)},complexContent:function(a,b){this.readChildNodes(a,b)},extension:function(a,b){this.readChildNodes(a,b)},sequence:function(a,b){var c={elements:[]};this.readChildNodes(a,c);b.properties=c.elements},element:function(a,b){var c;if(b.elements){var d={};c=a.attributes;for(var e,f=0,g=c.length;f<g;++f)e=c[f],d[e.name]= 309e.value;c=d.type;if(!c)c={},this.readChildNodes(a,c),d.restriction=c,d.type=c.base;d.localType=(c.base||c).split(":").pop();b.elements.push(d);this.readChildNodes(a,d)}b.complexTypes&&(c=a.getAttribute("type"),d=c.split(":").pop(),b.customTypes[d]={name:a.getAttribute("name"),type:c})},annotation:function(a,b){b.annotation={};this.readChildNodes(a,b.annotation)},appinfo:function(a,b){if(!b.appinfo)b.appinfo=[];b.appinfo.push(this.getChildValue(a))},documentation:function(a,b){if(!b.documentation)b.documentation= 310[];var c=this.getChildValue(a);b.documentation.push({lang:a.getAttribute("xml:lang"),textContent:c.replace(this.regExes.trimSpace,"")})},simpleType:function(a,b){this.readChildNodes(a,b)},restriction:function(a,b){b.base=a.getAttribute("base");this.readRestriction(a,b)}}},readRestriction:function(a,b){for(var c=a.childNodes,d,e,f=0,g=c.length;f<g;++f)d=c[f],1==d.nodeType&&(e=d.nodeName.split(":").pop(),d=d.getAttribute("value"),b[e]?("string"==typeof b[e]&&(b[e]=[b[e]]),b[e].push(d)):b[e]=d)},read:function(a){"string"== 311typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b={};if("ExceptionReport"===a.nodeName.split(":").pop()){var c=new OpenLayers.Format.OGCExceptionReport;b.error=c.read(a)}else this.readNode(a,b);return b},CLASS_NAME:"OpenLayers.Format.WFSDescribeFeatureType"}); 312OpenLayers.Filter=OpenLayers.Class({initialize:function(a){OpenLayers.Util.extend(this,a)},destroy:function(){},evaluate:function(){return!0},clone:function(){return null},toString:function(){return OpenLayers.Format&&OpenLayers.Format.CQL?OpenLayers.Format.CQL.prototype.write(this):Object.prototype.toString.call(this)},CLASS_NAME:"OpenLayers.Filter"}); 313OpenLayers.Filter.FeatureId=OpenLayers.Class(OpenLayers.Filter,{fids:null,type:"FID",initialize:function(a){this.fids=[];OpenLayers.Filter.prototype.initialize.apply(this,[a])},evaluate:function(a){for(var b=0,c=this.fids.length;b<c;b++)if((a.fid||a.id)==this.fids[b])return!0;return!1},clone:function(){var a=new OpenLayers.Filter.FeatureId;OpenLayers.Util.extend(a,this);a.fids=this.fids.slice();return a},CLASS_NAME:"OpenLayers.Filter.FeatureId"}); 314OpenLayers.Filter.Logical=OpenLayers.Class(OpenLayers.Filter,{filters:null,type:null,initialize:function(a){this.filters=[];OpenLayers.Filter.prototype.initialize.apply(this,[a])},destroy:function(){this.filters=null;OpenLayers.Filter.prototype.destroy.apply(this)},evaluate:function(a){var b,c;switch(this.type){case OpenLayers.Filter.Logical.AND:for(b=0,c=this.filters.length;b<c;b++)if(!1==this.filters[b].evaluate(a))return!1;return!0;case OpenLayers.Filter.Logical.OR:for(b=0,c=this.filters.length;b< 315c;b++)if(!0==this.filters[b].evaluate(a))return!0;return!1;case OpenLayers.Filter.Logical.NOT:return!this.filters[0].evaluate(a)}},clone:function(){for(var a=[],b=0,c=this.filters.length;b<c;++b)a.push(this.filters[b].clone());return new OpenLayers.Filter.Logical({type:this.type,filters:a})},CLASS_NAME:"OpenLayers.Filter.Logical"});OpenLayers.Filter.Logical.AND="&&";OpenLayers.Filter.Logical.OR="||";OpenLayers.Filter.Logical.NOT="!"; 316OpenLayers.Filter.Comparison=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,matchCase:!0,lowerBoundary:null,upperBoundary:null,initialize:function(a){OpenLayers.Filter.prototype.initialize.apply(this,[a]);
316if(this.type===OpenLayers.Filter.Comparison.LIKE&&void 0===a.matchCase)this.matchCase=null},evaluate:function(a){if(a instanceof OpenLayers.Feature.Vector)a=a.attributes;var b=!1,a=a[this.property];switch(this.type){case OpenLayers.Filter.Comparison.EQUAL_TO:b=this.value; 317b=!this.matchCase&&"string"==typeof a&&"string"==typeof b?a.toUpperCase()==b.toUpperCase():a==b;break;case OpenLayers.Filter.Comparison.NOT_EQUAL_TO:b=this.value;b=!this.matchCase&&"string"==typeof a&&"string"==typeof b?a.toUpperCase()!=b.toUpperCase():a!=b;break;case OpenLayers.Filter.Comparison.LESS_THAN:b=a<this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN:b=a>this.value;break;case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:b=a<=this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:b= 318a>=this.value;break;case OpenLayers.Filter.Comparison.BETWEEN:b=a>=this.lowerBoundary&&a<=this.upperBoundary;break;case OpenLayers.Filter.Comparison.LIKE:b=RegExp(this.value,"gi").test(a);break;case OpenLayers.Filter.Comparison.IS_NULL:b=null===a}return b},value2regex:function(a,b,c){if("."==a)throw Error("'.' is an unsupported wildCard character for OpenLayers.Filter.Comparison");a=a?a:"*";b=b?b:".";this.value=this.value.replace(RegExp("\\"+(c?c:"!")+"(.|$)","g"),"\\$1");this.value=this.value.replace(RegExp("\\"+ 319b,"g"),".");this.value=this.value.replace(RegExp("\\"+a,"g"),".*");this.value=this.value.replace(RegExp("\\\\.\\*","g"),"\\"+a);return this.value=this.value.replace(RegExp("\\\\\\.","g"),"\\"+b)},regex2value:function(){var a=this.value,a=a.replace(/!/g,"!!"),a=a.replace(/(\\)?\\\./g,function(a,c){return c?a:"!."}),a=a.replace(/(\\)?\\\*/g,function(a,c){return c?a:"!*"}),a=a.replace(/\\\\/g,"\\");return a=a.replace(/\.\*/g,"*")},clone:function(){return OpenLayers.Util.extend(new OpenLayers.Filter.Comparison, 320this)},CLASS_NAME:"OpenLayers.Filter.Comparison"});OpenLayers.Filter.Comparison.EQUAL_TO="==";OpenLayers.Filter.Comparison.NOT_EQUAL_TO="!=";OpenLayers.Filter.Comparison.LESS_THAN="<";OpenLayers.Filter.Comparison.GREATER_THAN=">";OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO="<=";OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO=">=";OpenLayers.Filter.Comparison.BETWEEN="..";OpenLayers.Filter.Comparison.LIKE="~";OpenLayers.Filter.Comparison.IS_NULL="NULL"; 321OpenLayers.Filter.Spatial=OpenLayers.Class(OpenLayers.Filter,{type:null,property:null,value:null,distance:null,distanceUnits:null,evaluate:function(a){var b=!1;switch(this.type){case OpenLayers.Filter.Spatial.BBOX:case OpenLayers.Filter.Spatial.INTERSECTS:if(a.geometry){var c=this.value;"OpenLayers.Bounds"==this.value.CLASS_NAME&&(c=this.value.toGeometry());a.geometry.intersects(c)&&(b=!0)}break;default:throw Error("evaluate is not implemented for this filter type.");}return b},clone:function(){var a= 322OpenLayers.Util.applyDefaults({value:this.value&&this.value.clone&&this.value.clone()},this);return new OpenLayers.Filter.Spatial(a)},CLASS_NAME:"OpenLayers.Filter.Spatial"});OpenLayers.Filter.Spatial.BBOX="BBOX";OpenLayers.Filter.Spatial.INTERSECTS="INTERSECTS";OpenLayers.Filter.Spatial.DWITHIN="DWITHIN";OpenLayers.Filter.Spatial.WITHIN="WITHIN";OpenLayers.Filter.Spatial.CONTAINS="CONTAINS"; 323OpenLayers.Format.SLD=OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC,{profile:null,defaultVersion:"1.0.0",stringifyOutput:!0,namedLayersAsArray:!1,CLASS_NAME:"OpenLayers.Format.SLD"});OpenLayers.Format.Filter=OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC,{defaultVersion:"1.0.0",CLASS_NAME:"OpenLayers.Format.Filter"});OpenLayers.Filter.Function=OpenLayers.Class(OpenLayers.Filter,{name:null,params:null,CLASS_NAME:"OpenLayers.Filter.Function"}); 324OpenLayers.Date={dateRegEx:/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))|Z)?$/,toISOString:function(){return"toISOString"in Date.prototype?function(a){return a.toISOString()}:function(a){return isNaN(a.getTime())?"Invalid Date":a.getUTCFullYear()+"-"+OpenLayers.Number.zeroPad(a.getUTCMonth()+1,2)+"-"+OpenLayers.Number.zeroPad(a.getUTCDate(),2)+"T"+OpenLayers.Number.zeroPad(a.getUTCHours(),2)+":"+OpenLayers.Number.zeroPad(a.getUTCMinutes(), 3252)+":"+OpenLayers.Number.zeroPad(a.getUTCSeconds(),2)+"."+OpenLayers.Number.zeroPad(a.getUTCMilliseconds(),3)+"Z"}}(),parse:function(a){var b;
325if((a=a.match(this.dateRegEx))&&(a[1]||a[7])){b=parseInt(a[1],10)||0;var c=parseInt(a[2],10)-1||0,d=parseInt(a[3],10)||1;b=new Date(Date.UTC(b,c,d));if(c=a[7]){var d=parseInt(a[4],10),e=parseInt(a[5],10),f=parseFloat(a[6]),g=f|0,f=Math.round(1E3*(f-g));b.setUTCHours(d,e,g,f);"Z"!==c&&(c=parseInt(c,10),a=parseInt(a[8],10)||0,b=new Date(b.getTime()+-1E3*(60*60* 326c+60*a)))}}else b=new Date("invalid");return b}}; 327OpenLayers.Format.Filter.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"ogc",schemaLocation:null,initialize:function(a){OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},read:function(a){var b={};this.readers.ogc.Filter.apply(this,[a,b]);return b.filter},readers:{ogc:{_expression:function(a){for(var b="",c=a.firstChild;c;c= 328c.nextSibling)switch(c.nodeType){case 1:a=this.readNode(c);a.property?b+="${"+a.property+"}":void 0!==a.value&&(b+=a.value);break;case 3:case 4:b+=c.nodeValue}return b},Filter:function(a,b){var c={fids:[],filters:[]};this.readChildNodes(a,c);if(0<c.fids.length)b.filter=new OpenLayers.Filter.FeatureId({fids:c.fids});else if(0<c.filters.length)b.filter=c.filters[0]},FeatureId:function(a,b){var c=a.getAttribute("fid");c&&b.fids.push(c)},And:function(a,b){var c=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND}); 329this.readChildNodes(a,c);b.filters.push(c)},Or:function(a,b){var c=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.OR});this.readChildNodes(a,c);b.filters.push(c)},Not:function(a,b){var c=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.NOT});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsLessThan:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsGreaterThan:function(a, 330b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsLessThanOrEqualTo:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsGreaterThanOrEqualTo:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO});this.readChildNodes(a,c);b.filters.push(c)}, 331PropertyIsBetween:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.BETWEEN});this.readChildNodes(a,c);b.filters.push(c)},Literal:function(a,b){b.value=OpenLayers.String.numericIf(this.getChildValue(a),!0)},PropertyName:function(a,b){b.property=this.getChildValue(a)},LowerBoundary:function(a,b){b.lowerBoundary=OpenLayers.String.numericIf(this.readers.ogc._expression.call(this,a),!0)},UpperBoundary:function(a,b){b.upperBoundary=OpenLayers.String.numericIf(this.readers.ogc._expression.call(this, 332a),!0)},Intersects:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.INTERSECTS)},Within:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.WITHIN)},Contains:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.CONTAINS)},DWithin:function(a,b){this.readSpatial(a,b,OpenLayers.Filter.Spatial.DWITHIN)},Distance:function(a,b){b.distance=parseInt(this.getChildValue(a));b.distanceUnits=a.getAttribute("units")},Function:function(){},PropertyIsNull:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.IS_NULL}); 333this.readChildNodes(a,c);b.filters.push(c)}}},readSpatial:function(a,b,c){c=new OpenLayers.Filter.Spatial({type:c});this.readChildNodes(a,c);c.value=c.components[0];delete c.components;b.filters.push(c)},encodeLiteral:function(a){a instanceof Date&&(a=OpenLayers.Date.toISOString(a));return a},writeOgcExpression:function(a,b){a instanceof OpenLayers.Filter.Function?this.writeNode("Function",a,b):this.writeNode("Literal",a,b);return b},write:function(a){return this.writers.ogc.Filter.apply(this,[a])}, 334writers:{ogc:{Filter:function(a){var b=this.createElementNSPlus("ogc:Filter");this.writeNode(this.getFilterType(a),a,b);return b},_featureIds:function(a){for(var b=this.createDocumentFragment(),c=0,d=a.fids.length;c<d;++c)this.writeNode("ogc:FeatureId",a.fids[c],b);return b},FeatureId:function(a){return this.createElementNSPlus("ogc:FeatureId",{attributes:{fid:a}})},And:function(a){for(var b=this.createElementNSPlus("ogc:And"),c,d=0,e=a.filters.length;d<e;++d)c=a.filters[d],this.writeNode(this.getFilterType(c), 335c,b);return b},Or:function(a){for(var b=this.createElementNSPlus("ogc:Or"),c,d=0,e=a.filters.length;d<e;++d)c=a.filters[d],this.writeNode(this.getFilterType(c),c,b);return b},Not:function(a){var b=this.createElementNSPlus("ogc:Not"),a=a.filters[0];this.writeNode(this.getFilterType(a),a,b);return b},PropertyIsLessThan:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLessThan");this.writeNode("PropertyName",a,b);this.writeOgcExpression(a.value,b);return b},PropertyIsGreaterThan:function(a){var b= 336this.createElementNSPlus("ogc:PropertyIsGreaterThan");this.writeNode("PropertyName",a,b);this.writeOgcExpression(a.value,b);return b},PropertyIsLessThanOrEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLessThanOrEqualTo");this.writeNode("PropertyName",a,b);this.writeOgcExpression(a.value,b);return b},PropertyIsGreaterThanOrEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsGreaterThanOrEqualTo");this.writeNode("PropertyName",a,b);this.writeOgcExpression(a.value,b); 337return b},PropertyIsBetween:function(a){var b=this.createElementNSPlus("ogc:PropertyIsBetween");this.writeNode("PropertyName",a,b);this.writeNode("LowerBoundary",a,b);this.writeNode("UpperBoundary",a,b);return b},PropertyName:function(a){return this.createElementNSPlus("ogc:PropertyName",{value:a.property})}
337,Literal:function(a){return this.createElementNSPlus("ogc:Literal",{value:(this.encodeLiteral||OpenLayers.Format.Filter.v1.prototype.encodeLiteral)(a)})},LowerBoundary:function(a){var b=this.createElementNSPlus("ogc:LowerBoundary"); 338this.writeOgcExpression(a.lowerBoundary,b);return b},UpperBoundary:function(a){var b=this.createElementNSPlus("ogc:UpperBoundary");this.writeNode("Literal",a.upperBoundary,b);return b},INTERSECTS:function(a){return this.writeSpatial(a,"Intersects")},WITHIN:function(a){return this.writeSpatial(a,"Within")},CONTAINS:function(a){return this.writeSpatial(a,"Contains")},DWITHIN:function(a){var b=this.writeSpatial(a,"DWithin");this.writeNode("Distance",a,b);return b},Distance:function(a){return this.createElementNSPlus("ogc:Distance", 339{attributes:{units:a.distanceUnits},value:a.distance})},Function:function(a){for(var b=this.createElementNSPlus("ogc:Function",{attributes:{name:a.name}}),a=a.params,c=0,d=a.length;c<d;c++)this.writeOgcExpression(a[c],b);return b},PropertyIsNull:function(a){var b=this.createElementNSPlus("ogc:PropertyIsNull");this.writeNode("PropertyName",a,b);return b}}},getFilterType:function(a){var b=this.filterMap[a.type];if(!b)throw"Filter writing not supported for rule type: "+a.type;return b},filterMap:{"&&":"And", 340"||":"Or","!":"Not","==":"PropertyIsEqualTo","!=":"PropertyIsNotEqualTo","<":"PropertyIsLessThan",">":"PropertyIsGreaterThan","<=":"PropertyIsLessThanOrEqualTo",">=":"PropertyIsGreaterThanOrEqualTo","..":"PropertyIsBetween","~":"PropertyIsLike",NULL:"PropertyIsNull",BBOX:"BBOX",DWITHIN:"DWITHIN",WITHIN:"WITHIN",CONTAINS:"CONTAINS",INTERSECTS:"INTERSECTS",FID:"_featureIds"},CLASS_NAME:"OpenLayers.Format.Filter.v1"}); 341OpenLayers.Format.Filter.v1_0_0=OpenLayers.Class(OpenLayers.Format.GML.v2,OpenLayers.Format.Filter.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.0.0/filter.xsd",initialize:function(a){OpenLayers.Format.GML.v2.prototype.initialize.apply(this,[a])},readers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsNotEqualTo:function(a, 342b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsLike:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE});this.readChildNodes(a,c);var d=a.getAttribute("wildCard"),e=a.getAttribute("singleChar"),f=a.getAttribute("escape");c.value2regex(d,e,f);b.filters.push(c)}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v2.prototype.readers.gml, 343feature:OpenLayers.Format.GML.v2.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsEqualTo");this.writeNode("PropertyName",a,b);this.writeOgcExpression(a.value,b);return b},PropertyIsNotEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsNotEqualTo");this.writeNode("PropertyName",a,b);this.writeOgcExpression(a.value,b);return b},PropertyIsLike:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLike", 344{attributes:{wildCard:"*",singleChar:".",escape:"!"}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.regex2value(),b);return b},BBOX:function(a){var b=this.createElementNSPlus("ogc:BBOX");a.property&&this.writeNode("PropertyName",a,b);var c=this.writeNode("gml:Box",a.value,b);a.projection&&c.setAttribute("srsName",a.projection);return b}},OpenLayers.Format.Filter.v1.prototype.writers.ogc),gml:OpenLayers.Format.GML.v2.prototype.writers.gml,feature:OpenLayers.Format.GML.v2.prototype.writers.feature}, 345writeSpatial:function(a,b){var c=this.createElementNSPlus("ogc:"+b);this.writeNode("PropertyName",a,c);if(a.value instanceof OpenLayers.Filter.Function)this.writeNode("Function",a.value,c);else{var d;d=a.value instanceof OpenLayers.Geometry?this.writeNode("feature:_geometry",a.value).firstChild:this.writeNode("gml:Box",a.value);a.projection&&d.setAttribute("srsName",a.projection);c.appendChild(d)}return c},CLASS_NAME:"OpenLayers.Format.Filter.v1_0_0"}); 346OpenLayers.Format.SLD.v1=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,{namespaces:{sld:"http://www.opengis.net/sld",ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"sld",schemaLocation:null,multipleSymbolizers:!1,featureTypeCounter:null,defaultSymbolizer:{fillColor:"#808080",fillOpacity:1,strokeColor:"#000000",strokeOpacity:1,strokeWidth:1,strokeDashstyle:"solid",pointRadius:3, 347graphicName:"square"}
347,read:function(a,b){var b=OpenLayers.Util.applyDefaults(b,this.options),c={namedLayers:!0===b.namedLayersAsArray?[]:{}};this.readChildNodes(a,c);return c},readers:OpenLayers.Util.applyDefaults({sld:{StyledLayerDescriptor:function(a,b){b.version=a.getAttribute("version");this.readChildNodes(a,b)},Name:function(a,b){b.name=this.getChildValue(a)},Title:function(a,b){b.title=this.getChildValue(a)},Abstract:function(a,b){b.description=this.getChildValue(a)},NamedLayer:function(a,b){var c= 348{userStyles:[],namedStyles:[]};this.readChildNodes(a,c);for(var d=0,e=c.userStyles.length;d<e;++d)c.userStyles[d].layerName=c.name;OpenLayers.Util.isArray(b.namedLayers)?b.namedLayers.push(c):b.namedLayers[c.name]=c},NamedStyle:function(a,b){b.namedStyles.push(this.getChildName(a.firstChild))},UserStyle:function(a,b){var c={defaultsPerSymbolizer:!0,rules:[]};this.featureTypeCounter=-1;this.readChildNodes(a,c);this.multipleSymbolizers?(delete c.defaultsPerSymbolizer,c=new OpenLayers.Style2(c)):c=new OpenLayers.Style(this.defaultSymbolizer, 349c);b.userStyles.push(c)},IsDefault:function(a,b){if("1"==this.getChildValue(a))b.isDefault=!0},FeatureTypeStyle:function(a,b){++this.featureTypeCounter;var c={rules:this.multipleSymbolizers?b.rules:[]};this.readChildNodes(a,c);if(!this.multipleSymbolizers)b.rules=c.rules},Rule:function(a,b){var c;this.multipleSymbolizers&&(c={symbolizers:[]});c=new OpenLayers.Rule(c);this.readChildNodes(a,c);b.rules.push(c)},ElseFilter:function(a,b){b.elseFilter=!0},MinScaleDenominator:function(a,b){b.minScaleDenominator= 350parseFloat(this.getChildValue(a))},MaxScaleDenominator:function(a,b){b.maxScaleDenominator=parseFloat(this.getChildValue(a))},TextSymbolizer:function(a,b){var c={};this.readChildNodes(a,c);this.multipleSymbolizers?(c.zIndex=this.featureTypeCounter,b.symbolizers.push(new OpenLayers.Symbolizer.Text(c))):b.symbolizer.Text=OpenLayers.Util.applyDefaults(c,b.symbolizer.Text)},LabelPlacement:function(a,b){this.readChildNodes(a,b)},PointPlacement:function(a,b){var c={};this.readChildNodes(a,c);c.labelRotation= 351c.rotation;delete c.rotation;var d,e=b.labelAnchorPointX,f=b.labelAnchorPointY;e<=1/3?d="l":e>1/3&&e<2/3?d="c":e>=2/3&&(d="r");f<=1/3?d+="b":f>1/3&&f<2/3?d+="m":f>=2/3&&(d+="t");c.labelAlign=d;OpenLayers.Util.applyDefaults(b,c)},AnchorPoint:function(a,b){this.readChildNodes(a,b)},AnchorPointX:function(a,b){var c=this.readers.ogc._expression.call(this,a);if(c)b.labelAnchorPointX=c},AnchorPointY:function(a,b){var c=this.readers.ogc._expression.call(this,a);if(c)b.labelAnchorPointY=c},Displacement:function(a, 352b){this.readChildNodes(a,b)},DisplacementX:function(a,b){var c=this.readers.ogc._expression.call(this,a);if(c)b.labelXOffset=c},DisplacementY:function(a,b){var c=this.readers.ogc._expression.call(this,a);if(c)b.labelYOffset=c},LinePlacement:function(a,b){this.readChildNodes(a,b)},PerpendicularOffset:function(a,b){var c=this.readers.ogc._expression.call(this,a);if(c)b.labelPerpendicularOffset=c},Label:function(a,b){var c=this.readers.ogc._expression.call(this,a);if(c)b.label=c},Font:function(a,b){this.readChildNodes(a, 353b)},Halo:function(a,b){var c={};this.readChildNodes(a,c);b.haloRadius=c.haloRadius;b.haloColor=c.fillColor;b.haloOpacity=c.fillOpacity},Radius:function(a,b){var c=this.readers.ogc._expression.call(this,a);if(null!=c)b.haloRadius=c},RasterSymbolizer:function(a,b){var c={};this.readChildNodes(a,c);this.multipleSymbolizers?(c.zIndex=this.featureTypeCounter,b.symbolizers.push(new OpenLayers.Symbolizer.Raster(c))):b.symbolizer.Raster=OpenLayers.Util.applyDefaults(c,b.symbolizer.Raster)},Geometry:function(a, 354b){b.geometry={};this.readChildNodes(a,b.geometry)},ColorMap:function(a,b){b.colorMap=[];this.readChildNodes(a,b.colorMap)},ColorMapEntry:function(a,b){var c=a.getAttribute("quantity"),d=a.getAttribute("opacity");b.push({color:a.getAttribute("color"),quantity:null!==c?parseFloat(c):void 0,label:a.getAttribute("label")||void 0,opacity:null!==d?parseFloat(d):void 0})},LineSymbolizer:function(a,b){var c={};this.readChildNodes(a,c);this.multipleSymbolizers?(c.zIndex=this.featureTypeCounter,b.symbolizers.push(new OpenLayers.Symbolizer.Line(c))): 355b.symbolizer.Line=OpenLayers.Util.applyDefaults(c,b.symbolizer.Line)},PolygonSymbolizer:function(a,b){var c={fill:!1,stroke:!1};this.multipleSymbolizers||(c=b.symbolizer.Polygon||c);this.readChildNodes(a,c);this.multipleSymbolizers?(c.zIndex=this.featureTypeCounter,b.symbolizers.push(new OpenLayers.Symbolizer.Polygon(c))):b.symbolizer.Polygon=c},PointSymbolizer:function(a,b){var c={fill:!1,stroke:!1,graphic:!1};this.multipleSymbolizers||(c=b.symbolizer.Point||c);this.readChildNodes(a,c);this.multipleSymbolizers? 356(c.zIndex=this.featureTypeCounter,b.symbolizers.push(new OpenLayers.Symbolizer.Point(c))):b.symbolizer.Point=c},Stroke:function(a,b){b.stroke=!0;this.readChildNodes(a,b)},Fill:function(a,b){b.fill=!0;this.readChildNodes(a,b)},CssParameter:function(a,b){var c=a.getAttribute("name"),d=this.cssMap[c];b.label&&("fill"===c?d="fontColor":"fill-opacity"===c&&(d="fontOpacity"));d&&(c=this.readers.ogc._expression.call(this,a))&&(b[d]=c)},Graphic:function(a,b){b.graphic=!0;var c={};this.readChildNodes(a,c); 357for(var d="stroke,strokeColor,strokeWidth,strokeOpacity,strokeLinecap,fill,fillColor,fillOpacity,graphicName,rotation,graphicFormat".split(","),e,f,g=0,h=d.length;g<h;++g)e=d[g],f=c[e],void 0!=f&&(b[e]=f);
357if(void 0!=c.opacity)b.graphicOpacity=c.opacity;if(void 0!=c.size)isNaN(c.size/2)?b.graphicWidth=c.size:b.pointRadius=c.size/2;if(void 0!=c.href)b.externalGraphic=c.href;if(void 0!=c.rotation)b.rotation=c.rotation},ExternalGraphic:function(a,b){this.readChildNodes(a,b)},Mark:function(a,b){this.readChildNodes(a, 358b)},WellKnownName:function(a,b){b.graphicName=this.getChildValue(a)},Opacity:function(a,b){var c=this.readers.ogc._expression.call(this,a);if(c)b.opacity=c},Size:function(a,b){var c=this.readers.ogc._expression.call(this,a);if(c)b.size=c},Rotation:function(a,b){var c=this.readers.ogc._expression.call(this,a);if(c)b.rotation=c},OnlineResource:function(a,b){b.href=this.getAttributeNS(a,this.namespaces.xlink,"href")},Format:function(a,b){b.graphicFormat=this.getChildValue(a)}}},OpenLayers.Format.Filter.v1_0_0.prototype.readers), 359cssMap:{stroke:"strokeColor","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-dasharray":"strokeDashstyle",fill:"fillColor","fill-opacity":"fillOpacity","font-family":"fontFamily","font-size":"fontSize","font-weight":"fontWeight","font-style":"fontStyle"},getCssProperty:function(a){var b=null,c;for(c in this.cssMap)if(this.cssMap[c]==a){b=c;break}return b},getGraphicFormat:function(a){var b,c;for(c in this.graphicFormats)if(this.graphicFormats[c].test(a)){b= 360c;break}return b||this.defaultGraphicFormat},defaultGraphicFormat:"image/png",graphicFormats:{"image/jpeg":/\.jpe?g$/i,"image/gif":/\.gif$/i,"image/png":/\.png$/i},write:function(a){return this.writers.sld.StyledLayerDescriptor.apply(this,[a])},writers:OpenLayers.Util.applyDefaults({sld:{_OGCExpression:function(a,b){var c=this.createElementNSPlus(a),d="string"==typeof b?b.split("${"):[b];c.appendChild(this.createTextNode(d[0]));for(var e,f,g=1,h=d.length;g<h;g++)e=d[g],f=e.indexOf("}"),0<f?(this.writeNode("ogc:PropertyName", 361{property:e.substring(0,f)},c),c.appendChild(this.createTextNode(e.substring(++f)))):c.appendChild(this.createTextNode("${"+e));return c},StyledLayerDescriptor:function(a){var b=this.createElementNSPlus("sld:StyledLayerDescriptor",{attributes:{version:this.VERSION,"xsi:schemaLocation":this.schemaLocation}});b.setAttribute("xmlns:ogc",this.namespaces.ogc);b.setAttribute("xmlns:gml",this.namespaces.gml);a.name&&this.writeNode("Name",a.name,b);a.title&&this.writeNode("Title",a.title,b);a.description&& 362this.writeNode("Abstract",a.description,b);if(OpenLayers.Util.isArray(a.namedLayers))for(var c=0,d=a.namedLayers.length;c<d;++c)this.writeNode("NamedLayer",a.namedLayers[c],b);else for(c in a.namedLayers)this.writeNode("NamedLayer",a.namedLayers[c],b);return b},Name:function(a){return this.createElementNSPlus("sld:Name",{value:a})},Title:function(a){return this.createElementNSPlus("sld:Title",{value:a})},Abstract:function(a){return this.createElementNSPlus("sld:Abstract",{value:a})},NamedLayer:function(a){var b= 363this.createElementNSPlus("sld:NamedLayer");this.writeNode("Name",a.name,b);if(a.namedStyles)for(var c=0,d=a.namedStyles.length;c<d;++c)this.writeNode("NamedStyle",a.namedStyles[c],b);if(a.userStyles){c=0;for(d=a.userStyles.length;c<d;++c)this.writeNode("UserStyle",a.userStyles[c],b)}return b},NamedStyle:function(a){var b=this.createElementNSPlus("sld:NamedStyle");this.writeNode("Name",a,b);return b},UserStyle:function(a){var b=this.createElementNSPlus("sld:UserStyle");a.name&&this.writeNode("Name", 364a.name,b);a.title&&this.writeNode("Title",a.title,b);a.description&&this.writeNode("Abstract",a.description,b);a.isDefault&&this.writeNode("IsDefault",a.isDefault,b);if(this.multipleSymbolizers&&a.rules){for(var c={"0":[]},d=[0],e,f,g,h,i,j=0,k=a.rules.length;j<k;++j)if(e=a.rules[j],e.symbolizers){f={};for(var l=0,m=e.symbolizers.length;l<m;++l){g=e.symbolizers[l];h=g.zIndex;if(!(h in f))i=e.clone(),i.symbolizers=[],f[h]=i;f[h].symbolizers.push(g.clone())}for(h in f)h in c||(d.push(h),c[h]=[]),c[h].push(f[h])}else c[0].push(e.clone()); 365d.sort();j=0;for(k=d.length;j<k;++j)if(e=c[d[j]],0<e.length)i=a.clone(),i.rules=c[d[j]],this.writeNode("FeatureTypeStyle",i,b)}else this.writeNode("FeatureTypeStyle",a,b);return b},IsDefault:function(a){return this.createElementNSPlus("sld:IsDefault",{value:a?"1":"0"})},FeatureTypeStyle:function(a){for(var b=this.createElementNSPlus("sld:FeatureTypeStyle"),c=0,d=a.rules.length;c<d;++c)this.writeNode("Rule",a.rules[c],b);return b},Rule:function(a){var b=this.createElementNSPlus("sld:Rule");a.name&& 366this.writeNode("Name",a.name,b);a.title&&this.writeNode("Title",a.title,b);a.description&&this.writeNode("Abstract",a.description,b);a.elseFilter?this.writeNode("ElseFilter",null,b):a.filter&&this.writeNode("ogc:Filter",a.filter,b);void 0!=a.minScaleDenominator&&this.writeNode("MinScaleDenominator",a.minScaleDenominator,b);void 0!=a.maxScaleDenominator&&this.writeNode("MaxScaleDenominator",a.maxScaleDenominator,b);var c,d;if(this.multipleSymbolizers&&a.symbolizers)for(var e=0,f=a.symbolizers.length;e< 367f;++e)d=a.symbolizers[e],c=d.CLASS_NAME.split(".").pop(),this.writeNode(c+"Symbolizer",d,b);
367else for(var f=OpenLayers.Style.SYMBOLIZER_PREFIXES,e=0,g=f.length;e<g;++e)c=f[e],(d=a.symbolizer[c])&&this.writeNode(c+"Symbolizer",d,b);return b},ElseFilter:function(){return this.createElementNSPlus("sld:ElseFilter")},MinScaleDenominator:function(a){return this.createElementNSPlus("sld:MinScaleDenominator",{value:a})},MaxScaleDenominator:function(a){return this.createElementNSPlus("sld:MaxScaleDenominator", 368{value:a})},LineSymbolizer:function(a){var b=this.createElementNSPlus("sld:LineSymbolizer");this.writeNode("Stroke",a,b);return b},Stroke:function(a){var b=this.createElementNSPlus("sld:Stroke");void 0!=a.strokeColor&&this.writeNode("CssParameter",{symbolizer:a,key:"strokeColor"},b);void 0!=a.strokeOpacity&&this.writeNode("CssParameter",{symbolizer:a,key:"strokeOpacity"},b);void 0!=a.strokeWidth&&this.writeNode("CssParameter",{symbolizer:a,key:"strokeWidth"},b);void 0!=a.strokeDashstyle&&"solid"!== 369a.strokeDashstyle&&this.writeNode("CssParameter",{symbolizer:a,key:"strokeDashstyle"},b);void 0!=a.strokeLinecap&&this.writeNode("CssParameter",{symbolizer:a,key:"strokeLinecap"},b);return b},CssParameter:function(a){return this.createElementNSPlus("sld:CssParameter",{attributes:{name:this.getCssProperty(a.key)},value:a.symbolizer[a.key]})},TextSymbolizer:function(a){var b=this.createElementNSPlus("sld:TextSymbolizer");null!=a.label&&this.writeNode("Label",a.label,b);(null!=a.fontFamily||null!=a.fontSize|| 370null!=a.fontWeight||null!=a.fontStyle)&&this.writeNode("Font",a,b);(null!=a.labelAnchorPointX||null!=a.labelAnchorPointY||null!=a.labelAlign||null!=a.labelXOffset||null!=a.labelYOffset||null!=a.labelRotation||null!=a.labelPerpendicularOffset)&&this.writeNode("LabelPlacement",a,b);(null!=a.haloRadius||null!=a.haloColor||null!=a.haloOpacity)&&this.writeNode("Halo",a,b);(null!=a.fontColor||null!=a.fontOpacity)&&this.writeNode("Fill",{fillColor:a.fontColor,fillOpacity:a.fontOpacity},b);return b},LabelPlacement:function(a){var b= 371this.createElementNSPlus("sld:LabelPlacement");(null!=a.labelAnchorPointX||null!=a.labelAnchorPointY||null!=a.labelAlign||null!=a.labelXOffset||null!=a.labelYOffset||null!=a.labelRotation)&&null==a.labelPerpendicularOffset&&this.writeNode("PointPlacement",a,b);null!=a.labelPerpendicularOffset&&this.writeNode("LinePlacement",a,b);return b},LinePlacement:function(a){var b=this.createElementNSPlus("sld:LinePlacement");this.writeNode("PerpendicularOffset",a.labelPerpendicularOffset,b);return b},PerpendicularOffset:function(a){return this.createElementNSPlus("sld:PerpendicularOffset", 372{value:a})},PointPlacement:function(a){var b=this.createElementNSPlus("sld:PointPlacement");(null!=a.labelAnchorPointX||null!=a.labelAnchorPointY||null!=a.labelAlign)&&this.writeNode("AnchorPoint",a,b);(null!=a.labelXOffset||null!=a.labelYOffset)&&this.writeNode("Displacement",a,b);null!=a.labelRotation&&this.writeNode("Rotation",a.labelRotation,b);return b},AnchorPoint:function(a){var b=this.createElementNSPlus("sld:AnchorPoint"),c=a.labelAnchorPointX,d=a.labelAnchorPointY;null!=c&&this.writeNode("AnchorPointX", 373c,b);null!=d&&this.writeNode("AnchorPointY",d,b);if(null==c&&null==d){var e=a.labelAlign.substr(0,1),a=a.labelAlign.substr(1,1);"l"===e?c=0:"c"===e?c=0.5:"r"===e&&(c=1);"b"===a?d=0:"m"===a?d=0.5:"t"===a&&(d=1);this.writeNode("AnchorPointX",c,b);this.writeNode("AnchorPointY",d,b)}return b},AnchorPointX:function(a){return this.createElementNSPlus("sld:AnchorPointX",{value:a})},AnchorPointY:function(a){return this.createElementNSPlus("sld:AnchorPointY",{value:a})},Displacement:function(a){var b=this.createElementNSPlus("sld:Displacement"); 374null!=a.labelXOffset&&this.writeNode("DisplacementX",a.labelXOffset,b);null!=a.labelYOffset&&this.writeNode("DisplacementY",a.labelYOffset,b);return b},DisplacementX:function(a){return this.createElementNSPlus("sld:DisplacementX",{value:a})},DisplacementY:function(a){return this.createElementNSPlus("sld:DisplacementY",{value:a})},Font:function(a){var b=this.createElementNSPlus("sld:Font");a.fontFamily&&this.writeNode("CssParameter",{symbolizer:a,key:"fontFamily"},b);a.fontSize&&this.writeNode("CssParameter", 375{symbolizer:a,key:"fontSize"},b);a.fontWeight&&this.writeNode("CssParameter",{symbolizer:a,key:"fontWeight"},b);a.fontStyle&&this.writeNode("CssParameter",{symbolizer:a,key:"fontStyle"},b);return b},Label:function(a){return this.writers.sld._OGCExpression.call(this,"sld:Label",a)},Halo:function(a){var b=this.createElementNSPlus("sld:Halo");a.haloRadius&&this.writeNode("Radius",a.haloRadius,b);(a.haloColor||a.haloOpacity)&&this.writeNode("Fill",{fillColor:a.haloColor,fillOpacity:a.haloOpacity},b); 376return b},Radius:function(a){return this.createElementNSPlus("sld:Radius",{value:a})},RasterSymbolizer:function(a){var b=this.createElementNSPlus("sld:RasterSymbolizer");a.geometry&&this.writeNode("Geometry",a.geometry,b);a.opacity&&this.writeNode("Opacity",a.opacity,b);a.colorMap&&this.writeNode("ColorMap",a.colorMap,b);return b},Geometry:function(a){var b=this.createElementNSPlus("sld:Geometry");a.property&&this.writeNode("ogc:PropertyName",a,b);return b},ColorMap:function(a){for(var b=this.createElementNSPlus("sld:ColorMap"), 377c=0,d=a.length;c<d;++c)this.writeNode("ColorMapEntry",a[c],b);return b},ColorMapEntry:function(a){var b=this.createElementNSPlus("sld:ColorMapEntry");b.setAttribute("color",a.color);
377void 0!==a.opacity&&b.setAttribute("opacity",parseFloat(a.opacity));void 0!==a.quantity&&b.setAttribute("quantity",parseFloat(a.quantity));void 0!==a.label&&b.setAttribute("label",a.label);return b},PolygonSymbolizer:function(a){var b=this.createElementNSPlus("sld:PolygonSymbolizer");!1!==a.fill&&this.writeNode("Fill", 378a,b);!1!==a.stroke&&this.writeNode("Stroke",a,b);return b},Fill:function(a){var b=this.createElementNSPlus("sld:Fill");a.fillColor&&this.writeNode("CssParameter",{symbolizer:a,key:"fillColor"},b);null!=a.fillOpacity&&this.writeNode("CssParameter",{symbolizer:a,key:"fillOpacity"},b);return b},PointSymbolizer:function(a){var b=this.createElementNSPlus("sld:PointSymbolizer");this.writeNode("Graphic",a,b);return b},Graphic:function(a){var b=this.createElementNSPlus("sld:Graphic");void 0!=a.externalGraphic? 379this.writeNode("ExternalGraphic",a,b):this.writeNode("Mark",a,b);void 0!=a.graphicOpacity&&this.writeNode("Opacity",a.graphicOpacity,b);void 0!=a.pointRadius?this.writeNode("Size",2*a.pointRadius,b):void 0!=a.graphicWidth&&this.writeNode("Size",a.graphicWidth,b);void 0!=a.rotation&&this.writeNode("Rotation",a.rotation,b);return b},ExternalGraphic:function(a){var b=this.createElementNSPlus("sld:ExternalGraphic");this.writeNode("OnlineResource",a.externalGraphic,b);this.writeNode("Format",a.graphicFormat|| 380this.getGraphicFormat(a.externalGraphic),b);return b},Mark:function(a){var b=this.createElementNSPlus("sld:Mark");a.graphicName&&this.writeNode("WellKnownName",a.graphicName,b);!1!==a.fill&&this.writeNode("Fill",a,b);!1!==a.stroke&&this.writeNode("Stroke",a,b);return b},WellKnownName:function(a){return this.createElementNSPlus("sld:WellKnownName",{value:a})},Opacity:function(a){return this.createElementNSPlus("sld:Opacity",{value:a})},Size:function(a){return this.writers.sld._OGCExpression.call(this, 381"sld:Size",a)},Rotation:function(a){return this.createElementNSPlus("sld:Rotation",{value:a})},OnlineResource:function(a){return this.createElementNSPlus("sld:OnlineResource",{attributes:{"xlink:type":"simple","xlink:href":a}})},Format:function(a){return this.createElementNSPlus("sld:Format",{value:a})}}},OpenLayers.Format.Filter.v1_0_0.prototype.writers),CLASS_NAME:"OpenLayers.Format.SLD.v1"}); 382OpenLayers.Format.SLD.v1_0_0=OpenLayers.Class(OpenLayers.Format.SLD.v1,{VERSION:"1.0.0",schemaLocation:"http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd",CLASS_NAME:"OpenLayers.Format.SLD.v1_0_0"});
383OpenLayers.Protocol=OpenLayers.Class({format:null,options:null,autoDestroy:!0,defaultFilter:null,initialize:function(a){a=a||{};OpenLayers.Util.extend(this,a);this.options=a},mergeWithDefaultFilter:function(a){return a&&this.defaultFilter?new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.defaultFilter,a]}):a||this.defaultFilter||void 0},destroy:function(){this.format=this.options=null},read:function(a){a=a||{};a.filter=this.mergeWithDefaultFilter(a.filter)},create:function(){}, 384update:function(){},"delete":function(){},commit:function(){},abort:function(){},createCallback:function(a,b,c){return OpenLayers.Function.bind(function(){a.apply(this,[b,c])},this)},CLASS_NAME:"OpenLayers.Protocol"});OpenLayers.Protocol.Response=OpenLayers.Class({code:null,requestType:null,last:!0,features:null,data:null,reqFeatures:null,priv:null,error:null,initialize:function(a){OpenLayers.Util.extend(this,a)},success:function(){return 0<this.code},CLASS_NAME:"OpenLayers.Protocol.Response"}); 385OpenLayers.Protocol.Response.SUCCESS=1;OpenLayers.Protocol.Response.FAILURE=0;OpenLayers.ProxyHost="";if(!OpenLayers.Request)OpenLayers.Request={}; 386OpenLayers.Util.extend(OpenLayers.Request,{DEFAULT_CONFIG:{method:"GET",url:window.location.href,async:!0,user:void 0,password:void 0,params:null,proxy:OpenLayers.ProxyHost,headers:{},data:null,callback:function(){},success:null,failure:null,scope:null},URL_SPLIT_REGEX:/([^:]*:)\/\/([^:]*:?[^@]*@)?([^:\/\?]*):?([^\/\?]*)/,events:new OpenLayers.Events(this),makeSameOrigin:function(a,b){var c=0!==a.indexOf("http"),d=!c&&a.match(this.URL_SPLIT_REGEX);if(d){var e=window.location,c=d[1]==e.protocol&&d[3]== 387e.hostname,d=d[4],e=e.port;if(80!=d&&""!=d||"80"!=e&&""!=e)c=c&&d==e}c||b&&(a="function"==typeof b?b(a):b+encodeURIComponent(a));return a}
387,issue:function(a){var b=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost}),a=a||{};a.headers=a.headers||{};a=OpenLayers.Util.applyDefaults(a,b);a.headers=OpenLayers.Util.applyDefaults(a.headers,b.headers);var b=!1,c;for(c in a.headers)a.headers.hasOwnProperty(c)&&"x-requested-with"===c.toLowerCase()&&(b=!0);!1===b&&(a.headers["X-Requested-With"]= 388"XMLHttpRequest");var d=new OpenLayers.Request.XMLHttpRequest,e=OpenLayers.Util.urlAppend(a.url,OpenLayers.Util.getParameterString(a.params||{})),e=OpenLayers.Request.makeSameOrigin(e,a.proxy);d.open(a.method,e,a.async,a.user,a.password);for(var f in a.headers)d.setRequestHeader(f,a.headers[f]);var g=this.events,h=this;d.onreadystatechange=function(){d.readyState==OpenLayers.Request.XMLHttpRequest.DONE&&!1!==g.triggerEvent("complete",{request:d,config:a,requestUrl:e})&&h.runCallbacks({request:d,config:a, 389requestUrl:e})};!1===a.async?d.send(a.data):window.setTimeout(function(){0!==d.readyState&&d.send(a.data)},0);return d},runCallbacks:function(a){var b=a.request,c=a.config,d=c.scope?OpenLayers.Function.bind(c.callback,c.scope):c.callback,e;c.success&&(e=c.scope?OpenLayers.Function.bind(c.success,c.scope):c.success);var f;c.failure&&(f=c.scope?OpenLayers.Function.bind(c.failure,c.scope):c.failure);if("file:"==OpenLayers.Util.createUrlObject(c.url).protocol&&b.responseText)b.status=200;d(b);if(!b.status|| 390200<=b.status&&300>b.status)this.events.triggerEvent("success",a),e&&e(b);if(b.status&&(200>b.status||300<=b.status))this.events.triggerEvent("failure",a),f&&f(b)},GET:function(a){a=OpenLayers.Util.extend(a,{method:"GET"});return OpenLayers.Request.issue(a)},POST:function(a){a=OpenLayers.Util.extend(a,{method:"POST"});a.headers=a.headers?a.headers:{};"CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(a.headers)||(a.headers["Content-Type"]="application/xml");return OpenLayers.Request.issue(a)},PUT:function(a){a= 391OpenLayers.Util.extend(a,{method:"PUT"});a.headers=a.headers?a.headers:{};"CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(a.headers)||(a.headers["Content-Type"]="application/xml");return OpenLayers.Request.issue(a)},DELETE:function(a){a=OpenLayers.Util.extend(a,{method:"DELETE"});return OpenLayers.Request.issue(a)},HEAD:function(a){a=OpenLayers.Util.extend(a,{method:"HEAD"});return OpenLayers.Request.issue(a)},OPTIONS:function(a){a=OpenLayers.Util.extend(a,{method:"OPTIONS"});return OpenLayers.Request.issue(a)}}); 392(function(){function a(){this._object=f&&!i?new f:new window.ActiveXObject("Microsoft.XMLHTTP");this._listeners=[]}function b(){return new a}function c(a){b.onreadystatechange&&b.onreadystatechange.apply(a);a.dispatchEvent({type:"readystatechange",bubbles:!1,cancelable:!1,timeStamp:new Date+0})}function d(a){try{a.responseText=a._object.responseText}catch(b){}try{var c=a._object,d=c.responseXML,e=c.responseText;if(h&&e&&d&&!d.documentElement&&c.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/))d= 393new window.ActiveXObject("Microsoft.XMLDOM"),d.async=!1,d.validateOnParse=!1,d.loadXML(e);a.responseXML=d&&(h&&0!=d.parseError||!d.documentElement||d.documentElement&&"parsererror"==d.documentElement.tagName)?null:d}catch(f){}try{a.status=a._object.status}catch(g){}try{a.statusText=a._object.statusText}catch(i){}}function e(a){a._object.onreadystatechange=new window.Function}var f=window.XMLHttpRequest,g=!!window.controllers,h=window.document.all&&!window.opera,i=h&&window.navigator.userAgent.match(/MSIE 7.0/); 394b.prototype=a.prototype;if(g&&f.wrapped)b.wrapped=f.wrapped;b.UNSENT=0;b.OPENED=1;b.HEADERS_RECEIVED=2;b.LOADING=3;b.DONE=4;b.prototype.readyState=b.UNSENT;b.prototype.responseText="";b.prototype.responseXML=null;b.prototype.status=0;b.prototype.statusText="";b.prototype.priority="NORMAL";b.prototype.onreadystatechange=null;b.onreadystatechange=null;b.onopen=null;b.onsend=null;b.onabort=null;b.prototype.open=function(a,f,i,m,n){delete this._headers;3>arguments.length&&(i=!0);this._async=i;var o=this, 395q=this.readyState,r;h&&i&&(r=function(){q!=b.DONE&&(e(o),o.abort())},window.attachEvent("onunload",r));b.onopen&&b.onopen.apply(this,arguments);4<arguments.length?this._object.open(a,f,i,m,n):3<arguments.length?this._object.open(a,f,i,m):this._object.open(a,f,i);this.readyState=b.OPENED;c(this);this._object.onreadystatechange=function(){if(!g||i)o.readyState=o._object.readyState,d(o),o._aborted?o.readyState=b.UNSENT:(o.readyState==b.DONE&&(delete o._data,e(o),h&&i&&window.detachEvent("onunload",r)), 396q!=o.readyState&&c(o),q=o.readyState)}};b.prototype.send=function(a){b.onsend&&b.onsend.apply(this,arguments);arguments.length||(a=null);a&&a.nodeType&&(a=window.XMLSerializer?(new window.XMLSerializer).serializeToString(a):a.xml,this._headers["Content-Type"]||this._object.setRequestHeader("Content-Type","application/xml"));this._data=a;this._object.send(this._data);if(g&&!this._async){this.readyState=b.OPENED;for(d(this);this.readyState<b.DONE&&!(this.readyState++,c(this),this._aborted););}};b.prototype.abort= 397function(){b.onabort&&b.onabort.apply(this,arguments);if(this.readyState>b.UNSENT)this._aborted=!0;this._object.abort();e(this);this.readyState=b.UNSENT;delete this._data};b.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders()};b.prototype.getResponseHeader=function(a){return this._object.getResponseHeader(a)};b.prototype.setRequestHeader=function(a,b){if(!this._headers)this._headers={};this._headers[a]=b;return this._object.setRequestHeader(a,b)};b.prototype.addEventListener= 398function(a,b,c){for(var d=0,e;e=this._listeners[d];d++)if(e[0]==a&&e[1]==b&&e[2]==c)return;this._listeners.push([a,b,c])};b.prototype.removeEventListener=function(a,b,c){for(var d=0,e;(e=this._listeners[d])&&!(e[0]==a&&e[1]==b&&e[2]==c);d++);e&&this._listeners.splice(d,1)};b.prototype.dispatchEvent=function(a){a={type:a.type,target:this,currentTarget:this,eventPhase:2,bubbles:a.bubbles,cancelable:a.cancelable,timeStamp:a.timeStamp,stopPropagation:function(){},preventDefault:function(){},initEvent:function(){}}; 399"readystatechange"==a.type&&this.onreadystatechange&&(this.onreadystatechange.handleEvent||this.onreadystatechange).apply(this,[a]);for(var b=0,c;c=this._listeners[b];b++)c[0]==a.type&&!c[2]&&(c[1].handleEvent||c[1]).apply(this,[a])};b.prototype.toString=function(){return"[object XMLHttpRequest]"};b.toString=function(){return"[XMLHttpRequest]"};if(!window.Function.prototype.apply)window.Function.prototype.apply=function(a,b){b||(b=[]);a.__func=this;a.__func(b[0],b[1],b[2],b[3],b[4]);delete a.__func}; 400if(!OpenLayers.Request)OpenLayers.Request={};OpenLayers.Request.XMLHttpRequest=b})();
401OpenLayers.Protocol.HTTP=OpenLayers.Class(OpenLayers.Protocol,{url:null,headers:null,params:null,callback:null,scope:null,readWithPOST:!1,updateWithPOST:!1,deleteWithPOST:!1,wildcarded:!1,srsInBBOX:!1,initialize:function(a){a=a||{};this.params={};this.headers={};OpenLayers.Protocol.prototype.initialize.apply(this,arguments);if(!this.filterToParams&&OpenLayers.Format.QueryStringFilter){var b=new OpenLayers.Format.QueryStringFilter({wildcarded:this.wildcarded,srsInBBOX:this.srsInBBOX});this.filterToParams= 402function(a,d){return b.write(a,d)}}},destroy:function(){this.headers=this.params=null;OpenLayers.Protocol.prototype.destroy.apply(this)},read:function(a){OpenLayers.Protocol.prototype.read.apply(this,arguments);a=a||{};a.params=OpenLayers.Util.applyDefaults(a.params,this.options.params);a=OpenLayers.Util.applyDefaults(a,this.options);if(a.filter&&this.filterToParams)a.params=this.filterToParams(a.filter,a.params);var b=void 0!==a.readWithPOST?a.readWithPOST:this.readWithPOST,c=new OpenLayers.Protocol.Response({requestType:"read"}); 403b?(b=a.headers||{},b["Content-Type"]="application/x-www-form-urlencoded",c.priv=OpenLayers.Request.POST({url:a.url,callback:this.createCallback(this.handleRead,c,a),data:OpenLayers.Util.getParameterString(a.params),headers:b})):c.priv=OpenLayers.Request.GET({url:a.url,callback:this.createCallback(this.handleRead,c,a),params:a.params,headers:a.headers});return c},handleRead:function(a,b){this.handleResponse(a,b)},create:function(a,b){var b=OpenLayers.Util.applyDefaults(b,this.options),c=new OpenLayers.Protocol.Response({reqFeatures:a, 404requestType:"create"});c.priv=OpenLayers.Request.POST({url:b.url,callback:this.createCallback(this.handleCreate,c,b),headers:b.headers,data:this.format.write(a)});return c},handleCreate:function(a,b){this.handleResponse(a,b)},update:function(a,b){var b=b||{},c=b.url||a.url||this.options.url+"/"+a.fid,b=OpenLayers.Util.applyDefaults(b,this.options),d=new OpenLayers.Protocol.Response({reqFeatures:a,requestType:"update"});d.priv=OpenLayers.Request[this.updateWithPOST?"POST":"PUT"]({url:c,callback:this.createCallback(this.handleUpdate, 405d,b),headers:b.headers,data:this.format.write(a)});return d},handleUpdate:function(a,b){this.handleResponse(a,b)},"delete":function(a,b){var b=b||{},c=b.url||a.url||this.options.url+"/"+a.fid,b=OpenLayers.Util.applyDefaults(b,this.options),d=new OpenLayers.Protocol.Response({reqFeatures:a,requestType:"delete"}),e=this.deleteWithPOST?"POST":"DELETE",c={url:c,callback:this.createCallback(this.handleDelete,d,b),headers:b.headers};if(this.deleteWithPOST)c.data=this.format.write(a);d.priv=OpenLayers.Request[e](c); 406return d},handleDelete:function(a,b){this.handleResponse(a,b)},handleResponse:function(a,b){var c=a.priv;if(b.callback){if(200<=c.status&&300>c.status){if("delete"!=a.requestType)a.features=this.parseFeatures(c);a.code=OpenLayers.Protocol.Response.SUCCESS}else a.code=OpenLayers.Protocol.Response.FAILURE;b.callback.call(b.scope,a)}},parseFeatures:function(a){var b=a.responseXML;if(!b||!b.documentElement)b=a.responseText;return!b||0>=b.length?null:this.format.read(b)},commit:function(a,b){function c(a){for(var b= 407a.features?a.features.length:0,c=Array(b),e=0;e<b;++e)c[e]=a.features[e].fid;o.insertIds=c;d.apply(this,[a])}function d(a){this.callUserCallback(a,b);n=n&&a.success();f++;if(f>=m&&b.callback)o.code=n?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE,b.callback.apply(b.scope,[o])}var b=OpenLayers.Util.applyDefaults(b,this.options),e=[],f=0,g={};g[OpenLayers.State.INSERT]=[];g[OpenLayers.State.UPDATE]=[];g[OpenLayers.State.DELETE]=[];for(var h,i,j=[],k=0,l=a.length;k<l;++k)if(h= 408a[k],i=g[h.state])i.push(h),j.push(h);var m=(0<g[OpenLayers.State.INSERT].length?1:0)+g[OpenLayers.State.UPDATE].length+g[OpenLayers.State.DELETE].length,n=!0,o=new OpenLayers.Protocol.Response({reqFeatures:j});h=g[OpenLayers.State.INSERT];0<h.length&&e.push(this.create(h,OpenLayers.Util.applyDefaults({callback:c,scope:this},b.create)));h=g[OpenLayers.State.UPDATE];for(k=h.length-1;0<=k;--k)e.push(this.update(h[k],OpenLayers.Util.applyDefaults({callback:d,scope:this},b.update)));h=g[OpenLayers.State.DELETE]; 409for(k=h.length-1;0<=k;
409--k)e.push(this["delete"](h[k],OpenLayers.Util.applyDefaults({callback:d,scope:this},b["delete"])));return e},abort:function(a){a&&a.priv.abort()},callUserCallback:function(a,b){var c=b[a.requestType];c&&c.callback&&c.callback.call(c.scope,a)},CLASS_NAME:"OpenLayers.Protocol.HTTP"}); 410OpenLayers.Protocol.WFS=function(a){var a=OpenLayers.Util.applyDefaults(a,OpenLayers.Protocol.WFS.DEFAULTS),b=OpenLayers.Protocol.WFS["v"+a.version.replace(/\./g,"_")];if(!b)throw"Unsupported WFS version: "+a.version;return new b(a)}; 411OpenLayers.Protocol.WFS.fromWMSLayer=function(a,b){var c,d;c=a.params.LAYERS;c=(OpenLayers.Util.isArray(c)?c[0]:c).split(":");1<c.length&&(d=c[0]);c=c.pop();d={url:a.url,featureType:c,featurePrefix:d,srsName:a.projection&&a.projection.getCode()||a.map&&a.map.getProjectionObject().getCode(),version:"1.1.0"};return new OpenLayers.Protocol.WFS(OpenLayers.Util.applyDefaults(b,d))};OpenLayers.Protocol.WFS.DEFAULTS={version:"1.0.0"}; 412OpenLayers.Protocol.WFS.v1=OpenLayers.Class(OpenLayers.Protocol,{version:null,srsName:"EPSG:4326",featureType:null,featureNS:null,geometryName:"the_geom",schema:null,featurePrefix:"feature",formatOptions:null,readFormat:null,readOptions:null,initialize:function(a){OpenLayers.Protocol.prototype.initialize.apply(this,[a]);if(!a.format)this.format=OpenLayers.Format.WFST(OpenLayers.Util.extend({version:this.version,featureType:this.featureType,featureNS:this.featureNS,featurePrefix:this.featurePrefix, 413geometryName:this.geometryName,srsName:this.srsName,schema:this.schema},this.formatOptions));!a.geometryName&&1<parseFloat(this.format.version)&&this.setGeometryName(null)},destroy:function(){this.options&&!this.options.format&&this.format.destroy();this.format=null;OpenLayers.Protocol.prototype.destroy.apply(this)},read:function(a){OpenLayers.Protocol.prototype.read.apply(this,arguments);a=OpenLayers.Util.extend({},a);OpenLayers.Util.applyDefaults(a,this.options||{});var b=new OpenLayers.Protocol.Response({requestType:"read"}), 414c=OpenLayers.Format.XML.prototype.write.apply(this.format,[this.format.writeNode("wfs:GetFeature",a)]);b.priv=OpenLayers.Request.POST({url:a.url,callback:this.createCallback(this.handleRead,b,a),params:a.params,headers:a.headers,data:c});return b},setFeatureType:function(a){this.featureType=a;this.format.featureType=a},setGeometryName:function(a){this.geometryName=a;this.format.geometryName=a},handleRead:function(a,b){b=OpenLayers.Util.extend({},b);OpenLayers.Util.applyDefaults(b,this.options);if(b.callback){var c= 415a.priv;200<=c.status&&300>c.status?(c=this.parseResponse(c,b.readOptions))&&!1!==c.success?(b.readOptions&&"object"==b.readOptions.output?OpenLayers.Util.extend(a,c):a.features=c,a.code=OpenLayers.Protocol.Response.SUCCESS):(a.code=OpenLayers.Protocol.Response.FAILURE,a.error=c):a.code=OpenLayers.Protocol.Response.FAILURE;b.callback.call(b.scope,a)}},parseResponse:function(a,b){var c=a.responseXML;if(!c||!c.documentElement)c=a.responseText;if(!c||0>=c.length)return null;c=null!==this.readFormat?this.readFormat.read(c): 416this.format.read(c,b);if(!this.featureNS){var d=this.readFormat||this.format;this.featureNS=d.featureNS;d.autoConfig=!1;this.geometryName||this.setGeometryName(d.geometryName)}return c},commit:function(a,b){b=OpenLayers.Util.extend({},b);OpenLayers.Util.applyDefaults(b,this.options);var c=new OpenLayers.Protocol.Response({requestType:"commit",reqFeatures:a});c.priv=OpenLayers.Request.POST({url:b.url,headers:b.headers,data:this.format.write(a,b),callback:this.createCallback(this.handleCommit,c,b)}); 417return c},handleCommit:function(a,b){if(b.callback){var c=a.priv,d=c.responseXML;if(!d||!d.documentElement)d=c.responseText;c=this.format.read(d)||{};a.insertIds=c.insertIds||[];c.success?a.code=OpenLayers.Protocol.Response.SUCCESS:(a.code=OpenLayers.Protocol.Response.FAILURE,a.error=c);b.callback.call(b.scope,a)}},filterDelete:function(a,b){b=OpenLayers.Util.extend({},b);OpenLayers.Util.applyDefaults(b,this.options);new OpenLayers.Protocol.Response({requestType:"commit"});var c=this.format.createElementNSPlus("wfs:Transaction", 418{attributes:{service:"WFS",version:this.version}}),d=this.format.createElementNSPlus("wfs:Delete",{attributes:{typeName:(b.featureNS?this.featurePrefix+":":"")+b.featureType}});b.featureNS&&d.setAttribute("xmlns:"+this.featurePrefix,b.featureNS);var e=this.format.writeNode("ogc:Filter",a);d.appendChild(e);c.appendChild(d);c=OpenLayers.Format.XML.prototype.write.apply(this.format,[c]);return OpenLayers.Request.POST({url:this.url,callback:b.callback||function(){},data:c})},abort:function(a){a&&a.priv.abort()}, 419CLASS_NAME:"OpenLayers.Protocol.WFS.v1"});OpenLayers.Format.WFST=function(a){var a=OpenLayers.Util.applyDefaults(a,OpenLayers.Format.WFST.DEFAULTS),b=Ope
419nLayers.Format.WFST["v"+a.version.replace(/\./g,"_")];if(!b)throw"Unsupported WFST version: "+a.version;return new b(a)};OpenLayers.Format.WFST.DEFAULTS={version:"1.0.0"}; 420OpenLayers.Format.WFST.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance",wfs:"http://www.opengis.net/wfs",gml:"http://www.opengis.net/gml",ogc:"http://www.opengis.net/ogc",ows:"http://www.opengis.net/ows"},defaultPrefix:"wfs",version:null,schemaLocations:null,srsName:null,extractAttributes:!0,xy:!0,stateName:null,initialize:function(a){this.stateName={};this.stateName[OpenLayers.State.INSERT]="wfs:Insert";this.stateName[OpenLayers.State.UPDATE]= 421"wfs:Update";this.stateName[OpenLayers.State.DELETE]="wfs:Delete";OpenLayers.Format.XML.prototype.initialize.apply(this,[a])},getSrsName:function(a,b){var c=b&&b.srsName;c||(c=a&&a.layer?a.layer.projection.getCode():this.srsName);return c},read:function(a,b){b=b||{};OpenLayers.Util.applyDefaults(b,{output:"features"});"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var c={};a&&this.readNode(a,c,!0);if(c.features&&"features"===b.output)c= 422c.features;return c},readers:{wfs:{FeatureCollection:function(a,b){b.features=[];this.readChildNodes(a,b)}}},write:function(a,b){var c=this.writeNode("wfs:Transaction",{features:a,options:b}),d=this.schemaLocationAttr();d&&this.setAttributeNS(c,this.namespaces.xsi,"xsi:schemaLocation",d);return OpenLayers.Format.XML.prototype.write.apply(this,[c])},writers:{wfs:{GetFeature:function(a){var b=this.createElementNSPlus("wfs:GetFeature",{attributes:{service:"WFS",version:this.version,handle:a&&a.handle, 423outputFormat:a&&a.outputFormat,maxFeatures:a&&a.maxFeatures,"xsi:schemaLocation":this.schemaLocationAttr(a)}});if("string"==typeof this.featureType)this.writeNode("Query",a,b);else for(var c=0,d=this.featureType.length;c<d;c++)a.featureType=this.featureType[c],this.writeNode("Query",a,b);return b},Transaction:function(a){var a=a||{},b=a.options||{},c=this.createElementNSPlus("wfs:Transaction",{attributes:{service:"WFS",version:this.version,handle:b.handle}}),d,e=a.features;if(e){!0===b.multi&&OpenLayers.Util.extend(this.geometryTypes, 424{"OpenLayers.Geometry.Point":"MultiPoint","OpenLayers.Geometry.LineString":!0===this.multiCurve?"MultiCurve":"MultiLineString","OpenLayers.Geometry.Polygon":!0===this.multiSurface?"MultiSurface":"MultiPolygon"});var f,g;for(a=0,d=e.length;a<d;++a)g=e[a],(f=this.stateName[g.state])&&this.writeNode(f,{feature:g,options:b},c);!0===b.multi&&this.setGeometryTypes()}if(b.nativeElements)for(a=0,d=b.nativeElements.length;a<d;++a)this.writeNode("wfs:Native",b.nativeElements[a],c);return c},Native:function(a){return this.createElementNSPlus("wfs:Native", 425{attributes:{vendorId:a.vendorId,safeToIgnore:a.safeToIgnore},value:a.value})},Insert:function(a){var b=a.feature,a=a.options,a=this.createElementNSPlus("wfs:Insert",{attributes:{handle:a&&a.handle}});this.srsName=this.getSrsName(b);this.writeNode("feature:_typeName",b,a);return a},Update:function(a){var b=a.feature,a=a.options,a=this.createElementNSPlus("wfs:Update",{attributes:{handle:a&&a.handle,typeName:(this.featureNS?this.featurePrefix+":":"")+this.featureType}});this.featureNS&&a.setAttribute("xmlns:"+ 426this.featurePrefix,this.featureNS);var c=b.modified;if(null!==this.geometryName&&(!c||void 0!==c.geometry))this.srsName=this.getSrsName(b),this.writeNode("Property",{name:this.geometryName,value:b.geometry},a);for(var d in b.attributes)void 0!==b.attributes[d]&&(!c||!c.attributes||c.attributes&&void 0!==c.attributes[d])&&this.writeNode("Property",{name:d,value:b.attributes[d]},a);this.writeNode("ogc:Filter",new OpenLayers.Filter.FeatureId({fids:[b.fid]}),a);return a},Property:function(a){var b=this.createElementNSPlus("wfs:Property"); 427this.writeNode("Name",a.name,b);null!==a.value&&this.writeNode("Value",a.value,b);return b},Name:function(a){return this.createElementNSPlus("wfs:Name",{value:a})},Value:function(a){var b;a instanceof OpenLayers.Geometry?(b=this.createElementNSPlus("wfs:Value"),a=this.writeNode("feature:_geometry",a).firstChild,b.appendChild(a)):b=this.createElementNSPlus("wfs:Value",{value:a});return b},Delete:function(a){var b=a.feature,a=a.options,a=this.createElementNSPlus("wfs:Delete",{attributes:{handle:a&& 428a.handle,typeName:(this.featureNS?this.featurePrefix+":":"")+this.featureType}});this.featureNS&&a.setAttribute("xmlns:"+this.featurePrefix,this.featureNS);this.writeNode("ogc:Filter",new OpenLayers.Filter.FeatureId({fids:[b.fid]}),a);return a}}},schemaLocationAttr:function(a){var a=OpenLayers.Util.extend({featurePrefix:this.featurePrefix,schema:this.schema},a),b=OpenLayers.Util.extend({},this.schemaLocations);if(a.schema)b[a.featurePrefix]=a.schema;var a=[],c,d;for(d in b)(c=this.namespaces[d])&& 429a.push(c+" "+b[d]);return a.join(" ")||void 0}
429,setFilterProperty:function(a){if(a.filters)for(var b=0,c=a.filters.length;b<c;++b)OpenLayers.Format.WFST.v1.prototype.setFilterProperty.call(this,a.filters[b]);else if(a instanceof OpenLayers.Filter.Spatial&&!a.property)a.property=this.geometryName},CLASS_NAME:"OpenLayers.Format.WFST.v1"}); 430OpenLayers.Format.Filter.v1_1_0=OpenLayers.Class(OpenLayers.Format.GML.v3,OpenLayers.Format.Filter.v1,{VERSION:"1.1.0",schemaLocation:"http://www.opengis.net/ogc/filter/1.1.0/filter.xsd",initialize:function(a){OpenLayers.Format.GML.v3.prototype.initialize.apply(this,[a])},readers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a,b){var c=a.getAttribute("matchCase"),c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,matchCase:!("false"===c||"0"===c)});this.readChildNodes(a, 431c);b.filters.push(c)},PropertyIsNotEqualTo:function(a,b){var c=a.getAttribute("matchCase"),c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.NOT_EQUAL_TO,matchCase:!("false"===c||"0"===c)});this.readChildNodes(a,c);b.filters.push(c)},PropertyIsLike:function(a,b){var c=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LIKE});this.readChildNodes(a,c);var d=a.getAttribute("wildCard"),e=a.getAttribute("singleChar"),f=a.getAttribute("escapeChar");c.value2regex(d,e, 432f);b.filters.push(c)}},OpenLayers.Format.Filter.v1.prototype.readers.ogc),gml:OpenLayers.Format.GML.v3.prototype.readers.gml,feature:OpenLayers.Format.GML.v3.prototype.readers.feature},writers:{ogc:OpenLayers.Util.applyDefaults({PropertyIsEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsEqualTo",{attributes:{matchCase:a.matchCase}});this.writeNode("PropertyName",a,b);this.writeOgcExpression(a.value,b);return b},PropertyIsNotEqualTo:function(a){var b=this.createElementNSPlus("ogc:PropertyIsNotEqualTo", 433{attributes:{matchCase:a.matchCase}});this.writeNode("PropertyName",a,b);this.writeOgcExpression(a.value,b);return b},PropertyIsLike:function(a){var b=this.createElementNSPlus("ogc:PropertyIsLike",{attributes:{matchCase:a.matchCase,wildCard:"*",singleChar:".",escapeChar:"!"}});this.writeNode("PropertyName",a,b);this.writeNode("Literal",a.regex2value(),b);return b},BBOX:function(a){var b=this.createElementNSPlus("ogc:BBOX");a.property&&this.writeNode("PropertyName",a,b);var c=this.writeNode("gml:Envelope", 434a.value);a.projection&&c.setAttribute("srsName",a.projection);b.appendChild(c);return b},SortBy:function(a){for(var b=this.createElementNSPlus("ogc:SortBy"),c=0,d=a.length;c<d;c++)this.writeNode("ogc:SortProperty",a[c],b);return b},SortProperty:function(a){var b=this.createElementNSPlus("ogc:SortProperty");this.writeNode("ogc:PropertyName",a,b);this.writeNode("ogc:SortOrder","DESC"==a.order?"DESC":"ASC",b);return b},SortOrder:function(a){return this.createElementNSPlus("ogc:SortOrder",{value:a})}}, 435OpenLayers.Format.Filter.v1.prototype.writers.ogc),gml:OpenLayers.Format.GML.v3.prototype.writers.gml,feature:OpenLayers.Format.GML.v3.prototype.writers.feature},writeSpatial:function(a,b){var c=this.createElementNSPlus("ogc:"+b);this.writeNode("PropertyName",a,c);if(a.value instanceof OpenLayers.Filter.Function)this.writeNode("Function",a.value,c);else{var d;d=a.value instanceof OpenLayers.Geometry?this.writeNode("feature:_geometry",a.value).firstChild:this.writeNode("gml:Envelope",a.value);a.projection&& 436d.setAttribute("srsName",a.projection);c.appendChild(d)}return c},CLASS_NAME:"OpenLayers.Format.Filter.v1_1_0"});OpenLayers.Format.OWSCommon=OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC,{defaultVersion:"1.0.0",getVersion:function(a){var b=this.version;if(!b&&((a=a.getAttribute("xmlns:ows"))&&"1.1"===a.substring(a.lastIndexOf("/")+1)&&(b="1.1.0"),!b))b=this.defaultVersion;return b},CLASS_NAME:"OpenLayers.Format.OWSCommon"}); 437OpenLayers.Format.OWSCommon.v1=OpenLayers.Class(OpenLayers.Format.XML,{regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g},read:function(a,b){OpenLayers.Util.applyDefaults(b,this.options);var c={};this.readChildNodes(a,c);return c},readers:{ows:{Exception:function(a,b){var c={code:a.getAttribute("exceptionCode"),locator:a.getAttribute("locator"),texts:[]};b.exceptions.push(c);this.readChildNodes(a,c)},ExceptionText:function(a,b){var c=this.getChildValue(a);b.texts.push(c)}, 438ServiceIdentification:function(a,b){b.serviceIdentification={};this.readChildNodes(a,b.serviceIdentification)},Title:function(a,b){b.title=this.getChildValue(a)},Abstract:function(a,b){b["abstract"]=this.getChildValue(a)},Keywords:function(a,b){b.keywords={};this.readChildNodes(a,b.keywords)},Keyword:function(a,b){b[this.getChildValue(a)]=!0},ServiceType:function(a,b){b.serviceType={codeSpace:a.getAttribute("codeSpace"),value:this.getChildValue(a)}},ServiceTypeVersion:function(a,b){b.serviceTypeVersion= 439this.getChildValue(a)},Fees:function(a,b){b.fees=this.getChildValue(a)},AccessConstraints:function(a,b){b.accessConstraints=this.getChildValue(a)},ServiceProvider:function(a,b){b.serviceProvider={};this.readChildNodes(a,b.serviceProvider)},ProviderName:function(a,b){b.providerName=this.getChildValue(a)},ProviderSite:function(a,b){b.providerSite=this.getAttributeNS(a,this.namespaces.xlink,"href")},ServiceContact:function(a,b){b.serviceContact={};this.readChildNodes(a,b.serviceContact)},IndividualName:function(a, 440b){b.individualName=this.getChildValue(a)},PositionName:function(a,b){b.positionName=this.getChildValue(a)},ContactInfo:function(a,b){b.contactInfo={};this.readChildNodes(a,b.contactInfo)},Phone:function(a,b){b.phone={};this.readChildNodes(a,b.phone)},Voice:function(a,b){b.voice=this.getChildValue(a)},Address:function(a,b){b.address={};this.readChildNodes(a,b.address)},DeliveryPoint:function(a,b){b.deliveryPoint=this.getChildValue(a)},City:function(a,b){b.city=this.getChildValue(a)},AdministrativeArea:function(a, 441b){b.administrativeArea=this.getChildValue(a)},PostalCode:function(a,b){b.postalCode=this.getChildValue(a)},Country:function(a,b){b.country=this.getChildValue(a)},ElectronicMailAddress:function(a,b){b.electronicMailAddress=this.getChildValue(a)},Role:function(a,b){b.role=this.getChildValue(a)},OperationsMetadata:function(a,b){b.operationsMetadata={};this.readChildNodes(a,b.operationsMetadata)},Operation:function(a,b){var c=a.getAttribute("name");b[c]={};this.readChildNodes(a,b[c])},DCP:function(a, 442b){b.dcp={};this.readChildNodes(a,b.dcp)},HTTP:function(a,b){b.http={};this.readChildNodes(a,b.http)},Get:function(a,b){if(!b.get)b.get=[];var c={url:this.getAttributeNS(a,this.namespaces.xlink,"href")};this.readChildNodes(a,c);b.get.push(c)},Post:function(a,b){if(!b.post)b.post=[];var c={url:this.getAttributeNS(a,this.namespaces.xlink,"href")};this.readChildNodes(a,c);b.post.push(c)},Parameter:function(a,b){if(!b.parameters)b.parameters={};var c=a.getAttribute("name");b.parameters[c]={};this.readChildNodes(a, 443b.parameters[c])},Constraint:function(a,b){if(!b.constraints)b.constraints={};var c=a.getAttribute("name");b.constraints[c]={};this.readChildNodes(a,b.constraints[c])},Value:function(a,b){b[this.getChildValue(a)]=!0},OutputFormat:function(a,b){b.formats.push({value:this.getChildValue(a)});this.readChildNodes(a,b)},WGS84BoundingBox:function(a,b){var c={};c.crs=a.getAttribute("crs");b.BoundingBox?b.BoundingBox.push(c):(b.projection=c.crs,c=b);this.readChildNodes(a,c)},BoundingBox:function(a,b){this.readers.ows.WGS84BoundingBox.apply(this, 444[a,b])},LowerCorner:function(a,b){var c=this.getChildValue(a).replace(this.regExes.trimSpace,""),c=c.replace(this.regExes.trimComma,","),c=c.split(this.regExes.splitSpace);b.left=c[0];b.bottom=c[1]},UpperCorner:function(a,b){var c=this.getChildValue(a).replace(this.regExes.trimSpace,""),c=c.replace(this.regExes.trimComma,","),c=c.split(this.regExes.splitSpace);b.right=c[0];b.top=c[1];b.bounds=new OpenLayers.Bounds(b.left,b.bottom,b.right,b.top);delete b.left;delete b.bottom;delete b.right;delete b.top}, 445Language:function(a,b){b.language=this.getChildValue(a)}}},writers:{ows:{BoundingBox:function(a,b){var c=this.createElementNSPlus(b||"ows:BoundingBox",{attributes:{crs:a.projection}});this.writeNode("ows:LowerCorner",a,c);this.writeNode("ows:UpperCorner",a,c);return c},LowerCorner:function(a){return this.createElementNSPlus("ows:LowerCorner",{value:a.bounds.left+" "+a.bounds.bottom})},UpperCorner:function(a){return this.createElementNSPlus("ows:UpperCorner",{value:a.bounds.right+" "+a.bounds.top})}, 446Identifier:function(a){return this.createElementNSPlus("ows:Identifier",{value:a})},Title:function(a){return this.createElementNSPlus("ows:Title",{value:a})},Abstract:function(a){return this.createElementNSPlus("ows:Abstract",{value:a})},OutputFormat:function(a){return this.createElementNSPlus("ows:OutputFormat",{value:a})}}},CLASS_NAME:"OpenLayers.Format.OWSCommon.v1"}); 447OpenLayers.Format.OWSCommon.v1_0_0=OpenLayers.Class(OpenLayers.Format.OWSCommon.v1,{namespaces:{ows:"http://www.opengis.net/ows",xlink:"http://www.w3.org/1999/xlink"},readers:{ows:OpenLayers.Util.applyDefaults({ExceptionReport:function(a,b){b.success=!1;b.exceptionReport={version:a.getAttribute("version"),language:a.getAttribute("language"),exceptions:[]};this.readChildNodes(a,b.exceptionReport)}},OpenLayers.Format.OWSCommon.v1.prototype.readers.ows)},writers:{ows:OpenLayers.Format.OWSCommon.v1.prototype.writers.ows}, 448CLASS_NAME:"OpenLayers.Format.OWSCommon.v1_0_0"}); 449OpenLayers.Format.WFST.v1_1_0=OpenLayers.Class(OpenLayers.Format.Filter.v1_1_0,OpenLayers.Format.WFST.v1,{version:"1.1.0",schemaLocations:{wfs:"http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"},initialize:function(a){OpenLayers.Format.Filter.v1_1_0.prototype.initialize.apply(this,[a]);OpenLayers.Format.WFST.v1.prototype.initialize.apply(this,[a])},readNode:function(a,b,c){return OpenLayers.Format.GML.v3.prototype.readNode.apply(this,arguments)},readers:{wfs:OpenLayers.Util.applyDefaults({FeatureCollection:function(a,b){b.numberOfFeatures= 450parseInt(a.getAttribute("numberOfFeatures"));OpenLayers.Format.WFST.v1.prototype.readers.wfs.FeatureCollection.apply(this,arguments)},TransactionResponse:function(a,b){b.insertIds=[];b.success=!1;this.readChildNodes(a,b)},TransactionSummary:function(a,b){b.success=!0},InsertResults:function(a,b){this.readChildNodes(a,b)},Feature:function(a,b){var c={fids:[]};this.readChildNodes(a,c);b.insertIds.push(c.fids[0])}},OpenLayers.Format.WFST.v1.prototype.readers.wfs),gml:OpenLayers.Format.GML.v3.prototype.readers.gml, 451feature:OpenLayers.Format.GML.v3.prototype.readers.feature,ogc:OpenLayers.Format.Filter.v1_1_0.prototype.readers.ogc,ows:OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows},writers:{wfs:OpenLayers.Util.applyDefaults({GetFeature:function(a){var b=Ope
451nLayers.Format.WFST.v1.prototype.writers.wfs.GetFeature.apply(this,arguments);a&&this.setAttributes(b,{resultType:a.resultType,startIndex:a.startIndex,count:a.count});return b},Query:function(a){var a=OpenLayers.Util.extend({featureNS:this.featureNS, 452featurePrefix:this.featurePrefix,featureType:this.featureType,srsName:this.srsName},a),b=a.featurePrefix,c=this.createElementNSPlus("wfs:Query",{attributes:{typeName:(b?b+":":"")+a.featureType,srsName:a.srsName}});a.featureNS&&c.setAttribute("xmlns:"+b,a.featureNS);if(a.propertyNames)for(var b=0,d=a.propertyNames.length;b<d;b++)this.writeNode("wfs:PropertyName",{property:a.propertyNames[b]},c);a.filter&&(OpenLayers.Format.WFST.v1_1_0.prototype.setFilterProperty.call(this,a.filter),this.writeNode("ogc:Filter", 453a.filter,c));return c},PropertyName:function(a){return this.createElementNSPlus("wfs:PropertyName",{value:a.property})}},OpenLayers.Format.WFST.v1.prototype.writers.wfs),gml:OpenLayers.Format.GML.v3.prototype.writers.gml,feature:OpenLayers.Format.GML.v3.prototype.writers.feature,ogc:OpenLayers.Format.Filter.v1_1_0.prototype.writers.ogc},CLASS_NAME:"OpenLayers.Format.WFST.v1_1_0"}); 454OpenLayers.Protocol.WFS.v1_1_0=OpenLayers.Class(OpenLayers.Protocol.WFS.v1,{version:"1.1.0",initialize:function(a){OpenLayers.Protocol.WFS.v1.prototype.initialize.apply(this,arguments);if(this.outputFormat&&!this.readFormat)if("gml2"==this.outputFormat.toLowerCase())this.readFormat=new OpenLayers.Format.GML.v2({featureType:this.featureType,featureNS:this.featureNS,geometryName:this.geometryName});else if("json"==this.outputFormat.toLowerCase())this.readFormat=new OpenLayers.Format.GeoJSON},CLASS_NAME:"OpenLayers.Protocol.WFS.v1_1_0"}); 455Ext.namespace("GeoExt.data");GeoExt.data.LayerRecord=Ext.data.Record.create([{name:"layer"},{name:"title",type:"string",mapping:"name"}]);GeoExt.data.LayerRecord.prototype.getLayer=function(){return this.get("layer")};GeoExt.data.LayerRecord.prototype.setLayer=function(a){if(a!==this.data.layer){this.dirty=!0;if(!this.modified)this.modified={};if(void 0===this.modified.layer)this.modified.layer=this.data.layer;this.data.layer=a;this.editing||this.afterEdit()}}; 456GeoExt.data.LayerRecord.prototype.clone=function(a){var b=this.getLayer()&&this.getLayer().clone();return new this.constructor(Ext.applyIf({layer:b},this.data),a||b.id)}; 457GeoExt.data.LayerRecord.create=function(a){var b=Ext.extend(GeoExt.data.LayerRecord,{}),c=b.prototype;c.fields=new Ext.util.MixedCollection(!1,function(a){return a.name});GeoExt.data.LayerRecord.prototype.fields.each(function(a){c.fields.add(a)});if(a)for(var d=0,e=a.length;d<e;d++)c.fields.add(new Ext.data.Field(a[d]));b.getField=function(a){return c.fields.get(a)};return b};Ext.namespace("GeoExt.data"); 458GeoExt.data.AttributeStoreMixin=function(){return{constructor:function(a){a=a||{};arguments.callee.superclass.constructor.call(this,Ext.apply(a,{proxy:a.proxy||(!a.data?new Ext.data.HttpProxy({url:a.url,disableCaching:!1,method:"GET"}):void 0),reader:new GeoExt.data.AttributeReader(a,a.fields||["name","type","restriction",{name:"nillable",type:"boolean"}])}));this.feature&&this.bind()},bind:function(){this.on({update:this.onUpdate,load:this.onLoad,add:this.onAdd,scope:this});var a=[];this.each(function(b){a.push(b)}); 459this.updateFeature(a)},onUpdate:function(a,b){this.updateFeature([b])},onLoad:function(a,b,c){(!c||!0!==c.add)&&this.updateFeature(b)},onAdd:function(a,b){this.updateFeature(b)},updateFeature:function(a){var b=this.feature,c=b.layer,d,e,f,g,h;for(d=0,e=a.length;d<e;d++)f=a[d],g=f.get("name"),f=f.get("value"),g=b.attributes[g],g!==f&&(h=!0);if(h&&c&&c.events&&!1!==c.events.triggerEvent("beforefeaturemodified",{feature:b})){for(d=0,e=a.length;d<e;d++)f=a[d],g=f.get("name"),f=f.get("value"),b.attributes[g]= 460f;c.events.triggerEvent("featuremodified",{feature:b});c.drawFeature(b)}}}};GeoExt.data.AttributeStore=Ext.extend(Ext.data.Store,GeoExt.data.AttributeStoreMixin());Ext.namespace("GeoExt.data");GeoExt.data.AttributeReader=function(a,b){a=a||{};if(!a.format)a.format=new OpenLayers.Format.WFSDescribeFeatureType;GeoExt.data.AttributeReader.superclass.constructor.call(this,a,b||a.fields);a.feature&&this.recordType.prototype.fields.add(new Ext.data.Field("value"))}; 461Ext.extend(GeoExt.data.AttributeReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML;if(!b||!b.documentElement)b=a.responseText;return this.readRecords(b)},readRecords:function(a){for(var a=a instanceof Array?a:this.meta.format.read(a).featureTypes[0].properties,b=this.meta.feature,c=this.recordType,d=c.prototype.fields,e=d.length,f,g,h,i,j,k=[],l=0,m=a.length;l<m;++l){i=!1;f=a[l];g={};for(var n=0;n<e;++n){j=d.items[n];h=j.name;j=j.convert(f[h]);if(this.ignoreAttribute(h,j)){i=!0;break}g[h]= 462j}if(b)j=b.attributes[g.name],void 0!==j&&(this.ignoreAttribute("value",j)?i=!0:g.value=j);i||(k[k.length]=new c(g))}return{success:!0,records:k,totalRecords:k.length}},ignoreAttribute:function(a,b){var c=!1;if(this.meta.ignore&&this.meta.ignore[a]){var d=this.meta.ignore[a];"string"==typeof d?c=d===b:d instanceof Array?c=-1<d.indexOf(b):d instanceof RegExp&&(c=d.test(b))}return c}});Ext.namespace("GeoExt","GeoExt.data"); 463GeoExt.data.ProtocolProxy=function(a){Ext.apply(this,a);GeoExt.data.ProtocolProxy.superclass.constructor.apply(this,arguments)}; 464Ext.extend(GeoExt.data.ProtocolProxy,Ext.data.DataProxy,{protocol:null,abortPrevious:!0,setParamsAsOptions:!1,response:null,load:function(a,b,c,d,e){!1!==this.fireEvent("beforeload",this,a)?(b=OpenLayers.Function.bind(this.loadResponse,this,{params:a||{},request:{callback:c,scope:d,arg:e},reader:b}
464),this.abortPrevious&&this.abortRequest(),a={params:a,callback:b,scope:this},Ext.applyIf(a,e),!0===this.setParamsAsOptions&&(Ext.applyIf(a,a.params),delete a.params),this.response=this.protocol.read(a)): 465c.call(d||this,null,e,!1)},abortRequest:function(){if(this.response)this.protocol.abort(this.response),this.response=null},loadResponse:function(a,b){if(b.success()){var c=a.reader.read(b);this.fireEvent("load",this,a,a.request.arg);a.request.callback.call(a.request.scope,c,a.request.arg,!0)}else this.fireEvent("loadexception",this,a,b),a.request.callback.call(a.request.scope,null,a.request.arg,!1)}});Ext.namespace("GeoExt.data"); 466GeoExt.data.FeatureStoreMixin=function(){return{layer:null,reader:null,featureFilter:null,constructor:function(a){a=a||{};a.reader=a.reader||new GeoExt.data.FeatureReader({},a.fields);var b=a.layer;delete a.layer;if(a.features)a.data=a.features;delete a.features;var c={initDir:a.initDir};delete a.initDir;arguments.callee.superclass.constructor.call(this,a);b&&this.bind(b,c)},bind:function(a,b){if(!this.layer){this.layer=a;var b=b||{},c=b.initDir;void 0==b.initDir&&(c=GeoExt.data.FeatureStore.LAYER_TO_STORE| 467GeoExt.data.FeatureStore.STORE_TO_LAYER);var d=a.features.slice(0);if(c&GeoExt.data.FeatureStore.STORE_TO_LAYER)for(var e=this.getRange(),f=e.length-1;0<=f;f--)this.layer.addFeatures([e[f].getFeature()]);c&GeoExt.data.FeatureStore.LAYER_TO_STORE&&this.loadData(d,!0);a.events.on({featuresadded:this.onFeaturesAdded,featuresremoved:this.onFeaturesRemoved,featuremodified:this.onFeatureModified,scope:this});this.on({load:this.onLoad,clear:this.onClear,add:this.onAdd,remove:this.onRemove,update:this.onUpdate, 468scope:this})}},unbind:function(){if(this.layer)this.layer.events.un({featuresadded:this.onFeaturesAdded,featuresremoved:this.onFeaturesRemoved,featuremodified:this.onFeatureModified,scope:this}),this.un("load",this.onLoad,this),this.un("clear",this.onClear,this),this.un("add",this.onAdd,this),this.un("remove",this.onRemove,this),this.un("update",this.onUpdate,this),this.layer=null},getRecordFromFeature:function(a){return this.getByFeature(a)||null},getByFeature:function(a){var b;if(a.state!==OpenLayers.State.INSERT)b= 469this.getById(a.id);else{var c=this.findBy(function(b){return b.getFeature()===a});-1<c&&(b=this.getAt(c))}return b},onFeaturesAdded:function(a){if(!this._adding){var b=a=a.features;if(this.featureFilter){var b=[],c,d,e;c=0;for(d=a.length;c<d;c++)e=a[c],!1!==this.featureFilter.evaluate(e)&&b.push(e)}this._adding=!0;this.loadData(b,!0);delete this._adding}},onFeaturesRemoved:function(a){if(!this._removing){var a=a.features,b,c;for(c=a.length-1;0<=c;c--)if(b=a[c],b=this.getByFeature(b),void 0!==b)this._removing= 470!0,this.remove(b),delete this._removing}},onFeatureModified:function(a){if(!this._updating){var a=a.feature,b=this.getByFeature(a);if(void 0!==b){b.beginEdit();var c=a.attributes;if(c)for(var d=this.recordType.prototype.fields,e=0,f=d.length;e<f;e++){var g=d.items[e],h=g.mapping||g.name;h in c&&b.set(g.name,g.convert(c[h]))}b.set("state",a.state);b.set("fid",a.fid);b.setFeature(a);this._updating=!0;b.endEdit();delete this._updating}}},addFeaturesToLayer:function(a){var b,c,d;d=Array(c=a.length);for(b= 4710;b<c;b++)d[b]=a[b].getFeature();if(0<d.length)this._adding=!0,this.layer.addFeatures(d),delete this._adding},onLoad:function(a,b,c){if(!c||!0!==c.add)this._removing=!0,this.layer.removeFeatures(this.layer.features),delete this._removing,this.addFeaturesToLayer(b)},onClear:function(){this._removing=!0;this.layer.removeFeatures(this.layer.features);delete this._removing},onAdd:function(a,b){this._adding||this.addFeaturesToLayer(b)},onRemove:function(a,b){if(!this._removing&&null!=this.layer.getFeatureById(b.getFeature().id))this._removing= 472!0,this.layer.removeFeatures([b.getFeature()]),delete this._removing},onUpdate:function(a,b){if(!this._updating){var c=(new GeoExt.data.FeatureRecord).fields,d=b.getFeature();if(d.state!==OpenLayers.State.INSERT)d.state=OpenLayers.State.UPDATE;if(b.fields&&!1!==this.layer.events.triggerEvent("beforefeaturemodified",{feature:d})){var e=d.attributes;b.fields.each(function(a){var d=a.mapping||a.name;c.containsKey(d)||(e[d]=b.get(a.name))});this._updating=!0;this.layer.events.triggerEvent("featuremodified", 473{feature:d});delete this._updating;null!=this.layer.getFeatureById(d.id)&&this.layer.drawFeature(d)}}},destroy:function(){this.unbind();GeoExt.data.FeatureStore.superclass.destroy.call(this)}}};
473GeoExt.data.FeatureStore=Ext.extend(Ext.data.Store,new GeoExt.data.FeatureStoreMixin);GeoExt.data.FeatureStore.LAYER_TO_STORE=1;GeoExt.data.FeatureStore.STORE_TO_LAYER=2;Ext.namespace("GeoExt","GeoExt.data"); 474GeoExt.data.FeatureReader=function(a,b){a=a||{};b instanceof Function||(b=GeoExt.data.FeatureRecord.create(b||a.fields||{}));GeoExt.data.FeatureReader.superclass.constructor.call(this,a,b)}; 475Ext.extend(GeoExt.data.FeatureReader,Ext.data.DataReader,{totalRecords:null,read:function(a){return this.readRecords(a.features)},readRecords:function(a){var b=[];if(a){var c=this.recordType,d=c.prototype.fields,e,f,g,h,i,j,k,l;for(e=0,f=a.length;e<f;e++){i=a[e];j={};if(i.attributes)for(g=0,h=d.length;g<h;g++){k=d.items[g];if(/[\[\.]/.test(k.mapping))try{l=(new Function("obj","return obj."+k.mapping))(i.attributes)}catch(m){l=k.defaultValue}else l=i.attributes[k.mapping||k.name]||k.defaultValue;k.convert&& 476(l=k.convert(l,i));j[k.name]=l}j.feature=i;j.state=i.state;j.fid=i.fid;b[b.length]=new c(j,i.state===OpenLayers.State.INSERT?void 0:i.id)}}return{records:b,totalRecords:null!=this.totalRecords?this.totalRecords:b.length}}});Ext.namespace("GeoExt.data");GeoExt.data.FeatureRecord=Ext.data.Record.create([{name:"feature"},{name:"state"},{name:"fid"}]);GeoExt.data.FeatureRecord.prototype.getFeature=function(){return this.get("feature")}; 477GeoExt.data.FeatureRecord.prototype.setFeature=function(a){if(a!==this.data.feature){this.dirty=!0;if(!this.modified)this.modified={};if(void 0===this.modified.feature)this.modified.feature=this.data.feature;this.data.feature=a;this.editing||this.afterEdit()}}; 478GeoExt.data.FeatureRecord.create=function(a){var b=Ext.extend(GeoExt.data.FeatureRecord,{}),c=b.prototype;c.fields=new Ext.util.MixedCollection(!1,function(a){return a.name});GeoExt.data.FeatureRecord.prototype.fields.each(function(a){c.fields.add(a)});if(a)for(var d=0,e=a.length;d<e;d++)c.fields.add(new Ext.data.Field(a[d]));b.getField=function(a){return c.fields.get(a)};return b};Ext.namespace("GeoExt.plugins"); 479GeoExt.plugins.PrintPageField=Ext.extend(Ext.util.Observable,{printPage:null,target:null,constructor:function(a){this.initialConfig=a;Ext.apply(this,a);GeoExt.plugins.PrintPageField.superclass.constructor.apply(this,arguments)},init:function(a){this.target=a;var b={beforedestroy:this.onBeforeDestroy,scope:this};b[a instanceof Ext.form.ComboBox?"select":a instanceof Ext.form.Checkbox?"check":"valid"]=this.onFieldChange;a.on(b);this.printPage.on({change:this.onPageChange,scope:this});this.printPage.printProvider.on({layoutchange:this.onLayoutChange, 480scope:this});this.setValue(this.printPage)},onFieldChange:function(a,b){var c=this.printPage.printProvider,d=a.getValue();this._updating=!0;a.store===c.scales||"scale"===a.name?this.printPage.setScale(b):"rotation"==a.name?!isNaN(d)&&this.printPage.setRotation(d):this.printPage.customParams[a.name]=d;delete this._updating},onPageChange:function(a){this._updating||this.setValue(a)},onLayoutChange:function(a,b){var c=this.target;"rotation"==c.name&&c.setDisabled(!b.get("rotation"))},setValue:function(a){var b= 481this.target;b.suspendEvents();b.store===a.printProvider.scales||"scale"===b.name?a.scale&&b.setValue(a.scale.get(b.displayField)):"rotation"==b.name&&b.setValue(a.rotation);b.resumeEvents()},onBeforeDestroy:function(){this.target.un("beforedestroy",this.onBeforeDestroy,this);this.target.un("select",this.onFieldChange,this);this.target.un("valid",this.onFieldChange,this);this.printPage.un("change",this.onPageChange,this);this.printPage.printProvider.un("layoutchange",this.onLayoutChange,this)}}); 482Ext.preg("gx_printpagefield",GeoExt.plugins.PrintPageField);Ext.namespace("GeoExt.plugins"); 483GeoExt.plugins.PrintProviderField=Ext.extend(Ext.util.Observable,{target:null,constructor:function(a){this.initialConfig=a;Ext.apply(this,a);GeoExt.plugins.PrintProviderField.superclass.constructor.apply(this,arguments)},init:function(a){this.target=a;var b={scope:this,render:this.onRender,beforedestroy:this.onBeforeDestroy};b[a instanceof Ext.form.ComboBox?"select":"valid"]=this.onFieldChange;a.on(b)},onRender:function(a){var b=this.printProvider||a.ownerCt.printProvider;a.store===b.layouts?(a.setValue(b.layout.get(a.displayField)), 484b.on({layoutchange:this.onProviderChange,scope:this})):a.store===b.dpis?(a.setValue(b.dpi.get(a.displayField)),b.on({dpichange:this.onProviderChange,scope:this})):void 0===a.initialConfig.value&&a.setValue(b.customParams[a.name])},onFieldChange:function(a,b){var c=this.printProvider||a.ownerCt.printProvider,d=a.getValue();this._updating=!0;if(b)switch(a.store){case c.layouts:c.setLayout(b);break;case c.dpis:c.setDpi(b)}else c.customParams[a.name]=d;delete this._updating},onProviderChange:function(a, 485b){this._updating||this.target.setValue(b.get(this.target.displayField))},onBeforeDestroy:function(){var a=this.target;a.un("beforedestroy",this.onBeforeDestroy,this);a.un("render",this.onRender,this);a.un("select",this.onFieldChange,this);a.un("valid",this.onFieldChange,this);a=this.printProvider||a.ownerCt.printProvider;a.un("layoutchange",this.onProviderChange,this);a.un("dpichange",this.onProviderChange,this)}});Ext.preg("gx_printproviderfield",GeoExt.plugins.PrintProviderField); 486OpenLayers.Control=OpenLayers.Class({id:null,map:null,div:null,type:null,allowSelection:!1,displayClass:"",title:"",autoActivate:!1,active:null,handlerOptions:null,handler:null,eventListeners:null,events:null,initialize:function(a){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,a);this.events=new OpenLayers.Events(this);if(this.eventListeners instanceof Object)this.events.on(this.eventListeners);if(null==this.id)this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+ 487"_")},destroy:function(){if(this.events)this.eventListeners&&this.events.un(this.eventListeners),this.events.destroy(),this.events=null;this.eventListeners=null;if(this.handler)this.handler.destroy(),this.handler=null;if(this.handlers){for(var a in this.handlers)this.handlers.hasOwnProperty(a)&&"function"==typeof this.handlers[a].destroy&&this.handlers[a].destroy();this.handlers=null}if(this.map)this.map.removeControl(this),this.map=null;this.div=null},setMap:function(a){this.map=a;this.handler&& 488this.handler.setMap(a)}
488,draw:function(a){if(null==this.div){this.div=OpenLayers.Util.createDiv(this.id);this.div.className=this.displayClass;if(!this.allowSelection)this.div.className+=" olControlNoSelect",this.div.setAttribute("unselectable","on",0),this.div.onselectstart=OpenLayers.Function.False;if(""!=this.title)this.div.title=this.title}if(null!=a)this.position=a.clone();this.moveTo(this.position);return this.div},moveTo:function(a){if(null!=a&&null!=this.div)this.div.style.left=a.x+"px",this.div.style.top= 489a.y+"px"},activate:function(){if(this.active)return!1;this.handler&&this.handler.activate();this.active=!0;this.map&&OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active");this.events.triggerEvent("activate");return!0},deactivate:function(){return this.active?(this.handler&&this.handler.deactivate(),this.active=!1,this.map&&OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active"),this.events.triggerEvent("deactivate"), 490!0):!1},CLASS_NAME:"OpenLayers.Control"});OpenLayers.Control.TYPE_BUTTON=1;OpenLayers.Control.TYPE_TOGGLE=2;OpenLayers.Control.TYPE_TOOL=3;Ext.namespace("GeoExt"); 491GeoExt.Action=Ext.extend(Ext.Action,{control:null,activateOnEnable:!1,deactivateOnDisable:!1,map:null,uScope:null,uHandler:null,uToggleHandler:null,uCheckHandler:null,constructor:function(a){this.uScope=a.scope;this.uHandler=a.handler;this.uToggleHandler=a.toggleHandler;this.uCheckHandler=a.checkHandler;a.scope=this;a.handler=this.pHandler;a.toggleHandler=this.pToggleHandler;a.checkHandler=this.pCheckHandler;var b=this.control=a.control;delete a.control;this.activateOnEnable=!!a.activateOnEnable; 492delete a.activateOnEnable;this.deactivateOnDisable=!!a.deactivateOnDisable;delete a.deactivateOnDisable;if(b){a.map&&(a.map.addControl(b),delete a.map);(a.pressed||a.checked)&&b.map&&b.activate();if(b.active)a.pressed=!0,a.checked=!0;b.events.on({activate:this.onCtrlActivate,deactivate:this.onCtrlDeactivate,scope:this})}arguments.callee.superclass.constructor.call(this,a)},pHandler:function(a){var b=this.control;b&&b.type==OpenLayers.Control.TYPE_BUTTON&&b.trigger();this.uHandler&&this.uHandler.apply(this.uScope, 493arguments)},pToggleHandler:function(a,b){this.changeControlState(b);this.uToggleHandler&&this.uToggleHandler.apply(this.uScope,arguments)},pCheckHandler:function(a,b){this.changeControlState(b);this.uCheckHandler&&this.uCheckHandler.apply(this.uScope,arguments)},changeControlState:function(a){if(a){if(!this._activating)this._activating=!0,this.control.activate(),this.initialConfig.pressed=!0,this.initialConfig.checked=!0,this._activating=!1}else if(!this._deactivating)this._deactivating=!0,this.control.deactivate(), 494this.initialConfig.pressed=!1,this._deactivating=this.initialConfig.checked=!1},onCtrlActivate:function(){this.control.type==OpenLayers.Control.TYPE_BUTTON?this.enable():(this.safeCallEach("toggle",[!0]),this.safeCallEach("setChecked",[!0]))},onCtrlDeactivate:function(){this.control.type==OpenLayers.Control.TYPE_BUTTON?this.disable():(this.safeCallEach("toggle",[!1]),this.safeCallEach("setChecked",[!1]))},safeCallEach:function(a,b){for(var c=this.items,d=0,e=c.length;d<e;d++)c[d][a]&&(c[d].rendered? 495c[d][a].apply(c[d],b):c[d].on({render:c[d][a].createDelegate(c[d],b),single:!0}))},setDisabled:function(a){!a&&this.activateOnEnable&&this.control&&!this.control.active&&this.control.activate();a&&this.deactivateOnDisable&&this.control&&this.control.active&&this.control.deactivate();return GeoExt.Action.superclass.setDisabled.apply(this,arguments)}});Ext.namespace("GeoExt.tree"); 496GeoExt.tree.LayerContainer=Ext.extend(Ext.tree.AsyncTreeNode,{text:"Layers",constructor:function(a){a=Ext.applyIf(a||{},{text:this.text});this.loader=a.loader instanceof GeoExt.tree.LayerLoader?a.loader:new GeoExt.tree.LayerLoader(Ext.applyIf(a.loader||{},{store:a.layerStore}));GeoExt.tree.LayerContainer.superclass.constructor.call(this,a)},recordIndexToNodeIndex:function(a){for(var b=this.loader.store,c=this.childNodes.length,d=-1,e=b.getCount()-1;0<=e&&!(!0===this.loader.filter(b.getAt(e))&&(++d, 497a===e||d>c-1));
497--e);return d},destroy:function(){delete this.layerStore;GeoExt.tree.LayerContainer.superclass.destroy.apply(this,arguments)}});Ext.tree.TreePanel.nodeTypes.gx_layercontainer=GeoExt.tree.LayerContainer;Ext.namespace("GeoExt.tree");GeoExt.tree.LayerLoader=function(a){Ext.apply(this,a);this.addEvents("beforeload","load");GeoExt.tree.LayerLoader.superclass.constructor.call(this)}; 498Ext.extend(GeoExt.tree.LayerLoader,Ext.util.Observable,{store:null,filter:function(a){return!0==a.getLayer().displayInLayerSwitcher},baseAttrs:null,uiProviders:null,load:function(a,b){if(this.fireEvent("beforeload",this,a)){for(this.removeStoreHandlers();a.firstChild;)a.removeChild(a.firstChild);if(!this.uiProviders)this.uiProviders=a.getOwnerTree().getLoader().uiProviders;if(!this.store)this.store=GeoExt.MapPanel.guess().layers;this.store.each(function(b){this.addLayerNode(a,b)},this);this.addStoreHandlers(a); 499"function"==typeof b&&b();this.fireEvent("load",this,a)}},onStoreAdd:function(a,b,c,d){if(!this._reordering){a=d.recordIndexToNodeIndex(c+b.length-1);for(c=0;c<b.length;++c)this.addLayerNode(d,b[c],a)}},onStoreRemove:function(a,b,c,d){this._reordering||this.removeLayerNode(d,b)},addLayerNode:function(a,b,c){c=c||0;!0===this.filter(b)&&(b=this.createNode({nodeType:"gx_layer",layer:b.getLayer(),layerStore:this.store}),(c=a.item(c))?a.insertBefore(b,c):a.appendChild(b),b.on("move",this.onChildMove,this))}, 500removeLayerNode:function(a,b){if(!0===this.filter(b)){var c=a.findChildBy(function(a){return a.layer==b.getLayer()});c&&(c.un("move",this.onChildMove,this),c.remove(),a.reload())}},onChildMove:function(a,b,c,d,e){this._reordering=!0;a=this.store.getByLayer(b.layer);if(d instanceof GeoExt.tree.LayerContainer&&this.store===d.loader.store){d.loader._reordering=!0;this.store.remove(a);var f;if(1<d.childNodes.length){var g=0===e?e+1:e-1;f=this.store.findBy(function(a){return d.childNodes[g].layer===a.getLayer()}); 5010===e&&f++}else if(c.parentNode===d.parentNode){var h=d;do h=h.previousSibling;while(h&&!(h instanceof GeoExt.tree.LayerContainer&&h.lastChild));if(h)f=this.store.findBy(function(a){return h.lastChild.layer===a.getLayer()});else{var i=d;do i=i.nextSibling;while(i&&!(i instanceof GeoExt.tree.LayerContainer&&i.firstChild));i&&(f=this.store.findBy(function(a){return i.firstChild.layer===a.getLayer()}));f++}}void 0!==f?(this.store.insert(f,[a]),window.setTimeout(function(){d.reload();c.reload()})):this.store.insert(oldRecordIndex, 502[a]);delete d.loader._reordering}delete this._reordering},addStoreHandlers:function(a){if(!this._storeHandlers){this._storeHandlers={add:this.onStoreAdd.createDelegate(this,[a],!0),remove:this.onStoreRemove.createDelegate(this,[a],!0)};for(var b in this._storeHandlers)this.store.on(b,this._storeHandlers[b],this)}},removeStoreHandlers:function(){if(this._storeHandlers){for(var a in this._storeHandlers)this.store.un(a,this._storeHandlers[a],this);delete this._storeHandlers}},createNode:function(a){this.baseAttrs&& 503Ext.apply(a,this.baseAttrs);if("string"==typeof a.uiProvider)a.uiProvider=this.uiProviders[a.uiProvider]||eval(a.uiProvider);a.nodeType=a.nodeType||"gx_layer";return new Ext.tree.TreePanel.nodeTypes[a.nodeType](a)},destroy:function(){this.removeStoreHandlers()}}); 504OpenLayers.Layer=OpenLayers.Class({id:null,name:null,div:null,opacity:1,alwaysInRange:null,RESOLUTION_PROPERTIES:"scales,resolutions,maxScale,minScale,maxResolution,minResolution,numZoomLevels,maxZoomLevel".split(","),events:null,map:null,isBaseLayer:!1,alpha:!1,displayInLayerSwitcher:!0,visibility:!0,attribution:null,inRange:!1,imageSize:null,options:null,eventListeners:null,gutter:0,projection:null,units:null,scales:null,resolutions:null,maxExtent:null,minExtent:null,maxResolution:null,minResolution:null, 505numZoomLevels:null,minScale:null,maxScale:null,displayOutsideMaxExtent:!1,wrapDateLine:!1,metadata:null,initialize:function(a,b){this.metadata={};b=OpenLayers.Util.extend({},b);if(null!=this.alwaysInRange)b.alwaysInRange=this.alwaysInRange;this.addOptions(b);this.name=a;if(null==this.id&&(this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_"),this.div=OpenLayers.Util.createDiv(this.id
505),this.div.style.width="100%",this.div.style.height="100%",this.div.dir="ltr",this.events=new OpenLayers.Events(this, 506this.div),this.eventListeners instanceof Object))this.events.on(this.eventListeners)},destroy:function(a){null==a&&(a=!0);null!=this.map&&this.map.removeLayer(this,a);this.options=this.div=this.name=this.map=this.projection=null;this.events&&(this.eventListeners&&this.events.un(this.eventListeners),this.events.destroy());this.events=this.eventListeners=null},clone:function(a){null==a&&(a=new OpenLayers.Layer(this.name,this.getOptions()));OpenLayers.Util.applyDefaults(a,this);a.map=null;return a}, 507getOptions:function(){var a={},b;for(b in this.options)a[b]=this[b];return a},setName:function(a){if(a!=this.name)this.name=a,null!=this.map&&this.map.events.triggerEvent("changelayer",{layer:this,property:"name"})},addOptions:function(a,b){if(null==this.options)this.options={};if(a){if("string"==typeof a.projection)a.projection=new OpenLayers.Projection(a.projection);a.projection&&OpenLayers.Util.applyDefaults(a,OpenLayers.Projection.defaults[a.projection.getCode()]);if(a.maxExtent&&!(a.maxExtent instanceof 508OpenLayers.Bounds))a.maxExtent=new OpenLayers.Bounds(a.maxExtent);if(a.minExtent&&!(a.minExtent instanceof OpenLayers.Bounds))a.minExtent=new OpenLayers.Bounds(a.minExtent)}OpenLayers.Util.extend(this.options,a);OpenLayers.Util.extend(this,a);if(this.projection&&this.projection.getUnits())this.units=this.projection.getUnits();if(this.map){var c=this.map.getResolution(),d=this.RESOLUTION_PROPERTIES.concat(["projection","units","minExtent","maxExtent"]),e;for(e in a)if(a.hasOwnProperty(e)&&0<=OpenLayers.Util.indexOf(d, 509e)){this.initResolutions();b&&this.map.baseLayer===this&&(this.map.setCenter(this.map.getCenter(),this.map.getZoomForResolution(c),!1,!0),this.map.events.triggerEvent("changebaselayer",{layer:this}));break}}},onMapResize:function(){},redraw:function(){var a=!1;if(this.map){this.inRange=this.calculateInRange();var b=this.getExtent();b&&this.inRange&&this.visibility&&(this.moveTo(b,!0,!1),this.events.triggerEvent("moveend",{zoomChanged:!0}),a=!0)}return a},moveTo:function(){var a=this.visibility;this.isBaseLayer|| 510(a=a&&this.inRange);this.display(a)},moveByPx:function(){},setMap:function(a){if(null==this.map){this.map=a;this.maxExtent=this.maxExtent||this.map.maxExtent;this.minExtent=this.minExtent||this.map.minExtent;this.projection=this.projection||this.map.projection;if("string"==typeof this.projection)this.projection=new OpenLayers.Projection(this.projection);this.units=this.projection.getUnits()||this.units||this.map.units;this.initResolutions();if(!this.isBaseLayer)this.inRange=this.calculateInRange(), 511this.div.style.display=this.visibility&&this.inRange?"":"none";this.setTileSize()}},afterAdd:function(){},removeMap:function(){},getImageSize:function(){return this.imageSize||this.tileSize},setTileSize:function(a){this.tileSize=a=a?a:this.tileSize?this.tileSize:this.map.getTileSize();if(this.gutter)this.imageSize=new OpenLayers.Size(a.w+2*this.gutter,a.h+2*this.gutter)},getVisibility:function(){return this.visibility},setVisibility:function(a){if(a!=this.visibility)this.visibility=a,this.display(a), 512this.redraw(),null!=this.map&&this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"}),this.events.triggerEvent("visibilitychanged")},display:function(a){if(a!=("none"!=this.div.style.display))this.div.style.display=a&&this.calculateInRange()?"block":"none"},calculateInRange:function(){var a=!1;this.alwaysInRange?a=!0:this.map&&(a=this.map.getResolution(),a=a>=this.minResolution&&a<=this.maxResolution);return a},setIsBaseLayer:function(a){if(a!=this.isBaseLayer)this.isBaseLayer= 513a,null!=this.map&&this.map.events.triggerEvent("changebaselayer",{layer:this})},initResolutions:function(){var a,b,c,d={},e=!0;for(a=0,b=this.RESOLUTION_PROPERTIES.length;a<b;a++)c=this.RESOLUTION_PROPERTIES[a],d[c]=this.options[c],e&&this.options[c]&&(e=!1);if(null==this.options.alwaysInRange)this.alwaysInRange=e;if(null==d.resolutions)d.resolutions=this.resolutionsFromScales(d.scales);if(null==d.resolutions)d.resolutions=this.calculateResolutions(d);if(null==d.resolutions){for(a=0,b=this.RESOLUTION_PROPERTIES.length;a< 514b;a++)c=this.RESOLUTION_PROPERTIES[a],d[c]=null!=this.options[c]?this.options[c]:this.map[c];if(null==d.resolutions)d.resolutions=this.resolutionsFromScales(d.scales);if(null==d.resolutions)d.resolutions=this.calculateResolutions(d)}var f;if(this.options.maxResolution&&"auto"!==this.options.maxResolution)f=this.options.maxResolution;this.options.minScale&&(f=OpenLayers.Util.getResolutionFromScale(this.options.minScale,this.units));var g;if(this.options.minResolution&&"auto"!==this.options.minResolution)g= 515this.options.minResolution;this.options.maxScale&&(g=OpenLayers.Util.getResolutionFromScale(this.options.maxScale,this.units));
515d.resolutions&&(d.resolutions.sort(function(a,b){return b-a}),f||(f=d.resolutions[0]),g||(g=d.resolutions[d.resolutions.length-1]));if(this.resolutions=d.resolutions){b=this.resolutions.length;this.scales=Array(b);for(a=0;a<b;a++)this.scales[a]=OpenLayers.Util.getScaleFromResolution(this.resolutions[a],this.units);this.numZoomLevels=b}if(this.minResolution=g)this.maxScale= 516OpenLayers.Util.getScaleFromResolution(g,this.units);if(this.maxResolution=f)this.minScale=OpenLayers.Util.getScaleFromResolution(f,this.units)},resolutionsFromScales:function(a){if(null!=a){var b,c,d;d=a.length;b=Array(d);for(c=0;c<d;c++)b[c]=OpenLayers.Util.getResolutionFromScale(a[c],this.units);return b}},calculateResolutions:function(a){var b,c,d=a.maxResolution;null!=a.minScale?d=OpenLayers.Util.getResolutionFromScale(a.minScale,this.units):"auto"==d&&null!=this.maxExtent&&(b=this.map.getSize(), 517c=this.maxExtent.getWidth()/b.w,b=this.maxExtent.getHeight()/b.h,d=Math.max(c,b));c=a.minResolution;null!=a.maxScale?c=OpenLayers.Util.getResolutionFromScale(a.maxScale,this.units):"auto"==a.minResolution&&null!=this.minExtent&&(b=this.map.getSize(),c=this.minExtent.getWidth()/b.w,b=this.minExtent.getHeight()/b.h,c=Math.max(c,b));"number"!==typeof d&&"number"!==typeof c&&null!=this.maxExtent&&(d=this.map.getTileSize(),d=Math.max(this.maxExtent.getWidth()/d.w,this.maxExtent.getHeight()/d.h));b=a.maxZoomLevel; 518a=a.numZoomLevels;"number"===typeof c&&"number"===typeof d&&void 0===a?a=Math.floor(Math.log(d/c)/Math.log(2))+1:void 0===a&&null!=b&&(a=b+1);if(!("number"!==typeof a||0>=a||"number"!==typeof d&&"number"!==typeof c)){b=Array(a);var e=2;"number"==typeof c&&"number"==typeof d&&(e=Math.pow(d/c,1/(a-1)));var f;if("number"===typeof d)for(f=0;f<a;f++)b[f]=d/Math.pow(e,f);else for(f=0;f<a;f++)b[a-1-f]=c*Math.pow(e,f);return b}},getResolution:function(){return this.getResolutionForZoom(this.map.getZoom())}, 519getExtent:function(){return this.map.calculateBounds()},getZoomForExtent:function(a,b){var c=this.map.getSize();return this.getZoomForResolution(Math.max(a.getWidth()/c.w,a.getHeight()/c.h),b)},getDataExtent:function(){},getResolutionForZoom:function(a){a=Math.max(0,Math.min(a,this.resolutions.length-1));if(this.map.fractionalZoom)var b=Math.floor(a),c=Math.ceil(a),a=this.resolutions[b]-(a-b)*(this.resolutions[b]-this.resolutions[c]);else a=this.resolutions[Math.round(a)];return a},getZoomForResolution:function(a, 520b){var c,d;if(this.map.fractionalZoom){var e=0,f=this.resolutions[e],g=this.resolutions[this.resolutions.length-1],h;for(c=0,d=this.resolutions.length;c<d;++c)if(h=this.resolutions[c],h>=a&&(f=h,e=c),h<=a){g=h;break}c=f-g;c=0<c?e+(f-a)/c:e}else{f=Number.POSITIVE_INFINITY;for(c=0,d=this.resolutions.length;c<d;c++)if(b){e=Math.abs(this.resolutions[c]-a);if(e>f)break;f=e}else if(this.resolutions[c]<a)break;c=Math.max(0,c-1)}return c},getLonLatFromViewPortPx:function(a){var b=null,c=this.map;if(null!= 521a&&c.minPx){var b=c.getResolution(),d=c.getMaxExtent({restricted:!0}),b=new OpenLayers.LonLat((a.x-c.minPx.x)*b+d.left,(c.minPx.y-a.y)*b+d.top);this.wrapDateLine&&(b=b.wrapDateLine(this.maxExtent))}return b},getViewPortPxFromLonLat:function(a,b){var c=null;null!=a&&(b=b||this.map.getResolution(),c=this.map.calculateBounds(null,b),c=new OpenLayers.Pixel(1/b*(a.lon-c.left),1/b*(c.top-a.lat)));return c},setOpacity:function(a){if(a!=this.opacity){this.opacity=a;for(var b=this.div.childNodes,c=0,d=b.length;c< 522d;++c){var e=b[c].firstChild||b[c],f=b[c].lastChild;if(f&&"iframe"===f.nodeName.toLowerCase())e=f.parentNode;OpenLayers.Util.modifyDOMElement(e,null,null,null,null,null,null,a)}null!=this.map&&this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"})}},getZIndex:function(){return this.div.style.zIndex},setZIndex:function(a){this.div.style.zIndex=a},adjustBounds:function(a){if(this.gutter)var b=this.gutter*this.map.getResolution(),a=new OpenLayers.Bounds(a.left-b,a.bottom-b,a.right+ 523b,a.top+b);this.wrapDateLine&&(b={rightTolerance:this.getResolution(),leftTolerance:this.getResolution()},a=a.wrapDateLine(this.maxExtent,b));return a},CLASS_NAME:"OpenLayers.Layer"});Ext.namespace("GeoExt.tree");
524GeoExt.tree.LayerNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{constructor:function(a){GeoExt.tree.LayerNodeUI.superclass.constructor.apply(this,arguments)},render:function(a){var b=this.node.attributes;if(void 0===b.checked)b.checked=this.node.layer.getVisibility();if(void 0===b.disabled&&this.node.autoDisable)this.node.disabled=!1===this.node.layer.inRange||!this.node.layer.calculateInRange();GeoExt.tree.LayerNodeUI.superclass.render.apply(this,arguments);var c=this.checkbox;if(b.checkedGroup)b=Ext.DomHelper.insertAfter(c, 525['<input type="radio" name="',b.checkedGroup,'_checkbox" class="',c.className,c.checked?'" checked="checked"':"",'"></input>'].join("")),b.defaultChecked=c.defaultChecked,Ext.get(c).remove(),this.checkbox=b;this.enforceOneVisible()},onClick:function(a){a.getTarget(".x-tree-node-cb",1)?this.toggleCheck(this.isChecked()):GeoExt.tree.LayerNodeUI.superclass.onClick.apply(this,arguments)},toggleCheck:function(a){a=void 0===a?!this.isChecked():a;GeoExt.tree.LayerNodeUI.superclass.toggleCheck.call(this, 526a);this.enforceOneVisible()},enforceOneVisible:function(){var a=this.node.attributes,b=a.checkedGroup;if(b&&"gx_baselayer"!==b){var c=this.node.layer,d=this.node.getOwnerTree().getChecked(),e=0;Ext.each(d,function(d){var g=d.layer;!d.hidden&&d.attributes.checkedGroup===b&&(e++,g!=c&&a.checked&&g.setVisibility(!1))});0===e&&!1==a.checked&&c.setVisibility(!0)}},appendDDGhost:function(a){var b=this.elNode.cloneNode(!0),c=Ext.DomQuery.select("input[type='radio']",b);Ext.each(c,function(a){a.name+="_clone"}); 527a.appendChild(b)}}); 528GeoExt.tree.LayerNode=Ext.extend(Ext.tree.AsyncTreeNode,{layer:null,autoDisable:null,layerStore:null,constructor:function(a){a.leaf=a.leaf||!(a.children||a.loader);if(!a.iconCls&&!a.children)a.iconCls="gx-tree-layer-icon";if(a.loader&&!(a.loader instanceof Ext.tree.TreeLoader))a.loader=new GeoExt.tree.LayerParamLoader(a.loader);this.defaultUI=this.defaultUI||GeoExt.tree.LayerNodeUI;Ext.apply(this,{layer:a.layer,layerStore:a.layerStore,autoDisable:a.autoDisable});if(a.text)this.fixedText=!0;GeoExt.tree.LayerNode.superclass.constructor.apply(this, 529arguments)},render:function(a){var b=this.layer instanceof OpenLayers.Layer&&this.layer;if(!b){if(!this.layerStore||"auto"==this.layerStore)this.layerStore=GeoExt.MapPanel.guess().layers;var c=this.layerStore.findBy(function(a){return a.get("title")==this.layer},this);-1!=c&&(b=this.layerStore.getAt(c).getLayer())}if(!this.rendered||!b){c=this.getUI();if(b){this.layer=b;if(b.isBaseLayer)this.draggable=!1,Ext.applyIf(this.attributes,{checkedGroup:"gx_baselayer"});this.autoDisable=!(!1===this.autoDisable|| 530this.layer.isBaseLayer||this.layer.alwaysInRange);if(!this.text)this.text=b.name;c.show();this.addVisibilityEventHandlers()}else c.hide();this.layerStore instanceof GeoExt.data.LayerStore&&this.addStoreEventHandlers(b)}GeoExt.tree.LayerNode.superclass.render.apply(this,arguments)},addVisibilityEventHandlers:function(){this.layer.events.on({visibilitychanged:this.onLayerVisibilityChanged,scope:this});this.on({checkchange:this.onCheckChange,scope:this});this.autoDisable&&(this.layer.map?this.layer.map.events.register("moveend", 531this,this.onMapMoveend):this.layer.events.register("added",this,function b(){this.layer.events.unregister("added",this,b);this.layer.map.events.register("moveend",this,this.onMapMoveend)}))},onLayerVisibilityChanged:function(){this._visibilityChanging||this.getUI().toggleCheck(this.layer.getVisibility())},onCheckChange:function(a,b){if(b!=this.layer.getVisibility()){this._visibilityChanging=!0;var c=this.layer;b&&c.isBaseLayer&&c.map?c.map.setBaseLayer(c):c.setVisibility(b);delete this._visibilityChanging}}, 532onMapMoveend:function(){this.autoDisable&&(!1===this.layer.inRange?this.disable():this.enable())},addStoreEventHandlers:function(){this.layerStore.on({add:this.onStoreAdd,remove:this.onStoreRemove,update:this.onStoreUpdate,scope:this})},onStoreAdd:function(a,b){for(var c,d=0;d<b.length;++d)if(c=b[d].getLayer(),this.layer==c){this.getUI().show();break}else if(this.layer==c.name){this.render();break}},onStoreRemove:function(a,b){this.layer==b.getLayer()&&this.getUI().hide()},onStoreUpdate:function(a, 533b){var c=b.getLayer();!this.fixedText&&this.layer==c&&this.text!==c.name&&this.setText(c.name)},destroy:function(){var a=this.layer;a instanceof OpenLayers.Layer&&(a.map&&a.map.events.unregister("moveend",this,this.onMapMoveend),a.events.un({visibilitychanged:this.onLayerVisibilityChanged,scope:this}));delete this.layer;if(a=this.layerStore)a.un("add",this.onStoreAdd,this),a.un("remove",this.onStoreRemove,this),a.un("update",this.onStoreUpdate,this);delete this.layerStore;
533this.un("checkchange",this.onCheckChange, 534this);GeoExt.tree.LayerNode.superclass.destroy.apply(this,arguments)}});Ext.tree.TreePanel.nodeTypes.gx_layer=GeoExt.tree.LayerNode;Ext.namespace("GeoExt.tree"); 535GeoExt.tree.BaseLayerContainer=Ext.extend(GeoExt.tree.LayerContainer,{text:"Base Layer",constructor:function(a){a=Ext.applyIf(a||{},{text:this.text,loader:{}});a.loader=Ext.applyIf(a.loader,{baseAttrs:Ext.applyIf(a.loader.baseAttrs||{},{iconCls:"gx-tree-baselayer-icon",checkedGroup:"baselayer"}),filter:function(a){a=a.getLayer();return!0===a.displayInLayerSwitcher&&!0===a.isBaseLayer}});GeoExt.tree.BaseLayerContainer.superclass.constructor.call(this,a)}}); 536Ext.tree.TreePanel.nodeTypes.gx_baselayercontainer=GeoExt.tree.BaseLayerContainer;Ext.namespace("GeoExt.tree");GeoExt.tree.OverlayLayerContainer=Ext.extend(GeoExt.tree.LayerContainer,{text:"Overlays",constructor:function(a){a=Ext.applyIf(a||{},{text:this.text});a.loader=Ext.applyIf(a.loader||{},{filter:function(a){a=a.getLayer();return!0===a.displayInLayerSwitcher&&!1===a.isBaseLayer}});GeoExt.tree.OverlayLayerContainer.superclass.constructor.call(this,a)}}); 537Ext.tree.TreePanel.nodeTypes.gx_overlaylayercontainer=GeoExt.tree.OverlayLayerContainer;Ext.namespace("GeoExt.tree"); 538GeoExt.tree.TreeNodeUIEventMixin=function(){return{constructor:function(a){a.addEvents("rendernode","rawclicknode");this.superclass=arguments.callee.superclass;this.superclass.constructor.apply(this,arguments)},render:function(a){this.rendered||(this.superclass.render.apply(this,arguments),this.fireEvent("rendernode",this.node))},onClick:function(a){!1!==this.fireEvent("rawclicknode",this.node,a)&&this.superclass.onClick.apply(this,arguments)}}};Ext.namespace("GeoExt"); 539GeoExt.Popup=Ext.extend(Ext.Window,{anchored:!0,map:null,panIn:!0,unpinnable:!0,location:null,insideViewport:null,animCollapse:!1,draggable:!1,shadow:!1,popupCls:"gx-popup",ancCls:null,anchorPosition:"auto",initComponent:function(){if(this.map instanceof GeoExt.MapPanel)this.map=this.map.map;if(!this.map&&this.location instanceof OpenLayers.Feature.Vector&&this.location.layer)this.map=this.location.layer.map;if(this.location instanceof OpenLayers.Feature.Vector)this.location=this.location.geometry; 540if(this.location instanceof OpenLayers.Geometry){if("function"==typeof this.location.getCentroid)this.location=this.location.getCentroid();this.location=this.location.getBounds().getCenterLonLat()}else if(this.location instanceof OpenLayers.Pixel)this.location=this.map.getLonLatFromViewPortPx(this.location);if(!(this.location instanceof OpenLayers.LonLat))this.anchored=!1;var a=this.map.getExtent();if(a&&this.location)this.insideViewport=a.containsLonLat(this.location);this.anchored?(this.addAnchorEvents(), 541this.elements+=",anc"):this.unpinnable=!1;this.baseCls=this.popupCls+" "+this.baseCls;GeoExt.Popup.superclass.initComponent.call(this)},onRender:function(a,b){GeoExt.Popup.superclass.onRender.call(this,a,b);this.anchored?(this.ancCls=this.popupCls+"-anc",this.createElement("anc",this.el.dom)):this.makeDraggable()},initTools:function(){this.unpinnable&&this.addTool({id:"unpin",handler:this.unanchorPopup.createDelegate(this,[])});GeoExt.Popup.superclass.initTools.call(this)},show:function(){GeoExt.Popup.superclass.show.apply(this, 542arguments);this.anchored&&(this.position(),this.panIn&&!this._mapMove&&this.panIntoView())},maximize:function(){!this.maximized&&this.anc&&this.unanchorPopup();GeoExt.Popup.superclass.maximize.apply(this,arguments)},setSize:function(a,b){if(this.anc){var c=this.anc.getSize();"object"==typeof a?(b=a.height-c.height,a=a.width):isNaN(b)||(b-=c.height)}GeoExt.Popup.superclass.setSize.call(this,a,b)},position:function(){var a=this;if(!0===a._mapMove)a.insideViewport=a.map.getExtent().containsLonLat(a.location), 543a.insideViewport!==a.isVisible()&&a.setVisible(a.insideViewport);if(a.isVisible()){var b=a.map.getPixelFromLonLat(a.location),c=Ext.fly(a.map.div).getBox(!0),d=b.y+c.y,e=b.x+c.x,f=a.el.getSize(),g=a.anc.getSize(),h=a.anchorPosition;if(-1<h.indexOf("right")||b.x>c.width/2){a.anc.addClass("right");var i=a.el.getX(!0)+f.width-a.anc.getX(!0)-g.width,e=e-(f.width-i-g.width/2)}else a.anc.removeClass("right"),i=a.anc.getLeft(!0),e-=i+g.width/2;-1<h.indexOf("bottom")||b.y>c.height/2?(a.anc.removeClass("top"), 544d-=f.height+g.height):(a.anc.addClass("top"),d+=g.height);window.setTimeout(function(){a.setPagePosition(e,d)},0)}},makeDraggable:function(){this.draggable=!0;this.header.addClass("x-window-draggable");this.dd=new Ext.Window.DD(this)},unanchorPopup:function(){this.removeAnchorEvents();this.makeDraggable();this.anc.remove();this.anc=null;this.tools.unpin.hide()},panIntoView:function(){var a=Ext.fly(this.map.div).getBox(!0),b=this.getPosition(!0);b[0]-=a.x;b[1]-=a.y;var a=[a.width,a.height],c=this.getSize(), 545d=[b[0],b[1]],e=this.map.paddingForPopups;b[0]<e.left?d[0]=e.left:b[0]+c.width>a[0]-e.right&&(d[0]=a[0]-e.right-c.width);b[1]<e.top?d[1]=e.top:b[1]+c.height>a[1]-e.bottom&&(d[1]=a[1]-e.bottom-c.height);this.map.pan(b[0]-d[0],b[1]-d[1])},onMapMove:function(){if(!this.hidden||!this.insideViewport)this._mapMove=!0,this.position(),delete this._mapMove},addAnchorEvents:function(){this.map.events.on({move:this.onMapMove,scope:this});this.on({resize:this.position,collapse:this.position,expand:this.position, 546scope:this})},removeAnchorEvents:function(){this.map.events.un({move:this.onMapMove,scope:this});this.un("resize",this.position,this);this.un("collapse",this.position,this);this.un("expand",this.position,this)},beforeDestroy:function(){this.anchored&&this.removeAnchorEvents();GeoExt.Popup.superclass.beforeDestroy.call(this)}});Ext.reg("gx_popup",GeoExt.Popup);Ext.namespace("GeoExt"); 547GeoExt.MapPanel=Ext.extend(Ext.Panel,{map:null,layers:null,center:null,zoom:null,extent:null,prettyStateKeys:!1,stateEvents:"aftermapmove,afterlayervisibilitychange,afterlayeropacitychange,afterlayerorderchange,afterlayernamechange,afterlayeradd,afterlayerremove".split(","),initComponent:function(){if(!(this.map instanceof OpenLayers.Map))this.map=new OpenLayers.Map(Ext.applyIf(this.map||{},{allOverlays:!0}));var a=this.layers;if(!a||a instanceof Array)this.layers=new GeoExt.data.LayerStore({layers:a, 548map:0<this.map.layers.length?this.map:null});if("string"==typeof this.center)this.center=OpenLayers.LonLat.fromString(this.center);else if(this.center instanceof Array)this.center=new OpenLayers.LonLat(this.center[0],this.center[1]);if("string"==typeof this.extent)this.extent=OpenLayers.Bounds.fromString(this.extent);else if(this.extent instanceof Array)this.extent=OpenLayers.Bounds.fromArray(this.extent);GeoExt.MapPanel.superclass.initComponent.call(this);this.addEvents("aftermapmove","afterlayervisibilitychange", 549"afterlayeropacitychange","afterlayerorderchange","afterlayernamechange","afterlayeradd","afterlayerremove");this.map.events.on({moveend:this.onMoveend,changelayer:this.onChangelayer,addlayer:this.onAddlayer,removelayer:this.onRemovelayer,scope:this});this.on("afterlayout",function(){"function"===typeof this.map.getViewport&&this.items.each(function(a){"function"===typeof a.addToMapPanel&&a.getEl().appendTo(this.map.getViewport())},this)},this)},onMoveend:function(){this.fireEvent("aftermapmove")},
550onChangelayer:function(a){a.property&&("visibility"===a.property?this.fireEvent("afterlayervisibilitychange"):"order"===a.property?this.fireEvent("afterlayerorderchange"):"name"===a.property?this.fireEvent("afterlayernamechange"):"opacity"===a.property&&this.fireEvent("afterlayeropacitychange"))},onAddlayer:function(){this.fireEvent("afterlayeradd")},onRemovelayer:function(){this.fireEvent("afterlayerremove")},applyState:function(a){this.center=new OpenLayers.LonLat(a.x,a.y);this.zoom=a.zoom;var b, 551c,d,e,f,g=this.map.layers;for(b=0,c=g.length;b<c;b++)d=g[b],e=this.prettyStateKeys?d.name:d.id,f=a["visibility_"+e],void 0!==f&&(f=/^true$/i.test(f),d.isBaseLayer?f&&this.map.setBaseLayer(d):d.setVisibility(f)),e=a["opacity_"+e],void 0!==e&&d.setOpacity(e)},getState:function(){var a;if(this.map){a=(a=this.map.getCenter())?{x:a.lon,y:a.lat,zoom:this.map.getZoom()}:{};var b,c,d,e,f=this.map.layers;for(b=0,c=f.length;b<c;b++)d=f[b],e=this.prettyStateKeys?d.name:d.id,a["visibility_"+e]=d.getVisibility(), 552a["opacity_"+e]=null==d.opacity?1:d.opacity;return a}},updateMapSize:function(){this.map&&this.map.updateSize()},renderMap:function(){var a=this.map;a.render(this.body.dom);this.layers.bind(a);if(0<a.layers.length)this.setInitialExtent();else this.layers.on("add",this.setInitialExtent,this,{single:!0})},setInitialExtent:function(){var a=this.map;this.center||null!=this.zoom?a.setCenter(this.center,this.zoom):this.extent?a.zoomToExtent(this.extent):a.zoomToMaxExtent()},afterRender:function(){GeoExt.MapPanel.superclass.afterRender.apply(this, 553arguments);this.ownerCt?(this.ownerCt.on("move",this.updateMapSize,this),this.ownerCt.on({afterlayout:this.afterLayout,scope:this})):this.renderMap()},afterLayout:function(){var a=this.getInnerWidth()-this.body.getBorderWidth("lr"),b=this.getInnerHeight()-this.body.getBorderWidth("tb");0<a&&0<b&&(this.ownerCt.un("afterlayout",this.afterLayout,this),this.renderMap())},onResize:function(){GeoExt.MapPanel.superclass.onResize.apply(this,arguments);this.updateMapSize()},onBeforeAdd:function(a){"function"=== 554typeof a.addToMapPanel&&a.addToMapPanel(this);GeoExt.MapPanel.superclass.onBeforeAdd.apply(this,arguments)},remove:function(a,b){"function"===typeof a.removeFromMapPanel&&a.removeFromMapPanel(this);GeoExt.MapPanel.superclass.remove.apply(this,arguments)},beforeDestroy:function(){this.ownerCt&&this.ownerCt.un("move",this.updateMapSize,this);this.map&&this.map.events&&this.map.events.un({moveend:this.onMoveend,changelayer:this.onChangelayer,addlayer:this.onAddlayer,removelayer:this.onRemovelayer,scope:this}); 555(!this.initialConfig.map||!(this.initialConfig.map instanceof OpenLayers.Map))&&this.map&&this.map.destroy&&this.map.destroy();delete this.map;GeoExt.MapPanel.superclass.beforeDestroy.apply(this,arguments)}});GeoExt.MapPanel.guess=function(){return Ext.ComponentMgr.all.find(function(a){return a instanceof GeoExt.MapPanel})};Ext.reg("gx_mappanel",GeoExt.MapPanel);Ext.namespace("GeoExt.data"); 556GeoExt.data.LayerStoreMixin=function(){return{map:null,reader:null,constructor:function(a){a=a||{};a.reader=a.reader||new GeoExt.data.LayerReader({},a.fields);delete a.fields;var b=a.map instanceof GeoExt.MapPanel?a.map.map:a.map;delete a.map;if(a.layers)a.data=a.layers;delete a.layers;var c={initDir:a.initDir};delete a.initDir;arguments.callee.superclass.constructor.call(this,a);this.addEvents("bind");b&&this.bind(b,c)},bind:function(a,b){if(!this.map){this.map=a;var b=b||{},c=b.initDir;void 0== 557b.initDir&&(c=GeoExt.data.LayerStore.MAP_TO_STORE|GeoExt.data.LayerStore.STORE_TO_MAP);var d=a.layers.slice(0);c&GeoExt.data.LayerStore.STORE_TO_MAP&&this.each(function(a){this.map.addLayer(a.getLayer())},this);c&GeoExt.data.LayerStore.MAP_TO_STORE&&this.loadData(d,!0);a.events.on({changelayer:this.onChangeLayer,addlayer:this.onAddLayer,removelayer:this.onRemoveLayer,scope:this});this.on({load:this.onLoad,clear:this.onClear,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,scope:this});this.data.on({replace:this.onReplace, 558scope:this});this.fireEvent("bind",this,a)}},unbind:function(){if(this.map)this.map.events.un({changelayer:this.onChangeLayer,addlayer:this.onAddLayer,removelayer:this.onRemoveLayer,scope:this}),this.un("load",this.onLoad,this),this.un("clear",this.onClear,this),this.un("add",this.onAdd,this),this.un("remove",this.onRemove,this),this.data.un("replace",this.onReplace,this),this.map=null},onChangeLayer:function(a){var b=a.layer,c=this.findBy(function(a){return a.getLayer()===b});if(-1<c){var d=this.getAt(c); 559if("order"===a.property){if(!this._adding&&!this._removing&&(a=this.map.getLayerIndex(b),a!==c))this._removing=!0,this.remove(d),delete this._removing,this._adding=!0,this.insert(a,[d]),delete this._adding}else"name"===a.property?d.set("title",b.name):this.fireEvent("update",this,d,Ext.data.Record.EDIT)}}
559,onAddLayer:function(a){if(!this._adding)a=a.layer,this._adding=!0,this.loadData([a],!0),delete this._adding},onRemoveLayer:function(a){if(this.map.unloadDestroy){if(!this._removing)a=a.layer,this._removing= 560!0,this.remove(this.getById(a.id)),delete this._removing}else this.unbind()},onLoad:function(a,b,c){Ext.isArray(b)||(b=[b]);if(c&&!c.add){this._removing=!0;for(a=this.map.layers.length-1;0<=a;a--)this.map.removeLayer(this.map.layers[a]);delete this._removing;a=b.length;if(0<a){for(var c=Array(a),d=0;d<a;d++)c[d]=b[d].getLayer();this._adding=!0;this.map.addLayers(c);delete this._adding}}},onClear:function(){this._removing=!0;for(var a=this.map.layers.length-1;0<=a;a--)this.map.removeLayer(this.map.layers[a]); 561delete this._removing},onAdd:function(a,b,c){if(!this._adding){this._adding=!0;for(var d=b.length-1;0<=d;--d)a=b[d].getLayer(),this.map.addLayer(a),c!==this.map.layers.length-1&&this.map.setLayerIndex(a,c);delete this._adding}},onRemove:function(a,b){if(!this._removing&&null!=this.map.getLayer(b.getLayer().id))this._removing=!0,this.removeMapLayer(b),delete this._removing},onUpdate:function(a,b,c){c===Ext.data.Record.EDIT&&b.modified&&b.modified.title&&(a=b.getLayer(),b=b.get("title"),b!==a.name&& 562a.setName(b))},removeMapLayer:function(a){this.map.removeLayer(a.getLayer())},onReplace:function(a,b){this.removeMapLayer(b)},getByLayer:function(a){var b=this.findBy(function(b){return b.getLayer()===a});if(-1<b)return this.getAt(b)},destroy:function(){this.unbind();GeoExt.data.LayerStore.superclass.destroy.call(this)}}};GeoExt.data.LayerStore=Ext.extend(Ext.data.Store,new GeoExt.data.LayerStoreMixin);GeoExt.data.LayerStore.MAP_TO_STORE=1;GeoExt.data.LayerStore.STORE_TO_MAP=2; 563Ext.namespace("GeoExt","GeoExt.data");GeoExt.data.LayerReader=function(a,b){a=a||{};b instanceof Function||(b=GeoExt.data.LayerRecord.create(b||a.fields||{}));GeoExt.data.LayerReader.superclass.constructor.call(this,a,b)}; 564Ext.extend(GeoExt.data.LayerReader,Ext.data.DataReader,{totalRecords:null,readRecords:function(a){var b=[];if(a){var c=this.recordType,d=c.prototype.fields,e,f,g,h,i,j,k,l;for(e=0,f=a.length;e<f;e++){i=a[e];j={};for(g=0,h=d.length;g<h;g++)k=d.items[g],l=i[k.mapping||k.name]||k.defaultValue,l=k.convert(l),j[k.name]=l;j.layer=i;b[b.length]=new c(j,i.id)}}return{records:b,totalRecords:null!=this.totalRecords?this.totalRecords:b.length}}});Ext.namespace("GeoExt.data"); 565GeoExt.data.ScaleStore=Ext.extend(Ext.data.Store,{map:null,constructor:function(a){var b=a.map instanceof GeoExt.MapPanel?a.map.map:a.map;delete a.map;a=Ext.applyIf(a,{reader:new Ext.data.JsonReader({},["level","resolution","scale"])});GeoExt.data.ScaleStore.superclass.constructor.call(this,a);b&&this.bind(b)},bind:function(a){this.map=a instanceof GeoExt.MapPanel?a.map:a;this.map.events.register("changebaselayer",this,this.populateFromMap);this.map.baseLayer?this.populateFromMap():this.map.events.register("addlayer", 566this,this.populateOnAdd)},unbind:function(){this.map&&(this.map.events.unregister("addlayer",this,this.populateOnAdd),this.map.events.unregister("changebaselayer",this,this.populateFromMap),delete this.map)},populateOnAdd:function(a){a.layer.isBaseLayer&&(this.populateFromMap(),this.map.events.unregister("addlayer",this,this.populateOnAdd))},populateFromMap:function(){for(var a=[],b=this.map.baseLayer.resolutions,c=this.map.baseLayer.units,d=b.length-1;0<=d;d--){var e=b[d];a.push({level:d,resolution:e, 567scale:OpenLayers.Util.getScaleFromResolution(e,c)})}this.loadData(a)},destroy:function(){this.unbind();GeoExt.data.ScaleStore.superclass.destroy.apply(this,arguments)}});Ext.namespace("GeoExt.form"); 568GeoExt.form.toFilter=function(a,b,c){a instanceof Ext.form.FormPanel&&(a=a.getForm());var d=[],a=a.getValues(!1),e;for(e in a){var f=e.split("__"),g=a[e],h;1<f.length&&void 0!==(h=GeoExt.form.toFilter.FILTER_MAP[f[1]])?e=f[0]:h=OpenLayers.Filter.Comparison.EQUAL_TO;if(h===OpenLayers.Filter.Comparison.LIKE)switch(c){case GeoExt.form.ENDS_WITH:g=".*"+g;break;case GeoExt.form.STARTS_WITH:g+=".*";break;case GeoExt.form.CONTAINS:g=".*"+g+".*"}d.push(new OpenLayers.Filter.Comparison({type:h,value:g,property:e}))}return 1== 569d.length&&b!=OpenLayers.Filter.Logical.NOT?d[0]:new OpenLayers.Filter.Logical({type:b||OpenLayers.Filter.Logical.AND,filters:d})};GeoExt.form.toFilter.FILTER_MAP={eq:OpenLayers.Filter.Comparison.EQUAL_TO,ne:OpenLayers.Filter.Comparison.NOT_EQUAL_TO,lt:OpenLayers.Filter.Comparison.LESS_THAN,le:OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO,gt:OpenLayers.Filter.Comparison.GREATER_THAN,ge:OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,like:OpenLayers.Filter.Comparison.LIKE}; 570GeoExt.form.ENDS_WITH=1;GeoExt.form.STARTS_WITH=2;GeoExt.form.CONTAINS=3; 571GeoExt.form.recordToField=function(a,b){var b=b||{},c=a.get("type");if("object"===typeof c&&c.xtype)return c;var c=c.split(":").pop(),d,e=a.get("name"),f=a.get("restriction")||{},g=a.get("nillable")||!1,h=a.get("label"),i=b.labelTpl;i?h=(i instanceof Ext.Template?i:new Ext.XTemplate(i)).apply(a.data):null==h&&(h=e);e={name:e,labelStyle:g?"":null!=b.mandatoryFieldLabelStyle?b.mandatoryFieldLabelStyle:"font-weight:bold;"};g=GeoExt.form.recordToField.REGEXES;f.enumeration?d=Ext.apply({xtype:"combo", 572fieldLabel:h,mode:"local",forceSelection:!0,triggerAction:"all",editable:!1,store:f.enumeration},e):c.match(g.text)?(c=void 0!==f.maxLength?parseFloat(f.maxLength):void 0,f=void 0!==f.minLength?parseFloat(f.minLength):void 0,d=Ext.apply({xtype:"textfield",fieldLabel:h,maxLength:c,minLength:f},e)):c.match(g.number)?(c=void 0!==f.maxInclusive?parseFloat(f.maxInclusive):void 0,f=void 0!==f.minInclusive?parseFloat(f.minInclusive):void 0,d=Ext.apply({xtype:"numberfield",fieldLabel:h,maxValue:c,minValue:f}, 573e)):c.match(g["boolean"])?(d=Ext.apply({xtype:"checkbox"},e),d[b.checkboxLabelProperty||"boxLabel"]=h):c.match(g.date)&&(d=Ext.apply({xtype:"datefield",fieldLabel:h,format:"c"},e));return d};GeoExt.form.recordToField.REGEXES={text:/^(text|string)$/i,number:/^(number|float|decimal|double|int|long|integer|short)$/i,"boolean":/^(boolean)$/i,date:/^(date|dateTime)$/i};Ext.namespace("GeoExt"); 574GeoExt.LegendPanel=Ext.extend(Ext.Panel,{dynamic:!0,layerStore:null,preferredTypes:null,filter:function(){return!0},onRender:function(){GeoExt.LegendPanel.superclass.onRender.apply(this,arguments);if(!this.layerStore)this.layerStore=GeoExt.MapPanel.guess().layers;this.layerStore.each(function(a){this.addLegend(a)},this);if(this.dynamic)this.layerStore.on({add:this.onStoreAdd,remove:this.onStoreRemove,clear:this.onStoreClear,scope:this})},recordIndexToPanelIndex:function(a){for(var b=this.layerStore, 575c=-1,d=this.items?this.items.length:0,e,f,g=b.getCount()-1;0<=g&&!(e=b.getAt(g),f=e.getLayer(),e=GeoExt.LayerLegend.getTypes(e),f.displayInLayerSwitcher&&0<e.length&&!0!==b.getAt(g).get("hideInLegend")&&(++c,a===g||c>d-1));--g);return c},getIdForLayer:function(a){return this.id+"-"+a.id},onStoreAdd:function(a,b,c){for(var a=this.recordIndexToPanelIndex(c+b.length-1),c=0,d=b.length;c<d;c++)this.addLegend(b[c],a);this.doLayout()},onStoreRemove:function(a,b){this.removeLegend(b)}
575,removeLegend:function(a){if(this.items&& 576(a=this.getComponent(this.getIdForLayer(a.getLayer()))))this.remove(a,!0),this.doLayout()},onStoreClear:function(){this.removeAllLegends()},removeAllLegends:function(){this.removeAll(!0);this.doLayout()},addLegend:function(a,b){if(!0===this.filter(a)){var c=a.getLayer(),b=b||0,d=GeoExt.LayerLegend.getTypes(a,this.preferredTypes);c.displayInLayerSwitcher&&!a.get("hideInLegend")&&0<d.length&&this.insert(b,{xtype:d[0],id:this.getIdForLayer(c),layerRecord:a,hidden:!(!c.map&&c.visibility||c.getVisibility()&& 577c.calculateInRange())})}},onDestroy:function(){this.layerStore&&(this.layerStore.un("add",this.onStoreAdd,this),this.layerStore.un("remove",this.onStoreRemove,this),this.layerStore.un("clear",this.onStoreClear,this));GeoExt.LegendPanel.superclass.onDestroy.apply(this,arguments)}});Ext.reg("gx_legendpanel",GeoExt.LegendPanel);Ext.namespace("GeoExt"); 578GeoExt.LayerLegend=Ext.extend(Ext.Container,{layerRecord:null,showTitle:!0,legendTitle:null,labelCls:null,layerStore:null,initComponent:function(){GeoExt.LayerLegend.superclass.initComponent.call(this);this.autoEl={};this.add({xtype:"label",html:this.getLayerTitle(this.layerRecord),cls:"x-form-item x-form-item-label"+(this.labelCls?" "+this.labelCls:"")});if(this.layerRecord&&this.layerRecord.store)this.layerStore=this.layerRecord.store,this.layerStore.on("update",this.onStoreUpdate,this),this.layerStore.on("add", 579this.onStoreAdd,this),this.layerStore.on("remove",this.onStoreRemove,this)},getLabel:function(){var a=this.items.get(0);return a.rendered?a.el.dom.innerHTML:a.html},onStoreRemove:function(){},onStoreAdd:function(){},onStoreUpdate:function(a,b){if(b===this.layerRecord&&0<this.items.getCount()){var c=b.getLayer();this.setVisible(c.getVisibility()&&c.calculateInRange()&&c.displayInLayerSwitcher&&!b.get("hideInLegend"));this.update()}},update:function(){var a=this.getLayerTitle(this.layerRecord),b=this.items.itemAt(0); 580b instanceof Ext.form.Label&&this.getLabel()!==a&&b.setText(a,!1)},getLayerTitle:function(a){var b=this.legendTitle||"";this.showTitle&&!b&&a&&!a.get("hideTitle")&&(b=a.get("title")||a.get("name")||a.getLayer().name||"");return b},beforeDestroy:function(){this.layerStore&&(this.layerStore.un("update",this.onStoreUpdate,this),this.layerStore.un("remove",this.onStoreRemove,this),this.layerStore.un("add",this.onStoreAdd,this));GeoExt.LayerLegend.superclass.beforeDestroy.apply(this,arguments)},onDestroy:function(){this.layerStore= 581this.layerRecord=null;GeoExt.LayerLegend.superclass.onDestroy.apply(this,arguments)}});GeoExt.LayerLegend.getTypes=function(a,b){var c=(b||[]).concat(),d=[],e,f;for(f in GeoExt.LayerLegend.types)e=GeoExt.LayerLegend.types[f].supports(a),0<e?-1==c.indexOf(f)&&d.push({type:f,score:e}):c.remove(f);d.sort(function(a,b){return a.score<b.score?1:a.score==b.score?0:-1});e=d.length;f=Array(e);for(var g=0;g<e;++g)f[g]=d[g].type;return c.concat(f)};GeoExt.LayerLegend.supports=function(){}; 582GeoExt.LayerLegend.types={};Ext.namespace("GeoExt"); 583GeoExt.LegendImage=Ext.extend(Ext.BoxComponent,{url:null,defaultImgSrc:null,imgCls:null,noImgCls:"gx-legend-noimage",initComponent:function(){GeoExt.LegendImage.superclass.initComponent.call(this);if(null===this.defaultImgSrc)this.defaultImgSrc=Ext.BLANK_IMAGE_URL;this.autoEl={tag:"img","class":this.imgCls?this.imgCls+" "+this.noImgCls:this.noImgCls,src:this.defaultImgSrc}},setUrl:function(a){this.url=a;var b=this.getEl();if(b)b.un("load",this.onImageLoad,this),b.on("load",this.onImageLoad,this,{single:!0}), 584b.un("error",this.onImageLoadError,this),b.on("error",this.onImageLoadError,this,{single:!0}),b.dom.src=a},onRender:function(a,b){GeoExt.LegendImage.superclass.onRender.call(this,a,b);this.url&&this.setUrl(this.url)},onDestroy:function(){var a=this.getEl();a&&(a.un("load",this.onImageLoad,this),a.un("error",this.onImageLoadError,this));GeoExt.LegendImage.superclass.onDestroy.apply(this,arguments)},onImageLoadError:function(){var a=this.getEl();a.addClass(this.noImgCls);a.dom.src=this.defaultImgSrc}, 585onImageLoad:function(){var a=this.getEl();OpenLayers.Util.isEquivalentUrl(a.dom.src,this.defaultImgSrc)||a.removeClass(this.noImgCls)}});Ext.reg("gx_legendimage",GeoExt.LegendImage);Ext.namespace("GeoExt"); 586GeoExt.PrintMapPanel=Ext.extend(GeoExt.MapPanel,{sourceMap:null,printProvider:null,printPage:null,previewScales:null,center:null,zoom:null,extent:null,currentZoom:null,initComponent:function(){if(this.sourceMap instanceof GeoExt.MapPanel)this.sourceMap=this.sourceMap.map;if(!this.map)this.map={};Ext.applyIf(this.map,{projection:this.sourceMap.getProjection(),maxExtent:this.sourceMap.getMaxExtent(),maxResolution:this.sourceMap.getMaxResolution(),units:this.sourceMap.getUnits()});if(!(this.printProvider instanceof 587GeoExt.data.PrintProvider))this.printProvider=new GeoExt.data.PrintProvider(this.printProvider);this.printPage=new GeoExt.data.PrintPage({printProvider:this.printProvider});this.previewScales=new Ext.data.Store;this.previewScales.add(this.printProvider.scales.getRange());this.layers=[];
587Ext.each(this.sourceMap.layers,function(a){if(!0===a.getVisibility())if(a instanceof OpenLayers.Layer.Vector){for(var b=a.features,c=Array(b.length),a=new OpenLayers.Layer.Vector(a.name),d=0,e=b.length;d<e;++d)c[d]= 588b[d].clone();a.addFeatures(c,{silent:!0});this.layers.push(a)}else this.layers.push(a.clone())},this);this.extent=this.sourceMap.getExtent();GeoExt.PrintMapPanel.superclass.initComponent.call(this)},bind:function(){this.printPage.on("change",this.fitZoom,this);this.printProvider.on("layoutchange",this.syncSize,this);this.map.events.register("moveend",this,this.updatePage);this.printPage.fit(this.sourceMap);!0===this.initialConfig.limitScales&&(this.on("resize",this.calculatePreviewScales,this),this.calculatePreviewScales())}, 589afterRender:function(){GeoExt.PrintMapPanel.superclass.afterRender.apply(this,arguments);this.syncSize();if(this.ownerCt)this.ownerCt.on({afterlayout:{fn:this.bind,scope:this,single:!0}});else this.bind()},adjustSize:function(a,b){var c=this.printProvider.layout.get("size"),c=c.width/c.height,d=this.ownerCt,e=d&&d.autoWidth?0:a||this.initialConfig.width,d=d&&d.autoHeight?0:b||this.initialConfig.height;e?(b=e/c,d&&b>d?(b=d,a=b*c):a=e):d&&(a=d*c,b=d);return{width:a,height:b}},fitZoom:function(){if(!this._updating&& 590this.printPage.scale){this._updating=!0;var a=this.printPage.getPrintExtent(this.map);this.currentZoom=this.map.getZoomForExtent(a);this.map.zoomToExtent(a);delete this._updating}},updatePage:function(){if(!this._updating){var a=this.map.getZoom();this._updating=!0;a===this.currentZoom?this.printPage.setCenter(this.map.getCenter()):this.printPage.fit(this.map);delete this._updating;this.currentZoom=a}},calculatePreviewScales:function(){this.previewScales.removeAll();this.printPage.suspendEvents(); 591var a=this.printPage.scale,b=this.map.getSize(),c={},d=[];this.printProvider.scales.each(function(a){this.printPage.setScale(a);var e=this.printPage.getPrintExtent(this.map),f=this.map.getZoomForExtent(e),e=Math.max(e.getWidth()/b.w,e.getHeight()/b.h),j=this.map.getResolutionForZoom(f),e=Math.abs(e-j);if(!(f in c)||c[f].diff>e)c[f]={rec:a,diff:e},-1==d.indexOf(f)&&d.push(f)},this);for(var e=0,f=d.length;e<f;++e)this.previewScales.add(c[d[e]].rec);a&&this.printPage.setScale(a);this.printPage.resumeEvents(); 592a&&0<this.previewScales.getCount()&&(e=this.previewScales.getAt(0),f=this.previewScales.getAt(this.previewScales.getCount()-1),a.get("value")<f.get("value")?this.printPage.setScale(f):a.get("value")>e.get("value")&&this.printPage.setScale(e));this.fitZoom()},print:function(a){this.printProvider.print(this.map,[this.printPage],a)},beforeDestroy:function(){this.map.events.unregister("moveend",this,this.updatePage);this.printPage.un("change",this.fitZoom,this);this.printProvider.un("layoutchange",this.syncSize, 593this);GeoExt.PrintMapPanel.superclass.beforeDestroy.apply(this,arguments)}});Ext.reg("gx_printmappanel",GeoExt.PrintMapPanel); 594OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:" ",space:" ",newline:"\n",level:0,pretty:!1,nativeJSON:function(){return!(!window.JSON||!("function"==typeof JSON.parse&&"function"==typeof JSON.stringify))}(),read:function(a,b){var c;if(this.nativeJSON)c=JSON.parse(a,b);else try{if(/^[\],:{}\s]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))&&(c=eval("("+a+")"),"function"=== 595typeof b)){var d=function(a,c){if(c&&"object"===typeof c)for(var e in c)c.hasOwnProperty(e)&&(c[e]=d(e,c[e]));return b(a,c)};c=d("",c)}}catch(e){}if(this.keepData)this.data=c;return c},write:function(a,b){this.pretty=!!b;var c=null,d=typeof a;if(this.serialize[d])try{c=!this.pretty&&this.nativeJSON?JSON.stringify(a):this.serialize[d].apply(this,[a])}catch(e){OpenLayers.Console.error("Trouble serializing: "+e)}return c},writeIndent:function(){var a=[];if(this.pretty)for(var b=0;b<this.level;++b)a.push(this.indent); 596return a.join("")},writeNewline:function(){return this.pretty?this.newline:""},writeSpace:function(){return this.pretty?this.space:""}
596,serialize:{object:function(a){if(null==a)return"null";if(a.constructor==Date)return this.serialize.date.apply(this,[a]);if(a.constructor==Array)return this.serialize.array.apply(this,[a]);var b=["{"];this.level+=1;var c,d,e,f=!1;for(c in a)a.hasOwnProperty(c)&&(d=OpenLayers.Format.JSON.prototype.write.apply(this,[c,this.pretty]),e=OpenLayers.Format.JSON.prototype.write.apply(this, 597[a[c],this.pretty]),null!=d&&null!=e&&(f&&b.push(","),b.push(this.writeNewline(),this.writeIndent(),d,":",this.writeSpace(),e),f=!0));this.level-=1;b.push(this.writeNewline(),this.writeIndent(),"}");return b.join("")},array:function(a){var b,c=["["];this.level+=1;for(var d=0,e=a.length;d<e;++d)b=OpenLayers.Format.JSON.prototype.write.apply(this,[a[d],this.pretty]),null!=b&&(0<d&&c.push(","),c.push(this.writeNewline(),this.writeIndent(),b));this.level-=1;c.push(this.writeNewline(),this.writeIndent(), 598"]");return c.join("")},string:function(a){var b={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(a)?'"'+a.replace(/([\x00-\x1f\\"])/g,function(a,d){var e=b[d];if(e)return e;e=d.charCodeAt();return"\\u00"+Math.floor(e/16).toString(16)+(e%16).toString(16)})+'"':'"'+a+'"'},number:function(a){return isFinite(a)?""+a:"null"},"boolean":function(a){return""+a},date:function(a){function b(a){return 10>a?"0"+a:a}return'"'+a.getFullYear()+"-"+ 599b(a.getMonth()+1)+"-"+b(a.getDate())+"T"+b(a.getHours())+":"+b(a.getMinutes())+":"+b(a.getSeconds())+'"'}},CLASS_NAME:"OpenLayers.Format.JSON"}); 600OpenLayers.Format.GeoJSON=OpenLayers.Class(OpenLayers.Format.JSON,{ignoreExtraDims:!1,read:function(a,b,c){var b=b?b:"FeatureCollection",d=null,e=null;if(e="string"==typeof a?OpenLayers.Format.JSON.prototype.read.apply(this,[a,c]):a)if("string"!=typeof e.type)OpenLayers.Console.error("Bad GeoJSON - no type: "+a);else{if(this.isValidType(e,b))switch(b){case "Geometry":try{d=this.parseGeometry(e)}catch(f){OpenLayers.Console.error(f)}break;case "Feature":try{d=this.parseFeature(e),d.type="Feature"}catch(g){OpenLayers.Console.error(g)}break; 601case "FeatureCollection":switch(d=[],e.type){case "Feature":try{d.push(this.parseFeature(e))}catch(h){d=null,OpenLayers.Console.error(h)}break;case "FeatureCollection":a=0;for(b=e.features.length;a<b;++a)try{d.push(this.parseFeature(e.features[a]))}catch(i){d=null,OpenLayers.Console.error(i)}break;default:try{var j=this.parseGeometry(e);d.push(new OpenLayers.Feature.Vector(j))}catch(k){d=null,OpenLayers.Console.error(k)}}}}else OpenLayers.Console.error("Bad JSON: "+a);return d},isValidType:function(a, 602b){var c=!1;switch(b){case "Geometry":-1==OpenLayers.Util.indexOf("Point,MultiPoint,LineString,MultiLineString,Polygon,MultiPolygon,Box,GeometryCollection".split(","),a.type)?OpenLayers.Console.error("Unsupported geometry type: "+a.type):c=!0;break;case "FeatureCollection":c=!0;break;default:a.type==b?c=!0:OpenLayers.Console.error("Cannot convert types from "+a.type+" to "+b)}return c},parseFeature:function(a){var b,c,d;c=a.properties?a.properties:{};d=a.geometry&&a.geometry.bbox||a.bbox;try{b=this.parseGeometry(a.geometry)}catch(e){throw e; 603}b=new OpenLayers.Feature.Vector(b,c);if(d)b.bounds=OpenLayers.Bounds.fromArray(d);if(a.id)b.fid=a.id;return b},parseGeometry:function(a){if(null==a)return null;var b,c=!1;if("GeometryCollection"==a.type){if(!OpenLayers.Util.isArray(a.geometries))throw"GeometryCollection must have geometries array: "+a;b=a.geometries.length;for(var c=Array(b),d=0;d<b;++d)c[d]=this.parseGeometry.apply(this,[a.geometries[d]]);b=new OpenLayers.Geometry.Collection(c);c=!0}else{if(!OpenLayers.Util.isArray(a.coordinates))throw"Geometry must have coordinates array: "+ 604a;if(!this.parseCoords[a.type.toLowerCase()])throw"Unsupported geometry type: "+a.type;try{b=this.parseCoords[a.type.toLowerCase()].apply(this,[a.coordinates])}catch(e){throw e;}}this.internalProjection&&this.externalProjection&&!c&&b.transform(this.externalProjection,this.internalProjection);return b},parseCoords:{point:function(a){if(!1==this.ignoreExtraDims&&2!=a.length)throw"Only 2D points are supported: "+a;return new OpenLayers.Geometry.Point(a[0],a[1])},multipoint:function(a){for(var b=[], 605c=null,d=0,e=a.length;d<e;++d){try{c=this.parseCoords.point.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.MultiPoint(b)},linestring:function(a){for(var b=[],c=null,d=0,e=a.length;d<e;++d){try{c=this.parseCoords.point.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.LineString(b)},multilinestring:function(a){for(var b=[],c=null,d=0,e=a.length;d<e;++d){try{c=this.parseCoords.linestring.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.MultiLineString(b)}, 606polygon:function(a){for(var b=[],c,d,e=0,f=a.length;e<f;++e){try{d=this.parseCoords.linestring.apply(this,[a[e]])}catch(g){throw g;}c=new OpenLayers.Geometry.LinearRing(d.components);b.push(c)}return new OpenLayers.Geometry.Polygon(b)},multipolygon:function(a){for(var b=[],c=null,d=0,e=a.length;d<e;++d){try{c=this.parseCoords.polygon.apply(this,[a[d]])}catch(f){throw f;}b.push(c)}return new OpenLayers.Geometry.MultiPolygon(b)}
606,box:function(a){if(2!=a.length)throw"GeoJSON box coordinates must have 2 elements"; 607return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(a[0][0],a[0][1]),new OpenLayers.Geometry.Point(a[1][0],a[0][1]),new OpenLayers.Geometry.Point(a[1][0],a[1][1]),new OpenLayers.Geometry.Point(a[0][0],a[1][1]),new OpenLayers.Geometry.Point(a[0][0],a[0][1])])])}},write:function(a,b){var c={type:null};if(OpenLayers.Util.isArray(a)){c.type="FeatureCollection";var d=a.length;c.features=Array(d);for(var e=0;e<d;++e){var f=a[e];if(!f instanceof OpenLayers.Feature.Vector)throw"FeatureCollection only supports collections of features: "+ 608f;c.features[e]=this.extract.feature.apply(this,[f])}}else if(0==a.CLASS_NAME.indexOf("OpenLayers.Geometry"))c=this.extract.geometry.apply(this,[a]);else if(a instanceof OpenLayers.Feature.Vector&&(c=this.extract.feature.apply(this,[a]),a.layer&&a.layer.projection))c.crs=this.createCRSObject(a);return OpenLayers.Format.JSON.prototype.write.apply(this,[c,b])},createCRSObject:function(a){var a=a.layer.projection.toString(),b={};a.match(/epsg:/i)&&(a=parseInt(a.substring(a.indexOf(":")+1)),b=4326==a? 609{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+a}});return b},extract:{feature:function(a){var b=this.extract.geometry.apply(this,[a.geometry]),b={type:"Feature",properties:a.attributes,geometry:b};if(null!=a.fid)b.id=a.fid;return b},geometry:function(a){if(null==a)return null;this.internalProjection&&this.externalProjection&&(a=a.clone(),a.transform(this.internalProjection,this.externalProjection));var b=a.CLASS_NAME.split(".")[2],a=this.extract[b.toLowerCase()].apply(this, 610[a]);return"Collection"==b?{type:"GeometryCollection",geometries:a}:{type:b,coordinates:a}},point:function(a){return[a.x,a.y]},multipoint:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.point.apply(this,[a.components[c]]));return b},linestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.point.apply(this,[a.components[c]]));return b},multilinestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.linestring.apply(this, 611[a.components[c]]));return b},polygon:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.linestring.apply(this,[a.components[c]]));return b},multipolygon:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.polygon.apply(this,[a.components[c]]));return b},collection:function(a){for(var b=a.components.length,c=Array(b),d=0;d<b;++d)c[d]=this.extract.geometry.apply(this,[a.components[d]]);return c}},CLASS_NAME:"OpenLayers.Format.GeoJSON"});Ext.namespace("GeoExt.data"); 612GeoExt.data.PrintProvider=Ext.extend(Ext.util.Observable,{url:null,capabilities:null,method:"POST",encoding:document.charset||document.characterSet||"UTF-8",timeout:3E4,customParams:null,scales:null,dpis:null,layouts:null,dpi:null,layout:null,constructor:function(a){this.initialConfig=a;Ext.apply(this,a);if(!this.customParams)this.customParams={};this.addEvents("loadcapabilities","layoutchange","dpichange","beforeprint","print","printexception","beforeencodelayer","encodelayer","beforedownload","beforeencodelegend"); 613GeoExt.data.PrintProvider.superclass.constructor.apply(this,arguments);this.scales=new Ext.data.JsonStore({root:"scales",sortInfo:{field:"value",direction:"DESC"},fields:["name",{name:"value",type:"float"}]});this.dpis=new Ext.data.JsonStore({root:"dpis",fields:["name",{name:"value",type:"float"}]});this.layouts=new Ext.data.JsonStore({root:"layouts",fields:["name",{name:"size",mapping:"map"},{name:"rotation",type:"boolean"}]});a.capabilities?this.loadStores():(this.url.split("/").pop()&&(this.url+= 614"/"),this.initialConfig.autoLoad&&this.loadCapabilities())},setLayout:function(a){this.layout=a;this.fireEvent("layoutchange",this,a)},setDpi:function(a){this.dpi=a;this.fireEvent("dpichange",this,a)},print:function(a,b,c){if(a instanceof GeoExt.MapPanel)a=a.map;b=b instanceof Array?b:[b];c=c||{};if(!1!==this.fireEvent("beforeprint",this,a,b,c)){var d=Ext.apply({units:a.getUnits(),srs:a.baseLayer.projection.getCode(),layout:this.layout.get("name"),dpi:this.dpi.get("value")},this.customParams),e=b[0].feature.layer, 615f=[],g=a.layers.concat();g.remove(a.baseLayer);g.unshift(a.baseLayer);Ext.each(g,function(a){a!==e&&!0===a.getVisibility()&&(a=this.encodeLayer(a))&&f.push(a)},this);d.layers=f;var h=[];Ext.each(b,function(a){h.push(Ext.apply({center:[a.center.lon,a.center.lat],scale:a.scale.get("value"),rotation:a.rotation},a.customParams))},this);d.pages=h;if(c.overview){var i=[];Ext.each(c.overview.layers,function(a){(a=this.encodeLayer(a))&&i.push(a)},this);d.overviewLayers=i}if(c.legend&&!1!==this.fireEvent("beforeencodelegend", 616this,d,c.legend)){a=c.legend;(b=a.rendered)||(a=a.cloneConfig({renderTo:document.body,hidden:!0}));var j=[];
616a.items&&a.items.each(function(a){if(!a.hidden){var b=this.encoders.legends[a.getXType()];j=j.concat(b.call(this,a,d.pages[0].scale))}},this);b||a.destroy();d.legends=j}"GET"===this.method?this.download(Ext.urlAppend(this.capabilities.printURL,"spec="+encodeURIComponent(Ext.encode(d)))):Ext.Ajax.request({url:this.capabilities.createURL,timeout:this.timeout,jsonData:d,headers:{"Content-Type":"application/json; charset="+ 617this.encoding},success:function(a){this.download(Ext.decode(a.responseText).getURL)},failure:function(a){this.fireEvent("printexception",this,a)},params:this.initialConfig.baseParams,scope:this})}},download:function(a){if(!1!==this.fireEvent("beforedownload",this,a))Ext.isOpera?window.open(a):window.location.href=a;this.fireEvent("print",this,a)},loadCapabilities:function(){this.url&&Ext.Ajax.request({url:this.url+"info.json",method:"GET",disableCaching:!1,success:function(a){this.capabilities=Ext.decode(a.responseText); 618this.loadStores()},params:this.initialConfig.baseParams,scope:this})},loadStores:function(){this.scales.loadData(this.capabilities);this.dpis.loadData(this.capabilities);this.layouts.loadData(this.capabilities);this.setLayout(this.layouts.getAt(0));this.setDpi(this.dpis.getAt(0));this.fireEvent("loadcapabilities",this,this.capabilities)},encodeLayer:function(a){var b,c;for(c in this.encoders.layers)if(OpenLayers.Layer[c]&&a instanceof OpenLayers.Layer[c]){if(!1===this.fireEvent("beforeencodelayer", 619this,a))return;b=this.encoders.layers[c].call(this,a);this.fireEvent("encodelayer",this,a,b);break}return b&&b.type?b:null},getAbsoluteUrl:function(a){Ext.isSafari&&(a=a.replace(/{/g,"%7B"),a=a.replace(/}/g,"%7D"));var b;Ext.isIE6||Ext.isIE7||Ext.isIE8?(b=document.createElement("<a href='"+a+"'/>"),b.style.display="none",document.body.appendChild(b),b.href=b.href,document.body.removeChild(b)):(b=document.createElement("a"),b.href=a);return b.href},encoders:{layers:{Layer:function(a){var b={};if(a.options&& 620a.options.maxScale)b.minScaleDenominator=a.options.maxScale;if(a.options&&a.options.minScale)b.maxScaleDenominator=a.options.minScale;return b},WMS:function(a){var b=this.encoders.layers.HTTPRequest.call(this,a);b.singleTile=a.singleTile;Ext.apply(b,{type:"WMS",layers:(""+a.params.LAYERS).split(","),format:a.params.FORMAT,styles:(""+a.params.STYLES).split(","),singleTile:a.singleTile});var c,d;for(d in a.params)if(c=d.toLowerCase(),null!=a.params[d]&&!a.DEFAULT_PARAMS[c]&&-1=="layers,styles,width,height,srs".indexOf(c)){if(!b.customParams)b.customParams= 621{};b.customParams[d]=a.params[d]}return b},OSM:function(a){a=this.encoders.layers.TileCache.call(this,a);return Ext.apply(a,{type:"OSM",baseURL:a.baseURL.substr(0,a.baseURL.indexOf("$")),extension:"png"})},TMS:function(a){var b=this.encoders.layers.TileCache.call(this,a);return Ext.apply(b,{type:"TMS",format:a.type})},TileCache:function(a){var b=this.encoders.layers.HTTPRequest.call(this,a);return Ext.apply(b,{type:"TileCache",layer:a.layername,maxExtent:a.maxExtent.toArray(),tileSize:[a.tileSize.w, 622a.tileSize.h],extension:a.extension,resolutions:a.serverResolutions||a.resolutions})},WMTS:function(a){var b=this.encoders.layers.HTTPRequest.call(this,a),b=Ext.apply(b,{type:"WMTS",layer:a.layer,version:a.version,requestEncoding:a.requestEncoding,style:a.style,dimensions:a.dimensions,params:a.params,matrixSet:a.matrixSet});if(a.matrixIds){if("KVP"==a.requestEncoding)b.format=a.format;b.matrixIds=[];Ext.each(a.matrixIds,function(c){b.matrixIds.push({identifier:c.identifier,matrixSize:[c.matrixWidth, 623c.matrixHeight],resolution:2.8E-4*c.scaleDenominator/OpenLayers.METERS_PER_INCH/OpenLayers.INCHES_PER_UNIT[a.units],tileSize:[c.tileWidth,c.tileHeight],topLeftCorner:[c.topLeftCorner.lon,c.topLeftCorner.lat]})});return b}return Ext.apply(b,{formatSuffix:a.formatSuffix,tileOrigin:[a.tileOrigin.lon,a.tileOrigin.lat],tileSize:[a.tileSize.w,a.tileSize.h],maxExtent:null!=a.tileFullExtent?a.tileFullExtent.toArray():a.maxExtent.toArray(),zoomOffset:a.zoomOffset,resolutions:a.serverResolutions||a.resolutions})}, 624KaMapCache:function(a){var b=this.encoders.layers.KaMap.call(this,a);return Ext.apply(b,{type:"KaMapCache",group:a.params.g,metaTileWidth:a.params.metaTileSize.w,metaTileHeight:a.params.metaTileSize.h})},KaMap:function(a){var b=this.encoders.layers.HTTPRequest.call(this,a);return Ext.apply(b,{type:"KaMap",map:a.params.map,extension:a.params.i,group:a.params.g||"",maxExtent:a.maxExtent.toArray(),tileSize:[a.tileSize.w,a.tileSize.h],resolutions:a.serverResolutions||a.resolutions})},HTTPRequest:function(a){var b= 625this.encoders.layers.Layer.call(this,a);return Ext.apply(b,{baseURL:this.getAbsoluteUrl(a.url instanceof Array?a.url[0]:a.url),opacity:null!=a.opacity?a.opacity:1})},Image:function(a){var b=this.encoders.layers.Layer.call(this,a);return Ext.apply(b,{type:"Image",baseURL:this.getAbsoluteUrl(a.getURL(a.extent)),opacity:null!=a.opacity?a.opacity:1,extent:a.extent.toArray(),pixelSize:[a.size.w,a.size.h],name:a.name})}
625,Vector:function(a){if(a.features.length){for(var b=[],c={},d=a.features,e=new OpenLayers.Format.GeoJSON, 626f=new OpenLayers.Format.JSON,g=1,h={},i,j,k,l,m=0,n=d.length;m<n;++m)if(i=d[m],j=i.style||a.style||a.styleMap.createSymbolizer(i,i.renderIntent),"none"!=j.display)k=f.write(j),(l=h[k])?k=l:(h[k]=k=g++,c[k]=j.externalGraphic?Ext.applyIf({externalGraphic:this.getAbsoluteUrl(j.externalGraphic)},j):j),i=e.extract.feature.call(e,i),i.properties=OpenLayers.Util.extend({_gx_style:k},i.properties),b.push(i);d=this.encoders.layers.Layer.call(this,a);return Ext.apply(d,{type:"Vector",styles:c,styleProperty:"_gx_style", 627geoJson:{type:"FeatureCollection",features:b},name:a.name,opacity:null!=a.opacity?a.opacity:1})}},Markers:function(a){for(var b=[],c=0,d=a.markers.length;c<d;c++){var e=a.markers[c],f=new OpenLayers.Geometry.Point(e.lonlat.lon,e.lonlat.lat),e=new OpenLayers.Feature.Vector(f,{},{externalGraphic:e.icon.url,graphicWidth:e.icon.size.w,graphicHeight:e.icon.size.h,graphicXOffset:e.icon.offset.x,graphicYOffset:e.icon.offset.y});b.push(e)}a=new OpenLayers.Layer.Vector(a.name);a.addFeatures(b);b=this.encoders.layers.Vector.call(this, 628a);a.destroy();return b}},legends:{gx_wmslegend:function(a,b){for(var c=this.encoders.legends.base.call(this,a),d=[],e=1,f=a.items.getCount();e<f;++e){var g=a.items.get(e).url;if(!0===a.useScaleParameter&&-1!=g.toLowerCase().indexOf("request=getlegendgraphic")){var g=g.split("?"),h=Ext.urlDecode(g[1]);h.SCALE=b;g=g[0]+"?"+Ext.urlEncode(h)}d.push(this.getAbsoluteUrl(g))}c[0].classes[0]={name:"",icons:d};return c},gx_urllegend:function(a){var b=this.encoders.legends.base.call(this,a);b[0].classes.push({name:"", 629icon:this.getAbsoluteUrl(a.items.get(1).url)});return b},base:function(a){return[{name:a.getLabel(),classes:[]}]}}}});Ext.namespace("GeoExt.data"); 630GeoExt.data.PrintPage=Ext.extend(Ext.util.Observable,{printProvider:null,feature:null,center:null,scale:null,rotation:0,customParams:null,constructor:function(a){this.initialConfig=a;Ext.apply(this,a);if(!this.customParams)this.customParams={};this.addEvents("change");GeoExt.data.PrintPage.superclass.constructor.apply(this,arguments);this.feature=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(-1,-1),new OpenLayers.Geometry.Point(1, 631-1),new OpenLayers.Geometry.Point(1,1),new OpenLayers.Geometry.Point(-1,1)])]));if(this.printProvider.capabilities)this.setScale(this.printProvider.scales.getAt(0));else this.printProvider.on({loadcapabilities:function(){this.setScale(this.printProvider.scales.getAt(0))},scope:this,single:!0});this.printProvider.on({layoutchange:this.onLayoutChange,scope:this})},getPrintExtent:function(a){a=a instanceof GeoExt.MapPanel?a.map:a;return this.calculatePageBounds(this.scale,a.getUnits())},setScale:function(a, 632b){var c=this.calculatePageBounds(a,b).toGeometry(),d=this.rotation;0!=d&&c.rotate(-d,c.getCentroid());this.updateFeature(c,{scale:a})},setCenter:function(a){var b=this.feature.geometry,c=b.getBounds().getCenterLonLat();b.move(a.lon-c.lon,a.lat-c.lat);this.updateFeature(b,{center:a})},setRotation:function(a,b){if(b||!0===this.printProvider.layout.get("rotation")){var c=this.feature.geometry;c.rotate(this.rotation-a,c.getCentroid());this.updateFeature(c,{rotation:a})}},fit:function(a,b){var b=b||{}, 633c=a,d;if(a instanceof GeoExt.MapPanel)c=a.map;else if(a instanceof OpenLayers.Feature.Vector)c=a.layer.map,d=a.geometry.getBounds();if(!d&&(d=c.getExtent(),!d))return;this._updating=!0;var e=d.getCenterLonLat();this.setCenter(e);var f=c.getUnits(),g=this.printProvider.scales.getAt(0),h=Number.POSITIVE_INFINITY,i=d.getWidth(),j=d.getHeight();this.printProvider.scales.each(function(a){var c=this.calculatePageBounds(a,f);if("closest"==b.mode)c=Math.abs(c.getWidth()-i)+Math.abs(c.getHeight()-j),c<h&& 634(h=c,g=a);else{if((c="screen"==b.mode?!d.containsBounds(c):c.containsBounds(d))||"screen"==b.mode&&!c)g=a;return c}},this);this.setScale(g,f);delete this._updating;this.updateFeature(this.feature.geometry,{center:e,scale:g})},updateFeature:function(a,b){var c=this.feature,d=c.geometry!==a;a.id=c.geometry.id;c.geometry=a;if(!this._updating){for(var e in b)b[e]===this[e]?delete b[e]:(this[e]=b[e],d=!0);Ext.apply(this,b);c.layer&&c.layer.drawFeature(c);d&&this.fireEvent("change",this,b)}},calculatePageBounds:function(a, 635b){var c=a.get("value"),d=this.feature,e=this.feature.geometry.getBounds().getCenterLonLat(),f=this.printProvider.layout.get("size"),b=b||d.layer&&d.layer.map&&d.layer.map.getUnits()||"dd",g=OpenLayers.INCHES_PER_UNIT[b],d=f.width/72/g*c/2,c=f.height/72/g*c/2;return new OpenLayers.Bounds(e.lon-d,e.lat-c,e.lon+d,e.lat+c)},onLayoutChange:function(){!1===this.printProvider.layout.get("rotation")&&this.setRotation(0,!0);this.scale&&this.setScale(this.scale)},destroy:function(){this.printProvider.un("layoutchange", 636this.onLayoutChange,this)}}); 637OpenLayers.Layer.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:!1,initialize:function(a,b,c,d){OpenLayers.Layer.prototype.initialize.apply(this,[a,d]);this.url=b;if(!this.params)this.params=OpenLayers.Util.extend({},c)},destroy:function(){this.params=this.url=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)}
637,clone:function(a){null==a&&(a=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.getOptions())); 638return 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();null!=this.map&&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, 639c-=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),e=OpenLayers.Util.getParameterString(d);OpenLayers.Util.isArray(c)&&(c=this.selectUrl(e,c));var e=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(c)),f;for(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"}); 640OpenLayers.Tile=OpenLayers.Class({events:null,eventListeners:null,id:null,layer:null,url:null,bounds:null,size:null,position:null,isLoading:!1,initialize:function(a,b,c,d,e,f){this.layer=a;this.position=b.clone();this.setBounds(c);this.url=d;if(e)this.size=e.clone();this.id=OpenLayers.Util.createUniqueID("Tile_");OpenLayers.Util.extend(this,f);this.events=new OpenLayers.Events(this);if(this.eventListeners instanceof Object)this.events.on(this.eventListeners)},unload:function(){if(this.isLoading)this.isLoading= 641!1,this.events.triggerEvent("unload")},destroy:function(){this.position=this.size=this.bounds=this.layer=null;this.eventListeners&&this.events.un(this.eventListeners);this.events.destroy();this.events=this.eventListeners=null},draw:function(a){a||this.clear();var b=this.shouldDraw();b&&!a&&!1===this.events.triggerEvent("beforedraw")&&(b=null);return b},shouldDraw:function(){var a=!1,b=this.layer.maxExtent;if(b){var c=this.layer.map,c=c.baseLayer.wrapDateLine&&c.getMaxExtent();this.bounds.intersectsBounds(b, 642{inclusive:!1,worldBounds:c})&&(a=!0)}
642return a||this.layer.displayOutsideMaxExtent},setBounds:function(a){a=a.clone();if(this.layer.map.baseLayer.wrapDateLine)var b=this.layer.map.getMaxExtent(),c=this.layer.map.getResolution(),a=a.wrapDateLine(b,{leftTolerance:c,rightTolerance:c});this.bounds=a},moveTo:function(a,b,c){null==c&&(c=!0);this.setBounds(a);this.position=b.clone();c&&this.draw()},clear:function(){},CLASS_NAME:"OpenLayers.Tile"}); 643OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,imageReloadAttempts:null,layerAlphaHack:null,asyncRequestId:null,maxGetUrlLength:null,canvasContext:null,crossOriginKeyword:null,initialize:function(a,b,c,d,e,f){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=d;this.layerAlphaHack=this.layer.alpha&&OpenLayers.Util.alphaHack();if(null!=this.maxGetUrlLength||this.layer.gutter||this.layerAlphaHack)this.frame=document.createElement("div"),this.frame.style.position= 644"absolute",this.frame.style.overflow="hidden";null!=this.maxGetUrlLength&&OpenLayers.Util.extend(this,OpenLayers.Tile.Image.IFrame)},destroy:function(){if(this.imgDiv)this.clear(),this.frame=this.imgDiv=null;this.asyncRequestId=null;OpenLayers.Tile.prototype.destroy.apply(this,arguments)},draw:function(){var a=OpenLayers.Tile.prototype.draw.apply(this,arguments);if(a){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject)this.bounds=this.getBoundsFromBaseLayer(this.position);this.isLoading? 645this._loadEvent="reload":(this.isLoading=!0,this._loadEvent="loadstart");this.renderTile();this.positionTile()}else!1===a&&this.unload();return a},renderTile:function(){if(this.layer.async){var a=this.asyncRequestId=(this.asyncRequestId||0)+1;this.layer.getURLasync(this.bounds,function(b){if(a==this.asyncRequestId)this.url=b,this.initImage()},this)}else this.url=this.layer.getURL(this.bounds),this.initImage()},positionTile:function(){var a=this.getTile().style,b=this.frame?this.size:this.layer.getImageSize(this.bounds), 646c=1;this.layer instanceof OpenLayers.Layer.Grid&&(c=this.layer.getServerResolution()/this.layer.map.getResolution());a.left=this.position.x+"px";a.top=this.position.y+"px";a.width=Math.round(c*b.w)+"px";a.height=Math.round(c*b.h)+"px"},clear:function(){OpenLayers.Tile.prototype.clear.apply(this,arguments);var a=this.imgDiv;if(a){var b=this.getTile();b.parentNode===this.layer.div&&this.layer.div.removeChild(b);this.setImgSrc();if(!0===this.layerAlphaHack)a.style.filter="";OpenLayers.Element.removeClass(a, 647"olImageLoadError")}this.canvasContext=null},getImage:function(){if(!this.imgDiv){this.imgDiv=OpenLayers.Tile.Image.IMAGE.cloneNode(!1);var a=this.imgDiv.style;if(this.frame){var b=0,c=0;this.layer.gutter&&(b=100*(this.layer.gutter/this.layer.tileSize.w),c=100*(this.layer.gutter/this.layer.tileSize.h));a.left=-b+"%";a.top=-c+"%";a.width=2*b+100+"%";a.height=2*c+100+"%"}a.visibility="hidden";a.opacity=0;if(1>this.layer.opacity)a.filter="alpha(opacity="+100*this.layer.opacity+")";a.position="absolute"; 648if(this.layerAlphaHack)a.paddingTop=a.height,a.height="0",a.width="100%";this.frame&&this.frame.appendChild(this.imgDiv)}return this.imgDiv},setImage:function(a){this.imgDiv=a},initImage:function(){this.events.triggerEvent("beforeload");this.layer.div.appendChild(this.getTile());this.events.triggerEvent(this._loadEvent);var a=this.getImage();this.url&&OpenLayers.Util.isEquivalentUrl(a.src,this.url)?this._loadTimeout=window.setTimeout(OpenLayers.Function.bind(this.onImageLoad,this),0):(this.stopLoading(), 649this.crossOriginKeyword&&a.removeAttribute("crossorigin"),OpenLayers.Event.observe(a,"load",OpenLayers.Function.bind(this.onImageLoad,this)),OpenLayers.Event.observe(a,"error",OpenLayers.Function.bind(this.onImageError,this)),this.imageReloadAttempts=0,this.setImgSrc(this.url))},setImgSrc:function(a){var b=this.imgDiv;a?(b.style.visibility="hidden",b.style.opacity=0,this.crossOriginKeyword&&("data:"!==a.substr(0,5)?b.setAttribute("crossorigin",this.crossOriginKeyword):b.removeAttribute("crossorigin")), 650b.src=a):(this.stopLoading(),this.imgDiv=null,b.parentNode&&b.parentNode.removeChild(b))},getTile:function(){return this.frame?this.frame:this.getImage()},createBackBuffer:function(){if(this.imgDiv&&!this.isLoading){var a;this.frame?(a=this.frame.cloneNode(!1),a.appendChild(this.imgDiv)):a=this.imgDiv;this.imgDiv=null;return a}},onImageLoad:function(){var a=this.imgDiv;this.stopLoading();a.style.visibility="inherit";a.style.opacity=this.layer.opacity;this.isLoading=!1;this.canvasContext=null;this.events.triggerEvent("loadend"); 651if(!0===this.layerAlphaHack)a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a.src+"', sizingMethod='scale')"},onImageError:function(){var a=this.imgDiv;null!=a.src&&(this.imageReloadAttempts++,this.imageReloadAttempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS?this.setImgSrc(this.layer.getURL(this.bounds)):(OpenLayers.Element.addClass(a,"olImageLoadError"),this.events.triggerEvent("loaderror"),this.onImageLoad()))},stopLoading:function(){OpenLayers.Event.stopObservingElement(this.imgDiv); 652window.clearTimeout(this._loadTimeout);delete this._loadTimeout},getCanvasContext:function(){if(OpenLayers.CANVAS_SUPPORTED&&this.imgDiv&&!this.isLoading){if(!this.canvasContext){var a=document.createElement("canvas");a.width=this.size.w;a.height=this.size.h;this.canvasContext=a.getContext("2d");this.canvasContext.drawImage(this.imgDiv,0,0)}return this.canvasContext}},CLASS_NAME:"OpenLayers.Tile.Image"}); 653OpenLayers.Tile.Image.IMAGE=function(){var a=new Image;a.className="olTileImage";a.galleryImg="no";return a}(); 654OpenLayers.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,tileOriginCorner:"bl",tileOrigin:null,tileOptions:null,tileClass:OpenLayers.Tile.Image,grid:null,
654singleTile:!1,ratio:1.5,buffer:0,transitionEffect:"resize",numLoadingTiles:0,serverResolutions:null,loading:!1,backBuffer:null,gridResolution:null,backBufferResolution:null,backBufferLonLat:null,backBufferTimerId:null,removeBackBufferDelay:null,className:null,gridLayout:null,rowSign:null,transitionendEvents:["transitionend", 655"webkitTransitionEnd","otransitionend","oTransitionEnd"],initialize:function(a,b,c,d){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.grid=[];this._removeBackBuffer=OpenLayers.Function.bind(this.removeBackBuffer,this);this.initProperties();this.rowSign="t"===this.tileOriginCorner.substr(0,1)?1:-1},initProperties:function(){if(void 0===this.options.removeBackBufferDelay)this.removeBackBufferDelay=this.singleTile?0:2500;if(void 0===this.options.className)this.className= 656this.singleTile?"olLayerGridSingleTile":"olLayerGrid"},setMap:function(a){OpenLayers.Layer.HTTPRequest.prototype.setMap.call(this,a);OpenLayers.Element.addClass(this.div,this.className)},removeMap:function(){this.removeBackBuffer()},destroy:function(){this.removeBackBuffer();this.clearGrid();this.tileSize=this.grid=null;OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments)},clearGrid:function(){if(this.grid){for(var a=0,b=this.grid.length;a<b;a++)for(var c=this.grid[a],d=0,e=c.length;d< 657e;d++)this.destroyTile(c[d]);this.grid=[];this.gridLayout=this.gridResolution=null}},addOptions:function(a,b){var c=void 0!==a.singleTile&&a.singleTile!==this.singleTile;OpenLayers.Layer.HTTPRequest.prototype.addOptions.apply(this,arguments);if(this.map&&c)this.initProperties(),this.clearGrid(),this.tileSize=this.options.tileSize,this.setTileSize(),this.moveTo(null,!0)},clone:function(a){null==a&&(a=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.getOptions()));a=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this, 658[a]);if(null!=this.tileSize)a.tileSize=this.tileSize.clone();a.grid=[];a.gridResolution=null;a.backBuffer=null;a.backBufferTimerId=null;a.loading=!1;a.numLoadingTiles=0;return a},moveTo:function(a,b,c){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);a=a||this.map.getExtent();if(null!=a){var d=!this.grid.length||b,e=this.getTilesBounds(),f=this.map.getResolution();this.getServerResolution(f);if(this.singleTile){if(d||!c&&!e.containsBounds(a))b&&"resize"!==this.transitionEffect&& 659this.removeBackBuffer(),(!b||"resize"===this.transitionEffect)&&this.applyBackBuffer(f),this.initSingleTile(a)}else(d=d||!e.intersectsBounds(a,{worldBounds:this.map.baseLayer.wrapDateLine&&this.map.getMaxExtent()}))?(b&&("resize"===this.transitionEffect||this.gridResolution===f)&&this.applyBackBuffer(f),this.initGriddedTiles(a)):this.moveGriddedTiles()}},getTileData:function(a){var b=null,c=a.lon,d=a.lat,e=this.grid.length;if(this.map&&e){var f=this.map.getResolution(),a=this.tileSize.w,g=this.tileSize.h, 660h=this.grid[0][0].bounds,i=h.left,h=h.top;if(c<i&&this.map.baseLayer.wrapDateLine)var j=this.map.getMaxExtent().getWidth(),k=Math.ceil((i-c)/j),c=c+j*k;c=(c-i)/(f*a);d=(h-d)/(f*g);f=Math.floor(c);i=Math.floor(d);0<=i&&i<e&&(e=this.grid[i][f])&&(b={tile:e,i:Math.floor((c-f)*a),j:Math.floor((d-i)*g)})}return b},destroyTile:function(a){this.removeTileMonitoringHooks(a);a.destroy()},getServerResolution:function(a){var b=Number.POSITIVE_INFINITY,a=a||this.map.getResolution();if(this.serverResolutions&& 661-1===OpenLayers.Util.indexOf(this.serverResolutions,a)){var c,d,e,f;for(c=this.serverResolutions.length-1;0<=c;c--){e=this.serverResolutions[c];d=Math.abs(e-a);if(d>b)break;b=d;f=e}a=f}return a},getServerZoom:function(){var a=this.getServerResolution();return this.serverResolutions?OpenLayers.Util.indexOf(this.serverResolutions,a):this.map.getZoomForResolution(a)+(this.zoomOffset||0)},applyBackBuffer:function(a){null!==this.backBufferTimerId&&this.removeBackBuffer();var b=this.backBuffer;if(!b){b= 662this.createBackBuffer();if(!b)return;a===this.gridResolution?this.div.insertBefore(b,this.div.firstChild):this.map.baseLayer.div.parentNode.insertBefore(b,this.map.baseLayer.div);this.backBuffer=b;var c=this.grid[0][0].bounds;this.backBufferLonLat={lon:c.left,lat:c.top};this.backBufferResolution=this.gridResolution}
662for(var c=this.backBufferResolution/a,d=b.childNodes,e,f=d.length-1;0<=f;--f)e=d[f],e.style.top=(c*e._i*e._h|0)+"px",e.style.left=(c*e._j*e._w|0)+"px",e.style.width=Math.round(c*e._w)+ 663"px",e.style.height=Math.round(c*e._h)+"px";a=this.getViewPortPxFromLonLat(this.backBufferLonLat,a);c=this.map.layerContainerOriginPx.y;b.style.left=Math.round(a.x-this.map.layerContainerOriginPx.x)+"px";b.style.top=Math.round(a.y-c)+"px"},createBackBuffer:function(){var a;if(0<this.grid.length){a=document.createElement("div");a.id=this.div.id+"_bb";a.className="olBackBuffer";a.style.position="absolute";var b=this.map;a.style.zIndex="resize"===this.transitionEffect?this.getZIndex()-1:b.Z_INDEX_BASE.BaseLayer- 664(b.getNumLayers()-b.getLayerIndex(this));for(var b=0,c=this.grid.length;b<c;b++)for(var d=0,e=this.grid[b].length;d<e;d++){var f=this.grid[b][d],g=this.grid[b][d].createBackBuffer();if(g)g._i=b,g._j=d,g._w=f.size.w,g._h=f.size.h,g.id=f.id+"_bb",a.appendChild(g)}}return a},removeBackBuffer:function(){if(this._transitionElement){for(var a=this.transitionendEvents.length-1;0<=a;--a)OpenLayers.Event.stopObserving(this._transitionElement,this.transitionendEvents[a],this._removeBackBuffer);delete this._transitionElement}if(this.backBuffer&& 665(this.backBuffer.parentNode&&this.backBuffer.parentNode.removeChild(this.backBuffer),this.backBufferResolution=this.backBuffer=null,null!==this.backBufferTimerId))window.clearTimeout(this.backBufferTimerId),this.backBufferTimerId=null},moveByPx:function(){this.singleTile||this.moveGriddedTiles()},setTileSize:function(a){if(this.singleTile)a=this.map.getSize(),a.h=parseInt(a.h*this.ratio,10),a.w=parseInt(a.w*this.ratio,10);OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[a])},getTilesBounds:function(){var a= 666null,b=this.grid.length;if(b)var a=this.grid[b-1][0].bounds,b=this.grid[0].length*a.getWidth(),c=this.grid.length*a.getHeight(),a=new OpenLayers.Bounds(a.left,a.bottom,a.left+b,a.bottom+c);return a},initSingleTile:function(a){this.events.triggerEvent("retile");var b=a.getCenterLonLat(),c=a.getWidth()*this.ratio,a=a.getHeight()*this.ratio,b=new OpenLayers.Bounds(b.lon-c/2,b.lat-a/2,b.lon+c/2,b.lat+a/2),c=this.map.getLayerPxFromLonLat({lon:b.left,lat:b.top});this.grid.length||(this.grid[0]=[]);(a=this.grid[0][0])? 667a.moveTo(b,c):(a=this.addTile(b,c),this.addTileMonitoringHooks(a),a.draw(),this.grid[0][0]=a);this.removeExcessTiles(1,1);this.gridResolution=this.getServerResolution()},calculateGridLayout:function(a,b,c){var d=c*this.tileSize.w,c=c*this.tileSize.h,e=Math.floor((a.left-b.lon)/d)-this.buffer,f=this.rowSign,a=Math[~f?"floor":"ceil"](f*(b.lat-a.top+c)/c)-this.buffer*f;return{tilelon:d,tilelat:c,startcol:e,startrow:a}},getTileOrigin:function(){var a=this.tileOrigin;if(!a)var a=this.getMaxExtent(),b= 668{tl:["left","top"],tr:["right","top"],bl:["left","bottom"],br:["right","bottom"]}[this.tileOriginCorner],a=new OpenLayers.LonLat(a[b[0]],a[b[1]]);return a},getTileBoundsForGridIndex:function(a,b){var c=this.getTileOrigin(),d=this.gridLayout,e=d.tilelon,f=d.tilelat,g=d.startcol,d=d.startrow,h=this.rowSign;return new OpenLayers.Bounds(c.lon+(g+b)*e,c.lat-(d+a*h)*f*h,c.lon+(g+b+1)*e,c.lat-(d+(a-1)*h)*f*h)},initGriddedTiles:function(a){this.events.triggerEvent("retile");var b=this.map.getSize(),c=this.getTileOrigin(), 669d=this.map.getResolution(),e=this.getServerResolution(),f=d/e,d=this.tileSize.w/f,f=this.tileSize.h/f,g=Math.ceil(b.h/f)+2*this.buffer+1,b=Math.ceil(b.w/d)+2*this.buffer+1;this.gridLayout=e=this.calculateGridLayout(a,c,e);var c=e.tilelon,h=e.tilelat,e=this.map.layerContainerOriginPx.x,i=this.map.layerContainerOriginPx.y,j=this.getTileBoundsForGridIndex(0,0),k=this.map.getViewPortPxFromLonLat(new OpenLayers.LonLat(j.left,j.top));k.x=Math.round(k.x)-e;k.y=Math.round(k.y)-i;var e=[],i=this.map.getCenter(), 670l=0;do{var m=this.grid[l];m||(m=[],this.grid.push(m));var n=0;do{var j=this.getTileBoundsForGridIndex(l,n),o=k.clone();o.x+=n*Math.round(d);o.y+=l*Math.round(f);var q=m[n];q?q.moveTo(j,o,!1):(q=this.addTile(j,o),this.addTileMonitoringHooks(q),m.push(q));o=j.getCenterLonLat();e.push({tile:q,distance:Math.pow(o.lon-i.lon,2)+Math.pow(o.lat-i.lat,2)});n+=1}while(j.right<=a.right+c*this.buffer||n<b);l+=1}while(j.bottom>=a.bottom-h*this.buffer||l<g);this.removeExcessTiles(l,n);this.gridResolution=d=this.getServerResolution(); 671e.sort(function(a,b){return a.distance-b.distance});a=0;for(d=e.length;a<d;++a)e[a].tile.draw()},getMaxExtent:function(){return this.maxExtent},addTile:function(a,b){var c=new this.tileClass(this,b,a,null,this.tileSize,this.tileOptions);this.events.triggerEvent("addtile",{tile:c});return c},addTileMonitoringHooks:function(a){a.onLoadStart=function(){if(!1===this.loading)this.loading=!0,this.events.triggerEvent("loadstart");this.events.triggerEvent("tileloadstart",{tile:a});this.numLoadingTiles++; 672!this.singleTile&&this.backBuffer&&this.gridResolution===this.backBufferResolution&&OpenLayers.Element.addClass(a.getTile(),"olTileReplacing")};a.onLoadEnd=function(b){this.numLoadingTiles--;b="unload"===b.type;this.events.triggerEvent("tileloaded",{tile:a,aborted:b});if(!this.singleTile&&!b&&this.backBuffer&&this.gridResolution===this.backBufferResolution){var c=a.getTile();if("none"===OpenLayers.Element.getStyle(c,"display")){var d=document.getElementById(a.id+"_bb");d&&d.parentNode.removeChild(d)}OpenLayers.Element.removeClass(c, 673"olTileReplacing")}
673if(0===this.numLoadingTiles){if(this.backBuffer)if(0===this.backBuffer.childNodes.length)this.removeBackBuffer();else{this._transitionElement=b?this.div.lastChild:a.imgDiv;b=this.transitionendEvents;for(c=b.length-1;0<=c;--c)OpenLayers.Event.observe(this._transitionElement,b[c],this._removeBackBuffer);this.backBufferTimerId=window.setTimeout(this._removeBackBuffer,this.removeBackBufferDelay)}this.loading=!1;this.events.triggerEvent("loadend")}};a.onLoadError=function(){this.events.triggerEvent("tileerror", 674{tile:a})};a.events.on({loadstart:a.onLoadStart,loadend:a.onLoadEnd,unload:a.onLoadEnd,loaderror:a.onLoadError,scope:this})},removeTileMonitoringHooks:function(a){a.unload();a.events.un({loadstart:a.onLoadStart,loadend:a.onLoadEnd,unload:a.onLoadEnd,loaderror:a.onLoadError,scope:this})},moveGriddedTiles:function(){for(var a=this.buffer+1;;){var b=this.grid[0][0],c=b.position.x+this.map.layerContainerOriginPx.x,b=b.position.y+this.map.layerContainerOriginPx.y,d=this.getServerResolution()/this.map.getResolution(), 675d={w:Math.round(this.tileSize.w*d),h:Math.round(this.tileSize.h*d)};if(c>-d.w*(a-1))this.shiftColumn(!0,d);else if(c<-d.w*a)this.shiftColumn(!1,d);else if(b>-d.h*(a-1))this.shiftRow(!0,d);else if(b<-d.h*a)this.shiftRow(!1,d);else break}},shiftRow:function(a,b){var c=this.grid,d=a?0:c.length-1,e=a?-1:1,f=this.gridLayout;f.startrow+=e*this.rowSign;for(var f=c[d],g=c[a?"pop":"shift"](),h=0,i=g.length;h<i;h++){var j=g[h],k=f[h].position.clone();k.y+=b.h*e;j.moveTo(this.getTileBoundsForGridIndex(d,h), 676k)}c[a?"unshift":"push"](g)},shiftColumn:function(a,b){var c=this.grid,d=a?0:c[0].length-1,e=a?-1:1,f=this.gridLayout;f.startcol+=e;for(var f=0,g=c.length;f<g;f++){var h=c[f],i=h[d].position.clone(),j=h[a?"pop":"shift"]();i.x+=b.w*e;j.moveTo(this.getTileBoundsForGridIndex(f,d),i);h[a?"unshift":"push"](j)}},removeExcessTiles:function(a,b){for(var c,d;this.grid.length>a;){var e=this.grid.pop();for(c=0,d=e.length;c<d;c++){var f=e[c];this.destroyTile(f)}}for(c=0,d=this.grid.length;c<d;c++)for(;this.grid[c].length> 677b;)e=this.grid[c],f=e.pop(),this.destroyTile(f)},onMapResize:function(){this.singleTile&&(this.clearGrid(),this.setTileSize())},getTileBounds:function(a){var b=this.maxExtent,c=this.getResolution(),d=c*this.tileSize.w,c=c*this.tileSize.h,e=this.getLonLatFromViewPortPx(a),a=b.left+d*Math.floor((e.lon-b.left)/d),b=b.bottom+c*Math.floor((e.lat-b.bottom)/c);return new OpenLayers.Bounds(a,b,a+d,b+c)},CLASS_NAME:"OpenLayers.Layer.Grid"}); 678OpenLayers.Layer.WMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"},isBaseLayer:!0,encodeBBOX:!1,noMagic:!1,yx:{},initialize:function(a,b,c,d){var e=[],c=OpenLayers.Util.upperCaseObject(c);if(1.3<=parseFloat(c.VERSION)&&!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)); 679if(!this.noMagic&&this.params.TRANSPARENT&&"true"==this.params.TRANSPARENT.toString().toLowerCase()){if(null==d||!d.isBaseLayer)this.isBaseLayer=!1;if("image/jpeg"==this.params.FORMAT)this.params.FORMAT=OpenLayers.Util.alphaHack()?"image/gif":"image/png"}},clone:function(a){null==a&&(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(){var a=this.projection.getCode();return 1.3<=parseFloat(this.params.VERSION)&& 680!!(this.yx[a]||OpenLayers.Projection.defaults[a]&&OpenLayers.Projection.defaults[a].yx)},getURL:function(a){var a=this.adjustBounds(a),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)},mergeNewParams:function(a){a=[OpenLayers.Util.upperCaseObject(a)];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,a)},getFullRequestString:function(a,b){var c=this.map.getProjectionObject(), 681c=this.projection&&this.projection.equals(c)?this.projection.getCode():c.getCode(),c="none"==c?null:c;1.3<=parseFloat(this.params.VERSION)?this.params.CRS=c:this.params.SRS=c;if("boolean"==typeof this.params.TRANSPARENT)a.TRANSPARENT=this.params.TRANSPARENT?"TRUE":"FALSE";return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments)},CLASS_NAME:"OpenLayers.Layer.WMS"});Ext.namespace("GeoExt"); 682GeoExt.WMSLegend=Ext.extend(GeoExt.LayerLegend,{defaultStyleIsFirst:!0,useScaleParameter:!0,baseParams:null,initComponent:function(){GeoExt.WMSLegend.superclass.initComponent.call(this);var a=this.layerRecord.getLayer();this._noMap=!a.map;a.events.register("moveend",this,this.onLayerMoveend);this.update()}
682,onLayerMoveend:function(a){if(!0===a.zoomChanged&&!0===this.useScaleParameter||this._noMap)delete this._noMap,this.update()},getLegendUrl:function(a,b){var c=this.layerRecord,d,e=c&&c.get("styles"), 683c=c.getLayer(),b=b||(""+c.params.LAYERS).split(","),f=c.params.STYLES&&(""+c.params.STYLES).split(","),g=b.indexOf(a),h=f&&f[g];e&&0<e.length&&(h?Ext.each(e,function(a){d=a.name==h&&a.legend&&a.legend.href;return!d}):!0===this.defaultStyleIsFirst&&!f&&!c.params.SLD&&!c.params.SLD_BODY&&(d=e[0].legend&&e[0].legend.href));d||(d=c.getFullRequestString({REQUEST:"GetLegendGraphic",WIDTH:null,HEIGHT:null,EXCEPTIONS:"application/vnd.ogc.se_xml",LAYER:a,LAYERS:null,STYLE:""!==h?h:null,STYLES:null,SRS:null, 684FORMAT:null,TIME:null}));e=Ext.apply({},this.baseParams);if(c.params._OLSALT)e._OLSALT=c.params._OLSALT;d=Ext.urlAppend(d,Ext.urlEncode(e));-1!=d.toLowerCase().indexOf("request=getlegendgraphic")&&(-1==d.toLowerCase().indexOf("format=")&&(d=Ext.urlAppend(d,"FORMAT=image%2Fgif")),!0===this.useScaleParameter&&(e=c.map.getScale(),d=Ext.urlAppend(d,"SCALE="+e)));return d},update:function(){var a=this.layerRecord.getLayer();if(a&&a.map){GeoExt.WMSLegend.superclass.update.apply(this,arguments);var b,c, 685d;b=(""+a.params.LAYERS).split(",");var e=[],f=this.items.find(function(a){return a.isXType("label")});this.items.each(function(a){d=b.indexOf(a.itemId);if(0>d&&a!=f)e.push(a);else if(a!==f){c=b[d];var g=this.getLegendUrl(c,b);OpenLayers.Util.isEquivalentUrl(g,a.url)||a.setUrl(g)}},this);for(d=0,a=e.length;d<a;d++){var g=e[d];this.remove(g);g.destroy()}for(d=0,a=b.length;d<a;d++)c=b[d],(!this.items||!this.getComponent(c))&&this.add({xtype:"gx_legendimage",url:this.getLegendUrl(c,b),itemId:c});this.doLayout()}}, 686beforeDestroy:function(){if(!0===this.useScaleParameter){var a=this.layerRecord.getLayer();a&&a.events&&a.events.unregister("moveend",this,this.onLayerMoveend)}GeoExt.WMSLegend.superclass.beforeDestroy.apply(this,arguments)}});GeoExt.WMSLegend.supports=function(a){return a.getLayer()instanceof OpenLayers.Layer.WMS?1:0};GeoExt.LayerLegend.types.gx_wmslegend=GeoExt.WMSLegend;Ext.reg("gx_wmslegend",GeoExt.WMSLegend); 687OpenLayers.Renderer=OpenLayers.Class({container:null,root:null,extent:null,locked:!1,size:null,resolution:null,map:null,featureDx:0,initialize:function(a,b){this.container=OpenLayers.Util.getElement(a);OpenLayers.Util.extend(this,b)},destroy:function(){this.map=this.resolution=this.size=this.extent=this.container=null},supported:function(){return!1},setExtent:function(a,b){this.extent=a.clone();if(this.map.baseLayer&&this.map.baseLayer.wrapDateLine){var c=a.getWidth()/this.map.getExtent().getWidth(), 688a=a.scale(1/c);this.extent=a.wrapDateLine(this.map.getMaxExtent()).scale(c)}if(b)this.resolution=null;return!0},setSize:function(a){this.size=a.clone();this.resolution=null},getResolution:function(){return this.resolution=this.resolution||this.map.getResolution()},drawFeature:function(a,b){if(null==b)b=a.style;if(a.geometry){var c=a.geometry.getBounds();if(c){var d;this.map.baseLayer&&this.map.baseLayer.wrapDateLine&&(d=this.map.getMaxExtent());c.intersectsBounds(this.extent,{worldBounds:d})?this.calculateFeatureDx(c, 689d):b={display:"none"};c=this.drawGeometry(a.geometry,b,a.id);if("none"!=b.display&&b.label&&!1!==c){d=a.geometry.getCentroid();if(b.labelXOffset||b.labelYOffset){var e=isNaN(b.labelXOffset)?0:b.labelXOffset,f=isNaN(b.labelYOffset)?0:b.labelYOffset,g=this.getResolution();d.move(e*g,f*g)}this.drawText(a.id,b,d)}else this.removeText(a.id);return c}}},calculateFeatureDx:function(a,b){this.featureDx=0;if(b){var c=b.getWidth();this.featureDx=Math.round(((a.left+a.right)/2-(this.extent.left+this.extent.right)/ 6902)/c)*c}},drawGeometry:function(){},drawText:function(){},removeText:function(){},clear:function(){},getFeatureIdFromEvent:function(){},eraseFeatures:function(a){OpenLayers.Util.isArray(a)||(a=[a]);for(var b=0,c=a.length;b<c;++b){var d=a[b];this.eraseGeometry(d.geometry,d.id);this.removeText(d.id)}},eraseGeometry:function(){},moveRoot:function(){},getRenderLayerId:function(){return this.container.id}
690,applyDefaultSymbolizer:function(a){var b=OpenLayers.Util.extend({},OpenLayers.Renderer.defaultSymbolizer); 691!1===a.stroke&&(delete b.strokeWidth,delete b.strokeColor);!1===a.fill&&delete b.fillColor;OpenLayers.Util.extend(b,a);return b},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.Renderer.defaultSymbolizer={fillColor:"#000000",strokeColor:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,pointRadius:0,labelAlign:"cm"}; 692OpenLayers.Renderer.symbol={star:[350,75,379,161,469,161,397,215,423,301,350,250,277,301,303,215,231,161,321,161,350,75],cross:[4,0,6,0,6,4,10,4,10,6,6,6,6,10,4,10,4,6,0,6,0,4,4,4,4,0],x:[0,0,25,0,50,35,75,0,100,0,65,50,100,100,75,100,50,65,25,100,0,100,35,50,0,0],square:[0,0,0,1,1,1,1,0,0,0],triangle:[0,10,10,10,5,0,0,10]}; 693OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:!0,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"]= 694a;else if("object"==typeof a)for(var c in a)if(a[c]instanceof OpenLayers.Style)this.styles[c]=a[c];else if("object"==typeof a[c])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, 695b){a||(a=new OpenLayers.Feature.Vector);this.styles[b]||(b="default");a.renderIntent=b;var c={};this.extendDefault&&"default"!=b&&(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)},CLASS_NAME:"OpenLayers.StyleMap"}); 696OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:!1,isFixed:!1,features:null,filter:null,selectedFeatures:null,unrenderedFeatures:null,reportError:!0,style:null,styleMap:null,strategies:null,protocol:null,renderers:["SVG","VML","Canvas"],renderer:null,rendererOptions:null,geometryType:null,drawn:!1,ratio:1,initialize:function(a,b){OpenLayers.Layer.prototype.initialize.apply(this,arguments);(!this.renderer||!this.renderer.supported())&&this.assignRenderer();if(!this.renderer|| 697!this.renderer.supported())this.renderer=null,this.displayError();if(!this.styleMap)this.styleMap=new OpenLayers.StyleMap;this.features=[];this.selectedFeatures=[];this.unrenderedFeatures={};if(this.strategies)for(var c=0,d=this.strategies.length;c<d;c++)this.strategies[c].setLayer(this)},destroy:function(){if(this.strategies){var a,b,c;for(b=0,c=this.strategies.length;b<c;b++)a=this.strategies[b],a.autoDestroy&&a.destroy();this.strategies=null}if(this.protocol)this.protocol.autoDestroy&&this.protocol.destroy(), 698this.protocol=null;this.destroyFeatures();this.unrenderedFeatures=this.selectedFeatures=this.features=null;this.renderer&&this.renderer.destroy();this.drawn=this.geometryType=this.renderer=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},clone:function(a){null==a&&(a=new OpenLayers.Layer.Vector(this.name,this.getOptions()));for(var a=OpenLayers.Layer.prototype.clone.apply(this,[a]),b=this.features,c=b.length,d=Array(c),e=0;e<c;++e)d[e]=b[e].clone();a.features=d;return a},refresh:function(a){this.calculateInRange()&& 699this.visibility&&this.events.triggerEvent("refresh",a)},assignRenderer:function(){for(var a=0,b=this.renderers.length;a<b;a++){var c=this.renderers[a];if((c="function"==typeof c?c:OpenLayers.Renderer[c])&&c.prototype.supported()){this.renderer=new c(this.div,this.rendererOptions);break}}},displayError:function(){this.reportError&&OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported",{renderers:this.renderers.join("\n")}))},setMap:function(a){OpenLayers.Layer.prototype.setMap.apply(this, 700arguments);if(this.renderer){this.renderer.map=this.map;var b=this.map.getSize();b.w*=this.ratio;b.h*=this.ratio;this.renderer.setSize(b)}else this.map.removeLayer(this)},afterAdd:function(){if(this.strategies){var a,b,c;for(b=0,c=this.strategies.length;b<c;b++)a=this.strategies[b],a.autoActivate&&a.activate()}},removeMap:function(){this.drawn=!1;if(this.strategies){var a,b,c;for(b=0,c=this.strategies.length;b<c;b++)a=this.strategies[b],a.autoActivate&&a.deactivate()}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this, 701arguments);var a=this.map.getSize();a.w*=this.ratio;a.h*=this.ratio;this.renderer.setSize(a)},moveTo:function(a,b,c){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var d=!0;if(!c){this.renderer.root.style.visibility="hidden";var d=this.map.getSize(),e=d.w,d=d.h,e=e/2*this.ratio-e/2,d=d/2*this.ratio-d/2,e=e+this.map.layerContainerOriginPx.x,e=-Math.round(e),d=d+this.map.layerContainerOriginPx.y,d=-Math.round(d);this.div.style.left=e+"px";this.div.style.top=d+"px";d=this.renderer.setExtent(this.map.getExtent().scale(this.ratio), 702b);this.renderer.root.style.visibility="visible";if(!0===OpenLayers.IS_GECKO)this.div.scrollLeft=this.div.scrollLeft;if(!b&&d)for(var f in this.unrenderedFeatures)e=this.unrenderedFeatures[f],this.drawFeature(e)}if(!this.drawn||b||!d){this.drawn=!0;f=0;for(d=this.features.length;f<d;f++)this.renderer.locked=f!==d-1,e=this.features[f],this.drawFeature(e)}},display:function(a){OpenLayers.Layer.prototype.display.apply(this,arguments);var b=this.div.style.display;
702if(b!=this.renderer.root.style.display)this.renderer.root.style.display= 703b},addFeatures:function(a,b){OpenLayers.Util.isArray(a)||(a=[a]);var c=!b||!b.silent;if(c){var d={features:a};if(!1===this.events.triggerEvent("beforefeaturesadded",d))return;a=d.features}for(var d=[],e=0,f=a.length;e<f;e++){this.renderer.locked=e!=a.length-1?!0:!1;var g=a[e];if(this.geometryType&&!(g.geometry instanceof this.geometryType))throw new TypeError("addFeatures: component should be an "+this.geometryType.prototype.CLASS_NAME);g.layer=this;if(!g.style&&this.style)g.style=OpenLayers.Util.extend({}, 704this.style);if(c){if(!1===this.events.triggerEvent("beforefeatureadded",{feature:g}))continue;this.preFeatureInsert(g)}d.push(g);this.features.push(g);this.drawFeature(g);c&&(this.events.triggerEvent("featureadded",{feature:g}),this.onFeatureInsert(g))}c&&this.events.triggerEvent("featuresadded",{features:d})},removeFeatures:function(a,b){if(a&&0!==a.length){if(a===this.features)return this.removeAllFeatures(b);OpenLayers.Util.isArray(a)||(a=[a]);a===this.selectedFeatures&&(a=a.slice());var c=!b|| 705!b.silent;c&&this.events.triggerEvent("beforefeaturesremoved",{features:a});for(var d=a.length-1;0<=d;d--){this.renderer.locked=0!=d&&a[d-1].geometry?!0:!1;var e=a[d];delete this.unrenderedFeatures[e.id];c&&this.events.triggerEvent("beforefeatureremoved",{feature:e});this.features=OpenLayers.Util.removeItem(this.features,e);e.layer=null;e.geometry&&this.renderer.eraseFeatures(e);-1!=OpenLayers.Util.indexOf(this.selectedFeatures,e)&&OpenLayers.Util.removeItem(this.selectedFeatures,e);c&&this.events.triggerEvent("featureremoved", 706{feature:e})}c&&this.events.triggerEvent("featuresremoved",{features:a})}},removeAllFeatures:function(a){var a=!a||!a.silent,b=this.features;a&&this.events.triggerEvent("beforefeaturesremoved",{features:b});for(var c,d=b.length-1;0<=d;d--)c=b[d],a&&this.events.triggerEvent("beforefeatureremoved",{feature:c}),c.layer=null,a&&this.events.triggerEvent("featureremoved",{feature:c});this.renderer.clear();this.features=[];this.unrenderedFeatures={};this.selectedFeatures=[];a&&this.events.triggerEvent("featuresremoved", 707{features:b})},destroyFeatures:function(a,b){if(void 0==a)a=this.features;if(a){this.removeFeatures(a,b);for(var c=a.length-1;0<=c;c--)a[c].destroy()}},drawFeature:function(a,b){if(this.drawn){if("object"!=typeof b){!b&&a.state===OpenLayers.State.DELETE&&(b="delete");var c=b||a.renderIntent;(b=a.style||this.style)||(b=this.styleMap.createSymbolizer(a,c))}c=this.renderer.drawFeature(a,b);!1===c||null===c?this.unrenderedFeatures[a.id]=a:delete this.unrenderedFeatures[a.id]}},eraseFeatures:function(a){this.renderer.eraseFeatures(a)}, 708getFeatureFromEvent:function(a){if(!this.renderer)throw Error("getFeatureFromEvent called on layer with no renderer. This usually means you destroyed a layer, but not some handler which is associated with it.");var b=null;(a=this.renderer.getFeatureIdFromEvent(a))&&(b="string"===typeof a?this.getFeatureById(a):a);return b},getFeatureBy:function(a,b){for(var c=null,d=0,e=this.features.length;d<e;++d)if(this.features[d][a]==b){c=this.features[d];break}return c},getFeatureById:function(a){return this.getFeatureBy("id", 709a)},getFeatureByFid:function(a){return this.getFeatureBy("fid",a)},getFeaturesByAttribute:function(a,b){var c,d,e=this.features.length,f=[];for(c=0;c<e;c++)(d=this.features[c])&&d.attributes&&d.attributes[a]===b&&f.push(d);return f},onFeatureInsert:function(){},preFeatureInsert:function(){},getDataExtent:function(){var a=null,b=this.features;if(b&&0<b.length)for(var c=null,d=0,e=b.length;d<e;d++)if(c=b[d].geometry)null===a&&(a=new OpenLayers.Bounds),a.extend(c.getBounds());return a},CLASS_NAME:"OpenLayers.Layer.Vector"}); 710Ext.namespace("GeoExt"); 711GeoExt.VectorLegend=Ext.extend(GeoExt.LayerLegend,{layerRecord:null,layer:null,rules:null,symbolType:null,untitledPrefix:"Untitled ",clickableSymbol:!1,clickableTitle:!1,selectOnClick:!1,enableDD:!1,bodyBorder:!1,feature:null,selectedRule:null,currentScaleDenominator:null,initComponent:function(){GeoExt.VectorLegend.superclass.initComponent.call(this);if(this.layerRecord&&(this.layer=this.layerRecord.getLayer(),this.layer.map))this.map=this.layer.map,this.currentScaleDenominator=this.layer.map.getScale(), 712this.layer.map.events.on({zoomend:this.onMapZoom,scope:this});if(!this.symbolType)if(this.feature)this.symbolType=this.symbolTypeFromFeature(this.feature);else if(this.layer)if(0<this.layer.features.length){var a=this.layer.features[0].clone();a.attributes={};this.feature=a;this.symbolType=this.symbolTypeFromFeature(this.feature)}else this.layer.events.on({featuresadded:this.onFeaturesAdded,scope:this});this.layer&&this.feature&&!this.rules&&this.setRules();this.rulesContainer=new Ext.Container({autoEl:{}}); 713this.add(this.rulesContainer);
713this.addEvents("titleclick","symbolclick","ruleclick","ruleselected","ruleunselected","rulemoved");this.update()},onMapZoom:function(){this.setCurrentScaleDenominator(this.layer.map.getScale())},symbolTypeFromFeature:function(a){return(a=a.geometry.CLASS_NAME.match(/Point|Line|Polygon/))&&a[0]||"Point"},onFeaturesAdded:function(){this.layer.events.un({featuresadded:this.onFeaturesAdded,scope:this});var a=this.layer.features[0].clone();a.attributes={};this.feature=a;this.symbolType= 714this.symbolTypeFromFeature(this.feature);this.rules||this.setRules();this.update()},setRules:function(){var a=this.layer.styleMap&&this.layer.styleMap.styles["default"];a||(a=new OpenLayers.Style);this.rules=0===a.rules.length?[new OpenLayers.Rule({title:a.title,symbolizer:a.createSymbolizer(this.feature)})]:a.rules},setCurrentScaleDenominator:function(a){if(a!==this.currentScaleDenominator)this.currentScaleDenominator=a,this.update()},getRuleEntry:function(a){return this.rulesContainer.items.get(this.rules.indexOf(a))}, 715addRuleEntry:function(a,b){this.rulesContainer.add(this.createRuleEntry(a));b||this.doLayout()},removeRuleEntry:function(a,b){var c=this.getRuleEntry(a);c&&(this.rulesContainer.remove(c),b||this.doLayout())},selectRuleEntry:function(a){var b=a!=this.selectedRule;this.selectedRule&&this.unselect();if(b)this.getRuleEntry(a).body.addClass("x-grid3-row-selected"),this.selectedRule=a,this.fireEvent("ruleselected",this,a)},unselect:function(){this.rulesContainer.items.each(function(a,b){if(this.rules[b]== 716this.selectedRule)a.body.removeClass("x-grid3-row-selected"),this.selectedRule=null,this.fireEvent("ruleunselected",this,this.rules[b])},this)},createRuleEntry:function(a){var b=!0;null!=this.currentScaleDenominator&&(a.minScaleDenominator&&(b=b&&this.currentScaleDenominator>=a.minScaleDenominator),a.maxScaleDenominator&&(b=b&&this.currentScaleDenominator<a.maxScaleDenominator));return{xtype:"panel",layout:"column",border:!1,hidden:!b,bodyStyle:this.selectOnClick?{cursor:"pointer"}:void 0,defaults:{border:!1}, 717items:[this.createRuleRenderer(a),this.createRuleTitle(a)],listeners:{render:function(b){this.selectOnClick&&b.getEl().on({click:function(){this.selectRuleEntry(a)},scope:this});!0==this.enableDD&&this.addDD(b)},scope:this}}},createRuleRenderer:function(a){var b=[this.symbolType,"Point","Line","Polygon"],c,d,e=a.symbolizers;if(e){var f,g=0,h=b.length;a:for(;g<h;++g)if(c=b[g],f=OpenLayers.Symbolizer[c])for(var i=0,j=e.length;i<j;++i)if(e[i]instanceof f){d=!0;break a}}else{var e=a.symbolizer,g=0;for(f= 718b.length;g<f;++g)if(c=b[g],e[c]){e=e[c];d=!0;break}e=[e]}return{xtype:"gx_renderer",labelText:"Ab",symbolType:d?c:this.symbolType,symbolizers:e,style:this.clickableSymbol?{cursor:"pointer"}:void 0,listeners:{click:function(){this.clickableSymbol&&(this.fireEvent("symbolclick",this,a),this.fireEvent("ruleclick",this,a))},scope:this}}},createRuleTitle:function(a){return{cls:"x-form-item",style:"padding: 0.2em 0.5em 0;",bodyStyle:Ext.applyIf({background:"transparent"},this.clickableTitle?{cursor:"pointer"}: 719void 0),html:this.getRuleTitle(a),listeners:{render:function(b){this.clickableTitle&&b.getEl().on({click:function(){this.fireEvent("titleclick",this,a);this.fireEvent("ruleclick",this,a)},scope:this})},scope:this}}},addDD:function(a){var b=a.ownerCt,c=this;new Ext.dd.DragSource(a.getEl(),{ddGroup:b.id,onDragOut:function(a,b){var c=Ext.getCmp(b);c.removeClass("gx-ruledrag-insert-above");c.removeClass("gx-ruledrag-insert-below");return Ext.dd.DragZone.prototype.onDragOut.apply(this,arguments)},onDragEnter:function(c, 720e){var f=Ext.getCmp(e),g,h=b.items.indexOf(a),i=b.items.indexOf(f);h>i?g="gx-ruledrag-insert-above":h<i&&(g="gx-ruledrag-insert-below");g&&f.addClass(g);return Ext.dd.DragZone.prototype.onDragEnter.apply(this,arguments)},onDragDrop:function(d,e){c.moveRule(b.items.indexOf(a),b.items.indexOf(Ext.getCmp(e)));return Ext.dd.DragZone.prototype.onDragDrop.apply(this,arguments)},getDragData:function(a){if(a=a.getTarget(".x-column-inner")){var b=a.cloneNode(!0);b.id=Ext.id();return{sourceEl:a,repairXY:Ext.fly(a).getXY(),
721ddel:b}}}});new Ext.dd.DropTarget(a.getEl(),{ddGroup:b.id,notifyDrop:function(){return!0}})},update:function(){GeoExt.VectorLegend.superclass.update.apply(this,arguments);if(this.symbolType&&this.rules){if(this.rulesContainer.items)for(var a,b=this.rulesContainer.items.length-1;0<=b;--b)a=this.rulesContainer.getComponent(b),this.rulesContainer.remove(a,!0);b=0;for(a=this.rules.length;b<a;++b)this.addRuleEntry(this.rules[b],!0);this.doLayout();this.selectedRule&&this.getRuleEntry(this.selectedRule).body.addClass("x-grid3-row-selected")}}, 722updateRuleEntry:function(a){var b=this.getRuleEntry(a);b&&(b.removeAll(),b.add(this.createRuleRenderer(a)),b.add(this.createRuleTitle(a)),b.doLayout())},moveRule:function(a,b){var c=this.rules[a];this.rules.splice(a,1);this.rules.splice(b,0,c);this.update();this.fireEvent("rulemoved",this,c)},getRuleTitle:function(a){var b=a.title||a.name||"";!b&&this.untitledPrefix&&(b=this.untitledPrefix+(this.rules.indexOf(a)+1));return b},beforeDestroy:function(){this.layer&&(this.layer.events&&this.layer.events.un({featuresadded:this.onFeaturesAdded, 723scope:this}),this.layer.map&&this.layer.map.events&&this.layer.map.events.un({zoomend:this.onMapZoom,scope:this}));delete this.layer;delete this.map;delete this.rules;GeoExt.VectorLegend.superclass.beforeDestroy.apply(this,arguments)},onStoreRemove:function(a,b){b.getLayer()===this.layer&&this.map&&this.map.events&&this.map.events.un({zoomend:this.onMapZoom,scope:this})},onStoreAdd:function(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c].getLayer()===this.layer&&this.layer.map&&this.layer.map.events)this.layer.map.events.on({zoomend:this.onMapZoom, 724scope:this})}});GeoExt.VectorLegend.supports=function(a){return a.getLayer()instanceof OpenLayers.Layer.Vector?1:0};GeoExt.LayerLegend.types.gx_vectorlegend=GeoExt.VectorLegend;Ext.reg("gx_vectorlegend",GeoExt.VectorLegend);Ext.namespace("GeoExt"); 725GeoExt.FeatureRenderer=Ext.extend(Ext.BoxComponent,{feature:void 0,symbolizers:[OpenLayers.Feature.Vector.style["default"]],symbolType:"Polygon",labelText:null,resolution:1,minWidth:20,minHeight:20,renderers:["SVG","VML","Canvas"],rendererOptions:null,pointFeature:void 0,lineFeature:void 0,polygonFeature:void 0,textFeature:void 0,renderer:null,initComponent:function(){GeoExt.FeatureRenderer.superclass.initComponent.apply(this,arguments);Ext.applyIf(this,{pointFeature:new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(0, 7260)),lineFeature:new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([new OpenLayers.Geometry.Point(-8,-3),new OpenLayers.Geometry.Point(-3,3),new OpenLayers.Geometry.Point(3,-3),new OpenLayers.Geometry.Point(8,3)])),polygonFeature:new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(-8,-4),new OpenLayers.Geometry.Point(-6,-6),new OpenLayers.Geometry.Point(6,-6),new OpenLayers.Geometry.Point(8,-4),new OpenLayers.Geometry.Point(8, 7274),new OpenLayers.Geometry.Point(6,6),new OpenLayers.Geometry.Point(-6,6),new OpenLayers.Geometry.Point(-8,4)])])),textFeature:new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(0,0))});this.feature||this.setFeature(null,{draw:!1});this.addEvents("click")},initCustomEvents:function(){this.clearCustomEvents();this.el.on("click",this.onClick,this)},clearCustomEvents:function(){this.el&&this.el.removeAllListeners&&this.el.removeAllListeners()},onClick:function(){this.fireEvent("click",this)}, 728onRender:function(a,b){if(!this.el)this.el=document.createElement("div"),this.el.id=this.getId();(!this.renderer||!this.renderer.supported())&&this.assignRenderer();this.renderer.map={getResolution:function(){return this.resolution}.createDelegate(this)};GeoExt.FeatureRenderer.superclass.onRender.apply(this,arguments);this.drawFeature()},afterRender:function(){GeoExt.FeatureRenderer.superclass.afterRender.apply(this,arguments);this.initCustomEvents()},onResize:function(a,b){this.setRendererDimensions(); 729GeoExt.FeatureRenderer.superclass.onResize.apply(this,arguments)},setRendererDimensions:function(){var a=this.feature.geometry.getBounds(),b=a.getWidth(),c=a.getHeight(),d=this.initialConfig.resolution;d||(d=Math.max(b/this.width||0,c/this.height||0)||1);this.resolution=d;var b=Math.max(this.width||this.minWidth,b/d),c=Math.max(this.height||this.minHeight,c/d),a=a.getCenterPixel(),e=b*d/2,d=c*d/2,d=new OpenLayers.Bounds(a.x-e,a.y-d,a.x+e,a.y+d);this.renderer.setSize(new OpenLayers.Size(Math.round(b), 730Math.round(c)));this.renderer.setExtent(d,!0)},assignRenderer:function(){for(var a=0,b=this.renderers.length;a<b;++a){var c=OpenLayers.Renderer[this.renderers[a]];if(c&&c.prototype.supported()){this.renderer=new c(this.el,this.rendererOptions);break}}},setSymbolizers:function(a,b){this.symbolizers=a;(!b||b.draw)&&this.drawFeature()},setSymbolType:function(a,b){this.symbolType=a;this.setFeature(null,b)},setFeature:function(a,b){this.feature=a||this[this.symbolType.toLowerCase()+"Feature"];(!b||b.draw)&& 731this.drawFeature()},drawFeature:function(){this.renderer.clear();this.setRendererDimensions();for(var a,b,c=0,d=this.symbolizers.length;c<d;++c){a=this.symbolizers[c];b=this.feature;if(a instanceof OpenLayers.Symbolizer){a=a.clone();if(OpenLayers.Symbolizer.Text&&a instanceof OpenLayers.Symbolizer.Text&&!1===a.graphic)a.fill=a.stroke=!1;this.initialConfig.feature||(b=a.CLASS_NAME.split(".").pop().toLowerCase(),b=this[b+"Feature"])}else a=Ext.apply({},a);if(void 0!==a.label&&null!==this.labelText)a.label= 732this.labelText;this.renderer.drawFeature(b.clone(),a)}},update:function(a){a=a||{};a.feature?this.setFeature(a.feature,{draw:!1}):a.symbolType&&this.setSymbolType(a.symbolType,{draw:!1});a.symbolizers&&this.setSymbolizers(a.symbolizers,{draw:!1});this.drawFeature()},beforeDestroy:function(){this.clearCustomEvents();this.renderer&&this.renderer.destroy()}});Ext.reg("gx_renderer",GeoExt.FeatureRenderer); 733(function(){var a=function(a,c){return function(d){c&&c[a]&&c[a].call(c.scope||window,Ext.applyIf({argument:c.argument},d))}};Ext.apply(Ext.lib.Ajax,{request:function(b,c,d,e,f){var f=f||{},b=b||f.method,g=f.headers;if(f.xmlData){if(!g||!g["Content-Type"])g=g||{},g["Content-Type"]="text/xml";b=b||"POST";e=f.xmlData}else if(f.jsonData){if(!g||!g["Content-Type"])g=g||{},g["Content-Type"]="application/json";b=b||"POST";
733e="object"==typeof f.jsonData?Ext.encode(f.jsonData):f.jsonData}if(b&&"post"==b.toLowerCase()&& 734(f.form||f.params)&&(!g||!g["Content-Type"]))g=g||{},g["Content-Type"]="application/x-www-form-urlencoded";return OpenLayers.Request.issue({success:a("success",d),failure:a("failure",d),method:b,headers:g,data:e,url:c})},isCallInProgress:function(){return!0},abort:function(a){a.abort()}})})();(function(){Ext.util.Observable.observeClass(Ext.form.TextField);Ext.form.TextField.on("specialkey",function(a,b){a.hasFocus&&b.getKey()===b.ENTER&&a.blur.defer(10,a)})})();Ext.namespace("gxp"); 735gxp.util={_uniqueNames:{},getOGCExceptionText:function(a){var b;a&&a.exceptions?(b=[],Ext.each(a.exceptions,function(a){Ext.each(a.texts,function(a){b.push(a)})}),b=b.join("\n")):b="Unknown error (no exception report).";return b},dispatch:function(a,b,c){function d(){++g;g===f&&b.call(c,h)}function e(b){window.setTimeout(function(){a[b].apply(c,[d,h])})}for(var b=b||Ext.emptyFn,c=c||this,f=a.length,g=0,h={},i=0;i<f;++i)e(i)},uniqueName:function(a,b){var b=b||" ",c=RegExp(b+"[0-9]*$"),d=a.replace(c, 736""),c=c.exec(a),c=void 0!==this._uniqueNames[d]?this._uniqueNames[d]:c instanceof Array?Number(c[0]):void 0,e=d;void 0!==c&&(c++,e+=b+c);this._uniqueNames[d]=c||0;return e},getAbsoluteUrl:function(a){var b;Ext.isIE6||Ext.isIE7||Ext.isIE8?(b=document.createElement("<a href='"+a+"'/>"),b.style.display="none",document.body.appendChild(b),b.href=b.href,document.body.removeChild(b)):(b=document.createElement("a"),b.href=a);return b.href},throttle:function(){var a=function(a,c,d){var e,f,g,h,i=function(){a.apply(d|| 737this,g);e=(new Date).getTime()};return function(){f=(new Date).getTime()-e;g=arguments;clearTimeout(h);!e||f>=c?i():h=setTimeout(i,c-f)}};return function(b,c,d){return a(b,c,d)}}(),md5:function(){function a(a){return String.fromCharCode(a&255)+String.fromCharCode(a>>>8&255)+String.fromCharCode(a>>>16&255)+String.fromCharCode(a>>>24&255)}function b(a){for(;0>a;)a+=4294967296;for(;4294967295<a;)a-=4294967296;return a}var c=[0,3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955, 7384249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,1272893353,4139469664,3200236656,
738681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690, 7394293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745],d=[[function(a,b,c){return a&b|~a&c},[[0,7,1],[1,12,2],[2,17,3],[3,22,4],[4,7,5],[5,12,6],[6,17,7],[7,22,8],[8,7,9],[9,12,10],[10,17,11],[11,22,12],[12,7,13],[13,12,14],[14,17,15],[15,22,16]]],[function(a,b,c){return a&c|b&~c},[[1,5,17],[6,9,18],[11,14,19],[0,20,20],[5,5,21],[10,9,22],[15,14,23],[4,20,24],[9,5,25],[14,9,26],[3,14,27],[8,20,28],[13,5,29],[2,9,30],[7,14,31],[12,20,32]]],[function(a, 740b,c){return a^b^c},[[5,4,33],[8,11,34],[11,16,35],[14,23,36],[1,4,37],[4,11,38],[7,16,39],[10,23,40],[13,4,41],[0,11,42],[3,16,43],[6,23,44],[9,4,45],[12,11,46],[15,16,47],[2,23,48]]],[function(a,b,c){return b^(a|~c)},[[0,6,49],[7,10,50],[14,15,51],[5,21,52],[12,6,53],[3,10,54],[10,15,55],[1,21,56],[8,6,57],[15,10,58],[6,15,59],[13,21,60],[4,6,61],[11,10,62],[2,15,63],[9,21,64]]]];return function(e){var f,g,h,i,j,k,l,m,n,o,q;f=[1732584193,4023233417,2562383102,271733878];g=e.length;h=g&63;i=56>h? 74156-h:120-h;if(0<i){e+="\u0080";for(h=0;h<i-1;h++)e+="\x00"}e+=a(8*g);e+=a(0);g+=i+8;i=[0,1,2,3];j=[16];k=[4];for(o=0;o<g;o+=64){for(h=0,n=o;16>h;h++,n+=4)j[h]=e.charCodeAt(n)|e.charCodeAt(n+1)<<8|e.charCodeAt(n+2)<<16|e.charCodeAt(n+3)<<24;for(h=0;4>h;h++)k[h]=f[h];for(h=0;4>h;h++){l=d[h][0];m=d[h][1];for(n=0;16>n;n++){q=j;var r=k,s=m[n],t=void 0,v=void 0,w=void 0,y=void 0,u=void 0,x=void 0,z=void 0,w=u=void 0,t=i[0],v=i[1],w=i[2],y=i[3],u=s[0],x=s[1],z=s[2],w=l(r[v],r[w],r[y]),u=r[t]+w+q[u]+c[z], 742u=b(u),u=u<<x|u>>>32-x,u=u+r[v];r[t]=b(u);q=i[0];i[0]=i[3];i[3]=i[2];i[2]=i[1];i[1]=q}}for(h=0;4>h;h++)f[h]+=k[h],f[h]=b(f[h])}h=a(f[0])+a(f[1])+a(f[2])+a(f[3]);f="";for(e=0;16>e;e++)g=h.charCodeAt(e),f+="0123456789abcdef".charAt(g>>4&15),f+="0123456789abcdef".charAt(g&15);return f}}()};Ext.namespace("gxp.menu"); 743gxp.menu.LayerMenu=Ext.extend(Ext.menu.Menu,{layerText:"Layer",layers:null,initComponent:function(){gxp.menu.LayerMenu.superclass.initComponent.apply(this,arguments);this.layers.on("add",this.onLayerAdd,this);this.onLayerAdd()},onRender:function(a,b){gxp.menu.LayerMenu.superclass.onRender.apply(this,arguments)},beforeDestroy:function(){this.layers&&this.layers.on&&this.layers.un("add",this.onLayerAdd,this);delete this.layers;gxp.menu.LayerMenu.superclass.beforeDestroy.apply(this,arguments)},onLayerAdd:function(){this.removeAll(); 744this.add({iconCls:"gxp-layer-visibility",text:this.layerText,canActivate:!1},"-");this.layers.each(function(a){if(a.getLayer().displayInLayerSwitcher){var b=new Ext.menu.CheckItem({text:a.get("title"),checked:a.getLayer().getVisibility(),group:a.get("group"),listeners:{checkchange:function(b,d){a.getLayer().setVisibility(d)}}});2<this.items.getCount()?this.insert(2,b):this.add(b)}},this)}});Ext.reg("gxp_layermenu",gxp.menu.LayerMenu);Ext.namespace("gxp"); 745gxp.CrumbPanel=Ext.extend(Ext.TabPanel,{widths:null,enableTabScroll:!0,initComponent:function(){gxp.CrumbPanel.superclass.initComponent.apply(this,arguments);this.widths={}},onBeforeAdd:function(a){gxp.CrumbPanel.superclass.onBeforeAdd.apply(this,arguments);if(a.shortTitle)a.title=a.shortTitle},onAdd:function(a){gxp.CrumbPanel.superclass.onAdd.apply(this,arguments);this.setActiveTab(this.items.getCount()-1);a.on("hide",this.onCmpHide,this);a.getEl().dom.style.display=""},onRemove:function(a){gxp.CrumbPanel.superclass.onRemove.apply(this, 746arguments);a.un("hide",this.onCmpHide,this);var b=this.widths[this.get(this.items.getCount()-1).id];b&&b<this.getWidth()&&(this.setWidth(b),this.ownerCt&&this.ownerCt.syncSize());a.getEl().dom.style.display="none";this.activeTab.doLayout()},onRender:function(a){if(!this.initialConfig.itemTpl)this.itemTpl=new Ext.Template('<li class="{cls} gxp-crumb" id="{id}"><div class="gxp-crumb-separator">\u00bb</div>','<a class="x-tab-right" href="#"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>', 747"</em></a></li>");gxp.CrumbPanel.superclass.onRender.apply(this,arguments);this.getEl().down("div").addClass("gxp-crumbpanel-header")},onCmpHide:function(a){var b=this.items.getCount()-1;this.items.indexOf(a)===b&&this.setActiveTab(this.get(--b))}
747,setActiveTab:function(a){var b;Ext.isNumber(a)?(b=a,a=this.get(b)):b=this.items.indexOf(a);if(~b){var c,d;for(d=this.items.getCount()-1;d>b;--d)c=this.get(d),this.remove(c,"hide"!==c.closeAction)}c=a.initialConfig.minWidth||a.initialConfig.width;d=this.getWidth(); 748c>d&&(this.widths[this.get(b-1).id]=d,this.setWidth(c),this.ownerCt&&this.ownerCt.syncSize());gxp.CrumbPanel.superclass.setActiveTab.apply(this,arguments)}});Ext.reg("gxp_crumbpanel",gxp.CrumbPanel);Ext.namespace("gxp"); 749gxp.LayerUploadPanel=Ext.extend(Ext.FormPanel,{titleLabel:"Title",titleEmptyText:"Layer title",abstractLabel:"Description",abstractEmptyText:"Layer description",fileLabel:"Data",fieldEmptyText:"Browse for data archive...",uploadText:"Upload",uploadFailedText:"Upload failed",processingUploadText:"Processing upload...",waitMsgText:"Uploading your data...",invalidFileExtensionText:"File extension must be one of: ",optionsText:"Options",workspaceLabel:"Workspace",workspaceEmptyText:"Default workspace", 750dataStoreLabel:"Store",dataStoreEmptyText:"Create new store",defaultDataStoreEmptyText:"Default data store",crsLabel:"CRS",crsEmptyText:"Coordinate Reference System ID",invalidCrsText:"CRS identifier should be an EPSG code (e.g. EPSG:4326)",fileUpload:!0,validFileExtensions:".zip,.tif,.tiff,.gz,.tar.bz2,.tar,.tgz,.tbz2".split(","),defaultDataStore:null,constructor:function(a){a.errorReader={read:a.handleUploadResponse||this.handleUploadResponse.createDelegate(this)};gxp.LayerUploadPanel.superclass.constructor.call(this, 751a)},selectedWorkspace:null,initComponent:function(){this.items=[{xtype:"textfield",name:"title",fieldLabel:this.titleLabel,emptyText:this.titleEmptyText,allowBlank:!0},{xtype:"textarea",name:"abstract",fieldLabel:this.abstractLabel,emptyText:this.abstractEmptyText,allowBlank:!0},{xtype:"fileuploadfield",id:"file",anchor:"90%",emptyText:this.fieldEmptyText,fieldLabel:this.fileLabel,name:"file",buttonText:"",buttonCfg:{iconCls:"gxp-icon-filebrowse"},listeners:{fileselected:function(a,b){a.setValue(b.split(/[/\\]/).pop())}}, 752validator:this.fileNameValidator.createDelegate(this)},{xtype:"fieldset",ref:"optionsFieldset",title:this.optionsText,checkboxToggle:!0,collapsed:!0,hidden:void 0!=this.workspace&&void 0!=this.store&&void 0!=this.crs,hideMode:"offsets",defaults:{anchor:"97%"},items:[this.createWorkspacesCombo(),this.createDataStoresCombo(),{xtype:"textfield",name:"nativeCRS",fieldLabel:this.crsLabel,emptyText:this.crsEmptyText,allowBlank:!0,regex:/^epsg:\d+$/i,regexText:this.invalidCrsText}],listeners:{collapse:function(a){a.items.each(function(a){a.reset()})}}}]; 753this.buttons=[{text:this.uploadText,handler:function(){var a=this.getForm();if(a.isValid()){var b=a.getFieldValues(),c={"import":{}};if(b.workspace)c["import"].targetWorkspace={workspace:{name:b.workspace}};if(b.store)c["import"].targetStore={dataStore:{name:b.store}};else if(this.defaultDataStore)c["import"].targetStore={dataStore:{name:this.defaultDataStore}};Ext.Ajax.request({url:this.getUploadUrl(),method:"POST",jsonData:c,success:function(b){this._import=b.getResponseHeader("Location");this.optionsFieldset.expand(); 754a.submit({url:this._import+"/tasks",waitMsg:this.waitMsgText,waitMsgTarget:!0,reset:!0,scope:this})},scope:this})}},scope:this}];this.addEvents("workspaceselected","datastoreselected","uploadcomplete");this.getDefaultDataStore("default");gxp.LayerUploadPanel.superclass.initComponent.call(this)},fileNameValidator:function(a){for(var b=!1,c,d=0,e=this.validFileExtensions.length;d<e;++d)if(c=this.validFileExtensions[d],a.slice(-c.length).toLowerCase()===c){b=!0;break}return b||this.invalidFileExtensionText+ 755"<br/>"+this.validFileExtensions.join(", ")},createWorkspacesCombo:function(){return{xtype:"combo",name:"workspace",ref:"../workspace",fieldLabel:this.workspaceLabel,emptyText:this.workspaceEmptyText,store:new Ext.data.JsonStore({url:this.getWorkspacesUrl(),autoLoad:!0,root:"workspaces.workspace",fields:["name","href"]}),displayField:"name",valueField:"name",mode:"local",allowBlank:!0,triggerAction:"all",forceSelection:!0,listeners:{select:function(a,b){this.getDefaultDataStore(b.get("name"));this.fireEvent("workspaceselected", 756this,b)},scope:this}}},createDataStoresCombo:function(){var a=new Ext.data.JsonStore({autoLoad:!1,root:"dataStores.dataStore",fields:["name","href"]});this.on({workspaceselected:function(c,d){b.reset();var e=d.get("href");a.removeAll();a.proxy=new Ext.data.HttpProxy({url:e.split(".json").shift()+"/datastores.json"});a.load()},scope:this});var b=new Ext.form.ComboBox({name:"store",ref:"../dataStore",fieldLabel:this.dataStoreLabel,emptyText:this.dataStoreEmptyText,store:a,displayField:"name",valueField:"name", 757mode:"local",allowBlank:!0,triggerAction:"all",forceSelection:!0,listeners:{select:function(a,b){this.fireEvent("datastoreselected",this,b)},scope:this}});return b},getDefaultDataStore:function(a){Ext.Ajax.request({url:this.url+"/workspaces
757/"+a+"/datastores/default.json",callback:function(a,c,d){this.defaultDataStore=null;this.dataStore.emptyText=this.dataStoreEmptyText;this.dataStore.setValue("");if(200===d.status&&(a=Ext.decode(d.responseText),a.dataStore&&!0===a.dataStore.enabled&&!/file/i.test(a.dataStore.type)))this.defaultDataStore= 758a.dataStore.name,this.dataStore.emptyText=this.defaultDataStoreEmptyText,this.workspace.setValue(a.dataStore.workspace.name),this.dataStore.setValue(this.defaultDataStore)},scope:this})},getUploadUrl:function(){return this.url+"/imports"},getWorkspacesUrl:function(){return this.url+"/workspaces.json"},handleUploadResponse:function(a){var b=this.parseResponseText(a.responseText),c,d,e,f,a=this.getForm().getFieldValues(),g=!!b;if(b)if("string"===typeof b)g=!1,f=b;else if(d=b.tasks||[b.task],0===d.length)g= 759!1,f="Upload contains no suitable files.";else for(b=d.length-1;0<=b;--b)if(e=d[b])if(e.items.length){if("READY"!==e.state&&!("INCOMPLETE"===e.state&&"NO_CRS"===e.items[0].state&&a.nativeCRS)){g=!1;f="Source "+e.source.file+" is "+e.state+": "+e.items[0].state;break}}else g=!1,f="Upload contains no items that can be imported.";else g=!1,f="Unknown upload error";g?a.title||a["abstract"]||a.nativeCRS?(this.waitMsg=new Ext.LoadMask((this.ownerCt||this).getEl(),{msg:this.processingUploadText}),this.waitMsg.show(), 760f={id:e.items[0].id,resource:{}},f.resource[e.items[0].resource.featureType?"featureType":"coverage"]={title:a.title||void 0,"abstract":a["abstract"]||void 0,srs:a.nativeCRS||void 0},Ext.Ajax.request({method:"PUT",url:d[0].items[0].href,jsonData:f,success:this.finishUpload,failure:function(a){this.waitMsg.hide();var b=[];try{var c=Ext.decode(a.responseText);if(c.errors)for(var d=0,e=c.errors.length;d<e;++d)b.push({id:~c.errors[d].indexOf("SRS")?"nativeCRS":"file",msg:c.errors[d]})}catch(f){b.push({id:"file", 761msg:a.responseText})}this.getForm().markInvalid(b)},scope:this})):this.finishUpload():c=[{data:{id:"file",msg:f||this.uploadFailedText}}];return{success:!1,records:c}},finishUpload:function(){Ext.Ajax.request({method:"POST",url:this._import,failure:this.handleFailure,success:this.handleUploadSuccess,scope:this})},parseResponseText:function(a){var b;try{b=Ext.decode(a)}catch(c){if(a=a.match(/^\s*<pre[^>]*>(.*)<\/pre>\s*/))try{b=Ext.decode(a[1])}catch(d){b=a[1]}}return b},handleUploadSuccess:function(){Ext.Ajax.request({method:"GET", 762url:this._import,failure:this.handleFailure,success:function(a){this.waitMsg.hide();this.getForm().reset();this.fireEvent("uploadcomplete",this,Ext.decode(a.responseText));delete this._import},scope:this})},handleFailure:function(){this.waitMsg.hide();this.getForm().markInvalid([{file:this.uploadFailedText}])}});Ext.reg("gxp_layeruploadpanel",gxp.LayerUploadPanel); 763OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(a){this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/};OpenLayers.Format.prototype.initialize.apply(this,[a])},read:function(a){var b,c,a=a.replace(/[\n\r]/g," ");if(c=this.regExes.typeStr.exec(a))if(a=c[1].toLowerCase(),c=c[2],this.parse[a]&&(b=this.parse[a].apply(this,[c])),this.internalProjection&&this.externalProjection)if(b&& 764"OpenLayers.Feature.Vector"==b.CLASS_NAME)b.geometry.transform(this.externalProjection,this.internalProjection);else if(b&&"geometrycollection"!=a&&"object"==typeof b){a=0;for(c=b.length;a<c;a++)b[a].geometry.transform(this.externalProjection,this.internalProjection)}return b},write:function(a){var b,c;a.constructor==Array?c=!0:(a=[a],c=!1);var d=[];c&&d.push("GEOMETRYCOLLECTION(");for(var e=0,f=a.length;e<f;++e)c&&0<e&&d.push(","),b=a[e].geometry,d.push(this.extractGeometry(b));c&&d.push(")");return d.join("")}, 765extractGeometry:function(a){var b=a.CLASS_NAME.split(".")[2].toLowerCase();if(!this.extract[b])return null;this.internalProjection&&this.externalProjection&&(a=a.clone(),a.transform(this.internalProjection,this.externalProjection));return("collection"==b?"GEOMETRYCOLLECTION":b.toUpperCase())+"("+this.extract[b].apply(this,[a])+")"},extract:{point:function(a){return a.x+" "+a.y},multipoint:function(a){for(var b=[],c=0,d=a.components.length;c<d;
765++c)b.push("("+this.extract.point.apply(this,[a.components[c]])+ 766")");return b.join(",")},linestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extract.point.apply(this,[a.components[c]]));return b.join(",")},multilinestring:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push("("+this.extract.linestring.apply(this,[a.components[c]])+")");return b.join(",")},polygon:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push("("+this.extract.linestring.apply(this,[a.components[c]])+")");return b.join(",")},multipolygon:function(a){for(var b= 767[],c=0,d=a.components.length;c<d;++c)b.push("("+this.extract.polygon.apply(this,[a.components[c]])+")");return b.join(",")},collection:function(a){for(var b=[],c=0,d=a.components.length;c<d;++c)b.push(this.extractGeometry.apply(this,[a.components[c]]));return b.join(",")}},parse:{point:function(a){a=OpenLayers.String.trim(a).split(this.regExes.spaces);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(a[0],a[1]))},multipoint:function(a){for(var b=OpenLayers.String.trim(a).split(","), 768c=[],d=0,e=b.length;d<e;++d)a=b[d].replace(this.regExes.trimParens,"$1"),c.push(this.parse.point.apply(this,[a]).geometry);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(c))},linestring:function(a){for(var a=OpenLayers.String.trim(a).split(","),b=[],c=0,d=a.length;c<d;++c)b.push(this.parse.point.apply(this,[a[c]]).geometry);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(b))},multilinestring:function(a){for(var b=OpenLayers.String.trim(a).split(this.regExes.parenComma), 769c=[],d=0,e=b.length;d<e;++d)a=b[d].replace(this.regExes.trimParens,"$1"),c.push(this.parse.linestring.apply(this,[a]).geometry);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(c))},polygon:function(a){for(var b,a=OpenLayers.String.trim(a).split(this.regExes.parenComma),c=[],d=0,e=a.length;d<e;++d)b=a[d].replace(this.regExes.trimParens,"$1"),b=this.parse.linestring.apply(this,[b]).geometry,b=new OpenLayers.Geometry.LinearRing(b.components),c.push(b);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(c))}, 770multipolygon:function(a){for(var b=OpenLayers.String.trim(a).split(this.regExes.doubleParenComma),c=[],d=0,e=b.length;d<e;++d)a=b[d].replace(this.regExes.trimParens,"$1"),c.push(this.parse.polygon.apply(this,[a]).geometry);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(c))},geometrycollection:function(a){for(var a=a.replace(/,\s*([A-Za-z])/g,"|$1"),a=OpenLayers.String.trim(a).split("|"),b=[],c=0,d=a.length;c<d;++c)b.push(OpenLayers.Format.WKT.prototype.read.apply(this,[a[c]])); 771return b}},CLASS_NAME:"OpenLayers.Format.WKT"}); 772OpenLayers.Format.CQL=function(){function a(a){function b(){var a=e.pop();switch(a.type){case "LOGICAL":var c=b(),g=b();return new OpenLayers.Filter.Logical({filters:[g,c],type:f[a.text.toUpperCase()]});case "NOT":return a=b(),new OpenLayers.Filter.Logical({filters:[a],type:OpenLayers.Filter.Logical.NOT});case "BETWEEN":return e.pop(),g=b(),a=b(),c=b(),new OpenLayers.Filter.Comparison({property:c,lowerBoundary:a,upperBoundary:g,type:OpenLayers.Filter.Comparison.BETWEEN});case "COMPARISON":return g= 773b(),c=b(),new OpenLayers.Filter.Comparison({property:c,value:g,type:d[a.text.toUpperCase()]});case "IS_NULL":return c=b(),new OpenLayers.Filter.Comparison({property:c,type:d[a.text.toUpperCase()]});case "VALUE":return(c=a.text.match(/^'(.*)'$/))?c[1].replace(/''/g,"'"):Number(a.text);case "SPATIAL":switch(a.text.toUpperCase()){case "BBOX":var a=b(),c=b(),g=b(),h=b(),i=b();return new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,property:i,value:OpenLayers.Bounds.fromArray([h,g,c, 774a])});case "INTERSECTS":return g=b(),c=b(),new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:c,value:g});case "WITHIN":return g=b(),c=b(),new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.WITHIN,property:c,value:g});case "CONTAINS":return g=b(),c=b(),new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.CONTAINS,property:c,value:g});case "DWITHIN":return a=b(),g=b(),c=b(),new OpenLayers.Filter.Spatial({type:Ope
774nLayers.Filter.Spatial.DWITHIN,value:g, 775property:c,distance:Number(a)})}case "GEOMETRY":return OpenLayers.Geometry.fromWKT(a.text);default:return a.text}}for(var c=[],e=[];a.length;){var g=a.shift();switch(g.type){case "PROPERTY":case "GEOMETRY":case "VALUE":e.push(g);break;case "COMPARISON":case "BETWEEN":case "IS_NULL":case "LOGICAL":for(var i=h[g.type];0<c.length&&h[c[c.length-1].type]<=i;)e.push(c.pop());c.push(g);break;case "SPATIAL":case "NOT":case "LPAREN":c.push(g);break;case "RPAREN":for(;0<c.length&&"LPAREN"!=c[c.length-1].type;)e.push(c.pop()); 776c.pop();0<c.length&&"SPATIAL"==c[c.length-1].type&&e.push(c.pop());case "COMMA":case "END":break;default:throw Error("Unknown token type "+g.type);}}for(;0<c.length;)e.push(c.pop());a=b();if(0<e.length){a="Remaining tokens after building AST: \n";for(c=e.length-1;0<=c;c--)a+=e[c].type+": "+e[c].text+"\n";throw Error(a);}return a}var b={PROPERTY:/^[_a-zA-Z]\w*/,COMPARISON:/^(=|<>|<=|<|>=|>|LIKE)/i,IS_NULL:/^IS NULL/i,COMMA:/^,/,LOGICAL:/^(AND|OR)/i,VALUE:/^('([^']|'')*'|\d+(\.\d*)?|\.\d+)/,LPAREN:/^\(/, 777RPAREN:/^\)/,SPATIAL:/^(BBOX|INTERSECTS|DWITHIN|WITHIN|CONTAINS)/i,NOT:/^NOT/i,BETWEEN:/^BETWEEN/i,GEOMETRY:function(a){var b=/^(POINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON|GEOMETRYCOLLECTION)/.exec(a);if(b){var c=a.length,b=a.indexOf("(",b[0].length);if(-1<b)for(var d=1;b<c&&0<d;)switch(b++,a.charAt(b)){case "(":d++;break;case ")":d--}return[a.substr(0,b+1)]}},END:/^$/},c={LPAREN:["GEOMETRY","SPATIAL","PROPERTY","VALUE","LPAREN"],RPAREN:["NOT","LOGICAL","END","RPAREN"],PROPERTY:["COMPARISON", 778"BETWEEN","COMMA","IS_NULL"],BETWEEN:["VALUE"],IS_NULL:["END"],COMPARISON:["VALUE"],COMMA:["GEOMETRY","VALUE","PROPERTY"],VALUE:["LOGICAL","COMMA","RPAREN","END"],SPATIAL:["LPAREN"],LOGICAL:["NOT","VALUE","SPATIAL","PROPERTY","LPAREN"],NOT:["PROPERTY","LPAREN"],GEOMETRY:["COMMA","RPAREN"]},d={"=":OpenLayers.Filter.Comparison.EQUAL_TO,"<>":OpenLayers.Filter.Comparison.NOT_EQUAL_TO,"<":OpenLayers.Filter.Comparison.LESS_THAN,"<=":OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO,">":OpenLayers.Filter.Comparison.GREATER_THAN, 779">=":OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,LIKE:OpenLayers.Filter.Comparison.LIKE,BETWEEN:OpenLayers.Filter.Comparison.BETWEEN,"IS NULL":OpenLayers.Filter.Comparison.IS_NULL},e={},f={AND:OpenLayers.Filter.Logical.AND,OR:OpenLayers.Filter.Logical.OR},g={},h={RPAREN:3,LOGICAL:2,COMPARISON:1},i;for(i in d)d.hasOwnProperty(i)&&(e[d[i]]=i);for(i in f)f.hasOwnProperty(i)&&(g[f[i]]=i);return OpenLayers.Class(OpenLayers.Format,{read:function(d){var e=d,d=[],f,g=["NOT","GEOMETRY","SPATIAL", 780"PROPERTY","LPAREN"];do{a:{f=g;for(var h=void 0,g=void 0,i=f.length,h=0;h<i;h++){var g=f[h],q=b[g]instanceof RegExp?b[g].exec(e):(0,b[g])(e);if(q){f=q[0];e=e.substr(f.length).replace(/^\s*/,"");f={type:g,text:f,remainder:e};break a}}d="ERROR: In parsing: ["+e+"], expected one of: ";for(h=0;h<i;h++)g=f[h],d+="\n "+g+": "+b[g];throw Error(d);}e=f.remainder;g=c[f.type];if("END"!=f.type&&!g)throw Error("No follows list for "+f.type);d.push(f)}while("END"!=f.type);d=a(d);if(this.keepData)this.data= 781d;return d},write:function(a){if(a instanceof OpenLayers.Geometry)return a.toString();switch(a.CLASS_NAME){case "OpenLayers.Filter.Spatial":switch(a.type){case OpenLayers.Filter.Spatial.BBOX:return"BBOX("+a.property+","+a.value.toBBOX()+")";case OpenLayers.Filter.Spatial.DWITHIN:return"DWITHIN("+a.property+", "+this.write(a.value)+", "+a.distance+")";case OpenLayers.Filter.Spatial.WITHIN:return"WITHIN("+a.property+", "+this.write(a.value)+")";case OpenLayers.Filter.Spatial.INTERSECTS:return"INTERSECTS("+ 782a.property+", "+this.write(a.value)+")";case OpenLayers.Filter.Spatial.CONTAINS:return"CONTAINS("+a.property+", "+this.write(a.value)+")";default:throw Error("Unknown spatial filter type: "+a.type);}case "OpenLayers.Filter.Logical":if(a.type==OpenLayers.Filter.Logical.NOT)return"NOT ("+this.write(a.filters[0])+")";for(var b="(",c=!0,d=0;d<a.filters.length;d++)c?c=!1:b+=") "+g[a.type]+" (",b+=this.write(a.filters[d]);return b+")";case "OpenLayers.Filter.Comparison":return a.type==OpenLayers.Filter.Comparison.BETWEEN? 783a.property+" BETWEEN "+this.write(a.lowerBoundary)+" AND "+this.write(a.upperBoundary):null!==a.value?a.property+" "+e[a.type]+" "+this.write(a.value):a.property+" "+e[a.type];case void 0:if("string"===typeof a)return"'"+a.replace(/'/g,"''")+"'";if("number"===typeof a)return""+a;default:throw Error("Can't encode: "+a.CLASS_NAME+" "+a);}},CLASS_NAME:"OpenLayers.Format.CQL"})}();Ext.namespace("gxp"); 784gxp.FilterBuilder=Ext.extend(Ext.Container,{builderTypeNames:["any","all","none","not all"],allowedBuilderTypes:null,allowBlank:!1,caseInsensitiveMatch:!1,preComboText:"Match",postComboText:"of the following:",cls:"gxp-filterbuilder",builderType:null,childFilterContainer:null,customizeFilterOnInit:!0,addConditionText:"add condition",addGroupText:"add group",removeConditionText:"remove condition",allowGroups:!0,initComponent:function(){Ext.applyIf(this,{defaultBuilderType:gxp.FilterBuilder.ANY_OF}); 785if(this.customizeFilterOnInit)this.filter=this.customizeFilter(this.filter);this.builderType=this.getBuilderType();this.items=[{xtype:"container",layout:"form",ref:"form",defaults:{anchor:"100%"},hideLabels:!0,items:[{xtype:"compositefield",style:"padding-left: 2px",items:[{xtype:"label",style:"padding-top: 0.3em",text:this.preComboText},this.createBuilderTypeCombo(),{xtype:"label",style:"padding-top: 0.3em",text:this.postComboText}]},this.createChildFiltersPanel(),{xtype:"toolbar",items:this.createToolBar()}]}]; 786this.addEvents("change");gxp.FilterBuilder.superclass.initComponent.call(this)},createToolBar:function(){var a=[{text:this.addConditionText,iconCls:"add",handler:function(){this.addCondition()},scope:this}];this.allowGroups&&a.push({text:this.addGroupText,iconCls:"add",handler:function(){this.addCondition(!0)},scope:this});return a},getFilter:function(){var a;this.filter&&(a=this.filter.clone(),a instanceof OpenLayers.Filter.Logical&&(a=this.cleanFilter(a)));return a}
786,cleanFilter:function(a){if(a instanceof 787OpenLayers.Filter.Logical)if(a.type!==OpenLayers.Filter.Logical.NOT&&1===a.filters.length)a=this.cleanFilter(a.filters[0]);else for(var b,c=0,d=a.filters.length;c<d;++c)if(b=a.filters[c],b instanceof OpenLayers.Filter.Logical)if(b=this.cleanFilter(b))a.filters[c]=b;else{a=b;break}else{if(!b||null===b.type||null===b.property||null===b[a.type===OpenLayers.Filter.Comparison.BETWEEN?"lowerBoundary":"value"]){a=!1;break}}else if(!a||null===a.type||null===a.property||null===a[a.type===OpenLayers.Filter.Comparison.BETWEEN? 788"lowerBoundary":"value"])a=!1;return a},customizeFilter:function(a){if(a){var a=this.cleanFilter(a),b,c,d;switch(a.type){case OpenLayers.Filter.Logical.AND:case OpenLayers.Filter.Logical.OR:if(!a.filters||0===a.filters.length)a.filters=[this.createDefaultFilter()];else for(c=0,d=a.filters.length;c<d;++c)b=a.filters[c],b instanceof OpenLayers.Filter.Logical&&(a.filters[c]=this.customizeFilter(b));a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.OR,filters:[a]});break;case OpenLayers.Filter.Logical.NOT:if(!a.filters|| 7890===a.filters.length)a.filters=[new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.OR,filters:[this.createDefaultFilter()]})];else if(b=a.filters[0],b instanceof OpenLayers.Filter.Logical)if(b.type!==OpenLayers.Filter.Logical.NOT){var e;for(c=0,d=b.filters.length;c<d;++c)e=b.filters[c],e instanceof OpenLayers.Filter.Logical&&(b.filters[c]=this.customizeFilter(e))}else a=b.filters&&0<b.filters.length?this.customizeFilter(b.filters[0]):this.wrapFilter(this.createDefaultFilter());else a.filters= 790[new OpenLayers.Filter.Logical({type:this.defaultBuilderType===gxp.FilterBuilder.NOT_ALL_OF?OpenLayers.Filter.Logical.AND:OpenLayers.Filter.Logical.OR,filters:[b]})];break;default:a=this.wrapFilter(a)}}else a=this.wrapFilter(this.createDefaultFilter());return a},createDefaultFilter:function(){return new OpenLayers.Filter.Comparison({matchCase:!this.caseInsensitiveMatch})},wrapFilter:function(a){return new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.OR,filters:[new OpenLayers.Filter.Logical({type:this.defaultBuilderType=== 791gxp.FilterBuilder.ALL_OF?OpenLayers.Filter.Logical.AND:OpenLayers.Filter.Logical.OR,filters:[a]})]})},addCondition:function(a){var b,c;a?(c="gxp_filterbuilder",b=this.wrapFilter(this.createDefaultFilter())):(c="gxp_filterfield",b=this.createDefaultFilter());this.childFilterContainer.add(this.newRow({xtype:c,filter:b,columnWidth:1,attributes:this.attributes,allowBlank:a?void 0:this.allowBlank,customizeFilterOnInit:a&&!1,caseInsensitiveMatch:this.caseInsensitiveMatch,listeners:{change:function(){this.fireEvent("change", 792this)},scope:this}}));this.filter.filters[0].filters.push(b);this.childFilterContainer.doLayout()},removeCondition:function(a,b){var c=this.filter.filters[0].filters;0<c.length&&(c.remove(b),this.childFilterContainer.remove(a,!0));0===c.length&&this.addCondition();this.fireEvent("change",this)},createBuilderTypeCombo:function(){for(var a=this.allowedBuilderTypes||[gxp.FilterBuilder.ANY_OF,gxp.FilterBuilder.ALL_OF,gxp.FilterBuilder.NONE_OF],b=a.length,c=Array(b),d,e=0;e<b;++e)d=a[e],c[e]=[d,this.builderTypeNames[d]]; 793return{xtype:"combo",store:new Ext.data.SimpleStore({data:c,fields:["value","name"]}),value:this.builderType,ref:"../../builderTypeCombo",displayField:"name",valueField:"value",triggerAction:"all",mode:"local",listeners:{select:function(a,b){this.changeBuilderType(b.get("value"));this.fireEvent("change",this)},scope:this},width:60}},changeBuilderType:function(a){if(a!==this.builderType){this.builderType=a;var b=this.filter.filters[0];switch(a){case gxp.FilterBuilder.ANY_OF:this.filter.type=OpenLayers.Filter.Logical.OR; 794b.type=OpenLayers.Filter.Logical.OR;break;case gxp.FilterBuilder.ALL_OF:this.filter.type=OpenLayers.Filter.Logical.OR;b.type=OpenLayers.Filter.Logical.AND;break;case gxp.FilterBuilder.NONE_OF:this.filter.type=OpenLayers.Filter.Logical.NOT;b.type=OpenLayers.Filter.Logical.OR;break;case gxp.FilterBuilder.NOT_ALL_OF:this.filter.type=OpenLayers.Filter.Logical.NOT,b.type=OpenLayers.Filter.Logical.AND}}},createChildFiltersPanel:function(){this.childFilterContainer=new Ext.Container;for(var a=this.filter.filters[0].filters, 795b,c=0,d=a.length;c<d;++c){b=a[c];var e={xtype:"gxp_filterfield",allowBlank:this.allowBlank,columnWidth:1,filter:b,attributes:this.attributes,listeners:{change:function(){this.fireEvent("change",this)},scope:this}};this.childFilterContainer.add(this.newRow(Ext.applyIf(b instanceof OpenLayers.Filter.Logical?{xtype:"gxp_filterbuilder"}:{xtype:"container",layout:"form",hideLabels:!0,items:e},e)))}return this.childFilterContainer},newRow:function(a){var b=new Ext.Container({layout:"column",items:[{xtype:"container", 796width:28,height:26,style:"padding-left: 2px",items:{xtype:"button",tooltip:this.removeConditionText,iconCls:"delete",handler:function(){this.removeCondition(b,a.filter)},scope:this}},a]});return b},getBuilderType:function(){var a=this.defaultBuilderType;if(this.filter){var b=this.filter.filters[0];if(this.filter.type===OpenLayers.Filter.Logical.NOT)switch(b.type){case OpenLayers.Filter.Logical.OR:a=gxp.FilterBuilder.NONE_OF;break;case OpenLayers.Filter.Logical.AND:a=gxp.FilterBuilder.NOT_ALL_OF}else switch(b.type){case OpenLayers.Filter.Logical.OR:a= 797gxp.FilterBuilder.ANY_OF;break;case OpenLayers.Filter.Logical.AND:a=gxp.FilterBuilder.ALL_OF}}return a},setFilter:function(a){this.filter=this.customizeFilter(a);this.changeBuilderType(this.getBuilderType());this.builderTypeCombo.setValue(this.builderType);this.form.remove(this.childFilterContainer);this.form.insert(1,this.createChildFiltersPanel());this.form.doLayout();this.fireEvent("change",this)}});gxp.FilterBuilder.ANY_OF=0;gxp.FilterBuilder.ALL_OF=1;gxp.FilterBuilder.NONE_OF=2; 798gxp.FilterBuilder.NOT_ALL_OF=3;Ext.reg("gxp_filterbuilder",gxp.FilterBuilder);Ext.namespace("gxp"); 799gxp.WMSLayerPanel=Ext.extend(Ext.TabPanel,{layerRecord:null,source:null,styling:!0,sameOriginStyling:!0,rasterStyling:!1,transparent:null,editableStyles:!1,activeTab:0,border:!1,imageFormats:/png|gif|jpe?g/i,aboutText:"About",titleText:"Title",nameText:"Name",descriptionText:"Description",displayText:"Display",opacityText:"Opacity",formatText:"Tile format",infoFormatText:"Info format",infoFormatEmptyText:"Select a format",transparentText:"Trans
799parent",cacheText:"Caching",cacheFieldText:"Use cached tiles", 800stylesText:"Available Styles",displayOptionsText:"Display options",queryText:"Limit with filters",scaleText:"Limit by scale",minScaleText:"Min scale",maxScaleText:"Max scale",switchToFilterBuilderText:"Switch back to filter builder",cqlPrefixText:"or ",cqlText:"use CQL filter instead",singleTileText:"Single tile",singleTileFieldText:"Use a single tile",initComponent:function(){this.cqlFormat=new OpenLayers.Format.CQL;this.source&&this.source.getSchema(this.layerRecord,function(a){if(!1!==a){var c= 801this.layerRecord.getLayer().params.CQL_FILTER;this.filterBuilder=new gxp.FilterBuilder({filter:c&&this.cqlFormat.read(c),allowGroups:!1,listeners:{afterrender:function(){this.filterBuilder.cascade(function(a){"toolbar"===a.getXType()&&(a.addText(this.cqlPrefixText),a.addButton({text:this.cqlText,handler:this.switchToCQL,scope:this}))},this)},change:function(a){var a=a.getFilter(),b=null;!1!==a&&(b=this.cqlFormat.write(a));this.layerRecord.getLayer().mergeNewParams({CQL_FILTER:b})},scope:this},attributes:a}); 802this.filterFieldset.add(this.filterBuilder);this.filterFieldset.doLayout()}},this);this.addEvents("change");this.items=[this.createAboutPanel(),this.createDisplayPanel()];if(this.styling&&gxp.WMSStylesDialog&&this.layerRecord.get("styles")){var a=this.layerRecord.get("restUrl");a||(a=(this.source||this.layerRecord.get("layer")).url.split("?").shift().replace(/\/(wms|ows)\/?$/,"/rest"));this.editableStyles=this.sameOriginStyling?"/"===a.charAt(0):!0;this.items.push(this.createStylesPanel(a))}gxp.WMSLayerPanel.superclass.initComponent.call(this)}, 803switchToCQL:function(){var a=this.filterBuilder.getFilter(),b="";!1!==a&&(b=this.cqlFormat.write(a));this.filterBuilder.hide();this.cqlField.setValue(b);this.cqlField.show();this.cqlToolbar.show()},switchToFilterBuilder:function(){var a=null;try{a=this.cqlFormat.read(this.cqlField.getValue())}catch(b){}this.cqlField.hide();this.cqlToolbar.hide();this.filterBuilder.show();null!==a&&this.filterBuilder.setFilter(a)},createStylesPanel:function(a){a=gxp.WMSStylesDialog.createGeoServerStylerConfig(this.layerRecord, 804a);!0===this.rasterStyling&&a.plugins.push({ptype:"gxp_wmsrasterstylesdialog"});var b=this.ownerCt;if(!(b.ownerCt instanceof Ext.Window))a.dialogCls=Ext.Panel,a.showDlg=function(a){a.layout="fit";a.autoHeight=!1;b.add(a)};return Ext.apply(a,{title:this.stylesText,style:"padding: 10px",editable:!1})},createAboutPanel:function(){return{title:this.aboutText,bodyStyle:{padding:"10px"},defaults:{border:!1},items:[{layout:"form",labelWidth:70,items:[{xtype:"textfield",fieldLabel:this.titleText,anchor:"99%", 805value:this.layerRecord.get("title"),listeners:{change:function(a){this.layerRecord.set("title",a.getValue());this.layerRecord.commit();this.fireEvent("change")},scope:this}},{xtype:"textfield",fieldLabel:this.nameText,anchor:"99%",value:this.layerRecord.get("name"),readOnly:!0}]},{layout:"form",labelAlign:"top",items:[{xtype:"textarea",fieldLabel:this.descriptionText,grow:!0,growMax:150,anchor:"99%",value:this.layerRecord.get("abstract"),readOnly:!0}]}]}},onFormatChange:function(a){var b=this.layerRecord.getLayer(), 806a=a.getValue();b.mergeNewParams({format:a});b=this.transparentCb;if("image/jpeg"==a)this.transparent=b.getValue(),b.setValue(!1);else if(null!==this.transparent)b.setValue(this.transparent),this.transparent=null;b.setDisabled("image/jpeg"==a);this.fireEvent("change")},addScaleOptions:function(a,b){a.alwaysInRange=null;a.addOptions(b);a.display();a.redraw()},createDisplayPanel:function(){var a=this.layerRecord,b=a.getLayer(),c=b.opacity;null==c&&(c=1);var d=[],c=b.params.FORMAT.toLowerCase();Ext.each(a.get("formats"), 807function(a){this.imageFormats.test(a)&&d.push(a.toLowerCase())},this);-1===d.indexOf(c)&&d.push(c);var e=b.params.TRANSPARENT;return{title:this.displayText,layout:"form",bodyStyle:{padding:"10px"},defaults:{labelWidth:70},items:[{xtype:"fieldset",title:this.displayOptionsText,items:[{xtype:"gx_opacityslider",name:"opacity",anchor:"99%",isFormField:!0,fieldLabel:this.opacityText,listeners:{change:function(){this.fireEvent("change")},scope:this},layer:this.layerRecord},{xtype:"compositefield",fieldLabel:this.formatText, 808anchor:"99%",items:[{xtype:"combo",width:90,listWidth:150,store:d,value:c,mode:"local",triggerAction:"all",editable:!1,listeners:{select:this.onFormatChange,scope:this}},{xtype:"checkbox",ref:"../../../transparentCb",checked:"true"===e||!0===e,listeners:{check:function(a,c){b.mergeNewParams({transparent:c?"true":"false"});this.fireEvent("change")},scope:this}},{xtype:"label",cls:"gxp-layerproperties-label",text:this.transparentText}]},{xtype:"compositefield",fieldLabel:this.singleTileText,anchor:"99%", 809items:[{xtype:"checkbox",checked:this.layerRecord.get("layer").singleTile,listeners:{check:function(a,c){b.addOptions({singleTile:c}
809);this.fireEvent("change")},scope:this}},{xtype:"label",cls:"gxp-layerproperties-label",text:this.singleTileFieldText}]},{xtype:"compositefield",anchor:"99%",hidden:null==this.layerRecord.get("layer").params.TILED,fieldLabel:this.cacheText,items:[{xtype:"checkbox",checked:!0===this.layerRecord.get("layer").params.TILED,listeners:{check:function(a,b){this.layerRecord.get("layer").mergeNewParams({TILED:b}); 810this.fireEvent("change")},scope:this}},{xtype:"label",cls:"gxp-layerproperties-label",text:this.cacheFieldText}]},{xtype:"combo",fieldLabel:this.infoFormatText,emptyText:this.infoFormatEmptyText,store:a.get("infoFormats"),value:a.get("infoFormat"),hidden:void 0===a.get("infoFormats"),mode:"local",listWidth:150,triggerAction:"all",editable:!1,anchor:"99%",listeners:{select:function(b){b=b.getValue();a.set("infoFormat",b);this.fireEvent("change")}},scope:this}]},{xtype:"fieldset",title:this.queryText, 811hideLabels:!0,ref:"../filterFieldset",listeners:{expand:function(){this.layerRecord.getLayer().mergeNewParams({CQL_FILTER:this.cqlFilter})},collapse:function(){this.cqlFilter=this.layerRecord.getLayer().params.CQL_FILTER;this.layerRecord.getLayer().mergeNewParams({CQL_FILTER:null})},scope:this},hidden:null===this.source,checkboxToggle:!0,collapsed:!this.layerRecord.getLayer().params.CQL_FILTER,items:[{xtype:"textarea",value:this.layerRecord.getLayer().params.CQL_FILTER,grow:!0,anchor:"99%",width:"100%", 812growMax:100,ref:"../../cqlField",hidden:!0}],buttons:[{ref:"../../../cqlToolbar",hidden:!0,text:this.switchToFilterBuilderText,handler:this.switchToFilterBuilder,scope:this}]},{xtype:"fieldset",title:this.scaleText,listeners:{expand:function(){var a=this.layerRecord.getLayer();(void 0!==this.minScale||void 0!==this.maxScale)&&this.addScaleOptions(a,{minScale:this.maxScale,maxScale:this.minScale})},collapse:function(){var a=this.layerRecord.getLayer();this.minScale=a.options.maxScale;this.maxScale= 813a.options.minScale;this.addScaleOptions(a,{minScale:null,maxScale:null})},scope:this},checkboxToggle:!0,collapsed:null==this.layerRecord.getLayer().options.maxScale&&null==this.layerRecord.getLayer().options.minScale,items:[{xtype:"compositefield",fieldLabel:this.minScaleText,items:[{xtype:"label",text:"1:",cls:"gxp-layerproperties-label"},{xtype:"numberfield",anchor:"99%",width:"85%",listeners:{change:function(a){a={maxScale:parseInt(a.getValue())};this.addScaleOptions(this.layerRecord.getLayer(), 814a)},scope:this},value:this.layerRecord.getLayer().options.maxScale}]},{xtype:"compositefield",fieldLabel:this.maxScaleText,items:[{xtype:"label",text:"1:",cls:"gxp-layerproperties-label"},{xtype:"numberfield",anchor:"99%",width:"85%",listeners:{change:function(a){a={minScale:parseInt(a.getValue())};this.addScaleOptions(this.layerRecord.getLayer(),a)},scope:this},value:this.layerRecord.getLayer().options.minScale}]}]}]}}});Ext.reg("gxp_wmslayerpanel",gxp.WMSLayerPanel);Ext.namespace("gxp.form"); 815gxp.form.FilterField=Ext.extend(Ext.form.CompositeField,{lowerBoundaryTip:"lower boundary",upperBoundaryTip:"upper boundary",caseInsensitiveMatch:!1,filter:null,attributes:null,attributesComboConfig:null,initComponent:function(){if(!this.filter)this.filter=this.createDefaultFilter();var a="remote",b=new GeoExt.data.AttributeStore;if(this.attributes)0!=this.attributes.getCount()?(a="local",this.attributes.each(function(a){/gml:((Multi)?(Point|Line|Polygon|Curve|Surface|Geometry)).*/.exec(a.get("type"))|| 816b.add([a])})):b=this.attributes;a={xtype:"combo",store:b,editable:"local"==a,typeAhead:!0,forceSelection:!0,mode:a,triggerAction:"all",ref:"property",allowBlank:this.allowBlank,displayField:"name",valueField:"name",value:this.filter.property,listeners:{select:function(a,b){this.items.get(1).enable();this.filter.property=b.get("name");this.fireEvent("change",this.filter,this)},blur:function(a){var b=a.store.findExact("name",a.getValue());-1!=b?a.fireEvent("select",a,a.store.getAt(b)):null!=a.startValue&& 817a.setValue(a.startValue)},scope:this},width:120};this.attributesComboConfig=this.attributesComboConfig||{};Ext.applyIf(this.attributesComboConfig,a);this.items=this.createFilterItems();this.addEvents("change");gxp.form.FilterField.superclass.initComponent.call(this)},validateValue:function(){return this.filter.type===OpenLayers.Filter.Comparison.BETWEEN?null!==this.filter.property&&null!==this.filter.upperBoundary&&null!==this.filter.lowerBoundary:null!==this.filter.property&&null!==this.filter.value&& 818null!==this.filter.type},createDefaultFilter:function(){return new OpenLayers.Filter.Comparison({matchCase:!this.caseInsensitiveMatch})},createFilterItems:function(){var a=this.filter.type===OpenLayers.Filter.Comparison.BETWEEN;return[this.attributesComboConfig,Ext.applyIf({xtype:"gxp_comparisoncombo",ref:"type",disabled:null==this.filter.property,allowBlank:this.allowBlank,value:this.filter.type,listeners:{select:function(a,c){this.items.get(2).enable();this.items.get(3).enable();this.items.get(4).enable(); 819this.setFilterType(c.get("value"));this.fireEvent("change",this.filter,this)},scope:this}},this.comparisonComboConfig),{xtype:"textfield",disabled:null==this.filter.type,hidden:a,ref:"value",value:this.filter.value,width:50,grow:!0,growMin:50,anch
819or:"100%",allowBlank:this.allowBlank,listeners:{change:function(a,c){this.filter.value=c;this.fireEvent("change",this.filter,this)},scope:this}},{xtype:"textfield",disabled:null==this.filter.type,hidden:!a,value:this.filter.lowerBoundary,tooltip:this.lowerBoundaryTip, 820grow:!0,growMin:30,ref:"lowerBoundary",anchor:"100%",allowBlank:this.allowBlank,listeners:{change:function(a,c){this.filter.lowerBoundary=c;this.fireEvent("change",this.filter,this)},render:function(a){Ext.QuickTips.register({target:a.getEl(),text:this.lowerBoundaryTip})},autosize:function(a,c){a.setWidth(c);a.ownerCt.doLayout()},scope:this}},{xtype:"textfield",disabled:null==this.filter.type,hidden:!a,grow:!0,growMin:30,ref:"upperBoundary",value:this.filter.upperBoundary,allowBlank:this.allowBlank, 821listeners:{change:function(a,c){this.filter.upperBoundary=c;this.fireEvent("change",this.filter,this)},render:function(a){Ext.QuickTips.register({target:a.getEl(),text:this.upperBoundaryTip})},scope:this}}]},setFilterType:function(a){this.filter.type=a;a===OpenLayers.Filter.Comparison.BETWEEN?(this.items.get(2).hide(),this.items.get(3).show(),this.items.get(4).show()):(this.items.get(2).show(),this.items.get(3).hide(),this.items.get(4).hide());this.doLayout()},setFilter:function(a){var b=this.filter.type; 822this.filter=a;b!==a.type&&this.setFilterType(a.type);this.property.setValue(a.property);this.type.setValue(a.type);a.type===OpenLayers.Filter.Comparison.BETWEEN?(this.lowerBoundary.setValue(a.lowerBoundary),this.upperBoundary.setValue(a.upperBoundary)):this.value.setValue(a.value);this.fireEvent("change",this.filter,this)}});Ext.reg("gxp_filterfield",gxp.form.FilterField);Ext.namespace("gxp.form"); 823gxp.form.ComparisonComboBox=Ext.extend(Ext.form.ComboBox,{allowedTypes:[[OpenLayers.Filter.Comparison.EQUAL_TO,"="],[OpenLayers.Filter.Comparison.NOT_EQUAL_TO,"<>"],[OpenLayers.Filter.Comparison.LESS_THAN,"<"],[OpenLayers.Filter.Comparison.GREATER_THAN,">"],[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO,"<="],[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,">="],[OpenLayers.Filter.Comparison.LIKE,"like"],[OpenLayers.Filter.Comparison.BETWEEN,"between"]],allowBlank:!1,mode:"local",typeAhead:!0, 824forceSelection:!0,triggerAction:"all",width:50,editable:!0,initComponent:function(){var a={displayField:"name",valueField:"value",store:new Ext.data.SimpleStore({data:this.allowedTypes,fields:["value","name"]}),value:void 0===this.value?this.allowedTypes[0][0]:this.value,listeners:{blur:function(){var a=this.store.findExact("value",this.getValue());-1!=a?this.fireEvent("select",this,this.store.getAt(a)):null!=this.startValue&&this.setValue(this.startValue)}}};Ext.applyIf(this,a);gxp.form.ComparisonComboBox.superclass.initComponent.call(this)}}); 825Ext.reg("gxp_comparisoncombo",gxp.form.ComparisonComboBox);Ext.namespace("GeoExt"); 826GeoExt.LayerOpacitySlider=Ext.extend(Ext.slider.SingleSlider,{layer:null,complementaryLayer:null,delay:5,changeVisibilityDelay:5,aggressive:!1,changeVisibility:!1,value:null,inverse:!1,constructor:function(a){if(a.layer){this.layer=this.getLayer(a.layer);this.bind();this.complementaryLayer=this.getLayer(a.complementaryLayer);if(void 0!==a.inverse)this.inverse=a.inverse;a.value=void 0!==a.value?a.value:this.getOpacityValue(this.layer);delete a.layer;delete a.complementaryLayer}GeoExt.LayerOpacitySlider.superclass.constructor.call(this, 827a)},bind:function(){if(this.layer&&this.layer.map)this.layer.map.events.on({changelayer:this.update,scope:this})},unbind:function(){this.layer&&this.layer.map&&this.layer.map.events&&this.layer.map.events.un({changelayer:this.update,scope:this})},update:function(a){"opacity"===a.property&&a.layer==this.layer&&!this._settingOpacity&&this.setValue(this.getOpacityValue(this.layer))},setLayer:function(a){this.unbind();this.layer=this.getLayer(a);this.setValue(this.getOpacityValue(a));this.bind()},getOpacityValue:function(a){a= 828a&&null!==a.opacity?parseInt(a.opacity*(this.maxValue-this.minValue)):this.maxValue;!0===this.inverse&&(a=this.maxValue-this.minValue-a);return a},getLayer:function(a){if(a instanceof OpenLayers.Layer)return a;
828if(a instanceof GeoExt.data.LayerRecord)return a.getLayer()},initComponent:function(){GeoExt.LayerOpacitySlider.superclass.initComponent.call(this);this.changeVisibility&&this.layer&&(0==this.layer.opacity||!1===this.inverse&&this.value==this.minValue||!0===this.inverse&&this.value==this.maxValue)&& 829this.layer.setVisibility(!1);this.complementaryLayer&&(this.layer&&1==this.layer.opacity||!1===this.inverse&&this.value==this.maxValue||!0===this.inverse&&this.value==this.minValue)&&this.complementaryLayer.setVisibility(!1);if(!0===this.aggressive)this.on("change",this.changeLayerOpacity,this,{buffer:this.delay});else this.on("changecomplete",this.changeLayerOpacity,this);if(!0===this.changeVisibility)this.on("change",this.changeLayerVisibility,this,{buffer:this.changeVisibilityDelay});if(this.complementaryLayer)this.on("change", 830this.changeComplementaryLayerVisibility,this,{buffer:this.changeVisibilityDelay});this.on("beforedestroy",this.unbind,this)},changeLayerOpacity:function(a,b){if(this.layer)b/=this.maxValue-this.minValue,!0===this.inverse&&(b=1-b),this._settingOpacity=!0,this.layer.setOpacity(b),delete this._settingOpacity},changeLayerVisibility:function(a,b){var c=this.layer.getVisibility();!1===this.inverse&&b==this.minValue||!0===this.inverse&&b==this.maxValue&&!0===c?this.layer.setVisibility(!1):(!1===this.inverse&& 831b>this.minValue||!0===this.inverse&&b<this.maxValue&&!1==c)&&this.layer.setVisibility(!0)},changeComplementaryLayerVisibility:function(a,b){var c=this.complementaryLayer.getVisibility();!1===this.inverse&&b==this.maxValue||!0===this.inverse&&b==this.minValue&&!0===c?this.complementaryLayer.setVisibility(!1):(!1===this.inverse&&b<this.maxValue||!0===this.inverse&&b>this.minValue&&!1==c)&&this.complementaryLayer.setVisibility(!0)},addToMapPanel:function(a){this.on({render:function(){var b=this.getEl(); 832b.setStyle({position:"absolute",zIndex:a.map.Z_INDEX_BASE.Control});b.on({mousedown:this.stopMouseEvents,click:this.stopMouseEvents})},scope:this})},removeFromMapPanel:function(){this.getEl().un({mousedown:this.stopMouseEvents,click:this.stopMouseEvents,scope:this});this.unbind()},stopMouseEvents:function(a){a.stopEvent()}});Ext.reg("gx_opacityslider",GeoExt.LayerOpacitySlider);Ext.namespace("GeoExt"); 833GeoExt.SliderTip=Ext.extend(Ext.slider.Tip,{hover:!0,minWidth:10,offsets:[0,-10],dragging:!1,init:function(a){GeoExt.SliderTip.superclass.init.apply(this,arguments);if(this.hover)a.on("render",this.registerThumbListeners,this);this.slider=a},registerThumbListeners:function(){for(var a,b,c=0,d=this.slider.thumbs.length;c<d;++c)a=this.slider.thumbs[c],b=a.tracker.el,function(a,b){b.on({mouseover:function(b){this.onSlide(this.slider,b,a);this.dragging=!1},mouseout:function(){this.dragging||this.hide.apply(this, 834arguments)},scope:this})}.apply(this,[a,b])},onSlide:function(a,b,c){this.dragging=!0;return GeoExt.SliderTip.superclass.onSlide.apply(this,arguments)}});Ext.namespace("GeoExt");GeoExt.LayerOpacitySliderTip=Ext.extend(GeoExt.SliderTip,{template:"<div>{opacity}%</div>",compiledTemplate:null,init:function(a){this.compiledTemplate=new Ext.Template(this.template);GeoExt.LayerOpacitySliderTip.superclass.init.call(this,a)},getText:function(a){return this.compiledTemplate.apply({opacity:a.value})}});Ext.namespace("gxp"); 835gxp.GoogleEarthPanel=Ext.extend(Ext.Panel,{HORIZONTAL_FIELD_OF_VIEW:30*Math.PI/180,map:null,mapPanel:null,layers:null,earth:null,projection:null,layerCache:null,initComponent:function(){this.addEvents("beforeadd","pluginfailure","pluginready");gxp.GoogleEarthPanel.superclass.initComponent.call(this);var a=this.mapPanel;a&&!(a instanceof GeoExt.MapPanel)&&(a=Ext.getCmp(a));if(!a)throw Error("Could not get map panel from config: "+this.mapPanel);this.map=a.map;this.layers=a.layers;this.projection=new OpenLayers.Projection("EPSG:4326"); 836this.on("render",this.onRenderEvent,this);this.on("show",this.onShowEvent,this);this.on("hide",function(){null!=this.earth&&this.updateMap();this.body.dom.innerHTML="";this.earth=null},this)},onEarthReady:function(a){this.earth=a;void 0===this.flyToSpeed?this.earth.getOptions().setFlyToSpeed(this.earth.SPEED_TELEPORT):null!==this.flyToSpeed&&this.earth.getOptions().setFlyToSpeed(this.flyToSpeed);this.resetCamera();this.setExtent(this.map.getExtent());this.earth.getNavigationControl().setVisibility(this.earth.VISIBILITY_SHOW); 837a=this.earth.getNavigationControl().getScreenXY();a.setXUnits(this.earth.UNITS_PIXELS);a.setYUnits(this.earth.UNITS_INSET_PIXELS);this.earth.getWindow().setVisibility(!0);this.layers.each(function(a){this.addLayer(a)},this);this.layers.on("remove",this.updateLayers,this);this.layers.on("update",this.updateLayers,this);this.layers.on("add",this.updateLayers,this);this.fireEvent("pluginready",this.earth)},onRenderEvent:function(){var a=this.ownerCt&&this.ownerCt.layout instanceof Ext.layout.CardLayout; 838if(!this.hidden&&!a)this.onShowEvent()},onShowEvent:function(){if(this.rendered)this.layerCache={},google.earth.createInstance(this.body.dom,this.onEarthReady.createDelegate(this),function(a){this.fireEvent("pluginfailure",this,a)}.createDelegate(this))},beforeDestroy:function(){this.layers.un("remove",this.updateLayers,this);this.layers.un("update",this.updateLayers,this);this.layers.un("add",this.updateLayers,this);gxp.GoogleEarthPanel.superclass.beforeDestroy.call(this)},updateLayers:function(){if(this.earth){for(var a= 839this.earth.getFeatures(),b=a.getFirstChild();null!=b;)a.removeChild(b),b=a.getFirstChild();this.layers.each(function(a){this.addLayer(a)},this)}},addLayer:function(a,b){var c=a.getLayer(),d=c&&c.url;if(this.earth&&c instanceof OpenLayers.Layer.WMS&&"string"==typeof d&&!1!==this.fireEvent("beforeadd",a)){var e=c.id;if(this.layerCache[e])d=this.layerCache[e];else{var f=this.earth.createLink("kl_"+e),d=d.replace(/\?.*/,""),g=c.params;f.setHref(d+("/kml?mode=refresh&layers="+g.LAYERS+"&styles="+g.STYLES)); 840d=this.earth.createNetworkLink("nl_"+e);d.setName(e);d.set(f,!1,!1);this.layerCache[e]=d}d.setVisibility(c.getVisibility());void 0!==b&&b<this.earth.getFeatures().getChildNodes().getLength()?this.earth.getFeatures().insertBefore(this.earth.getFeatures().getChildNodes().item(b)):this.earth.getFeatures().appendChild(d)}},setExtent:function(a){var a=a.transform(this.map.getProjectionObject(),this.projection),b=a.getCenterLonLat(),a=this.getExtentWidth(a)/(2*Math.tan(this.HORIZONTAL_FIELD_OF_VIEW)),c= 841this.earth.getView().copyAsLookAt(this.earth.ALTITUDE_RELATIVE_TO_GROUND);c.setLatitude(b.lat);c.setLongitude(b.lon);c.setRange(a);this.earth.getView().setAbstractView(c)},resetCamera:function(){var a=this.earth.getView().copyAsCamera(this.earth.ALTITUDE_RELATIVE_TO_GROUND);a.setRoll(0);a.setHeading(0);a.setTilt(0);this.earth.getView().setAbstractView(a)},getExtent:function(){var a=this.earth.getView().getViewportGlobeBounds();return new OpenLayers.Bounds(a.getWest(),a.getSouth(),a.getEast(),a.getNorth())}, 842updateMap:function(){var a=this.earth.getView().copyAsLookAt(this.earth.ALTITUDE_RELATIVE_TO_GROUND),b=this.reprojectToMap(new OpenLayers.LonLat(a.getLongitude(),a.getLatitude()));this.map.zoomToExtent(this.reprojectToMap(this.getExtent()),!0);this.map.setCenter(b);var a=2*a.getRange()*Math.tan(this.HORIZONTAL_FIELD_OF_VIEW),c=this.map.getResolutionForZoom(this.map.getZoom()+1),d=this.map.getExtent(),b=new OpenLayers.Bounds(b.lon-this.map.getSize().w/2*c,b.lat+this.map.getSize().h/2*c,b.lon+this.map.getSize().w/ 8432*c,b.lat-this.map.getSize().h/2*c),d=Math.abs(this.getExtentWidth(d)-a);Math.abs(this.getExtentWidth(b)-a)<d&&this.map.zoomTo(this.map.getZoom()+1)},getExtentWidth:function(a){var b=a.getCenterLonLat(),c=new OpenLayers.LonLat(a.left,b.lat),a=new OpenLayers.LonLat(a.right,b.lat);return 1E3*OpenLayers.Util.distVincenty(c,a)},reprojectToGE:function(a){return a.clone().transform(this.map.getProjectionObject(),this.projection)},reprojectToMap:function(a){return a.clone().transform(this.projection,this.map.getProjectionObject())}}); 844Ext.reg("gxp_googleearthpanel",gxp.GoogleEarthPanel); 845OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",template:"${layers}",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, 846addlayer: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()&&-1===OpenLayers.Util.indexOf(a,d.attribution)&&a.push(d.attribution)}this.div.innerHTML=OpenLayers.String.format(this.template,{layers:a.join(this.separator)})}},CLASS_NAME:"OpenLayers.Control.Attribution"}); 847OpenLayers.Events.buttonclick=OpenLayers.Class({target:null,events:"mousedown,mouseup,click,dblclick,touchstart,touchmove,touchend,keydown".split(","),startRegEx:/^mousedown|touchstart$/,cancelRegEx:/^touchmove$/,completeRegEx:/^mouseup|touchend$/,initialize:function(a){this.target=a;for(a=this.events.length-1;0<=a;--a)this.target.register(this.events[a],this,this.buttonClick,{extension:!0})},destroy:function(){for(var a=this.events.length-1;0<=a;--a)this.target.unregister(this.events[a],this,this.buttonClick); 848delete this.target},getPressedButton:function(a){var b=3,c;do{if(OpenLayers.Element.hasClass(a,"olButton")){c=a;break}a=a.parentNode}while(0<--b&&a);return c},ignore:function(a){var b=3,c=!1;do{if("a"===a.nodeName.toLowerCase()){c=!0;break}a=a.parentNode}while(0<--b&&a);return c},buttonClick:function(a){var b=!0,c=OpenLayers.Event.element(a);
848if(c&&(OpenLayers.Event.isLeftClick(a)||!~a.type.indexOf("mouse")))if(c=this.getPressedButton(c)){if("keydown"===a.type)switch(a.keyCode){case OpenLayers.Event.KEY_RETURN:case OpenLayers.Event.KEY_SPACE:this.target.triggerEvent("buttonclick", 849{buttonElement:c}),OpenLayers.Event.stop(a),b=!1}else if(this.startEvt){if(this.completeRegEx.test(a.type)){var b=OpenLayers.Util.pagePosition(c),d=OpenLayers.Util.getViewportElement(),e=window.pageYOffset||d.scrollTop;b[0]-=window.pageXOffset||d.scrollLeft;b[1]-=e;this.target.triggerEvent("buttonclick",{buttonElement:c,buttonXY:{x:this.startEvt.clientX-b[0],y:this.startEvt.clientY-b[1]}})}this.cancelRegEx.test(a.type)&&delete this.startEvt;OpenLayers.Event.stop(a);b=!1}if(this.startRegEx.test(a.type))this.startEvt= 850a,OpenLayers.Event.stop(a),b=!1}else b=!this.ignore(OpenLayers.Event.element(a)),delete this.startEvt;return b}}); 851OpenLayers.Control.Panel=OpenLayers.Class(OpenLayers.Control,{controls:null,autoActivate:!0,defaultControl:null,saveState:!1,allowDepress:!1,activeState:null,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.controls=[];this.activeState={}},destroy:function(){this.map&&this.map.events.unregister("buttonclick",this,this.onButtonClick);OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var a,b=this.controls.length-1;0<=b;b--)a=this.controls[b],a.events&& 852a.events.un({activate:this.iconOn,deactivate:this.iconOff}),a.panel_div=null;this.activeState=null},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){for(var a,b=0,c=this.controls.length;b<c;b++)a=this.controls[b],(a===this.defaultControl||this.saveState&&this.activeState[a.id])&&a.activate();if(!0===this.saveState)this.defaultControl=null;this.redraw();return!0}return!1},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){for(var a, 853b=0,c=this.controls.length;b<c;b++)a=this.controls[b],this.activeState[a.id]=a.deactivate();this.redraw();return!0}return!1},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.outsideViewport?(this.events.attachToElement(this.div),this.events.register("buttonclick",this,this.onButtonClick)):this.map.events.register("buttonclick",this,this.onButtonClick);this.addControlsToMap(this.controls);return this.div},redraw:function(){for(var a=this.div.childNodes.length-1;0<=a;a--)this.div.removeChild(this.div.childNodes[a]); 854this.div.innerHTML="";if(this.active)for(var a=0,b=this.controls.length;a<b;a++)this.div.appendChild(this.controls[a].panel_div)},activateControl:function(a){if(!this.active)return!1;if(a.type==OpenLayers.Control.TYPE_BUTTON)a.trigger();else if(a.type==OpenLayers.Control.TYPE_TOGGLE)a.active?a.deactivate():a.activate();else if(this.allowDepress&&a.active)a.deactivate();else{for(var b,c=0,d=this.controls.length;c<d;c++)b=this.controls[c],b!=a&&(b.type===OpenLayers.Control.TYPE_TOOL||null==b.type)&& 855b.deactivate();a.activate()}},addControls:function(a){OpenLayers.Util.isArray(a)||(a=[a]);this.controls=this.controls.concat(a);for(var b=0,c=a.length;b<c;b++){var d=a[b],e=this.createControlMarkup(d);OpenLayers.Element.addClass(e,d.displayClass+"ItemInactive");OpenLayers.Element.addClass(e,"olButton");if(""!=d.title&&!e.title)e.title=d.title;d.panel_div=e}this.map&&(this.addControlsToMap(a),this.redraw())},createControlMarkup:function(){return document.createElement("div")},addControlsToMap:function(a){for(var b, 856c=0,d=a.length;c<d;c++)b=a[c],!0===b.autoActivate?(b.autoActivate=!1,this.map.addControl(b),b.autoActivate=!0):(this.map.addControl(b),b.deactivate()),b.events.on({activate:this.iconOn,deactivate:this.iconOff})},iconOn:function(){var a=this.panel_div;a.className=a.className.replace(RegExp("\\b("+this.displayClass+"Item)Inactive\\b"),"$1Active")},iconOff:function(){var a=this.panel_div;a.className=a.className.replace(RegExp("\\b("+this.displayClass+"Item)Active\\b"),"$1Inactive")},onButtonClick:function(a){for(var b= 857this.controls,a=a.buttonElement,c=b.length-1;0<=c;--c)if(b[c].panel_div===a){this.activateControl(b[c]);break}},getControlsBy:function(a,b){var c="function"==typeof b.test;return OpenLayers.Array.filter(this.controls,function(d){return d[a]==b||c&&b.test(d[a])})},getControlsByName:function(a){return this.getControlsBy("name",a)},getControlsByClass:function(a){return this.getControlsBy("CLASS_NAME",a)},CLASS_NAME:"OpenLayers.Control.Panel"}); 858OpenLayers.Control.Button=OpenLayers.Class(OpenLayers.Control,{type:Ope
858nLayers.Control.TYPE_BUTTON,trigger:function(){},CLASS_NAME:"OpenLayers.Control.Button"});OpenLayers.Control.ZoomIn=OpenLayers.Class(OpenLayers.Control.Button,{trigger:function(){this.map&&this.map.zoomIn()},CLASS_NAME:"OpenLayers.Control.ZoomIn"});OpenLayers.Control.ZoomOut=OpenLayers.Class(OpenLayers.Control.Button,{trigger:function(){this.map&&this.map.zoomOut()},CLASS_NAME:"OpenLayers.Control.ZoomOut"}); 859OpenLayers.Control.ZoomToMaxExtent=OpenLayers.Class(OpenLayers.Control.Button,{trigger:function(){this.map&&this.map.zoomToMaxExtent()},CLASS_NAME:"OpenLayers.Control.ZoomToMaxExtent"});OpenLayers.Control.ZoomPanel=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(a){OpenLayers.Control.Panel.prototype.initialize.apply(this,[a]);this.addControls([new OpenLayers.Control.ZoomIn,new OpenLayers.Control.ZoomToMaxExtent,new OpenLayers.Control.ZoomOut])},CLASS_NAME:"OpenLayers.Control.ZoomPanel"}); 860OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:!1,evt:null,touch:!1,initialize:function(a,b,c){OpenLayers.Util.extend(this,c);this.control=a;this.callbacks=b;(a=this.map||a.map)&&this.setMap(a);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_")},setMap:function(a){this.map=a},checkModifiers:function(a){return null==this.keyMask?!0:((a.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(a.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(a.altKey?OpenLayers.Handler.MOD_ALT: 8610)|(a.metaKey?OpenLayers.Handler.MOD_META:0))==this.keyMask},activate:function(){if(this.active)return!1;for(var a=OpenLayers.Events.prototype.BROWSER_EVENTS,b=0,c=a.length;b<c;b++)this[a[b]]&&this.register(a[b],this[a[b]]);return this.active=!0},deactivate:function(){if(!this.active)return!1;for(var a=OpenLayers.Events.prototype.BROWSER_EVENTS,b=0,c=a.length;b<c;b++)this[a[b]]&&this.unregister(a[b],this[a[b]]);this.active=this.touch=!1;return!0},startTouch:function(){if(!this.touch){this.touch=!0; 862for(var a="mousedown,mouseup,mousemove,click,dblclick,mouseout".split(","),b=0,c=a.length;b<c;b++)this[a[b]]&&this.unregister(a[b],this[a[b]])}},callback:function(a,b){a&&this.callbacks[a]&&this.callbacks[a].apply(this.control,b)},register:function(a,b){this.map.events.registerPriority(a,this,b);this.map.events.registerPriority(a,this,this.setEvent)},unregister:function(a,b){this.map.events.unregister(a,this,b);this.map.events.unregister(a,this,this.setEvent)},setEvent:function(a){this.evt=a;return!0}, 863destroy:function(){this.deactivate();this.control=this.map=null},CLASS_NAME:"OpenLayers.Handler"});OpenLayers.Handler.MOD_NONE=0;OpenLayers.Handler.MOD_SHIFT=1;OpenLayers.Handler.MOD_CTRL=2;OpenLayers.Handler.MOD_ALT=4;OpenLayers.Handler.MOD_META=8; 864OpenLayers.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:!1,stopDown:!0,dragging:!1,last:null,start:null,lastMoveEvt:null,oldOnselectstart:null,interval:0,timeoutId:null,documentDrag:!1,documentEvents:null,initialize:function(a,b,c){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(!0===this.documentDrag){var d=this;this._docMove=function(a){d.mousemove({xy:{x:a.clientX,y:a.clientY},element:document})};this._docUp=function(a){d.mouseup({xy:{x:a.clientX,y:a.clientY}})}}}, 865dragstart:function(a){var b=!0;this.dragging=!1;if(this.checkModifiers(a)&&(OpenLayers.Event.isLeftClick(a)||OpenLayers.Event.isSingleTouch(a))){this.started=!0;this.last=this.start=a.xy;OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown");this.down(a);this.callback("down",[a.xy]);OpenLayers.Event.preventDefault(a);if(!this.oldOnselectstart)this.oldOnselectstart=document.onselectstart?document.onselectstart:OpenLayers.Function.True;document.onselectstart=OpenLayers.Function.False;b=!this.stopDown}else this.started= 866!1,this.last=this.start=null;return b},dragmove:function(a){this.lastMoveEvt=a;if(this.started&&!this.timeoutId&&(a.xy.x!=this.last.x||a.xy.y!=this.last.y)){!0===this.documentDrag&&this.documentEvents&&(a.element===document?(this.adjustXY(a),this.setEvent(a)):this.removeDocumentEvents());if(0<this.interval)this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval);this.dragging=!0;this.move(a);this.callback("move",[a.xy]);if(!this.oldOnselectstart)this.oldOnselectstart= 867document.onselectstart,document.onselectstart=OpenLayers.Function.False;this.last=a.xy}return!0}
867,dragend:function(a){if(this.started){!0===this.documentDrag&&this.documentEvents&&(this.adjustXY(a),this.removeDocumentEvents());var b=this.start!=this.last;this.dragging=this.started=!1;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(a);this.callback("up",[a.xy]);b&&this.callback("done",[a.xy]);document.onselectstart=this.oldOnselectstart}return!0},down:function(){},move:function(){}, 868up:function(){},out:function(){},mousedown:function(a){return this.dragstart(a)},touchstart:function(a){this.startTouch();return this.dragstart(a)},mousemove:function(a){return this.dragmove(a)},touchmove:function(a){return this.dragmove(a)},removeTimeout:function(){this.timeoutId=null;this.dragging&&this.mousemove(this.lastMoveEvt)},mouseup:function(a){return this.dragend(a)},touchend:function(a){a.xy=this.last;return this.dragend(a)},mouseout:function(a){if(this.started&&OpenLayers.Util.mouseLeft(a, 869this.map.viewPortDiv))if(!0===this.documentDrag)this.addDocumentEvents();else{var b=this.start!=this.last;this.dragging=this.started=!1;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(a);this.callback("out",[]);b&&this.callback("done",[a.xy]);if(document.onselectstart)document.onselectstart=this.oldOnselectstart}return!0},click:function(){return this.start==this.last},activate:function(){var a=!1;if(OpenLayers.Handler.prototype.activate.apply(this,arguments))this.dragging= 870!1,a=!0;return a},deactivate:function(){var a=!1;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments))this.dragging=this.started=!1,this.last=this.start=null,a=!0,OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");return a}
870,adjustXY:function(a){var b=OpenLayers.Util.pagePosition(this.map.viewPortDiv);a.xy.x-=b[0];a.xy.y-=b[1]},addDocumentEvents:function(){OpenLayers.Element.addClass(document.body,"olDragDown");this.documentEvents=!0;OpenLayers.Event.observe(document,"mousemove", 871this._docMove);OpenLayers.Event.observe(document,"mouseup",this._docUp)},removeDocumentEvents:function(){OpenLayers.Element.removeClass(document.body,"olDragDown");this.documentEvents=!1;OpenLayers.Event.stopObserving(document,"mousemove",this._docMove);OpenLayers.Event.stopObserving(document,"mouseup",this._docUp)},CLASS_NAME:"OpenLayers.Handler.Drag"}); 872OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:"olHandlerBoxZoomBox",boxOffsets:null,initialize:function(a,b,c){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.dragHandler=new OpenLayers.Handler.Drag(this,{down:this.startBox,move:this.moveBox,out:this.removeBox,up:this.endBox},{keyMask:this.keyMask})},destroy:function(){OpenLayers.Handler.prototype.destroy.apply(this,arguments);if(this.dragHandler)this.dragHandler.destroy(),this.dragHandler= 873null},setMap:function(a){OpenLayers.Handler.prototype.setMap.apply(this,arguments);this.dragHandler&&this.dragHandler.setMap(a)},startBox:function(){this.callback("start",[]);this.zoomBox=OpenLayers.Util.createDiv("zoomBox",{x:-9999,y:-9999});this.zoomBox.className=this.boxDivClassName;this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE.Popup-1;this.map.viewPortDiv.appendChild(this.zoomBox);OpenLayers.Element.addClass(this.map.viewPortDiv,"olDrawBox")},moveBox:function(a){var b=this.dragHandler.start.x, 874c=this.dragHandler.start.y,d=Math.abs(b-a.x),e=Math.abs(c-a.y),f=this.getBoxOffsets();this.zoomBox.style.width=d+f.width+1+"px";this.zoomBox.style.height=e+f.height+1+"px";this.zoomBox.style.left=(a.x<b?b-d-f.left:b-f.left)+"px";this.zoomBox.style.top=(a.y<c?c-e-f.top:c-f.top)+"px"},endBox:function(a){var b;if(5<Math.abs(this.dragHandler.start.x-a.x)||5<Math.abs(this.dragHandler.start.y-a.y)){var c=this.dragHandler.start;b=Math.min(c.y,a.y);var d=Math.max(c.y,a.y),e=Math.min(c.x,a.x),a=Math.max(c.x, 875a.x);b=new OpenLayers.Bounds(e,d,a,b)}else b=this.dragHandler.start.clone();this.removeBox();this.callback("done",[b])},removeBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.boxOffsets=this.zoomBox=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDrawBox")},activate:function(){return OpenLayers.Handler.prototype.activate.apply(this,arguments)?(this.dragHandler.activate(),!0):!1},deactivate:function(){return OpenLayers.Handler.prototype.deactivate.apply(this,arguments)? 876(this.dragHandler.deactivate()&&this.zoomBox&&this.removeBox(),!0):!1},getBoxOffsets:function(){if(!this.boxOffsets){var a=document.createElement("div");a.style.position="absolute";a.style.border="1px solid black";a.style.width="3px";document.body.appendChild(a);var b=3==a.clientWidth;document.body.removeChild(a);var a=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width")),c=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width")),d=parseInt(OpenLayers.Element.getStyle(this.zoomBox, 877"border-top-width")),e=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"));this.boxOffsets={left:a,right:c,top:d,bottom:e,width:!1===b?a+c:0,height:!1===b?d+e:0}}return this.boxOffsets},CLASS_NAME:"OpenLayers.Handler.Box"}); 878OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,out:!1,keyMask:null,alwaysZoom:!1,zoomOnClick:!0,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask})},zoomBox:function(a){if(a instanceof OpenLayers.Bounds){var b,c=a.getCenterPixel();if(this.out){b=Math.min(this.map.size.h/(a.bottom-a.top),this.map.size.w
878/(a.right-a.left));var d=this.map.getExtent(),e=this.map.getLonLatFromPixel(c),f=e.lon-d.getWidth()/ 8792*b,a=e.lon+d.getWidth()/2*b,g=e.lat-d.getHeight()/2*b;b=e.lat+d.getHeight()/2*b;b=new OpenLayers.Bounds(f,g,a,b)}else f=this.map.getLonLatFromPixel({x:a.left,y:a.bottom}),a=this.map.getLonLatFromPixel({x:a.right,y:a.top}),b=new OpenLayers.Bounds(f.lon,f.lat,a.lon,a.lat);f=this.map.getZoom();g=this.map.getSize();a=g.w/2;g=g.h/2;b=this.map.getZoomForExtent(b);d=this.map.getResolution();e=this.map.getResolutionForZoom(b);d==e?this.map.setCenter(this.map.getLonLatFromPixel(c)):this.map.zoomTo(b,{x:(d* 880c.x-e*a)/(d-e),y:(d*c.y-e*g)/(d-e)});f==this.map.getZoom()&&!0==this.alwaysZoom&&this.map.zoomTo(f+(this.out?-1:1))}else this.zoomOnClick&&(this.out?this.map.zoomTo(this.map.getZoom()-1,a):this.map.zoomTo(this.map.getZoom()+1,a))},CLASS_NAME:"OpenLayers.Control.ZoomBox"}); 881OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:!1,interval:0,documentDrag:!1,kinetic:null,enableKinetic:!0,kineticInterval:10,draw:function(){if(this.enableKinetic&&OpenLayers.Kinetic){var a={interval:this.kineticInterval};"object"===typeof this.enableKinetic&&(a=OpenLayers.Util.extend(a,this.enableKinetic));this.kinetic=new OpenLayers.Kinetic(a)}this.handler=new OpenLayers.Handler.Drag(this,{move:this.panMap,done:this.panMapDone,down:this.panMapStart}, 882{interval:this.interval,documentDrag:this.documentDrag})},panMapStart:function(){this.kinetic&&this.kinetic.begin()},panMap:function(a){this.kinetic&&this.kinetic.update(a);this.panned=!0;this.map.pan(this.handler.last.x-a.x,this.handler.last.y-a.y,{dragging:!0,animate:!1})},panMapDone:function(a){if(this.panned){var b=null;this.kinetic&&(b=this.kinetic.end(a));this.map.pan(this.handler.last.x-a.x,this.handler.last.y-a.y,{dragging:!!b,animate:!1});if(b){var c=this;this.kinetic.move(b,function(a,b, 883f){c.map.pan(a,b,{dragging:!f,animate:!1})})}this.panned=!1}},CLASS_NAME:"OpenLayers.Control.DragPan"}); 884OpenLayers.Handler.MouseWheel=OpenLayers.Class(OpenLayers.Handler,{wheelListener:null,interval:0,maxDelta:Number.POSITIVE_INFINITY,delta:0,cumulative:!0,initialize:function(a,b,c){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.wheelListener=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this)},destroy:function(){OpenLayers.Handler.prototype.destroy.apply(this,arguments);this.wheelListener=null},onWheelEvent:function(a){if(this.map&&this.checkModifiers(a)){for(var b= 885!1,c=!1,d=!1,e=OpenLayers.Event.element(a);null!=e&&!d&&!b;){if(!b)try{var f,b=(f=e.currentStyle?e.currentStyle.overflow:document.defaultView.getComputedStyle(e,null).getPropertyValue("overflow"))&&"auto"==f||"scroll"==f}catch(g){}if(!c&&(c=OpenLayers.Element.hasClass(e,"olScrollable"),!c))for(var d=0,h=this.map.layers.length;d<h;d++){var i=this.map.layers[d];if(e==i.div||e==i.pane){c=!0;break}}d=e==this.map.div;e=e.parentNode}if(!b&&d){if(c)if(b=0,a.wheelDelta?(b=a.wheelDelta,0===b%160&&(b*=0.75), 886b/=120):a.detail&&(b=-(a.detail/Math.abs(a.detail))),this.delta+=b,window.clearTimeout(this._timeoutId),this.interval&&Math.abs(this.delta)<this.maxDelta){var j=OpenLayers.Util.extend({},a);this._timeoutId=window.setTimeout(OpenLayers.Function.bind(function(){this.wheelZoom(j)},this),this.interval)}else this.wheelZoom(a);OpenLayers.Event.stop(a)}}},wheelZoom:function(a){var b=this.delta;this.delta=0;if(b)a.xy=this.map.events.getMousePosition(a),0>b?this.callback("down",[a,this.cumulative?Math.max(-this.maxDelta, 887b):-1]):this.callback("up",[a,this.cumulative?Math.min(this.maxDelta,b):1])},activate:function(a){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var b=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",b);OpenLayers.Event.observe(window,"mousewheel",b);OpenLayers.Event.observe(document,"mousewheel",b);return!0}return!1},deactivate:function(a){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var b=this.wheelListener;OpenLayers.Event.stopObserving(window, 888"DOMMouseScroll",b);OpenLayers.Event.stopObserving(window,"mousewheel",b);OpenLayers.Event.stopObserving(document,"mousewheel",b);return!0}return!1},CLASS_NAME:"OpenLayers.Handler.MouseWheel"}); 889OpenLayers.Handler.Click=OpenLayers.Class(OpenLayers.Handler,{delay:300,single:!0,"double":!1,pixelTolerance:0,dblclickTolerance:13,stopSingle:!1,stopDouble:!1,timerId:null,down:null,last:null,first:null,rightclickTimerId:null,touchstart:function(a){this.startTouch();this.down=this.getEventInfo(a);this.last=this.getEventInfo(a);return!0},touchmove:function(a){this.last=this.getEventInfo(a);return!0}
889,touchend:function(a){if(this.down)a.xy=this.last.xy,a.lastTouches=this.last.touches,this.handleSingle(a), 890this.down=null;return!0},mousedown:function(a){this.down=this.getEventInfo(a);this.last=this.getEventInfo(a);return!0},mouseup:function(a){var b=!0;this.checkModifiers(a)&&this.control.handleRightClicks&&OpenLayers.Event.isRightClick(a)&&(b=this.rightclick(a));return b},rightclick:function(a){if(this.passesTolerance(a)){if(null!=this.rightclickTimerId)return this.clearTimer(),this.callback("dblrightclick",[a]),!this.stopDouble;a=this["double"]?OpenLayers.Util.extend({},a):this.callback("rightclick", 891[a]);a=OpenLayers.Function.bind(this.delayedRightCall,this,a);this.rightclickTimerId=window.setTimeout(a,this.delay)}return!this.stopSingle},delayedRightCall:function(a){this.rightclickTimerId=null;a&&this.callback("rightclick",[a])},click:function(a){if(!this.last)this.last=this.getEventInfo(a);this.handleSingle(a);return!this.stopSingle},dblclick:function(a){this.handleDouble(a);return!this.stopDouble},handleDouble:function(a){this.passesDblclickTolerance(a)&&(this["double"]&&this.callback("dblclick", 892[a]),this.clearTimer())},handleSingle:function(a){if(this.passesTolerance(a))null!=this.timerId?(this.last.touches&&1===this.last.touches.length&&(this["double"]&&OpenLayers.Event.preventDefault(a),this.handleDouble(a)),(!this.last.touches||2!==this.last.touches.length)&&this.clearTimer()):(this.first=this.getEventInfo(a),this.queuePotentialClick(this.single?OpenLayers.Util.extend({},a):null))},queuePotentialClick:function(a){this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall, 893this,a),this.delay)},passesTolerance:function(a){var b=!0;if(null!=this.pixelTolerance&&this.down&&this.down.xy&&(b=this.pixelTolerance>=this.down.xy.distanceTo(a.xy))&&this.touch&&this.down.touches.length===this.last.touches.length)for(var a=0,c=this.down.touches.length;a<c;++a)if(this.getTouchDistance(this.down.touches[a],this.last.touches[a])>this.pixelTolerance){b=!1;break}return b},getTouchDistance:function(a,b){return Math.sqrt(Math.pow(a.clientX-b.clientX,2)+Math.pow(a.clientY-b.clientY,2))}, 894passesDblclickTolerance:function(){var a=!0;this.down&&this.first&&(a=this.down.xy.distanceTo(this.first.xy)<=this.dblclickTolerance);return a},clearTimer:function(){if(null!=this.timerId)window.clearTimeout(this.timerId),this.timerId=null;if(null!=this.rightclickTimerId)window.clearTimeout(this.rightclickTimerId),this.rightclickTimerId=null},delayedCall:function(a){this.timerId=null;a&&this.callback("click",[a])},getEventInfo:function(a){var b;if(a.touches){var c=a.touches.length;b=Array(c);for(var d, 895e=0;e<c;e++)d=a.touches[e],b[e]={clientX:d.olClientX,clientY:d.olClientY}}return{xy:a.xy,touches:b}},deactivate:function(){var a=!1;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments))this.clearTimer(),this.last=this.first=this.down=null,a=!0;return a},CLASS_NAME:"OpenLayers.Handler.Click"}); 896OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,pinchZoom:null,pinchZoomOptions:null,documentDrag:!1,zoomBox:null,zoomBoxEnabled:!0,zoomWheelEnabled:!0,mouseWheelOptions:null,handleRightClicks:!1,zoomBoxKeyMask:OpenLayers.Handler.MOD_SHIFT,autoActivate:!0,initialize:function(a){this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,arguments)},destroy:function(){this.deactivate();this.dragPan&&this.dragPan.destroy();this.dragPan=null; 897this.zoomBox&&this.zoomBox.destroy();this.zoomBox=null;this.pinchZoom&&this.pinchZoom.destroy();this.pinchZoom=null;OpenLayers.Control.prototype.destroy.apply(this,arguments)},activate:function(){this.dragPan.activate();this.zoomWheelEnabled&&this.handlers.wheel.activate();this.handlers.click.activate();this.zoomBoxEnabled&&this.zoomBox.activate();this.pinchZoom&&this.pinchZoom.activate();return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){this.pinchZoom&&this.pinchZoom.deactivate(); 898this.zoomBox.deactivate();this.dragPan.deactivate();this.handlers.click.deactivate();this.handlers.wheel.deactivate();return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},draw:function(){if(this.handleRightClicks)this.map.viewPortDiv.oncontextmenu=OpenLayers.Function.False;this.handlers.click=new OpenLayers.Handler.Click(this,{click:this.defaultClick,dblclick:this.defaultDblClick,dblrightclick:this.defaultDblRightClick},{"double":!0,stopDouble:!0});this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map, 899documentDrag:this.documentDrag},this.dragPanOptions));this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:this.zoomBoxKeyMask});this.dragPan.draw();this.zoomBox.draw();this.handlers.wheel=new OpenLayers.Handler.MouseWheel(this,{up:this.wheelUp,down:this.wheelDown},OpenLayers.Util.extend(this.map.fractionalZoom?{}:{cumulative:!1,interval:50,maxDelta:6},this.mouseWheelOptions));if(OpenLayers.Control.PinchZoom)this.pinchZoom=new OpenLayers.Control.PinchZoom(OpenLayers.Util.extend({map:this.map}, 900this.pinchZoomOptions))},defaultClick:function(a){a.lastTouches&&2==a.lastTouches.length&&this.map.zoomOut()},defaultDblClick:function(a){this.map.zoomTo(this.map.zoom+1,a.xy)},defaultDblRightClick:function(a){this.map.zoomTo(this.map.zoom-1,a.xy)},wheelChange:function(a,b){this.map.fractionalZoom||(b=Math.round(b));var c=this.map.getZoom(),d;d=Math.max(c+b,0);d=Math.min(d,this.map.getNumZoomLevels());d!==c&&this.map.zoomTo(d,a.xy)},wheelUp:function(a,b){this.wheelChange(a,b||1)},wheelDown:function(a, 901b){this.wheelChange(a,b||-1)},disableZoomBox:function(){this.zoomBoxEnabled=!1;this.zoomBox.deactivate()},enableZoomBox:function(){this.zoomBoxEnabled=!0;this.active&&this.zoomBox.activate()},disableZoomWheel:function(){this.zoomWheelEnabled=!1;this.handlers.wheel.deactivate()},enableZoomWheel:function(){this.zoomWheelEnabled=!0;this.active&&this.handlers.wheel.activate()},CLASS_NAME:"OpenLayers.Control.Navigation"}); 902OpenLayers.Kinetic=OpenLayers.Class({threshold:0,deceleration:0.0035,nbPoints:100,delay:200,points:void 0,timerId:void 0,initialize:function(a){OpenLayers.Util.extend(this,a)},begin:function(){OpenLayers.Animation.stop(this.timerId);this.timerId=void 0;this.points=[]},update:function(a){this.points.unshift({xy:a,tick:(new Date).getTime()});this.points.length>this.nbPoints&&this.points.pop()},end:function(a){for(var b,c=(new Date).getTime(),d=0,e=this.points.length,f;d<e;d++){f=this.points[d];if(c- 903f.tick>this.delay)break;b=f}if(b&&(d=(new Date).getTime()-b.tick,c=Math.sqrt(Math.pow(a.x-b.xy.x,2)+Math.pow(a.y-b.xy.y,2)),d=c/d,!(0==d||d<this.threshold)))return c=Math.asin((a.y-b.xy.y)/c),b.xy.x<=a.x&&(c=Math.PI-c),{speed:d,theta:c}},move:function(a,b){var c=a.speed,d=Math.cos(a.theta),e=-Math.sin(a.theta),f=(new Date).getTime(),g=0,h=0;this.timerId=OpenLayers.Animation.start(OpenLayers.Function.bind(function(){if(null!=this.timerId){var a=(new Date).getTime()-f,j=-this.deceleration*Math.pow(a, 9042)/2+c*a,k=j*d,j=j*e,l,m;l=!1;if(0>=-this.deceleration*a+c)OpenLayers.Animation.stop(this.timerId),this.timerId=null,l=!0;a=k-g;m=j-h;g=k;h=j;b(a,m,l)}},this))},CLASS_NAME:"OpenLayers.Kinetic"}); 905OpenLayers.Control.Pan=OpenLayers.Class(OpenLayers.Control.Button,{slideFactor:50,slideRatio:null,direction:null,initialize:function(a,b){this.direction=a;this.CLASS_NAME+=this.direction;OpenLayers.Control.prototype.initialize.apply(this,[b])},trigger:function(){if(this.map){var a=OpenLayers.Function.bind(function(a){return this.slideRatio?this.map.getSize()[a]*this.slideRatio:this.slideFactor},this);switch(this.direction){case OpenLayers.Control.Pan.NORTH:this.map.pan(0,-a("h"));break;case OpenLayers.Control.Pan.SOUTH:this.map.pan(0, 906a("h"));break;case OpenLayers.Control.Pan.WEST:this.map.pan(-a("w"),0);break;case OpenLayers.Control.Pan.EAST:this.map.pan(a("w"),0)}}},CLASS_NAME:"OpenLayers.Control.Pan"});OpenLayers.Control.Pan.NORTH="North";OpenLayers.Control.Pan.SOUTH="South";OpenLayers.Control.Pan.EAST="East";OpenLayers.Control.Pan.WEST="West"; 907OpenLayers.Control.PanPanel=OpenLayers.Class(OpenLayers.Control.Panel,{slideFactor:50,slideRatio:null,initialize:function(a){OpenLayers.Control.Panel.prototype.initialize.apply(this,[a]);a={slideFactor:this.slideFactor,slideRatio:this.slideRatio};
907this.addControls([new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH,a),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH,a),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST,a),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST,a)])}, 908CLASS_NAME:"OpenLayers.Control.PanPanel"});Ext.namespace("GeoExt"); 909GeoExt.ZoomSlider=Ext.extend(Ext.slider.SingleSlider,{map:null,baseCls:"gx-zoomslider",aggressive:!1,updating:!1,initComponent:function(){GeoExt.ZoomSlider.superclass.initComponent.call(this);if(this.map){if(this.map instanceof GeoExt.MapPanel)this.map=this.map.map;this.bind(this.map)}if(!0===this.aggressive)this.on("change",this.changeHandler,this);else this.on("changecomplete",this.changeHandler,this);this.on("beforedestroy",this.unbind,this)},onRender:function(){GeoExt.ZoomSlider.superclass.onRender.apply(this, 910arguments);this.el.addClass(this.baseCls)},afterRender:function(){Ext.slider.SingleSlider.superclass.afterRender.apply(this,arguments);this.update()},addToMapPanel:function(a){this.on({render:function(){var b=this.getEl();b.setStyle({position:"absolute",zIndex:a.map.Z_INDEX_BASE.Control});b.on({mousedown:this.stopMouseEvents,click:this.stopMouseEvents})},afterrender:function(){this.bind(a.map)},scope:this})},stopMouseEvents:function(a){a.stopEvent()},removeFromMapPanel:function(){var a=this.getEl(); 911a.un("mousedown",this.stopMouseEvents,this);a.un("click",this.stopMouseEvents,this);this.unbind()},bind:function(a){this.map=a;this.map.events.on({zoomend:this.onZoomEnd,updatesize:this.initZoomValues,changebaselayer:this.initZoomValues,scope:this});this.initZoomValues()},onZoomEnd:function(){this.update()},unbind:function(){this.map&&this.map.events&&this.map.events.un({zoomend:this.onZoomEnd,updatesize:this.initZoomValues,changebaselayer:this.initZoomValues,scope:this})},initZoomValues:function(){var a= 912this.map.baseLayer;if(a){if(void 0===this.initialConfig.minValue){var b=this.map.getMinZoom?this.map.getMinZoom():0;this.minValue=Math.max(b,a.minZoomLevel||0)}if(void 0===this.initialConfig.maxValue)this.maxValue=null==a.minZoomLevel?a.numZoomLevels-1:a.maxZoomLevel;this.update(!0)}},getZoom:function(){return this.getValue()},getScale:function(){return OpenLayers.Util.getScaleFromResolution(this.map.getResolutionForZoom(this.getValue()),this.map.getUnits())},getResolution:function(){return this.map.getResolutionForZoom(this.getValue())}, 913changeHandler:function(){this.map&&!this.updating&&this.map.zoomTo(this.getValue())},update:function(a){if(this.rendered&&this.map){this.updating=!0;if(a)this.thumbs[0].value=null;this.setValue(this.map.getZoom());this.updating=!1}}});Ext.reg("gx_zoomslider",GeoExt.ZoomSlider);Ext.namespace("GeoExt"); 914GeoExt.ZoomSliderTip=Ext.extend(GeoExt.SliderTip,{template:"<div>Zoom Level: {zoom}</div><div>Resolution: {resolution}</div><div>Scale: 1 : {scale}</div>",compiledTemplate:null,init:function(a){this.compiledTemplate=new Ext.Template(this.template);GeoExt.ZoomSliderTip.superclass.init.call(this,a)},getText:function(a){return this.compiledTemplate.apply({zoom:a.value,resolution:this.slider.getResolution(),scale:Math.round(this.slider.getScale())})}});Ext.namespace("gxp"); 915gxp.Viewer=Ext.extend(Ext.util.Observable,{defaultToolType:"gxp_tool",tools:null,selectedLayer:null,authenticate:null,saveErrorText:"Trouble saving: ",constructor:function(a){this.addEvents("ready","portalready","beforelayerselectionchange","layerselectionchange","featureedit","authorizationchange","beforesave","save","beforehashchange");Ext.apply(this,{layerSources:{},portalItems:[]});this.createLayerRecordQueue=[];(a.loadConfig||this.loadConfig).call(this,a,this.applyConfig);gxp.Viewer.superclass.constructor.apply(this, 916arguments)},selectLayer:function(a){var a=a||null,b=!1;if(!1!==this.fireEvent("beforelayerselectionchange",a))b=!0,this.selectedLayer&&this.selectedLayer.set("selected",!1),(this.selectedLayer=a)&&this.selectedLayer.set("selected",!0),this.fireEvent("layerselectionchange",a);return b},loadConfig:function(a){this.applyConfig(a)},applyConfig:function(a){this.initialConfig=Ext.apply({},a);Ext.apply(this,this.initialConfig);this.load()},load:function(){if(this.proxy)OpenLayers.ProxyHost=this.proxy;this.initMapPanel(); 917this.initTools();var a=[],b;for(b in this.sources)a.push(this.createSourceLoader(b));a.push(function(a){Ext.onReady(function(){this.initPortal();a()},this)});
917gxp.util.dispatch(a,this.activate,this)},createSourceLoader:function(a){return function(b){var c=this.sources[a];c.projection=this.initialConfig.map.projection;this.addLayerSource({id:a,config:c,callback:b,fallback:function(){b()},scope:this})}},addLayerSource:function(a){var b=a.id||Ext.id(null,"gxp-source-"),c,d=a.config;d.id=b;try{c=Ext.ComponentMgr.createPlugin(d, 918this.defaultSourceType)}catch(e){throw Error("Could not create new source plugin with ptype: "+a.config.ptype);}c.on({ready:{fn:function(){(a.callback||Ext.emptyFn).call(a.scope||this,b)},scope:this,single:!0},failure:{fn:function(){var c=a.fallback||Ext.emptyFn;delete this.layerSources[b];c.apply(a.scope||this,arguments)},scope:this,single:!0}});this.layerSources[b]=c;c.init(this);return c},initMapPanel:function(){var a=Ext.apply({},this.initialConfig.map),b={},c={wrapDateLine:void 0!==a.wrapDateLine? 919a.wrapDateLine:!0,maxResolution:a.maxResolution,numZoomLevels:a.numZoomLevels,displayInLayerSwitcher:!1};if(this.initialConfig.map)for(var d="theme,controls,resolutions,projection,units,maxExtent,restrictedExtent,maxResolution,numZoomLevels,panMethod".split(","),e,f=d.length-1;0<=f;--f)e=d[f],e in a&&(b[e]=a[e],delete a[e]);this.mapPanel=Ext.ComponentMgr.create(Ext.applyIf({xtype:a.xtype||"gx_mappanel",map:Ext.applyIf({theme:b.theme||null,controls:b.controls||[new OpenLayers.Control.Navigation({zoomWheelOptions:{interval:250}, 920dragPanOptions:{enableKinetic:!0}}),new OpenLayers.Control.PanPanel,new OpenLayers.Control.ZoomPanel,new OpenLayers.Control.Attribution],maxExtent:b.maxExtent&&OpenLayers.Bounds.fromArray(b.maxExtent),restrictedExtent:b.restrictedExtent&&OpenLayers.Bounds.fromArray(b.restrictedExtent),numZoomLevels:b.numZoomLevels||20},b),center:a.center&&new OpenLayers.LonLat(a.center[0],a.center[1]),resolutions:a.resolutions,forceInitialExtent:!0,layers:[new OpenLayers.Layer(null,c)],items:this.mapItems,plugins:this.mapPlugins, 921tbar:a.tbar||new Ext.Toolbar({hidden:!0})},a));this.mapPanel.getTopToolbar().on({afterlayout:this.mapPanel.map.updateSize,show:this.mapPanel.map.updateSize,hide:this.mapPanel.map.updateSize,scope:this.mapPanel.map});this.mapPanel.layers.on({add:function(a,b){for(var c,d=b.length-1;0<=d;d--)c=b[d],!0===c.get("selected")&&this.selectLayer(c)},remove:function(a,b){!0===b.get("selected")&&this.selectLayer()},scope:this})},initTools:function(){this.tools={};if(this.initialConfig.tools&&0<this.initialConfig.tools.length)for(var a, 922b=0,c=this.initialConfig.tools.length;b<c;b++){try{a=Ext.ComponentMgr.createPlugin(this.initialConfig.tools[b],this.defaultToolType)}catch(d){throw Error("Could not create tool plugin with ptype: "+this.initialConfig.tools[b].ptype);}a.init(this)}},initPortal:function(){var a=Ext.apply({},this.portalConfig);if(0===this.portalItems.length)this.mapPanel.region="center",this.portalItems.push(this.mapPanel);this.portal=Ext.ComponentMgr.create(Ext.applyIf(a,{layout:"fit",hideBorders:!0,items:{layout:"border", 923deferredRender:!1,items:this.portalItems}}),a.renderTo?"panel":"viewport");this.fireEvent("portalready")},activate:function(){Ext.QuickTips.init();this.addLayers();this.checkLayerRecordQueue();this.fireEvent("ready")},addLayers:function(){var a=this.initialConfig.map;if(a&&a.layers){for(var b,c,d=[],e=[],f=0;f<a.layers.length;++f)b=a.layers[f],(c=this.layerSources[b.source])?(b=c.createLayerRecord(b))&&("background"===b.get("group")?d.push(b):e.push(b)):window.console&&console.warn("Non-existing source '"+ 924b.source+"' referenced in layer config.");a=this.mapPanel;d=d.concat(e);d.length&&a.layers.add(d)}},getLayerRecordFromMap:function(a){var b=null;this.mapPanel&&this.mapPanel.layers.each(function(c){if(c.get("source")==a.source&&c.get("name")==a.name)return b=c,!1});return b},createLayerRecord:function(a,b,c){this.createLayerRecordQueue.push({config:a,callback:b,scope:c});this.checkLayerRecordQueue()},checkLayerRecordQueue:function(){for(var a,b,c,d,e=[],f=0,g=this.createLayerRecordQueue.length;f< 925g;++f)d=!1,a=this.createLayerRecordQueue[f],b=a.config.source,b in this.layerSources&&(b=this.layerSources[b],(c=b.createLayerRecord(a.c
925onfig))?(function(a,b){window.setTimeout(function(){a.callback.call(a.scope,b)},0)}(a,c),d=!0):b.lazy&&b.store.load({callback:this.checkLayerRecordQueue,scope:this})),d||e.push(a);this.createLayerRecordQueue=e},getSource:function(a){return a&&this.layerSources[a.get("source")]},getState:function(){var a=Ext.apply({},this.initialConfig),b=this.mapPanel.map.getCenter(); 926Ext.apply(a.map,{center:[b.lon,b.lat],zoom:this.mapPanel.map.zoom,layers:[]});var c={};this.mapPanel.layers.each(function(b){var e=b.getLayer();if(e.displayInLayerSwitcher&&!(e instanceof OpenLayers.Layer.Vector)){var f=b.get("source"),g=this.layerSources[f];if(!g)throw Error("Could not find source for record '"+b.get("name")+" and layer "+e.name+"'");a.map.layers.push(g.getConfigForRecord(b));c[f]||(c[f]=g.getState())}},this);Ext.apply(this.sources,c);a.tools=[];Ext.iterate(this.tools,function(b, 927c){c.getState!=gxp.plugins.Tool.prototype.getState&&a.tools.push(c.getState())});return a},isAuthorized:function(a){var b=!0;if(this.authorizedRoles){b=!1;a||(a="ROLE_ADMINISTRATOR");Ext.isArray(a)||(a=[a]);for(var c=a.length-1;0<=c;--c)if(~this.authorizedRoles.indexOf(a[c])){b=!0;break}}return b},setAuthorizedRoles:function(a){this.authorizedRoles=a;this.fireEvent("authorizationchange")},cancelAuthentication:function(){this._authFn&&this.un("authorizationchange",this._authFn,this);this.fireEvent("authorizationchange")}, 928isAuthenticated:function(){return!this.authorizedRoles||0<this.authorizedRoles.length},doAuthorized:function(a,b,c){this.isAuthorized(a)||!this.authenticate?window.setTimeout(function(){b.call(c)},0):(this.authenticate(),this._authFn=function(){delete this._authFn;this.doAuthorized(a,b,c,!0)},this.on("authorizationchange",this._authFn,this,{single:!0}))},save:function(a,b){var c=Ext.util.JSON.encode(this.getState()),d,e;
928this.id?(d="PUT",e="../maps/"+this.id):(d="POST",e="../maps/");c={method:d,url:e, 929data:c};!1!==this.fireEvent("beforesave",c,a)&&OpenLayers.Request.issue(Ext.apply(c,{callback:function(c){this.handleSave(c);a&&a.call(b||this)},scope:this}))},handleSave:function(a){if(200==a.status){if(a=Ext.util.JSON.decode(a.responseText).id){this.id=a;a="#maps/"+a;if(!1!==this.fireEvent("beforehashchange",a))window.location.hash=a;this.fireEvent("save",this.id)}}else window.console&&console.warn(this.saveErrorText+a.responseText)},destroy:function(){this.mapPanel.destroy();this.portal&&this.portal.destroy()}}); 930(function(){OpenLayers.DOTS_PER_INCH=25.4/0.28})();Ext.namespace("gxp"); 931gxp.EmbedMapDialog=Ext.extend(Ext.Container,{url:null,url:null,publishMessage:"Your map is ready to be published to the web! Simply copy the following HTML to embed the map in your website:",heightLabel:"Height",widthLabel:"Width",mapSizeLabel:"Map Size",miniSizeLabel:"Mini",smallSizeLabel:"Small",premiumSizeLabel:"Premium",largeSizeLabel:"Large",snippetArea:null,heightField:null,widthField:null,initComponent:function(){Ext.apply(this,this.getConfig());gxp.EmbedMapDialog.superclass.initComponent.call(this)}, 932getIframeHTML:function(){return this.snippetArea.getValue()},updateSnippet:function(){this.snippetArea.setValue('<iframe style="border: none;" height="'+this.heightField.getValue()+'" width="'+this.widthField.getValue()+'" src="'+gxp.util.getAbsoluteUrl(this.url)+'"></iframe>');!0===this.snippetArea.isVisible()&&this.snippetArea.focus(!0,100)},getConfig:function(){this.snippetArea=new Ext.form.TextArea({height:70,selectOnFocus:!0,readOnly:!0});var a={change:this.updateSnippet,specialkey:function(a, 933c){c.getKey()==c.ENTER&&this.updateSnippet()},scope:this};this.heightField=new Ext.form.NumberField({width:50,value:400,listeners:a});this.widthField=new Ext.form.NumberField({width:50,value:600,listeners:a});return{border:!1,defaults:{border:!1,cls:"gxp-export-section",xtype:"container",layout:"fit"},items:[{items:[new Ext.Container({layout:"column",defaults:{border:!1,xtype:"box"},items:[{autoEl:{cls:"gxp-field-label",html:this.mapSizeLabel}},new Ext.form.ComboBox({editable:!1,width:75,store:new Ext.data.SimpleStore({fields:["name", 934"height","width"],data:[[this.miniSizeLabel,100,100],[this.smallSizeLabel,200,300],[this.largeSizeLabel,400,600],[this.premiumSizeLabel,600,800]]}),triggerAction:"all",displayField:"name",value:this.largeSizeLabel,mode:"local",listeners:{select:function(a,c){this.widthField.setValue(c.get("width"));this.heightField.setValue(c.get("height"));this.updateSnippet()},scope:this}}),{autoEl:{cls:"gxp-field-label",html:this.heightLabel}},this.heightField,{autoEl:{cls:"gxp-field-label",html:this.widthLabel}}, 935this.widthField]})]},{xtype:"box",autoEl:{tag:"p",html:this.publishMessage}},{items:[this.snippetArea]}],listeners:{afterrender:this.updateSnippet,scope:this}}}});Ext.reg("gxp_embedmapdialog",gxp.EmbedMapDialog);Ext.namespace("gxp"); 936gxp.RulePanel=Ext.extend(Ext.TabPanel,{fonts:void 0,symbolType:"Point",rule:null,attributes:null,nestedFilters:!0,minScaleDenominatorLimit:1.577757414193268E9*Math.pow(0.5,19)*OpenLayers.DOTS_PER_INCH/256,maxScaleDenominatorLimit:1.577757414193268E9*OpenLayers.DOTS_PER_INCH/256,scaleLevels:20,scaleSliderTemplate:"{scaleType} Scale 1:{scale}",modifyScaleTipContext:Ext.emptyFn,labelFeaturesText:"Label Features",labelsText:"Labels",basicText:"Basic",advancedText:"Advanced",limitByScaleText:"Limit by scale", 937limitByConditionText:"Limit by condition",symbolText:"Symbol",nameText:"Name",initComponent:function(){Ext.applyIf(this,{plain:!0,border:!1});if(this.rule){if(!this.initialConfig.symbolType)this.symbolType=this.getSymbolTypeFromRule(this.rule)||this.symbolType}else this.rule=new OpenLayers.Rule({name:this.uniqueRuleName()});this.activeTab=0;this.textSymbolizer=new gxp.TextSymbolizer({symbolizer:this.getTextSymbolizer(),attributes:this.attributes,fonts:this.fonts,listeners:{change:function(){this.fireEvent("change", 938this,this.rule)},scope:this}});this.scaleLimitPanel=new gxp.ScaleLimitPanel({maxScaleDenominator:this.rule.maxScaleDenominator||void 0,limitMaxScaleDenominator:!!this.rule.maxScaleDenominator,maxScaleDenominatorLimit:this.maxScaleDenominatorLimit,minScaleDenominator:this.rule.minScaleDenominator||void 0,limitMinScaleDenominator:!!this.rule.minScaleDenominator,minScaleDenominatorLimit:this.minScaleDenominatorLimit,scaleLevels:this.scaleLevels,scaleSliderTemplate:this.scaleSliderTemplate,modifyScaleTipContext:this.modifyScaleTipContext, 939listeners:{change:function(a,b,c){this.rule.minScaleDenominator=b;this.rule.maxScaleDenominator=c;this.fireEvent("change",this,this.rule)},scope:this}});this.filterBuilder=new gxp.FilterBuilder({allowGroups:this.nestedFilters,filter:this.rule&&this.rule.filter&&this.rule.filter.clone(),attributes:this.attributes,listeners:{change:function(a){this.rule.filter=a.getFilter();this.fireEvent("change",this,this.rule)},scope:this}});this.items=[{title:this.labelsText,autoScroll:!0,bodyStyle:{padding:"10px"}, 940items:[{xtype:"fieldset",title:this.labelFeaturesText,autoHeight:!0,checkboxToggle:!0,collapsed:!this.hasTextSymbolizer(),items:[this.textSymbolizer],listeners:{collapse:function(){OpenLayers.Util.removeItem(this.rule.symbolizers,this.getTextSymbolizer());this.fireEvent("change",this,this.rule)},expand:function(){this.setTextSymbolizer(this.textSymbolizer.symbolizer);this.fireEvent("change",this,this.rule)},scope:this}}]}];if(this.getSymbolTypeFromRule(this.rule)||this.symbolType)this.items=[{title:this.basicText, 941autoScroll:!0,items:[this.createHeaderPanel(),this.createSymbolizerPanel()]},this.items[0],{title:this.advancedText,defaults:{style:{margin:"7px"}},autoScroll:!0,items:[{xtype:"fieldset",title:this.limitByScaleText,checkboxToggle:!0,collapsed:!(this.rule&&(this.rule.minScaleDenominator||this.rule.maxScaleDenominator)),autoHeight:!0,items:[this.scaleLimitPanel],listeners:{collapse:function(){delete this.rule.minScaleDenominator;delete this.rule.maxScaleDenominator;this.fireEvent("change",this,this.rule)}, 942expand:function(){var a=this.getActiveTab();this.activeTab=null;this.setActiveTab(a);a=!1;if(this.scaleLimitPanel.limitMinScaleDenominator)this.rule.minScaleDenominator=this.scaleLimitPanel.minScaleDenominator,a=!0;if(this.scaleLimitPanel.limitMaxScaleDenominator)this.rule.maxScaleDenominator=this.scaleLimitPanel.maxScaleDenominator,a=!0;a&&this.fireEvent("change",this,this.rule)},scope:this}},{xtype:"fieldset",title:this.limitByConditionText,checkboxToggle:!0,collapsed:!(this.rule&&this.rule.filter), 943autoHeight:!0,items:[this.filterBuilder],listeners:{collapse:function(){delete this.rule.filter;this.fireEvent("change",this,this.rule)},expand:function(){this.rule.filter=this.filterBuilder.getFilter();this.fireEvent("change",this,this.rule)},scope:this}}]}];this.items[0].autoHeight=!0;this.addEvents("change");this.on({tabchange:function(a,b){b.doLayout()},scope:this});gxp.RulePanel.superclass.initComponent.call(this)},hasTextSymbolizer:function(){for(var a,b,c=0,d=this.rule.symbolizers.length;c< 944d;++c)if(a=this.rule.symbolizers[c],a instanceof OpenLayers.Symbolizer.Text){b=a;break}return b},getTextSymbolizer:function(){var a=this.hasTextSymbolizer();a||(a=new OpenLayers.Symbolizer.Text({graphic:!1}));return a},setTextSymbolizer:function(a){for(var b,c=0,d=this.rule.symbolizers.length;c<d;++c)if(candidate=this.rule.symbolizers[c],this.rule.symbolizers[c]instanceof OpenLayers.Symbolizer.Text){this.rule.symbolizers[c]=a;b=!0;break}b||this.rule.symbolizers.push(a)},uniqueRuleName:function(){return OpenLayers.Util.createUniqueID("rule_")}, 945createHeaderPanel:function(){this.symbolizerSwatch=new GeoExt.FeatureRenderer({symbolType:this.symbolType,isFormField:!0,fieldLabel:this.symbolText});return{xtype:"form",border:!1,labelAlign:"top",defaults:{border:!1},style:{padding:"0.3em 0 0 1em"},items:[{layout:"column",defaults:{border:!1,style:{"padding-right":"1em"}},items:[{layout:"form",width:150,items:[{xtype:"textfield",fieldLabel:this.nameText,anchor:"95%",value:this.rule&&(this.rule.title||this.rule.name||""),listeners:{change:function(a, 946b){this.rule.title=b;this.fireEvent("change",this,this.rule)},scope:this}}]},{layout:"form",width:70,items:[this.symbolizerSwatch]}]}]}},createSymbolizerPanel:function(){var a,b,c=OpenLayers.Symbolizer[this.symbolType],d=!1;if(c){for(var e=0,f=this.rule.symbolizers.length;e<f;++e)if(a=this.rule.symbolizers[e],a instanceof c){d=!0;b=a;break}
946b||(b=new c({fill:!1,stroke:!1}))}else throw Error("Appropriate symbolizer type not included in build: "+this.symbolType);this.symbolizerSwatch.setSymbolizers([b], 947{draw:this.symbolizerSwatch.rendered});a={xtype:"gxp_"+this.symbolType.toLowerCase()+"symbolizer",symbolizer:b,bodyStyle:{padding:"10px"},border:!1,labelWidth:70,defaults:{labelWidth:70},listeners:{change:function(a){this.symbolizerSwatch.setSymbolizers([a],{draw:this.symbolizerSwatch.rendered});d||(this.rule.symbolizers.push(a),d=!0);this.fireEvent("change",this,this.rule)},scope:this}};if("Point"===this.symbolType&&this.pointGraphics)a.pointGraphics=this.pointGraphics;return a},getSymbolTypeFromRule:function(a){for(var b, 948c,d=0,e=a.symbolizers.length;d<e;++d)if(b=a.symbolizers[d],!(b instanceof OpenLayers.Symbolizer.Text)){c=b.CLASS_NAME.split(".").pop();break}return c}});Ext.reg("gxp_rulepanel",gxp.RulePanel);Ext.namespace("gxp"); 949gxp.StylePropertiesDialog=Ext.extend(Ext.Container,{titleText:"General",nameFieldText:"Name",titleFieldText:"Title",abstractFieldText:"Abstract",userStyle:null,initComponent:function(){Ext.applyIf(this,{layout:"form",items:[{xtype:"fieldset",title:this.titleText,labelWidth:75,defaults:{xtype:"textfield",anchor:"100%",listeners:{change:function(a,b){this.userStyle[a.name]=b;this.fireEvent("change",this,this.userStyle)},scope:this}},items:[{xtype:this.initialConfig.nameEditable?"textfield":"displayfield", 950fieldLabel:this.nameFieldText,name:"name",value:this.userStyle.name,maskRe:/[A-Za-z0-9_]/},{fieldLabel:this.titleFieldText,name:"title",value:this.userStyle.title},{xtype:"textarea",fieldLabel:this.abstractFieldText,name:"description",value:this.userStyle.description}]}]});this.addEvents("change");gxp.StylePropertiesDialog.superclass.initComponent.apply(this,arguments)}});Ext.reg("gxp_stylepropertiesdialog",gxp.StylePropertiesDialog); 951OpenLayers.ElementsIndexer=OpenLayers.Class({maxZIndex:null,order:null,indices:null,compare:null,initialize:function(a){this.compare=a?OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER:OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER;this.clear()},insert:function(a){this.exists(a)&&this.remove(a);var b=a.id;this.determineZIndex(a);for(var c=-1,d=this.order.length,e;1<d-c;)e=parseInt((c+d)/2),0<this.compare(this,a,OpenLayers.Util.getElement(this.order[e]))?c=e:d=e;this.order.splice(d, 9520,b);this.indices[b]=this.getZIndex(a);return this.getNextElement(d)},remove:function(a){var a=a.id,b=OpenLayers.Util.indexOf(this.order,a);if(0<=b)this.order.splice(b,1),delete this.indices[a],this.maxZIndex=0<this.order.length?this.indices[this.order[this.order.length-1]]:0},clear:function(){this.order=[];this.indices={};this.maxZIndex=0},exists:function(a){return null!=this.indices[a.id]},getZIndex:function(a){return a._style.graphicZIndex},determineZIndex:function(a){var b=a._style.graphicZIndex; 953if(null==b)b=this.maxZIndex,a._style.graphicZIndex=b;else if(b>this.maxZIndex)this.maxZIndex=b},getNextElement:function(a){a+=1;if(a<this.order.length){var b=OpenLayers.Util.getElement(this.order[a]);void 0==b&&(b=this.getNextElement(a));return b}return null},CLASS_NAME:"OpenLayers.ElementsIndexer"}); 954OpenLayers.ElementsIndexer.IndexingMethods={Z_ORDER:function(a,b,c){var b=a.getZIndex(b),d=0;c&&(a=a.getZIndex(c),d=b-a);return d},Z_ORDER_DRAWING_ORDER:function(a,b,c){a=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(a,b,c);c&&0==a&&(a=1);return a},Z_ORDER_Y_ORDER:function(a,b,c){a=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(a,b,c);c&&0===a&&(b=c._boundsBottom-b._boundsBottom,a=0===b?1:b);return a}}; 955OpenLayers.Renderer.Elements=OpenLayers.Class(OpenLayers.Renderer,{rendererRoot:null,root:null,vectorRoot:null,textRoot:null,xmlns:null,xOffset:0,indexer:null,BACKGROUND_ID_SUFFIX:"_background",LABEL_ID_SUFFIX:"_label",LABEL_OUTLINE_SUFFIX:"_outline",initialize:function(a,b){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot("_root");this.vectorRoot=this.createRoot("_vroot");this.textRoot=this.createRoot("_troot");this.root.appendChild(this.vectorRoot); 956this.root.appendChild(this.textRoot);this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);if(b&&(b.zIndexing||b.yOrdering))this.indexer=new OpenLayers.ElementsIndexer(b.yOrdering)},destroy:function(){this.clear();this.xmlns=this.root=this.rendererRoot=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments)},clear:function(){var a,b=this.vectorRoot;if(b)for(;a=b.firstChild;)b.removeChild(a);if(b=this.textRoot)for(;a=b.firstChild;)b.removeChild(a);this.indexer&& 957this.indexer.clear()},setExtent:function(a,b){var c=OpenLayers.Renderer.prototype.setExtent.apply(this,arguments),d=this.getResolution();if(this.map.baseLayer&&this.map.baseLayer.wrapDateLine){var e,f=a.getWidth()/this.map.getExtent().getWidth(),a=a.scale(1/f),f=this.map.getMaxExtent();f.right>a.left&&f.right<a.right?e=!0:f.left>a.left&&f.left<a.right&&(e=!1);if(e!==this.rightOfDateLine||b)c=!1,this.xOffset=!0===e?f.getWidth()/d:0;this.rightOfDateLine=e}return c},getNodeType:function(){},drawGeometry:function(a, 958b,c){var d=a.CLASS_NAME,e=!0;if("OpenLayers.Geometry.Collection"==d||"OpenLayers.Geometry.MultiPoint"==d||"OpenLayers.Geometry.MultiLineString"==d||"OpenLayers.Geometry.MultiPolygon"==d){for(var d=0,f=a.components.length;d<f;d++)e=this.drawGeometry(a.components[d],b,c)&&e;return e}d=e=!1;
958"none"!=b.display&&(b.backgroundGraphic?this.redrawBackgroundNode(a.id,a,b,c):d=!0,e=this.redrawNode(a.id,a,b,c));if(!1==e&&(b=document.getElementById(a.id)))b._style.backgroundGraphic&&(d=!0),b.parentNode.removeChild(b); 959d&&(b=document.getElementById(a.id+this.BACKGROUND_ID_SUFFIX))&&b.parentNode.removeChild(b);return e},redrawNode:function(a,b,c,d){c=this.applyDefaultSymbolizer(c);a=this.nodeFactory(a,this.getNodeType(b,c));a._featureId=d;a._boundsBottom=b.getBounds().bottom;a._geometryClass=b.CLASS_NAME;a._style=c;b=this.drawGeometryNode(a,b,c);if(!1===b)return!1;a=b.node;this.indexer?(c=this.indexer.insert(a))?this.vectorRoot.insertBefore(a,c):this.vectorRoot.appendChild(a):a.parentNode!==this.vectorRoot&&this.vectorRoot.appendChild(a); 960this.postDraw(a);return b.complete},redrawBackgroundNode:function(a,b,c){c=OpenLayers.Util.extend({},c);c.externalGraphic=c.backgroundGraphic;c.graphicXOffset=c.backgroundXOffset;c.graphicYOffset=c.backgroundYOffset;c.graphicZIndex=c.backgroundGraphicZIndex;c.graphicWidth=c.backgroundWidth||c.graphicWidth;c.graphicHeight=c.backgroundHeight||c.graphicHeight;c.backgroundGraphic=null;c.backgroundXOffset=null;c.backgroundYOffset=null;c.backgroundGraphicZIndex=null;return this.redrawNode(a+this.BACKGROUND_ID_SUFFIX, 961b,c,null)},drawGeometryNode:function(a,b,c){var c=c||a._style,d={isFilled:void 0===c.fill?!0:c.fill,isStroked:void 0===c.stroke?!!c.strokeWidth:c.stroke},e;switch(b.CLASS_NAME){case "OpenLayers.Geometry.Point":if(!1===c.graphic)d.isFilled=!1,d.isStroked=!1;e=this.drawPoint(a,b);break;case "OpenLayers.Geometry.LineString":d.isFilled=!1;e=this.drawLineString(a,b);break;case "OpenLayers.Geometry.LinearRing":e=this.drawLinearRing(a,b);break;case "OpenLayers.Geometry.Polygon":e=this.drawPolygon(a,b);break; 962case "OpenLayers.Geometry.Rectangle":e=this.drawRectangle(a,b)}a._options=d;return!1!=e?{node:this.setStyle(a,c,d,b),complete:e}:!1},postDraw:function(){},drawPoint:function(){},drawLineString:function(){},drawLinearRing:function(){},drawPolygon:function(){},drawRectangle:function(){},drawCircle:function(){},removeText:function(a){var b=document.getElementById(a+this.LABEL_ID_SUFFIX);b&&this.textRoot.removeChild(b);(a=document.getElementById(a+this.LABEL_OUTLINE_SUFFIX))&&this.textRoot.removeChild(a)}, 963getFeatureIdFromEvent:function(a){var b=a.target,c=b&&b.correspondingUseElement;return(c?c:b||a.srcElement)._featureId},eraseGeometry:function(a,b){if("OpenLayers.Geometry.MultiPoint"==a.CLASS_NAME||"OpenLayers.Geometry.MultiLineString"==a.CLASS_NAME||"OpenLayers.Geometry.MultiPolygon"==a.CLASS_NAME||"OpenLayers.Geometry.Collection"==a.CLASS_NAME)for(var c=0,d=a.components.length;c<d;c++)this.eraseGeometry(a.components[c],b);else if((c=OpenLayers.Util.getElement(a.id))&&c.parentNode){if(c.geometry)c.geometry.destroy(), 964c.geometry=null;c.parentNode.removeChild(c);this.indexer&&this.indexer.remove(c);c._style.backgroundGraphic&&(c=OpenLayers.Util.getElement(a.id+this.BACKGROUND_ID_SUFFIX))&&c.parentNode&&c.parentNode.removeChild(c)}},nodeFactory:function(a,b){var c=OpenLayers.Util.getElement(a);c?this.nodeTypeCompare(c,b)||(c.parentNode.removeChild(c),c=this.nodeFactory(a,b)):c=this.createNode(b,a);return c},nodeTypeCompare:function(){},createNode:function(){},moveRoot:function(a){var b=this.root;if(a.root.parentNode== 965this.rendererRoot)b=a.root;b.parentNode.removeChild(b);a.rendererRoot.appendChild(b)},getRenderLayerId:function(){return this.root.parentNode.parentNode.id},isComplexSymbol:function(a){return"circle"!=a&&!!a},CLASS_NAME:"OpenLayers.Renderer.Elements"}); 966OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",xlinkns:"http://www.w3.org/1999/xlink",MAX_PIXEL:15E3,translationParameters:null,symbolMetrics:null,initialize:function(a){if(this.supported())OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments),this.translationParameters={x:0,y:0},this.symbolMetrics={}},supported:function(){return document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#SVG",
967"1.1")||document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"))},inValidRange:function(a,b,c){a+=c?0:this.translationParameters.x;b+=c?0:this.translationParameters.y;return a>=-this.MAX_PIXEL&&a<=this.MAX_PIXEL&&b>=-this.MAX_PIXEL&&b<=this.MAX_PIXEL},setExtent:function(a,b){var c=OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments),d=this.getResolution(),e=-a.left/d,d=a.top/d;if(b)return this.left=e,this.top=d,this.rendererRoot.setAttributeNS(null, 968"viewBox","0 0 "+this.size.w+" "+this.size.h),this.translate(this.xOffset,0),!0;(e=this.translate(e-this.left+this.xOffset,d-this.top))||this.setExtent(a,!0);return c&&e},translate:function(a,b){if(this.inValidRange(a,b,!0)){var c="";if(a||b)c="translate("+a+","+b+")";this.root.setAttributeNS(null,"transform",c);this.translationParameters={x:a,y:b};return!0}return!1},setSize:function(a){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);this.rendererRoot.setAttributeNS(null,"width",this.size.w); 969this.rendererRoot.setAttributeNS(null,"height",this.size.h)},getNodeType:function(a,b){var c=null;switch(a.CLASS_NAME){case "OpenLayers.Geometry.Point":c=b.externalGraphic?"image":this.isComplexSymbol(b.graphicName)?"svg":"circle";break;case "OpenLayers.Geometry.Rectangle":c="rect";break;case "OpenLayers.Geometry.LineString":c="polyline";break;case "OpenLayers.Geometry.LinearRing":c="polygon";break;case "OpenLayers.Geometry.Polygon":case "OpenLayers.Geometry.Curve":c="path"}return c},setStyle:function(a, 970b,c){var b=b||a._style,c=c||a._options,d=b.title||b.graphicTitle;if(d){a.setAttributeNS(null,"title",d);var e=a.getElementsByTagName("title");0<e.length?e[0].firstChild.textContent=d:(e=this.nodeFactory(null,"title"),e.textContent=d,a.appendChild(e))}var e=parseFloat(a.getAttributeNS(null,"r")),d=1,f;if("OpenLayers.Geometry.Point"==a._geometryClass&&e){a.style.visibility="";if(!1===b.graphic)a.style.visibility="hidden";else if(b.externalGraphic){f=this.getPosition(a);b.graphicWidth&&b.graphicHeight&& 971a.setAttributeNS(null,"preserveAspectRatio","none");var e=b.graphicWidth||b.graphicHeight,g=b.graphicHeight||b.graphicWidth,e=e?e:2*b.pointRadius,g=g?g:2*b.pointRadius,h=void 0!=b.graphicYOffset?b.graphicYOffset:-(0.5*g),i=b.graphicOpacity||b.fillOpacity;a.setAttributeNS(null,"x",(f.x+(void 0!=b.graphicXOffset?b.graphicXOffset:-(0.5*e))).toFixed());a.setAttributeNS(null,"y",(f.y+h).toFixed());a.setAttributeNS(null,"width",e);a.setAttributeNS(null,"height",g);a.setAttributeNS(this.xlinkns,"xlink:href", 972b.externalGraphic);a.setAttributeNS(null,"style","opacity: "+i);a.onclick=OpenLayers.Event.preventDefault}else if(this.isComplexSymbol(b.graphicName)){var e=3*b.pointRadius,g=2*e,j=this.importSymbol(b.graphicName);f=this.getPosition(a);d=3*this.symbolMetrics[j.id][0]/g;h=a.parentNode;i=a.nextSibling;h&&h.removeChild(a);a.firstChild&&a.removeChild(a.firstChild);a.appendChild(j.firstChild.cloneNode(!0));a.setAttributeNS(null,"viewBox",j.getAttributeNS(null,"viewBox"));a.setAttributeNS(null,"width", 973g);a.setAttributeNS(null,"height",g);a.setAttributeNS(null,"x",f.x-e);a.setAttributeNS(null,"y",f.y-e);i?h.insertBefore(a,i):h&&h.appendChild(a)}else a.setAttributeNS(null,"r",b.pointRadius);e=b.rotation;if((void 0!==e||void 0!==a._rotation)&&f)a._rotation=e,e|=0,"svg"!==a.nodeName?a.setAttributeNS(null,"transform","rotate("+e+" "+f.x+" "+f.y+")"):(f=this.symbolMetrics[j.id],a.firstChild.setAttributeNS(null,"transform","rotate("+e+" "+f[1]+" "+f[2]+")"))}c.isFilled?(a.setAttributeNS(null,"fill",b.fillColor), 974a.setAttributeNS(null,"fill-opacity",b.fillOpacity)):a.setAttributeNS(null,"fill","none");c.isStroked?(a.setAttributeNS(null,"stroke",b.strokeColor),a.setAttributeNS(null,"stroke-opacity",b.strokeOpacity),a.setAttributeNS(null,"stroke-width",b.strokeWidth*d),a.setAttributeNS(null,"stroke-linecap",b.strokeLinecap||"round"),a.setAttributeNS(null,"stroke-linejoin","round"),b.strokeDashstyle&&a.setAttributeNS(null,"stroke-dasharray",this.dashStyle(b,d))):a.setAttributeNS(null,"stroke","none");b.pointerEvents&& 975a.setAttributeNS(null,"pointer-events",b.pointerEvents);null!=b.cursor&&a.setAttributeNS(null,"cursor",b.cursor);return a},dashStyle:function(a,b){var c=a.strokeWidth*b,d=a.strokeDashstyle;switch(d){case "solid":return"none";case "dot":return[1,4*c].join();case "dash":return[4*c,4*c].join();case "dashdot":return[4*c,4*c,1,4*c].join();case "longdash":return[8*c,4*c].join();case "longdashdot":return[8*c,4*c,1,4*c].join();default:return OpenLayers.String.trim(d).replace(/\s+/g,",")}},createNode:function(a, 976b){var c=document.createElementNS(this.xmlns,a);b&&c.setAttributeNS(null,"id",b);return c},nodeTypeCompare:function(a,b){return b==a.nodeName},createRenderRoot:function(){var a=this.nodeFactory(this.container.id+"_svgRoot","svg");a.style.display="block";return a},createRoot:function(a){return this.nodeFactory(this.container.id+a,"g")},createDefs:function(){var a=this.nodeFactory(this.container.id+"_defs","defs");this.rendererRoot.appendChild(a);return a},drawPoint:function(a,b){return this.drawCircle(a, 977b,1)},drawCircle:function(a,b,c){var d=this.getResolution(),e=(b.x-this.featureDx)/d+this.left,b=this.top-b.y/d;return this.inValidRange(e,b)?(a.setAttributeNS(null,"cx",e),a.setAttributeNS(null,"cy",b),a.setAttributeNS(null,"r",c),a):!1},drawLineString:function(a,b){var c=this.getComponentsString(b.components);return c.path?(a.setAttributeNS(null,"points",c.path),c.complete?a:null):!1},drawLinearRing:function(a,b){var c=this.getComponentsString(b.components);return c.path?(a.setAttributeNS(null, 978"points",c.path),c.complete?a:null):!1},drawPolygon:function(a,b){for(var c="",d=!0,e=!0,f,g,h=0,i=b.components.length;h<i;h++)c+=" M",f=this.getComponentsString(b.components[h].components," "),(g=f.path)?(c+=" "+g,e=f.complete&&e):d=!1;return d?(a.setAttributeNS(null,"d",c+" z"),a.setAttributeNS(null,"fill-rule","evenodd"),e?a:null):!1},drawRectangle:function(a,b){var c=this.getResolution(),d=(b.x-this.featureDx)/c+this.left,e=this.top-b.y/c;return this.inValidRange(d,e)?(a.setAttributeNS(null,"x", 979d),a.setAttributeNS(null,"y",e),a.setAttributeNS(null,"width",b.width/c),a.setAttributeNS(null,"height",b.height/c),a):!1},drawText:function(a,b,c){var d=!!b.labelOutlineWidth;if(d){var e=OpenLayers.Util.extend({},b);e.fontColor=e.labelOutlineColor;e.fontStrokeColor=e.labelOutlineColor;e.fontStrokeWidth=b.labelOutlineWidth;if(b.labelOutlineOpacity)e.fontOpacity=b.labelOutlineOpacity;delete e.labelOutlineWidth;this.drawText(a,e,c)}var f=this.getResolution(),e=(c.x-this.featureDx)/f+this.left,g=c.y/ 980f-this.top,d=d?this.LABEL_OUTLINE_SUFFIX:this.LABEL_ID_SUFFIX,f=this.nodeFactory(a+d,"text");f.setAttributeNS(null,"x",e);f.setAttributeNS(null,"y",-g);b.fontColor&&f.setAttributeNS(null,"fill",b.fontColor);
980b.fontStrokeColor&&f.setAttributeNS(null,"stroke",b.fontStrokeColor);b.fontStrokeWidth&&f.setAttributeNS(null,"stroke-width",b.fontStrokeWidth);b.fontOpacity&&f.setAttributeNS(null,"opacity",b.fontOpacity);b.fontFamily&&f.setAttributeNS(null,"font-family",b.fontFamily);b.fontSize&&f.setAttributeNS(null, 981"font-size",b.fontSize);b.fontWeight&&f.setAttributeNS(null,"font-weight",b.fontWeight);b.fontStyle&&f.setAttributeNS(null,"font-style",b.fontStyle);!0===b.labelSelect?(f.setAttributeNS(null,"pointer-events","visible"),f._featureId=a):f.setAttributeNS(null,"pointer-events","none");g=b.labelAlign||OpenLayers.Renderer.defaultSymbolizer.labelAlign;f.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[g[0]]||"middle");!0===OpenLayers.IS_GECKO&&f.setAttributeNS(null,"dominant-baseline", 982OpenLayers.Renderer.SVG.LABEL_ALIGN[g[1]]||"central");for(var h=b.label.split("\n"),i=h.length;f.childNodes.length>i;)f.removeChild(f.lastChild);for(var j=0;j<i;j++){var k=this.nodeFactory(a+d+"_tspan_"+j,"tspan");if(!0===b.labelSelect)k._featureId=a,k._geometry=c,k._geometryClass=c.CLASS_NAME;!1===OpenLayers.IS_GECKO&&k.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[g[1]]||"-35%");k.setAttribute("x",e);if(0==j){var l=OpenLayers.Renderer.SVG.LABEL_VFACTOR[g[1]];null==l&& 983(l=-0.5);k.setAttribute("dy",l*(i-1)+"em")}else k.setAttribute("dy","1em");k.textContent=""===h[j]?" ":h[j];k.parentNode||f.appendChild(k)}f.parentNode||this.textRoot.appendChild(f)},getComponentsString:function(a,b){for(var c=[],d=!0,e=a.length,f=[],g,h=0;h<e;h++)g=a[h],c.push(g),(g=this.getShortString(g))?f.push(g):(0<h&&this.getShortString(a[h-1])&&f.push(this.clipLine(a[h],a[h-1])),h<e-1&&this.getShortString(a[h+1])&&f.push(this.clipLine(a[h],a[h+1])),d=!1);return{path:f.join(b||","),complete:d}}, 984clipLine:function(a,b){if(b.equals(a))return"";var c=this.getResolution(),d=this.MAX_PIXEL-this.translationParameters.x,e=this.MAX_PIXEL-this.translationParameters.y,f=(b.x-this.featureDx)/c+this.left,g=this.top-b.y/c,h=(a.x-this.featureDx)/c+this.left,c=this.top-a.y/c,i;if(h<-d||h>d)i=(c-g)/(h-f),h=0>h?-d:d,c=g+(h-f)*i;if(c<-e||c>e)i=(h-f)/(c-g),c=0>c?-e:e,h=f+(c-g)*i;return h+","+c},getShortString:function(a){var b=this.getResolution(),c=(a.x-this.featureDx)/b+this.left,a=this.top-a.y/b;return this.inValidRange(c, 985a)?c+","+a:!1},getPosition:function(a){return{x:parseFloat(a.getAttributeNS(null,"cx")),y:parseFloat(a.getAttributeNS(null,"cy"))}},importSymbol:function(a){if(!this.defs)this.defs=this.createDefs();var b=this.container.id+"-"+a,c=document.getElementById(b);if(null!=c)return c;var d=OpenLayers.Renderer.symbol[a];if(!d)throw Error(a+" is not a valid symbol name");var a=this.nodeFactory(b,"symbol"),e=this.nodeFactory(null,"polygon");a.appendChild(e);for(var c=new OpenLayers.Bounds(Number.MAX_VALUE, 986Number.MAX_VALUE,0,0),f=[],g,h,i=0;i<d.length;i+=2)g=d[i],h=d[i+1],c.left=Math.min(c.left,g),c.bottom=Math.min(c.bottom,h),c.right=Math.max(c.right,g),c.top=Math.max(c.top,h),f.push(g,",",h);e.setAttributeNS(null,"points",f.join(" "));d=c.getWidth();e=c.getHeight();a.setAttributeNS(null,"viewBox",[c.left-d,c.bottom-e,3*d,3*e].join(" "));this.symbolMetrics[b]=[Math.max(d,e),c.getCenterLonLat().lon,c.getCenterLonLat().lat];this.defs.appendChild(a);return a}
986,getFeatureIdFromEvent:function(a){var b=OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this, 987arguments);if(!b)b=a.target,b=b.parentNode&&b!=this.rendererRoot?b.parentNode._featureId:void 0;return b},CLASS_NAME:"OpenLayers.Renderer.SVG"});OpenLayers.Renderer.SVG.LABEL_ALIGN={l:"start",r:"end",b:"bottom",t:"hanging"};OpenLayers.Renderer.SVG.LABEL_VSHIFT={t:"-70%",b:"0"};OpenLayers.Renderer.SVG.LABEL_VFACTOR={t:0,b:-1};OpenLayers.Renderer.SVG.preventDefault=function(a){OpenLayers.Event.preventDefault(a)}; 988OpenLayers.Renderer.VML=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"urn:schemas-microsoft-com:vml",symbolCache:{},offset:null,initialize:function(a){if(this.supported()){if(!document.namespaces.olv){document.namespaces.add("olv",this.xmlns);for(var b=document.createStyleSheet(),c="shape,rect,oval,fill,stroke,imagedata,group,textbox".split(","),d=0,e=c.length;d<e;d++)b.addRule("olv\\:"+c[d],"behavior: url(#default#VML); position: absolute; display: inline-block;")}OpenLayers.Renderer.Elements.prototype.initialize.apply(this, 989arguments)}},supported:function(){return!!document.namespaces},setExtent:function(a,b){var c=OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments),d=this.getResolution(),e=a.left/d|0,d=a.top/d-this.size.h|0;b||!this.offset?(this.offset={x:e,y:d},d=e=0):(e-=this.offset.x,d-=this.offset.y);this.root.coordorigin=e-this.xOffset+" "+d;for(var e=[this.root,this.vectorRoot,this.textRoot],f=0,g=e.length;f<g;++f)d=e[f],d.coordsize=this.size.w+" "+this.size.h;this.root.style.flip="y";return c}, 990setSize:function(a){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);for(var b=[this.rendererRoot,this.root,this.vectorRoot,this.textRoot],c=this.size.w+"px",d=this.size.h+"px",e,f=0,g=b.length;f<g;++f)e=b[f],e.style.width=c,e.style.height=d},getNodeType:function(a,b){var c=null;switch(a.CLASS_NAME){case "OpenLayers.Geometry.Point":c=b.externalGraphic?"olv:rect":this.isComplexSymbol(b.graphicName)?"olv:shape":"olv:oval";break;case "OpenLayers.Geometry.Rectangle":c="olv:rect";break;case "OpenLayers.Geometry.LineString":case "OpenLayers.Geometry.LinearRing":case "OpenLayers.Geometry.Polygon":case "OpenLayers.Geometry.Curve":c= 991"olv:shape"}return c},setStyle:function(a,b,c,d){var b=b||a._style,c=c||a._options,e=b.fillColor,f=b.title||b.graphicTitle;if(f)a.title=f;if("OpenLayers.Geometry.Point"===a._geometryClass)if(b.externalGraphic){c.isFilled=!0;var e=b.graphicWidth||b.graphicHeight,f=b.graphicHeight||b.graphicWidth,e=e?e:2*b.pointRadius,f=f?f:2*b.pointRadius,g=this.getResolution(),h=void 0!=b.graphicXOffset?b.graphicXOffset:-(0.5*e),i=void 0!=b.graphicYOffset?b.graphicYOffset:-(0.5*f);a.style.left=((d.x-this.featureDx)/ 992g-this.offset.x+h|0)+"px";a.style.top=(d.y/g-this.offset.y-(i+f)|0)+"px";a.style.width=e+"px";a.style.height=f+"px";a.style.flip="y";e="none";c.isStroked=!1}else this.isComplexSymbol(b.graphicName)?(f=this.importSymbol(b.graphicName),a.path=f.path,a.coordorigin=f.left+","+f.bottom,f=f.size,a.coordsize=f+","+f,this.drawCircle(a,d,b.pointRadius),a.style.flip="y"):this.drawCircle(a,d,b.pointRadius);c.isFilled?a.fillcolor=e:a.filled="false";d=a.getElementsByTagName("fill");d=0==d.length?null:d[0];if(c.isFilled){d|| 993(d=this.createNode("olv:fill",a.id+"_fill"));d.opacity=b.fillOpacity;if("OpenLayers.Geometry.Point"===a._geometryClass&&b.externalGraphic){if(b.graphicOpacity)d.opacity=b.graphicOpacity;d.src=b.externalGraphic;d.type="frame";if(!b.graphicWidth||!b.graphicHeight)d.aspect="atmost"}d.parentNode!=a&&a.appendChild(d)}else d&&a.removeChild(d);e=b.rotation;if(void 0!==e||void 0!==a._rotation)if(a._rotation=e,b.externalGraphic)this.graphicRotate(a,h,i,b),d.opacity=0;else if("OpenLayers.Geometry.Point"=== 994a._geometryClass)a.style.rotation=e||0;h=a.getElementsByTagName("stroke");h=0==h.length?null:h[0];if(c.isStroked){if(h||(h=this.createNode("olv:stroke",a.id+"_stroke"),a.appendChild(h)),h.on=!0,h.color=b.strokeColor,h.weight=b.strokeWidth+"px",h.opacity=b.strokeOpacity,h.endcap="butt"==b.strokeLinecap?"flat":b.strokeLinecap||"round",b.strokeDashstyle)h.dashstyle=this.dashStyle(b)}else if(a.stroked=!1,h)h.on=!1;if("inherit"!=b.cursor&&null!=b.cursor)a.style.cursor=b.cursor;return a},graphicRotate:function(a, 995b,c,d){var d=d||a._style,e=d.rotation||0,f,g;
995if(!d.graphicWidth||!d.graphicHeight){var h=new Image;h.onreadystatechange=OpenLayers.Function.bind(function(){if("complete"==h.readyState||"interactive"==h.readyState)f=h.width/h.height,g=Math.max(2*d.pointRadius,d.graphicWidth||0,d.graphicHeight||0),b*=f,d.graphicWidth=g*f,d.graphicHeight=g,this.graphicRotate(a,b,c,d)},this);h.src=d.externalGraphic}else{g=Math.max(d.graphicWidth,d.graphicHeight);f=d.graphicWidth/d.graphicHeight;var i=Math.round(d.graphicWidth|| 996g*f),j=Math.round(d.graphicHeight||g);a.style.width=i+"px";a.style.height=j+"px";var k=document.getElementById(a.id+"_image");k||(k=this.createNode("olv:imagedata",a.id+"_image"),a.appendChild(k));k.style.width=i+"px";k.style.height=j+"px";k.src=d.externalGraphic;k.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='', sizingMethod='scale')";k=e*Math.PI/180;e=Math.sin(k);k=Math.cos(k);e="progid:DXImageTransform.Microsoft.Matrix(M11="+k+",M12="+-e+",M21="+e+",M22="+k+",SizingMethod='auto expand')\n"; 997(k=d.graphicOpacity||d.fillOpacity)&&1!=k&&(e+="progid:DXImageTransform.Microsoft.BasicImage(opacity="+k+")\n");a.style.filter=e;e=new OpenLayers.Geometry.Point(-b,-c);i=(new OpenLayers.Bounds(0,0,i,j)).toGeometry();i.rotate(d.rotation,e);i=i.getBounds();a.style.left=Math.round(parseInt(a.style.left)+i.left)+"px";a.style.top=Math.round(parseInt(a.style.top)-i.bottom)+"px"}},postDraw:function(a){a.style.visibility="visible";var b=a._style.fillColor,c=a._style.strokeColor;if("none"==b&&a.fillcolor!= 998b)a.fillcolor=b;if("none"==c&&a.strokecolor!=c)a.strokecolor=c},setNodeDimension:function(a,b){var c=b.getBounds();if(c){var d=this.getResolution(),c=new OpenLayers.Bounds((c.left-this.featureDx)/d-this.offset.x|0,c.bottom/d-this.offset.y|0,(c.right-this.featureDx)/d-this.offset.x|0,c.top/d-this.offset.y|0);a.style.left=c.left+"px";a.style.top=c.top+"px";a.style.width=c.getWidth()+"px";a.style.height=c.getHeight()+"px";a.coordorigin=c.left+" "+c.top;a.coordsize=c.getWidth()+" "+c.getHeight()}},dashStyle:function(a){a= 999a.strokeDashstyle;switch(a){case "solid":case "dot":case "dash":case "dashdot":case "longdash":case "longdashdot":return a;default:return a=a.split(/[ ,]/),2==a.length?1*a[0]>=2*a[1]?"longdash":1==a[0]||1==a[1]?"dot":"dash":4==a.length?1*a[0]>=2*a[1]?"longdashdot":"dashdot":"solid"}},createNode:function(a,b){var c=document.createElement(a);if(b)c.id=b;c.unselectable="on";c.onselectstart=OpenLayers.Function.False;return c},nodeTypeCompare:function(a,b){var c=b,d=c.indexOf(":");-1!=d&&(c=c.substr(d+ 10001));var e=a.nodeName,d=e.indexOf(":");-1!=d&&(e=e.substr(d+1));return c==e},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_vmlRoot","div")},createRoot:function(a){return this.nodeFactory(this.container.id+a,"olv:group")},drawPoint:function(a,b){return this.drawCircle(a,b,1)},drawCircle:function(a,b,c){if(!isNaN(b.x)&&!isNaN(b.y)){var d=this.getResolution();a.style.left=((b.x-this.featureDx)/d-this.offset.x|0)-c+"px";a.style.top=(b.y/d-this.offset.y|0)-c+"px";b=2*c;a.style.width= 1001b+"px";a.style.height=b+"px";return a}return!1},drawLineString:function(a,b){return this.drawLine(a,b,!1)},drawLinearRing:function(a,b){return this.drawLine(a,b,!0)},drawLine:function(a,b,c){this.setNodeDimension(a,b);for(var d=this.getResolution(),e=b.components.length,f=Array(e),g,h,i=0;i<e;i++)g=b.components[i],h=(g.x-this.featureDx)/d-this.offset.x|0,g=g.y/d-this.offset.y|0,f[i]=" "+h+","+g+" l ";a.path="m"+f.join("")+(c?" x e":" e");return a},drawPolygon:function(a,b){this.setNodeDimension(a, 1002b);var c=this.getResolution(),d=[],e,f,g,h,i,j,k,l,m,n;for(e=0,f=b.components.length;e<f;e++){d.push("m");g=b.components[e].components;h=0===e;j=i=null;for(k=0,l=g.length;k<l;k++)m=g[k],n=(m.x-this.featureDx)/c-this.offset.x|0,m=m.y/c-this.offset.y|0,n=" "+n+","+m,d.push(n),0==k&&d.push(" l"),h||(i?i!=n&&(j?j!=n&&(h=!0):j=n):i=n);d.push(h?" x ":" ")}d.push("e");a.path=d.join("");return a},drawRectangle:function(a,b){var c=this.getResolution();a.style.left=((b.x-this.featureDx)/c-this.offset.x|0)+ 1003"px";a.style.top=(b.y/c-this.offset.y|0)+"px";a.style.width=(b.width/c|0)+"px";a.style.height=(b.height/c|0)+"px";return a},drawText:function(a,b,c){var d=this.nodeFactory(a+this.LABEL_ID_SUFFIX,"olv:rect"),e=this.nodeFactory(a+this.LABEL_ID_SUFFIX+"_textbox","olv:textbox"),f=this.getResolution();d.style.left=((c.x-this.featureDx)/f-this.offset.x|0)+"px";d.style.top=(c.y/f-this.offset.y|0)+"px";d.style.flip="y";e.innerText=b.label;if("inherit"!=b.cursor&&null!=b.cursor)e.style.cursor=b.cursor;if(b.fontColor)e.style.color= 1004b.fontColor;if(b.fontOpacity)e.style.filter="alpha(opacity="+100*b.fontOpacity+")";if(b.fontFamily)e.style.fontFamily=b.fontFamily;if(b.fontSize)e.style.fontSize=b.fontSize;if(b.fontWeight)e.style.fontWeight=b.fontWeight;if(b.fontStyle)e.style.fontStyle=b.fontStyle;if(!0===b.labelSelect)d._featureId=a,e._featureId=a,e._geometry=c,e._geometryClass=c.CLASS_NAME;e.style.whiteSpace="nowrap";
1004e.inset="1px,0px,0px,0px";d.parentNode||(d.appendChild(e),this.textRoot.appendChild(d));b=b.labelAlign||"cm";1== 1005b.length&&(b+="m");a=e.clientWidth*OpenLayers.Renderer.VML.LABEL_SHIFT[b.substr(0,1)];e=e.clientHeight*OpenLayers.Renderer.VML.LABEL_SHIFT[b.substr(1,1)];d.style.left=parseInt(d.style.left)-a-1+"px";d.style.top=parseInt(d.style.top)+e+"px"},moveRoot:function(a){var b=this.map.getLayer(a.container.id);b instanceof OpenLayers.Layer.Vector.RootContainer&&(b=this.map.getLayer(this.container.id));b&&b.renderer.clear();OpenLayers.Renderer.Elements.prototype.moveRoot.apply(this,arguments);b&&b.redraw()}, 1006importSymbol:function(a){var b=this.container.id+"-"+a,c=this.symbolCache[b];if(c)return c;c=OpenLayers.Renderer.symbol[a];if(!c)throw Error(a+" is not a valid symbol name");for(var a=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0),d=["m"],e=0;e<c.length;e+=2){var f=c[e],g=c[e+1];a.left=Math.min(a.left,f);a.bottom=Math.min(a.bottom,g);a.right=Math.max(a.right,f);a.top=Math.max(a.top,g);d.push(f);d.push(g);0==e&&d.push("l")}d.push("x e");c=d.join(" ");d=(a.getWidth()-a.getHeight())/2; 10070<d?(a.bottom-=d,a.top+=d):(a.left+=d,a.right-=d);c={path:c,size:a.getWidth(),left:a.left,bottom:a.bottom};return this.symbolCache[b]=c},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Renderer.VML.LABEL_SHIFT={l:0,c:0.5,r:1,t:0,m:0.5,b:1}; 1008OpenLayers.Renderer.Canvas=OpenLayers.Class(OpenLayers.Renderer,{hitDetection:!0,hitOverflow:0,canvas:null,features:null,pendingRedraw:!1,cachedSymbolBounds:{},initialize:function(a,b){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.root=document.createElement("canvas");this.container.appendChild(this.root);this.canvas=this.root.getContext("2d");this.features={};if(this.hitDetection)this.hitCanvas=document.createElement("canvas"),this.hitContext=this.hitCanvas.getContext("2d")}, 1009setExtent:function(){OpenLayers.Renderer.prototype.setExtent.apply(this,arguments);return!1},eraseGeometry:function(a,b){this.eraseFeatures(this.features[b][0])},supported:function(){return OpenLayers.CANVAS_SUPPORTED},setSize:function(a){this.size=a.clone();var b=this.root;b.style.width=a.w+"px";b.style.height=a.h+"px";b.width=a.w;b.height=a.h;this.resolution=null;if(this.hitDetection)b=this.hitCanvas,b.style.width=a.w+"px",b.style.height=a.h+"px",b.width=a.w,b.height=a.h},drawFeature:function(a, 1010b){var c;if(a.geometry){b=this.applyDefaultSymbolizer(b||a.style);c=a.geometry.getBounds();var d;this.map.baseLayer&&this.map.baseLayer.wrapDateLine&&(d=this.map.getMaxExtent());d=c&&c.intersectsBounds(this.extent,{worldBounds:d});(c="none"!==b.display&&!!c&&d)?this.features[a.id]=[a,b]:delete this.features[a.id];this.pendingRedraw=!0}if(this.pendingRedraw&&!this.locked)this.redraw(),this.pendingRedraw=!1;return c},drawGeometry:function(a,b,c){var d=a.CLASS_NAME;if("OpenLayers.Geometry.Collection"== 1011d||"OpenLayers.Geometry.MultiPoint"==d||"OpenLayers.Geometry.MultiLineString"==d||"OpenLayers.Geometry.MultiPolygon"==d)for(d=0;d<a.components.length;d++)this.drawGeometry(a.components[d],b,c);else switch(a.CLASS_NAME){case "OpenLayers.Geometry.Point":this.drawPoint(a,b,c);break;case "OpenLayers.Geometry.LineString":this.drawLineString(a,b,c);break;case "OpenLayers.Geometry.LinearRing":this.drawLinearRing(a,b,c);break;case "OpenLayers.Geometry.Polygon":this.drawPolygon(a,b,c)}},drawExternalGraphic:function(a, 1012b,c){var d=new Image,e=b.title||b.graphicTitle;if(e)d.title=e;var f=b.graphicWidth||b.graphicHeight,g=b.graphicHeight||b.graphicWidth,f=f?f:2*b.pointRadius,g=g?g:2*b.pointRadius,h=void 0!=b.graphicXOffset?b.graphicXOffset:-(0.5*f),i=void 0!=b.graphicYOffset?b.graphicYOffset:-(0.5*g),j=b.graphicOpacity||b.fillOpacity;d.onload=OpenLayers.Function.bind(function(){if(this.features[c]){var b=this.getLocalXY(a),e=b[0],b=b[1];if(!isNaN(e)&&!isNaN(b)){var e=e+h|0,b=b+i|0,m=this.canvas;m.globalAlpha=j;var n= 1013OpenLayers.Renderer.Canvas.drawImageScaleFactor||(OpenLayers.Renderer.Canvas.drawImageScaleFactor=/android 2.1/.test(navigator.userAgent.toLowerCase())?320/window.screen.width:1);m.drawImage(d,e*n,b*n,f*n,g*n);this.hitDetection&&(this.setHitContextStyle("fill",c),this.hitContext.fillRect(e,b,f,g))}}},this);d.src=b.externalGraphic},drawNamedSymbol:function(a,b,c){var d,e,f,g;f=Math.PI/180;var h=OpenLayers.Renderer.symbol[b.graphicName];if(!h)throw Error(b.graphicName+" is not a valid symbol name"); 1014if(h.length&&!(2>h.length)&&(a=this.getLocalXY(a),e=a[0],g=a[1],!isNaN(e)&&!isNaN(g))){this.canvas.lineCap="round";this.canvas.lineJoin="round";if(this.hitDetection)this.hitContext.lineCap="round",this.hitContext.lineJoin="round";if(b.graphicName in this.cachedSymbolBounds)d=this.cachedSymbolBounds[b.graphicName];else{d=new OpenLayers.Bounds;for(a=0;a<h.length;a+=2)d.extend(new OpenLayers.LonLat(h[a],h[a+1]));this.cachedSymbolBounds[b.graphicName]=d}this.canvas.save();this.hitDetection&&this.hitContext.save(); 1015this.canvas.translate(e,g);this.hitDetection&&this.hitContext.translate(e,g);a=f*b.rotation;
1015isNaN(a)||(this.canvas.rotate(a),this.hitDetection&&this.hitContext.rotate(a));f=2*b.pointRadius/Math.max(d.getWidth(),d.getHeight());this.canvas.scale(f,f);this.hitDetection&&this.hitContext.scale(f,f);a=d.getCenterLonLat().lon;d=d.getCenterLonLat().lat;this.canvas.translate(-a,-d);this.hitDetection&&this.hitContext.translate(-a,-d);g=b.strokeWidth;b.strokeWidth=g/f;if(!1!==b.fill){this.setCanvasStyle("fill", 1016b);this.canvas.beginPath();for(a=0;a<h.length;a+=2)d=h[a],e=h[a+1],0==a&&this.canvas.moveTo(d,e),this.canvas.lineTo(d,e);this.canvas.closePath();this.canvas.fill();if(this.hitDetection){this.setHitContextStyle("fill",c,b);this.hitContext.beginPath();for(a=0;a<h.length;a+=2)d=h[a],e=h[a+1],0==a&&this.canvas.moveTo(d,e),this.hitContext.lineTo(d,e);this.hitContext.closePath();this.hitContext.fill()}}if(!1!==b.stroke){this.setCanvasStyle("stroke",b);this.canvas.beginPath();for(a=0;a<h.length;a+=2)d=h[a], 1017e=h[a+1],0==a&&this.canvas.moveTo(d,e),this.canvas.lineTo(d,e);this.canvas.closePath();this.canvas.stroke();if(this.hitDetection){this.setHitContextStyle("stroke",c,b,f);this.hitContext.beginPath();for(a=0;a<h.length;a+=2)d=h[a],e=h[a+1],0==a&&this.hitContext.moveTo(d,e),this.hitContext.lineTo(d,e);this.hitContext.closePath();this.hitContext.stroke()}}b.strokeWidth=g;this.canvas.restore();this.hitDetection&&this.hitContext.restore();this.setCanvasStyle("reset")}},setCanvasStyle:function(a,b){"fill"=== 1018a?(this.canvas.globalAlpha=b.fillOpacity,this.canvas.fillStyle=b.fillColor):"stroke"===a?(this.canvas.globalAlpha=b.strokeOpacity,this.canvas.strokeStyle=b.strokeColor,this.canvas.lineWidth=b.strokeWidth):(this.canvas.globalAlpha=0,this.canvas.lineWidth=1)},featureIdToHex:function(a){a=Number(a.split("_").pop())+1;if(16777216<=a)this.hitOverflow=a-16777215,a=a%16777216+1;var a="000000"+a.toString(16),b=a.length;return a="#"+a.substring(b-6,b)},setHitContextStyle:function(a,b,c,d){b=this.featureIdToHex(b); 1019if("fill"==a)this.hitContext.globalAlpha=1,this.hitContext.fillStyle=b;else if("stroke"==a)if(this.hitContext.globalAlpha=1,this.hitContext.strokeStyle=b,"undefined"===typeof d)this.hitContext.lineWidth=c.strokeWidth+2;else{if(!isNaN(d))this.hitContext.lineWidth=c.strokeWidth+2/d}else this.hitContext.globalAlpha=0,this.hitContext.lineWidth=1},drawPoint:function(a,b,c){if(!1!==b.graphic)if(b.externalGraphic)this.drawExternalGraphic(a,b,c);else if(b.graphicName&&"circle"!=b.graphicName)this.drawNamedSymbol(a, 1020b,c);else{var d=this.getLocalXY(a),a=d[0],d=d[1];if(!isNaN(a)&&!isNaN(d)){var e=2*Math.PI,f=b.pointRadius;!1!==b.fill&&(this.setCanvasStyle("fill",b),this.canvas.beginPath(),this.canvas.arc(a,d,f,0,e,!0),this.canvas.fill(),this.hitDetection&&(this.setHitContextStyle("fill",c,b),this.hitContext.beginPath(),this.hitContext.arc(a,d,f,0,e,!0),this.hitContext.fill()));!1!==b.stroke&&(this.setCanvasStyle("stroke",b),this.canvas.beginPath(),this.canvas.arc(a,d,f,0,e,!0),this.canvas.stroke(),this.hitDetection&& 1021(this.setHitContextStyle("stroke",c,b),this.hitContext.beginPath(),this.hitContext.arc(a,d,f,0,e,!0),this.hitContext.stroke()),this.setCanvasStyle("reset"))}}},drawLineString:function(a,b,c){b=OpenLayers.Util.applyDefaults({fill:!1},b);this.drawLinearRing(a,b,c)},drawLinearRing:function(a,b,c){!1!==b.fill&&(this.setCanvasStyle("fill",b),this.renderPath(this.canvas,a,b,c,"fill"),this.hitDetection&&(this.setHitContextStyle("fill",c,b),this.renderPath(this.hitContext,a,b,c,"fill")));!1!==b.stroke&&(this.setCanvasStyle("stroke", 1022b),this.renderPath(this.canvas,a,b,c,"stroke"),this.hitDetection&&(this.setHitContextStyle("stroke",c,b),this.renderPath(this.hitContext,a,b,c,"stroke")));this.setCanvasStyle("reset")},renderPath:function(a,b,c,d,e){b=b.components;c=b.length;a.beginPath();var d=this.getLocalXY(b[0]),f=d[1];if(!isNaN(d[0])&&!isNaN(f)){a.moveTo(d[0],d[1]);for(d=1;d<c;++d)f=this.getLocalXY(b[d]),a.lineTo(f[0],f[1]);"fill"===e?a.fill():a.stroke()}},drawPolygon:function(a,b,c){var a=a.components,d=a.length;this.drawLinearRing(a[0], 1023b,c);for(var e=1;e<d;++e){this.canvas.globalCompositeOperation="destination-out";if(this.hitDetection)this.hitContext.globalCompositeOperation="destination-out";this.drawLinearRing(a[e],OpenLayers.Util.applyDefaults({stroke:!1,fillOpacity:1},b),c);this.canvas.globalCompositeOperation="source-over";if(this.hitDetection)this.hitContext.globalCompositeOperation="source-over";this.drawLinearRing(a[e],OpenLayers.Util.applyDefaults({fill:!1},b),c)}},drawText:function(a,b){var c=this.getLocalXY(a);this.setCanvasStyle("reset"); 1024this.canvas.fillStyle=b.fontColor;this.canvas.globalAlpha=b.fontOpacity||1;var d=[b.fontStyle?b.fontStyle:"normal","normal",b.fontWeight?b.fontWeight:"normal",b.fontSize?b.fontSize:"1em",b.fontFamily?b.fontFamily:"sans-serif"].join(" "),e=b.label.split("\n"),f=e.length;if(this.canvas.fillText){this.canvas.font=d;this.canvas.textAlign=OpenLayers.Renderer.Canvas.LABEL_ALIGN[b.labelAlign[0]]||"center";this.canvas.textBaseline=OpenLayers.Renderer.Canvas.LABEL_ALIGN[b.labelAlign[1]]||"middle";
1024var g=OpenLayers.Renderer.Canvas.LABEL_FACTOR[b.labelAlign[1]]; 1025null==g&&(g=-0.5);d=this.canvas.measureText("Mg").height||this.canvas.measureText("xx").width;c[1]+=d*g*(f-1);for(g=0;g<f;g++){if(b.labelOutlineWidth)this.canvas.save(),this.canvas.globalAlpha=b.labelOutlineOpacity||b.fontOpacity||1,this.canvas.strokeStyle=b.labelOutlineColor,this.canvas.lineWidth=b.labelOutlineWidth,this.canvas.strokeText(e[g],c[0],c[1]+d*g+1),this.canvas.restore();this.canvas.fillText(e[g],c[0],c[1]+d*g)}}else if(this.canvas.mozDrawText){this.canvas.mozTextStyle=d;var h=OpenLayers.Renderer.Canvas.LABEL_FACTOR[b.labelAlign[0]]; 1026null==h&&(h=-0.5);g=OpenLayers.Renderer.Canvas.LABEL_FACTOR[b.labelAlign[1]];null==g&&(g=-0.5);d=this.canvas.mozMeasureText("xx");c[1]+=d*(1+g*f);for(g=0;g<f;g++){var i=c[0]+h*this.canvas.mozMeasureText(e[g]),j=c[1]+g*d;this.canvas.translate(i,j);this.canvas.mozDrawText(e[g]);this.canvas.translate(-i,-j)}}this.setCanvasStyle("reset")},getLocalXY:function(a){var b=this.getResolution(),c=this.extent;return[(a.x-this.featureDx)/b+-c.left/b,c.top/b-a.y/b]},clear:function(){var a=this.root.height,b=this.root.width; 1027this.canvas.clearRect(0,0,b,a);this.features={};this.hitDetection&&this.hitContext.clearRect(0,0,b,a)},getFeatureIdFromEvent:function(a){var b;if(this.hitDetection&&"none"!==this.root.style.display&&!this.map.dragging&&(a=a.xy,a=this.hitContext.getImageData(a.x|0,a.y|0,1,1).data,255===a[3]&&(a=a[2]+256*(a[1]+256*a[0])))){a="OpenLayers_Feature_Vector_"+(a-1+this.hitOverflow);try{b=this.features[a][0]}catch(c){}}return b},eraseFeatures:function(a){OpenLayers.Util.isArray(a)||(a=[a]);for(var b=0;b<a.length;++b)delete this.features[a[b].id]; 1028this.redraw()},redraw:function(){if(!this.locked){var a=this.root.height,b=this.root.width;this.canvas.clearRect(0,0,b,a);this.hitDetection&&this.hitContext.clearRect(0,0,b,a);var a=[],c,d,e=this.map.baseLayer&&this.map.baseLayer.wrapDateLine&&this.map.getMaxExtent(),f;for(f in this.features)if(this.features.hasOwnProperty(f))b=this.features[f][0],c=b.geometry,this.calculateFeatureDx(c.getBounds(),e),d=this.features[f][1],this.drawGeometry(c,d,b.id),d.label&&a.push([b,d]);b=0;for(c=a.length;b<c;++b)f= 1029a[b],this.drawText(f[0].geometry.getCentroid(),f[1])}},CLASS_NAME:"OpenLayers.Renderer.Canvas"});OpenLayers.Renderer.Canvas.LABEL_ALIGN={l:"left",r:"right",t:"top",b:"bottom"};OpenLayers.Renderer.Canvas.LABEL_FACTOR={l:0,r:-1,t:0,b:-1};OpenLayers.Renderer.Canvas.drawImageScaleFactor=null; 1030OpenLayers.Format.SLD.v1_0_0_GeoServer=OpenLayers.Class(OpenLayers.Format.SLD.v1_0_0,{version:"1.0.0",profile:"GeoServer",readers:OpenLayers.Util.applyDefaults({sld:OpenLayers.Util.applyDefaults({Priority:function(a,b){var c=this.readers.ogc._expression.call(this,a);if(c)b.priority=c},VendorOption:function(a,b){if(!b.vendorOptions)b.vendorOptions={};b.vendorOptions[a.getAttribute("name")]=this.getChildValue(a)},TextSymbolizer:function(a,b){OpenLayers.Format.SLD.v1_0_0.prototype.readers.sld.TextSymbolizer.apply(this, 1031arguments);var c=this.multipleSymbolizers?b.symbolizers[b.symbolizers.length-1]:b.symbolizer.Text;if(void 0===c.graphic)c.graphic=!1}},OpenLayers.Format.SLD.v1_0_0.prototype.readers.sld)},OpenLayers.Format.SLD.v1_0_0.prototype.readers),writers:OpenLayers.Util.applyDefaults({sld:OpenLayers.Util.applyDefaults({Priority:function(a){return this.writers.sld._OGCExpression.call(this,"sld:Priority",a)},VendorOption:function(a){return this.createElementNSPlus("sld:VendorOption",{attributes:{name:a.name}, 1032value:a.value})}
1032,TextSymbolizer:function(a){var b=OpenLayers.Format.SLD.v1_0_0.prototype.writers.sld.TextSymbolizer.apply(this,arguments);!1!==a.graphic&&(a.externalGraphic||a.graphicName)&&this.writeNode("Graphic",a,b);"priority"in a&&this.writeNode("Priority",a.priority,b);return this.addVendorOptions(b,a)},PointSymbolizer:function(a){return this.addVendorOptions(OpenLayers.Format.SLD.v1_0_0.prototype.writers.sld.PointSymbolizer.apply(this,arguments),a)},LineSymbolizer:function(a){return this.addVendorOptions(OpenLayers.Format.SLD.v1_0_0.prototype.writers.sld.LineSymbolizer.apply(this, 1033arguments),a)},PolygonSymbolizer:function(a){return this.addVendorOptions(OpenLayers.Format.SLD.v1_0_0.prototype.writers.sld.PolygonSymbolizer.apply(this,arguments),a)}},OpenLayers.Format.SLD.v1_0_0.prototype.writers.sld)},OpenLayers.Format.SLD.v1_0_0.prototype.writers),addVendorOptions:function(a,b){if(b.vendorOptions)for(var c in b.vendorOptions)this.writeNode("VendorOption",{name:c,value:b.vendorOptions[c]},a);return a},CLASS_NAME:"OpenLayers.Format.SLD.v1_0_0_GeoServer"});Ext.namespace("gxp"); 1034gxp.WMSStylesDialog=Ext.extend(Ext.Container,{addStyleText:"Add",addStyleTip:"Add a new style",chooseStyleText:"Choose style",deleteStyleText:"Remove",deleteStyleTip:"Delete the selected style",editStyleText:"Edit",editStyleTip:"Edit the selected style",duplicateStyleText:"Duplicate",duplicateStyleTip:"Duplicate the selected style",addRuleText:"Add",addRuleTip:"Add a new rule",newRuleText:"New Rule",deleteRuleText:"Remove",deleteRuleTip:"Delete the selected rule",editRuleText:"Edit",editRuleTip:"Edit the selected rule", 1035duplicateRuleText:"Duplicate",duplicateRuleTip:"Duplicate the selected rule",cancelText:"Cancel",saveText:"Save",styleWindowTitle:"User Style: {0}",ruleWindowTitle:"Style Rule: {0}",stylesFieldsetTitle:"Styles",rulesFieldsetTitle:"Rules",errorTitle:"Error saving style",errorMsg:"There was an error saving the style back to the server.",layerRecord:null,layerDescription:null,symbolType:null,stylesStore:null,selectedStyle:null,selectedRule:null,editable:!0,modified:!1,dialogCls:Ext.Window,initComponent:function(){this.addEvents("ready", 1036"modified","styleselected","beforesaved","saved");Ext.applyIf(this,{layout:"form",disabled:!0,items:[{xtype:"fieldset",title:this.stylesFieldsetTitle,labelWidth:85,style:"margin-bottom: 0;"},{xtype:"toolbar",style:"border-width: 0 1px 1px 1px; margin-bottom: 10px;",items:[{xtype:"button",iconCls:"add",text:this.addStyleText,tooltip:this.addStyleTip,handler:this.addStyle,scope:this},{xtype:"button",iconCls:"delete",text:this.deleteStyleText,tooltip:this.deleteStyleTip,handler:function(){this.stylesStore.remove(this.selectedStyle)}, 1037scope:this},{xtype:"button",iconCls:"edit",text:this.editStyleText,tooltip:this.editStyleTip,handler:function(){this.editStyle()},scope:this},{xtype:"button",iconCls:"duplicate",text:this.duplicateStyleText,tooltip:this.duplicateStyleTip,handler:function(){var a=this.selectedStyle,b=a.get("userStyle").clone();b.isDefault=!1;b.name=this.newStyleName();var c=this.stylesStore;c.add(new c.recordType({name:b.name,title:b.title,"abstract":b.description,userStyle:b}));this.editStyle(a)},scope:this}]}]}); 1038this.createStylesStore();this.on({beforesaved:function(){this._saving=!0},saved:function(){delete this._saving},savefailed:function(){Ext.Msg.show({title:this.errorTitle,msg:this.errorMsg,icon:Ext.MessageBox.ERROR,buttons:{ok:!0}});delete this._saving},render:function(){gxp.util.dispatch([this.getStyles],function(){this.enable()},this)},scope:this});gxp.WMSStylesDialog.superclass.initComponent.apply(this,arguments)},addStyle:function(){if(this._ready){var a=this.selectedStyle,b=this.stylesStore,c= 1039new OpenLayers.Style(null,{name:this.newStyleName(),rules:[this.createRule()]});b.add(new b.recordType({name:c.name,userStyle:c}));this.editStyle(a)}else this.on("ready",this.addStyle,this)},editStyle:function(a){var b=this.selectedStyle.get("userStyle"),c=new this.dialogCls(Ext.apply({bbar:["->",{text:this.cancelText,iconCls:"cancel",handler:function(){c.propertiesDialog.userStyle=b;c.destroy();if(a)this._cancelling=!0,this.stylesStore.remove(this.selectedStyle),this.changeStyle(a,{updateCombo:!0, 1040markModified:!0}),delete this._cancelling},scope:this},{text:this.saveText,iconCls:"save",handler:function(){c.destroy()}}]},{title:String.format(this.styleWindowTitle,b.title||b.name),shortTitle:b.title||b.name,bodyBorder:!1,autoHeight:!0,width:300,modal:!0,items:{border:!1,items:{xtype:"gxp_stylepropertiesdialog",ref:"../propertiesDialog",userStyle:b.clone(),nameEditable:!1,style:"padding: 10px;"}},listeners:{beforedestroy:function(){this.selectedStyle.set("userStyle",c.propertiesDialog.userStyle)}, 1041scope:this}}));this.showDlg(c)},createSLD:function(a){var a=a||{},b={version:"1.0.0",namedLayers:{}},c=this.layerRecord.get("name");b.namedLayers[c]={name:c,userStyles:[]};this.stylesStore.each(function(d){(!a.userStyles||-1!==a.userStyles.indexOf(d.get("name")))&&b.namedLayers[c].userStyles.push(d.get("userStyle"))});return(new OpenLayers.Format.SLD({multipleSymbolizers:!0,profile:"GeoServer"})).write(b)},saveStyles:function(a){!0===this.modified&&this.fireEvent("beforesaved",this,a)},updateStyleRemoveButton:function(){var a= 1042this.selectedStyle&&this.selectedStyle.get("userStyle");this.items.get(1).items.get(1).setDisabled(!a||1>=this.stylesStore.getCount()||!0===a.isDefault)},updateRuleRemoveButton:function(){this.items.get(3).items.get(1).setDisabled(!this.selectedRule||2>this.items.get(2).items.get(0).rules.length)},createRule:function(){return new OpenLayers.Rule({symbolizers:[new OpenLayers.Symbolizer[this.symbolType]]})},addRulesFieldSet:function(){var a=new Ext.form.FieldSet({itemId:"rulesfieldset",title:this.rulesFieldsetTitle, 1043autoScroll:!0,style:"margin-bottom: 0;",hideMode:"offsets",hidden:!0}),b=new Ext.Toolbar({style:"border-width: 0 1px 1px 1px;",hidden:!0,items:[{xtype:"button",iconCls:"add",text:this.addRuleText,tooltip:this.addRuleTip,handler:this.addRule,scope:this},{xtype:"button",iconCls:"delete",text:this.deleteRuleText,tooltip:this.deleteRuleTip,handler:this.removeRule,scope:this,disabled:!0},{xtype:"button",iconCls:"edit",text:this.editRuleText,toolitp:this.editRuleTip,handler:function(){this.layerDescription? 1044this.editRule():this.describeLayer(this.editRule)},scope:this,disabled:!0},{xtype:"button",iconCls:"duplicate",text:this.duplicateRuleText,tip:this.duplicateRuleTip,handler:this.duplicateRule,
1044scope:this,disabled:!0}]});this.add(a,b);this.doLayout();return a},addRule:function(){var a=this.items.get(2).items.get(0);this.selectedStyle.get("userStyle").rules.push(this.createRule());a.update();this.selectedStyle.store.afterEdit(this.selectedStyle);this.updateRuleRemoveButton()},removeRule:function(){var a= 1045this.selectedRule;this.items.get(2).items.get(0).unselect();this.selectedStyle.get("userStyle").rules.remove(a);this.afterRuleChange()},duplicateRule:function(){var a=this.items.get(2).items.get(0),b=this.selectedRule.clone();this.selectedStyle.get("userStyle").rules.push(b);a.update();this.selectedStyle.store.afterEdit(this.selectedStyle);this.updateRuleRemoveButton()},editRule:function(){var a=this.selectedRule,b=a.clone(),c=new this.dialogCls({title:String.format(this.ruleWindowTitle,a.title|| 1046a.name||this.newRuleText),shortTitle:a.title||a.name||this.newRuleText,layout:"fit",width:320,height:450,modal:!0,items:[{xtype:"gxp_rulepanel",ref:"rulePanel",symbolType:this.symbolType,rule:a,attributes:new GeoExt.data.AttributeStore({url:this.layerDescription.owsURL,baseParams:{SERVICE:this.layerDescription.owsType,REQUEST:"DescribeFeatureType",TYPENAME:this.layerDescription.typeName},method:"GET",disableCaching:!1}),autoScroll:!0,border:!1,defaults:{autoHeight:!0,hideMode:"offsets"},listeners:{change:this.saveRule, 1047tabchange:function(){c instanceof Ext.Window&&c.syncShadow()},scope:this}}],bbar:["->",{text:this.cancelText,iconCls:"cancel",handler:function(){this.saveRule(c.rulePanel,b);c.destroy()},scope:this},{text:this.saveText,iconCls:"save",handler:function(){c.destroy()}}]});this.showDlg(c)},saveRule:function(a,b){var c=this.selectedStyle;this.items.get(2).items.get(0);var c=c.get("userStyle"),d=c.rules.indexOf(this.selectedRule);c.rules[d]=b;this.afterRuleChange(b)},afterRuleChange:function(a){this.items.get(2).items.get(0); 1048this.selectedRule=a;this.selectedStyle.store.afterEdit(this.selectedStyle)},setRulesFieldSetVisible:function(a){this.items.get(3).setVisible(a&&this.editable);this.items.get(2).setVisible(a);this.doLayout()},parseSLD:function(a){var b=a.responseXML;if(!b||!b.documentElement)b=(new OpenLayers.Format.XML).read(a.responseText);var a=this.layerRecord.getLayer().params,c=this.initialConfig.styleName||a.STYLES;if(c)this.selectedStyle=this.stylesStore.getAt(this.stylesStore.findExact("name",c));var d=new OpenLayers.Format.SLD({profile:"GeoServer", 1049multipleSymbolizers:!0});try{var e=d.read(b).namedLayers[a.LAYERS].userStyles,f;if(a.SLD_BODY)f=d.read(a.SLD_BODY).namedLayers[a.LAYERS].userStyles,Array.prototype.push.apply(e,f);this.stylesStore.removeAll();this.selectedStyle=null;for(var g,h,i,j,b=0,k=e.length;b<k;++b){g=e[b];i=this.stylesStore.findExact("name",g.name);-1!==i&&this.stylesStore.removeAt(i);h=new this.stylesStore.recordType({name:g.name,title:g.title,"abstract":g.description,userStyle:g});h.phantom=!1;this.stylesStore.add(h);if(!this.selectedStyle&& 1050(c===g.name||!c&&!0===g.isDefault))this.selectedStyle=h;!0===g.isDefault&&(j=h)}if(!this.selectedStyle)this.selectedStyle=j;this.addRulesFieldSet();this.createLegend(this.selectedStyle.get("userStyle").rules);this.stylesStoreReady();a.SLD_BODY&&this.markModified()}catch(l){window.console&&console.warn(l.msg),this.setupNonEditable()}}
1050,createLegend:function(a){var b=OpenLayers.Symbolizer.Raster;if(b&&a[0]&&a[0].symbolizers[0]instanceof b)throw Error("Raster symbolizers are not supported.");this.addVectorLegend(a)}, 1051setupNonEditable:function(){this.editable=!1;this.items.get(1).hide();(this.getComponent("rulesfieldset")||this.addRulesFieldSet()).add(this.createLegendImage());this.doLayout();this.items.get(3).hide();this.stylesStoreReady()},stylesStoreReady:function(){this.stylesStore.commitChanges();this.stylesStore.on({load:function(){this.addStylesCombo();this.updateStyleRemoveButton()},add:function(a,b,c){this.updateStyleRemoveButton();b=this.items.get(0).items.get(0);this.markModified();b.fireEvent("select", 1052b,a.getAt(c),c);b.setValue(this.selectedStyle.get("name"))},remove:function(a,b,c){if(!this._cancelling)this._removing=!0,b=Math.min(c,a.getCount()-1),this.updateStyleRemoveButton(),c=this.items.get(0).items.get(0),this.markModified(),c.fireEvent("select",c,a.getAt(b),b),c.setValue(this.selectedStyle.get("name")),delete this._removing},update:function(a,b){var c=b.get("userStyle");Ext.apply(b.data,{name:c.name,title:c.title||c.name,"abstract":c.description});this.changeStyle(b,{updateCombo:!0,markModified:!0})}, 1053scope:this});this.stylesStore.fireEvent("load",this.stylesStore,this.stylesStore.getRange());this._ready=!0;this.fireEvent("ready")},markModified:function(){if(!1===this.modified)this.modified=!0;this._saving||this.fireEvent("modified",this,this.selectedStyle.get("name"))},createStylesStore:function(){var a=this.layerRecord.get("styles")||[];this.stylesStore=new Ext.data.JsonStore({data:{styles:a},idProperty:"name",root:"styles",fields:["name","title","abstract","legend","userStyle"],listeners:{add:function(a, 1054c){for(var d,e=c.length-1;0<=e;--e)d=c[e],a.suspendEvents(),d.get("title")||d.set("title",d.get("name")),a.resumeEvents()}}})},getStyles:function(a){var b=this.layerRecord.getLayer();if(!0===this.editable){var c=b.params.VERSION;1.1<parseFloat(c)&&(c="1.1.1");Ext.Ajax.request({url:b.url,params:{SERVICE:"WMS",VERSION:c,REQUEST:"GetStyles",LAYERS:""+b.params.LAYERS},method:"GET",disableCaching:!1,success:this.parseSLD,failure:this.setupNonEditable,callback:a,scope:this})}else this.setupNonEditable()}, 1055describeLayer:function(a){if(this.layerDescription)window.setTimeout(function(){a.call(this)},0);else{var b=this.layerRecord.getLayer(),c=b.params.VERSION;1.1<parseFloat(c)&&(c="1.1.1");Ext.Ajax.request({url:b.url,params:{SERVICE:"WMS",VERSION:c,REQUEST:"DescribeLayer",LAYERS:""+b.params.LAYERS},method:"GET",disableCaching:!1,success:function(a){this.layerDescription=(new OpenLayers.Format.WMSDescribeLayer).read(a.responseXML&&a.responseXML.documentElement?a.responseXML:a.responseText)[0]},callback:a, 1056scope:this})}},addStylesCombo:function(){var a=this.stylesStore,a=new Ext.form.ComboBox(Ext.apply({fieldLabel:this.chooseStyleText,store:a,editable:!1,displayField:"title",valueField:"name",value:this.selectedStyle?this.selectedStyle.get("title"):this.layerRecord.getLayer().params.STYLES||"default",disabled:!a.getCount(),mode:"local",typeAhead:!0,triggerAction:"all",forceSelection:!0,anchor:"100%",listeners:{select:function(a,c){this.changeStyle(c);!c.phantom&&!this._removing&&this.fireEvent("styleselected", 1057this,c.get("name"))},scope:this}},this.initialConfig.stylesComboOptions));this.items.get(0).add(a);this.doLayout()},createLegendImage:function(){var a=new GeoExt.WMSLegend({showTitle:!1,layerRecord:this.layerRecord,autoScroll:!0,defaults:{listeners:{render:function(b){b.getEl().on({load:function(c,d){d.getAttribute("src")!=b.defaultImgSrc&&(this.setRulesFieldSetVisible(!0),250<b.getEl().getHeight()&&a.setHeight(250))},error:function(){this.setRulesFieldSetVisible(!1)},scope:this})},scope:this}}}); 1058return a},changeStyle:function(a,b){var b=b||{},c=this.items.get(2).items.get(0);this.selectedStyle=a;this.updateStyleRemoveButton();a.get("name");if(!0===this.editable){var d=a.get("userStyle"),e=c.rules.indexOf(this.selectedRule);c.ownerCt.remove(c);this.createLegend(d.rules,{selectedRuleIndex:e})}!0===b.updateCombo&&(this.items.get(0).items.get(0).setValue(d.name),!0===b.markModified&&this.markModified())},addVectorLegend:function(a,b){b=Ext.applyIf(b||{},{enableDD:!0});this.symbolType=b.symbolType; 1059if(!this.symbolType){var c=["Point","Line","Polygon"];highest=0;for(var d=a[0].symbolizers,e,f=d.length-1;0<=f;
1059f--)e=d[f].CLASS_NAME.split(".").pop(),highest=Math.max(highest,c.indexOf(e));this.symbolType=c[highest]}var g=this.items.get(2).add({xtype:"gx_vectorlegend",showTitle:!1,height:10<a.length?250:void 0,autoScroll:10<a.length,rules:a,symbolType:this.symbolType,selectOnClick:!0,enableDD:b.enableDD,listeners:{ruleselected:function(a,b){this.selectedRule=b;var c=this.items.get(3).items;this.updateRuleRemoveButton(); 1060c.get(2).enable();c.get(3).enable()},ruleunselected:function(){this.selectedRule=null;var a=this.items.get(3).items;a.get(1).disable();a.get(2).disable();a.get(3).disable()},rulemoved:function(){this.markModified()},afterlayout:function(){null!==this.selectedRule&&null===g.selectedRule&&-1!==g.rules.indexOf(this.selectedRule)&&g.selectRuleEntry(this.selectedRule)},scope:this}});this.setRulesFieldSetVisible(!0);return g},newStyleName:function(){var a=this.layerRecord.get("name");return a.split(":").pop()+ 1061"_"+gxp.util.md5(a+new Date+Math.random()).substr(0,8)},showDlg:function(a){a.show()}}); 1062gxp.WMSStylesDialog.createGeoServerStylerConfig=function(a,b){var c=a.getLayer();b||(b=a.get("restUrl"));b||(b=c.url.split("?").shift().replace(/\/(wms|ows)\/?$/,"/rest"));return{xtype:"gxp_wmsstylesdialog",layerRecord:a,plugins:[{ptype:"gxp_geoserverstylewriter",baseUrl:b}],listeners:{styleselected:function(a,b){c.mergeNewParams({styles:b})},modified:function(a){a.saveStyles()},saved:function(a,b){c.mergeNewParams({_olSalt:Math.random(),styles:b})},scope:this}}}; 1063OpenLayers.Renderer.defaultSymbolizer={fillColor:"#808080",fillOpacity:1,strokeColor:"#000000",strokeOpacity:1,strokeWidth:1,strokeDashstyle:"solid",pointRadius:3,graphicName:"square",fontColor:"#000000",fontSize:10,haloColor:"#FFFFFF",haloOpacity:1,haloRadius:1,labelAlign:"cm"};Ext.reg("gxp_wmsstylesdialog",gxp.WMSStylesDialog);Ext.namespace("gxp"); 1064gxp.ScaleLimitPanel=Ext.extend(Ext.Panel,{maxScaleDenominatorLimit:1.577757414193268E9*OpenLayers.DOTS_PER_INCH/256,limitMaxScaleDenominator:!0,maxScaleDenominator:void 0,minScaleDenominatorLimit:1.577757414193268E9*Math.pow(0.5,19)*OpenLayers.DOTS_PER_INCH/256,limitMinScaleDenominator:!0,minScaleDenominator:void 0,scaleLevels:20,scaleSliderTemplate:"{scaleType} Scale 1:{scale}",modifyScaleTipContext:Ext.emptyFn,scaleFactor:null,changing:!1,border:!1,maxScaleLimitText:"Max scale limit",minScaleLimitText:"Min scale limit", 1065initComponent:function(){this.layout="column";this.defaults={border:!1,bodyStyle:"margin: 0 5px;"};this.bodyStyle={padding:"5px"};this.scaleSliderTemplate=new Ext.Template(this.scaleSliderTemplate);Ext.applyIf(this,{minScaleDenominator:this.minScaleDenominatorLimit,maxScaleDenominator:this.maxScaleDenominatorLimit});this.scaleFactor=Math.pow(this.maxScaleDenominatorLimit/this.minScaleDenominatorLimit,1/(this.scaleLevels-1));this.scaleSlider=new Ext.Slider({vertical:!0,height:100,values:[0,100],listeners:{changecomplete:function(a){this.updateScaleValues(a)}, 1066render:function(a){a.thumbs[0].el.setVisible(this.limitMaxScaleDenominator);a.thumbs[1].el.setVisible(this.limitMinScaleDenominator);a.setDisabled(!this.limitMinScaleDenominator&&!this.limitMaxScaleDenominator)},scope:this},plugins:[new gxp.slider.Tip({getText:function(a){var b=a.slider.thumbs.indexOf(a),a={scale:""+this.sliderValuesToScale([a.value])[0],zoom:(a.value*(this.scaleLevels/100)).toFixed(1),type:0===b?"Max":"Min",scaleType:0===b?"Min":"Max"};this.modifyScaleTipContext(this,a);return this.scaleSliderTemplate.apply(a)}.createDelegate(this)})]}); 1067this.maxScaleDenominatorInput=new Ext.form.NumberField({allowNegative:!1,width:100,fieldLabel:"1",value:Math.round(this.maxScaleDenominator),disabled:!this.limitMaxScaleDenominator,validator:function(a){return!this.limitMinScaleDenominator||a>this.minScaleDenominator}.createDelegate(this),listeners:{valid:function(a){var a=Number(a.getValue()),b=Math.round(this.maxScaleDenominatorLimit);if(a<b&&a>this.minScaleDenominator)this.maxScaleDenominator=a,this.updateSliderValues()},change:function(a){var b= 1068Number(a.getValue()),c=Math.round(this.maxScaleDenominatorLimit);b>c?a.setValue(c):b<this.minScaleDenominator?a.setValue(this.minScaleDenominator):(this.maxScaleDenominator=b,this.updateSliderValues())},scope:this}});this.minScaleDenominatorInput=new Ext.form.NumberField({allowNegative:!1,width:100,fieldLabel:"1",value:Math.round(this.minScaleDenominator),disabled:!this.limitMinScaleDenominator,validator:function(a){return!this.limitMaxScaleDenominator||a<this.maxScaleDenominator}.createDelegate(this), 1069listeners:{valid:function(a){var a=Number(a.getValue()),b=Math.round(this.minScaleDenominatorLimit);if(a>b&&a<this.maxScaleDenominator)this.minScaleDenominator=a,this.updateSliderValues()},change:function(a){var b=Number(a.getValue()),c=Math.round(this.minScaleDenominatorLimit);b<c?a.setValue(c):b>this.maxScaleDenominator?a.setValue(this.maxScaleDenominator):(this.minScaleDenominator=b,this.updateSliderValues())},scope:this}});this.items=[this.scaleSlider,{xtype:"panel",layout:"form",defaults:{border:!1}, 1070items:[{labelWidth:90,layout:"form",width:150,items:[{xtype:"checkbox",checked:!!this.limitMinScaleDenominator,fieldLabel:this.maxScaleLimitText,listeners:{check:function(a,b){this.limitMinScaleDenominator=b;var c=this.scaleSlider;c.setValue(1,100);c.thumbs[1].el.setVisible(b);this.minScaleDenominatorInput.setDisabled(!b);this.updateScaleValues(c);c.setDisabled(!this.limitMinScaleDenominator&&!this.limitMaxScaleDenominator)},scope:this}}]},{labelWidth:10,layout:"form",items:[this.minScaleDenominatorInput]}, 1071{labelWidth:90,layout:"form",items:[{xtype:"checkbox",checked:!!this.limitMaxScaleDenominator,fieldLabel:this.minScaleLimitText,listeners:{check:function(a,b){this.limitMaxScaleDenominator=b;var c=this.scaleSlider;c.setValue(0,0);c.thumbs[0].el.setVisible(b);this.maxScaleDenominatorInput.setDisabled(!b);this.updateScaleValues(c);c.setDisabled(!this.limitMinScaleDenominator&&!this.limitMaxScaleDenominator)},scope:this}}]},{labelWidth:10,layout:"form",items:[this.maxScaleDenominatorInput]}]}];this.addEvents("change"); 1072gxp.ScaleLimitPanel.superclass.initComponent.call(this)}
1072,updateScaleValues:function(a){if(!this.changing){var b=a.getValues(),c=!1;!this.limitMaxScaleDenominator&&0<b[0]&&(b[0]=0,c=!0);!this.limitMinScaleDenominator&&100>b[1]&&(b[1]=100,c=!0);c?(a.setValue(0,b[0]),a.setValue(1,b[1])):(b=this.sliderValuesToScale(b),a=b[0],b=b[1],this.changing=!0,this.minScaleDenominatorInput.setValue(b),this.maxScaleDenominatorInput.setValue(a),this.changing=!1,this.fireEvent("change",this,this.limitMinScaleDenominator? 1073b:void 0,this.limitMaxScaleDenominator?a:void 0))}},updateSliderValues:function(){if(!this.changing){var a=this.minScaleDenominator,b=this.maxScaleDenominator,c=this.scaleToSliderValues([b,a]);this.changing=!0;this.scaleSlider.setValue(0,c[0]);this.scaleSlider.setValue(1,c[1]);this.changing=!1;this.fireEvent("change",this,this.limitMinScaleDenominator?a:void 0,this.limitMaxScaleDenominator?b:void 0)}},sliderValuesToScale:function(a){var b=100/(this.scaleLevels-1);return[Math.round(Math.pow(this.scaleFactor, 1074(100-a[0])/b)*this.minScaleDenominatorLimit),Math.round(Math.pow(this.scaleFactor,(100-a[1])/b)*this.minScaleDenominatorLimit)]},scaleToSliderValues:function(a){var b=100/(this.scaleLevels-1);return[100-b*Math.log(a[0]/this.minScaleDenominatorLimit)/Math.log(this.scaleFactor),100-b*Math.log(a[1]/this.minScaleDenominatorLimit)/Math.log(this.scaleFactor)]}});Ext.reg("gxp_scalelimitpanel",gxp.ScaleLimitPanel);Ext.namespace("gxp.slider"); 1075gxp.slider.Tip=Ext.extend(Ext.slider.Tip,{hover:!0,dragging:!1,init:function(a){if(this.hover)a.on("render",this.registerThumbListeners,this);this.slider=a;gxp.slider.Tip.superclass.init.apply(this,arguments)},registerThumbListeners:function(){for(var a=0,b=this.slider.thumbs.length;a<b;++a)this.slider.thumbs[a].el.on({mouseover:this.createHoverListener(a),mouseout:function(){this.dragging||this.hide.apply(this,arguments)},scope:this})},createHoverListener:function(a){return function(){this.onSlide(this.slider, 1076{},this.slider.thumbs[a]);this.dragging=!1}.createDelegate(this)},onSlide:function(a,b,c){this.dragging=!0;gxp.slider.Tip.superclass.onSlide.apply(this,arguments)}});Ext.namespace("gxp.plugins"); 1077gxp.plugins.FormFieldHelp=Ext.extend(Object,{ptype:"gxp_formfieldhelp",helpText:null,dismissDelay:5E3,constructor:function(a){Ext.apply(this,a)},init:function(a){this.target=a;a.on("render",this.showHelp,this)},showHelp:function(){var a;a=this.target.label?this.target.label:this.target.getEl();Ext.QuickTips.register({target:a,dismissDelay:this.dismissDelay,text:this.helpText})}});Ext.preg(gxp.plugins.FormFieldHelp.prototype.ptype,gxp.plugins.FormFieldHelp);Ext.namespace("gxp"); 1078gxp.TextSymbolizer=Ext.extend(Ext.Panel,{fonts:void 0,symbolizer:null,defaultSymbolizer:null,attributes:null,colorManager:null,haloCache:null,border:!1,layout:"form",labelValuesText:"Label values",haloText:"Halo",sizeText:"Size",priorityText:"Priority",labelOptionsText:"Label options",autoWrapText:"Auto wrap",followLineText:"Follow line",maxDisplacementText:"Maximum displacement",repeatText:"Repeat",forceLeftToRightText:"Force left to right",graphicResizeText:"Graphic resize",graphicMarginText:"Graphic margin", 1079graphicTitle:"Graphic",fontColorTitle:"Font color and opacity",positioningText:"Label positioning",anchorPointText:"Anchor point",displacementXText:"Displacement (X-direction)",displacementYText:"Displacement (Y-direction)",perpendicularOffsetText:"Perpendicular offset",priorityHelp:"The higher the value of the specified field, the sooner the label will be drawn (which makes it win in the conflict resolution game)",autoWrapHelp:"Wrap labels that exceed a certain length in pixels",followLineHelp:"Should the label follow the geometry of the line?", 1080maxDisplacementHelp:"Maximum displacement in pixels if label position is busy",repeatHelp:"Repeat labels after a certain
1080number of pixels",forceLeftToRightHelp:"Labels are usually flipped to make them readable. If the character happens to be a directional arrow then this is not desirable",graphic_resizeHelp:"Specifies a mode for resizing label graphics (such as highway shields) to fit the text of the label. The default mode, \u2018none\u2019, never modifies the label graphic. In stretch mode, GeoServer will resize the graphic to exactly surround the label text, possibly modifying the image\u2019s aspect ratio. In proportional mode, GeoServer will expand the image to be large enough to surround the text while preserving its original aspect ratio.", 1081graphic_marginHelp:"Similar to the margin shorthand property in CSS for HTML, its interpretation varies depending on how many margin values are provided: 1 = use that margin length on all sides of the label 2 = use the first for top & bottom margins and the second for left & right margins. 3 = use the first for the top margin, second for left & right margins, third for the bottom margin. 4 = use the first for the top margin, second for the right margin, third for the bottom margin, and fourth for the left margin.", 1082initComponent:function(){if(!this.symbolizer)this.symbolizer={};Ext.applyIf(this.symbolizer,this.defaultSymbolizer);if(!this.symbolizer.vendorOptions)this.symbolizer.vendorOptions={};this.haloCache={};this.attributes.load();var a={xtype:"combo",fieldLabel:this.labelValuesText,store:this.attributes,mode:"local",lastQuery:"",editable:!1,triggerAction:"all",allowBlank:!1,displayField:"name",valueField:"name",value:this.symbolizer.label&&this.symbolizer.label.replace(/^\${(.*)}$/,"$1"),listeners:{select:function(a, 1083c){this.symbolizer.label="${"+c.get("name")+"}";this.fireEvent("change",this.symbolizer)},scope:this},width:120};this.attributesComboConfig=this.attributesComboConfig||{};Ext.applyIf(this.attributesComboConfig,a);this.labelWidth=80;this.items=[this.attributesComboConfig,{cls:"x-html-editor-tb",style:"background: transparent; border: none; padding: 0 0em 0.5em;",xtype:"toolbar",items:[{xtype:"gxp_fontcombo",fonts:this.fonts||void 0,width:110,value:this.symbolizer.fontFamily,listeners:{select:function(a, 1084c){this.symbolizer.fontFamily=c.get("field1");this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"tbtext",text:this.sizeText+": "},{xtype:"numberfield",allowNegative:!1,emptyText:OpenLayers.Renderer.defaultSymbolizer.fontSize,value:this.symbolizer.fontSize,width:30,listeners:{change:function(a,c){c=parseFloat(c);isNaN(c)?delete this.symbolizer.fontSize:this.symbolizer.fontSize=c;this.fireEvent("change",this.symbolizer)},scope:this}},{enableToggle:!0,cls:"x-btn-icon",iconCls:"x-edit-bold", 1085pressed:"bold"===this.symbolizer.fontWeight,listeners:{toggle:function(a,c){this.symbolizer.fontWeight=c?"bold":"normal";this.fireEvent("change",this.symbolizer)},scope:this}},{enableToggle:!0,cls:"x-btn-icon",iconCls:"x-edit-italic",pressed:"italic"===this.symbolizer.fontStyle,listeners:{toggle:function(a,c){this.symbolizer.fontStyle=c?"italic":"normal";this.fireEvent("change",this.symbolizer)},scope:this}}]},{xtype:"gxp_fillsymbolizer",fillText:this.fontColorTitle,symbolizer:this.symbolizer,colorProperty:"fontColor", 1086opacityProperty:"fontOpacity",checkboxToggle:!1,autoHeight:!0,width:213,labelWidth:70,plugins:this.colorManager&&[new this.colorManager],listeners:{change:function(){this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"fieldset",title:this.graphicTitle,checkboxToggle:!0,hideMode:"offsets",collapsed:!(this.symbolizer.fillColor||this.symbolizer.fillOpacity),labelWidth:70,items:[{xtype:"gxp_pointsymbolizer",symbolizer:this.symbolizer,listeners:{change:function(a){a.graphic=!!a.graphicName|| 1087!!a.externalGraphic;this.fireEvent("change",this.symbolizer)},scope:this},border:!1,labelWidth:70},this.createVendorSpecificField({name:"graphic-resize",xtype:"combo",store:["none","stretch","proportional"],mode:"local",listeners:{select:function(a){"none"===a.getValue()?this.graphicMargin.hide():(Ext.isEmpty(this.graphicMargin.getValue())&&(this.graphicMargin.setValue(0),this.symbolizer.vendorOptions["graphic-margin"]=0),this.graphicMargin.show())},scope:this},width:100,triggerAction:"all",fieldLabel:this.graphicResizeText}), 1088this.createVendorSpecificField({name:"graphic-margin",ref:"../graphicMargin",hidden:"stretch"!==this.symbolizer.vendorOptions["graphic-resize"]&&"proportional"!==this.symbolizer.vendorOptions["graphic-resize"],width:100,fieldLabel:this.graphicMarginText,xtype:"textfield"})],listeners:{collapse:function(){this.graphicCache={externalGraphic:this.symbolizer.externalGraphic,fillColor:this.symbolizer.fillColor,fillOpacity:this.symbolizer.fillOpacity,graphicName:this.symbolizer.graphicName,pointRadius:this.symbolizer.pointRadius, 1089rotation:this.symbolizer.rotation,strokeColor:this.symbolizer.strokeColor,strokeWidth:this.symbolizer.strokeWidth,strokeDashStyle:this.symbolizer.strokeDashStyle};delete this.symbolizer.externalGraphic;delete this.symbolizer.fillColor;delete this.symbolizer.fillOpacity;delete this.symbolizer.graphicName;delete this.symbolizer.pointRadius;delete this.symbolizer.rotation;delete this.symbolizer.strokeColor;delete this.symbolizer.strokeWidth;delete this.symbolizer.strokeDashStyle;this.fireEvent("change", 1090this.symbolizer)},expand:function(){Ext.apply(this.symbolizer,this.graphicCache);this.doLayout();this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"fieldset",title:this.haloText,checkboxToggle:!0,collapsed:!(this.symbolizer.haloRadius||this.symbolizer.haloColor||this.symbolizer.haloOpacity),autoHeight:!0,labelWidth:50,items:[{xtype:"numberfield",fieldLabel:this.sizeText,anchor:"89%",allowNegative:!1,emptyText:OpenLayers.Renderer.defaultSymbolizer.haloRadius,value:this.symbolizer.haloRadius, 1091listeners:{change:function(a,c){c=parseFloat(c);isNaN(c)?delete this.symbolizer.haloRadius:this.symbolizer.haloRadius=c;this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"gxp_fillsymbolizer",symbolizer:{fillColor:"haloColor"in this.symbolizer?this.symbolizer.haloColor:OpenLayers.Renderer.defaultSymbolizer.haloColor,fillOpacity:"haloOpacity"in this.symbolizer?this.symbolizer.haloOpacity:100*OpenLayers.Renderer.defaultSymbolizer.haloOpacity},defaultColor:OpenLayers.Renderer.defaultSymbolizer.haloColor, 1092checkboxToggle:!1,width:190,labelWidth:60,plugins:this.colorManager&&[new this.colorManager],listeners:{change:function(a){this.symbolizer.haloColor=a.fillColor;this.symbolizer.haloOpacity=a.fillOpacity;this.fireEvent("change",this.symbolizer)},scope:this}}],listeners:{collapse:function(){this.haloCache={haloRadius:this.symbolizer.haloRadius,haloColor:this.symbolizer.haloColor,haloOpacity:this.symbolizer.haloOpacity};delete this.symbolizer.haloRadius;delete this.symbolizer.haloColor;delete this.symbolizer.haloOpacity; 1093this.fireEvent("change",this.symbolizer)},expand:function(){Ext.apply(this.symbolizer,this.haloCache);this.doLayout();this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"fieldset",title:this.positioningText,checkboxToggle:!0,collapsed:!0,autoHeight:!0,labelWidth:75,defaults:{width:100},items:[Ext.applyIf({fieldLabel:this.anchorPointText,value:this.symbolizer.labelAlign||"lb",store:[["lt","Left-top"],["ct","Center-top"],["rt","Right-top"],["lm","Left-center"],["cm","Center"],["rm","Right-center"], 1094["lb","Left-bottom"],["cb","Center-bottom"],["rb","Right-bottom"]],listeners:{select:function(a){this.symbolizer.labelAlign=a.getValue();delete this.symbolizer.labelAnchorPointX;delete this.symbolizer.labelAnchorPointY;this.fireEvent("change",this.symbolizer)},scope:this}},this.attributesComboConfig),{xtype:"numberfield",fieldLabel:this.displacementXText,value:this.symbolizer.labelXOffset,listeners:{change:function(a,c){this.symbolizer.labelXOffset=c;this.fireEvent("change",this.symbolizer)},scope:this}}, 1095{xtype:"numberfield",fieldLabel:this.displacementYText,value:this.symbolizer.labelYOffset,listeners:{change:function(a,c){this.symbolizer.labelYOffset=c;this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"numberfield",fieldLabel:this.perpendicularOffsetText,value:this.symbolizer.labelPerpendicularOffset,listeners:{change:function(a,c){Ext.isEmpty(c)?delete this.symbolizer.labelPerpendicularOffset:this.symbolizer.labelPerpendicularOffset=c;this.fireEvent("change",this.symbolizer)},scope:this}}]}, 1096{xtype:"fieldset",title:this.priorityText,checkboxToggle:!0,collapsed:!0,autoHeight:!0,labelWidth:50,items:[Ext.applyIf({fieldLabel:this.priorityText,value:this.symbolizer.priority&&this.symbolizer.priority.replace(/^\${(.*)}$/,"$1"),allowBlank:!0,name:"priority",plugins:[{ptype:"gxp_formfieldhelp",dismissDelay:2E4,helpText:this.priorityHelp}],listeners:{select:function(a,c){this.symbolizer[a.name]="${"+c.get("name")+"}";this.fireEvent("change",this.symbolizer)},scope:this}},this.attributesComboConfig)]}, 1097{xtype:"fieldset",title:this.labelOptionsText,checkboxToggle:!0,collapsed:!0,autoHeight:!0,labelWidth:80,defaults:{width:100},items:[this.createVendorSpecificField({name:"autoWrap",allowBlank:!1,fieldLabel:this.autoWrapText}),this.createVendorSpecificField({name:"followLine",xtype:"checkbox",fieldLabel:this.followLineText}),this.createVendorSpecificField({name:"maxDisplacement",fieldLabel:this.maxDisplacementText}),this.createVendorSpecificField({name:"repeat",fieldLabel:this.repeatText}),this.createVendorSpecificField({name:"forceLeftToRight", 1098xtype:"checkbox",fieldLabel:this.forceLeftToRightText})]}];this.addEvents("change");gxp.TextSymbolizer.superclass.initComponent.call(this)},createVendorSpecificField:function(a){var b=function(b,c){Ext.isEmpty(c)?delete this.symbolizer.vendorOptions[a.name]:this.symbolizer.vendorOptions[a.name]=c;this.fireEvent("change",this.symbolizer)},c=Ext.ComponentMgr.create(Ext.applyIf(a,{xtype:"numberfield",allowNegative:!1,value:this.symbolizer.vendorOptions[a.name],plugins:[{ptype:"gxp_formfieldhelp",dismissDelay:2E4, 1099helpText:this[a.name.replace(/-/g,"_")+"Help"]}]}));c.on("change",b,this);c.on("check",b,this);return c}});Ext.reg("gxp_textsymbolizer",gxp.TextSymbolizer);Ext.namespace("gxp"); 1100gxp.FillSymbolizer=Ext.extend(Ext.FormPanel,{symbolizer:null,colorProperty:"fillColor",opacityProperty:"fillOpacity",colorManager:null,checkboxToggle:!0,defaultColor:null,border:!1,fillText:"Fill",colorText:"Color",opacityText:"Opacity",initComponent:function(){if(!this.symbolizer)this.symbolizer={};var a;this.colorManager&&(a=[new this.colorManager]);var b=100;this.opacityProperty in this.symbolizer?b=100*this.symbolizer[this.opacityProperty]:OpenLayers.Renderer.defaultSymbolizer[this.opacityProperty]&& 1101(b=100*OpenLayers.Renderer.defaultSymbolizer[this.opacityProperty]);this.items=[{xtype:"fieldset",title:this.fillText,autoHeight:!0,checkboxToggle:this.checkboxToggle,collapsed:!0===this.checkboxToggle&&!1===this.symbolizer.fill,hideMode:"offsets",defaults:{width:100},items:[{xtype:"gxp_colorfield",fieldLabel:this.colorText,name:"color",emptyText:OpenLayers.Renderer.defaultSymbolizer[this.colorProperty],value:this.symbolizer[this.colorProperty],defaultBackgroun
1101d:this.defaultColor||OpenLayers.Renderer.defaultSymbolizer[this.colorProperty], 1102plugins:a,listeners:{valid:function(a){var a=a.getValue(),b=this.symbolizer[this.colorProperty]!=a;this.symbolizer[this.colorProperty]=a;b&&this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"slider",fieldLabel:this.opacityText,name:"opacity",values:[b],isFormField:!0,listeners:{changecomplete:function(a,b){this.symbolizer[this.opacityProperty]=b/100;this.fireEvent("change",this.symbolizer)},scope:this},plugins:[new GeoExt.SliderTip({getText:function(a){return a.value+"%"}})]}],listeners:{collapse:function(){if(!1!== 1103this.symbolizer.fill)this.symbolizer.fill=!1,this.fireEvent("change",this.symbolizer)},expand:function(){this.symbolizer.fill=!0;this.fireEvent("change",this.symbolizer)},scope:this}}];this.addEvents("change");gxp.FillSymbolizer.superclass.initComponent.call(this)}});Ext.reg("gxp_fillsymbolizer",gxp.FillSymbolizer);Ext.namespace("gxp.form"); 1104gxp.form.ColorField=Ext.extend(Ext.form.TextField,{cssColors:{aqua:"#00FFFF",black:"#000000",blue:"#0000FF",fuchsia:"#FF00FF",gray:"#808080",green:"#008000",lime:"#00FF00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#FF0000",silver:"#C0C0C0",teal:"#008080",white:"#FFFFFF",yellow:"#FFFF00"},defaultBackground:"#ffffff",initComponent:function(){if(this.value)this.value=this.hexToColor(this.value);gxp.form.ColorField.superclass.initComponent.call(this);this.on({render:this.colorField, 1105valid:this.colorField,scope:this})},isDark:function(a){var b=!1;if(a)var b=parseInt(a.substring(1,3),16)/255,c=parseInt(a.substring(3,5),16)/255,a=parseInt(a.substring(5,7),16)/255,b=0.5>0.299*b+0.587*c+0.144*a;return b},colorField:function(){var a=this.colorToHex(this.getValue())||this.defaultBackground;this.getEl().setStyle({background:a,color:this.isDark(a)?"#ffffff":"#000000"})},getHexValue:function(){return this.colorToHex(gxp.form.ColorField.superclass.getValue.apply(this,arguments))},getValue:function(){var a= 1106this.getHexValue(),b=this.initialConfig.value;a===this.hexToColor(b)&&(a=b);return a},setValue:function(a){gxp.form.ColorField.superclass.setValue.apply(this,[this.hexToColor(a)])},colorToHex:function(a){return!a?a:a.match(/^#[0-9a-f]{6}$/i)?a:this.cssColors[a.toLowerCase()]||null},hexToColor:function(a){if(!a)return a;for(var b in this.cssColors)if(this.cssColors[b]==a.toUpperCase()){a=b;break}return a}});Ext.reg("gxp_colorfield",gxp.form.ColorField);Ext.namespace("gxp.form"); 1107gxp.form.FontComboBox=Ext.extend(Ext.form.ComboBox,{fonts:"Serif,SansSerif,Arial,Courier New,Tahoma,Times New Roman,Verdana".split(","),defaultFont:"Serif",allowBlank:!1,mode:"local",triggerAction:"all",editable:!1,initComponent:function(){var a=this.fonts||gxp.form.FontComboBox.prototype.fonts,b=this.defaultFont;-1===a.indexOf(this.defaultFont)&&(b=a[0]);a={displayField:"field1",valueField:"field1",store:a,value:b,tpl:new Ext.XTemplate('<tpl for="."><div class="x-combo-list-item"><span style="font-family: {field1};">{field1}</span></div></tpl>')}; 1108Ext.applyIf(this,a);gxp.form.FontComboBox.superclass.initComponent.call(this)}});Ext.reg("gxp_fontcombo",gxp.form.FontComboBox);Ext.namespace("gxp"); 1109gxp.PolygonSymbolizer=Ext.extend(Ext.Panel,{symbolizer:null,initComponent:function(){this.items=[{xtype:"gxp_fillsymbolizer",symbolizer:this.symbolizer,listeners:{change:function(){this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"gxp_strokesymbolizer",symbolizer:this.symbolizer,listeners:{change:function(){this.fireEvent("change",this.symbolizer)},scope:this}}];this.addEvents("change");gxp.PolygonSymbolizer.superclass.initComponent.call(this)}});Ext.reg("gxp_polygonsymbolizer",gxp.PolygonSymbolizer); 1110Ext.namespace("gxp"); 1111gxp.StrokeSymbolizer=Ext.extend(Ext.FormPanel,{solidStrokeName:"solid",dashStrokeName:"dash",dotStrokeName:"dot",titleText:"Stroke",styleText:"Style",colorText:"Color",widthText:"Width",opacityText:"Opacity",symbolizer:null,colorManager:null,checkboxToggle:!0,defaultColor:null,dashStyles:null,border:!1,initComponent:function(){this.dashStyles=this.dashStyles||[["solid",this.solidStrokeName],["4 4",this.dashStrokeName],["2 4",this.dotStrokeName]];if(!this.symbolizer)this.symbolizer={};var a;this.colorManager&& 1112(a=[new this.colorManager]);this.items=[{xtype:"fieldset",title:this.titleText,autoHeight:!0,checkboxToggle:this.checkboxToggle,collapsed:!0===this.checkboxToggle&&!1===this.symbolizer.stroke,hideMode:"offsets",defaults:{width:100},items:[{xtype:"combo",name:"style",fieldLabel:this.styleText,store:new Ext.data.SimpleStore({data:this.dashStyles,fields:["value","display"]}),displayField:"display",valueField:"value",value:this.getDashArray(this.symbolizer.strokeDashstyle)||OpenLayers.Renderer.defaultSymbolizer.strokeDashstyle, 1113mode:"local",allowBlank:!0,triggerAction:"all",editable:!1,listeners:{select:function(a,c){this.symbolizer.strokeDashstyle=c.get("value");this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"gxp_colorfield",name:"color",fieldLabel:this.colorText,emptyText:OpenLayers.Renderer.defaultSymbolizer.strokeColor,value:this.symbolizer.strokeColor,defaultBackgroun
1113d:this.defaultColor||OpenLayers.Renderer.defaultSymbolizer.strokeColor,plugins:a,listeners:{valid:function(a){var a=a.getValue(),c=this.symbolizer.strokeColor!= 1114a;this.symbolizer.strokeColor=a;c&&this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"numberfield",name:"width",fieldLabel:this.widthText,allowNegative:!1,emptyText:OpenLayers.Renderer.defaultSymbolizer.strokeWidth,value:this.symbolizer.strokeWidth,listeners:{change:function(a,c){c=parseFloat(c);isNaN(c)?delete this.symbolizer.strokeWidth:this.symbolizer.strokeWidth=c;this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"slider",name:"opacity",fieldLabel:this.opacityText,values:[100* 1115("strokeOpacity"in this.symbolizer?this.symbolizer.strokeOpacity:OpenLayers.Renderer.defaultSymbolizer.strokeOpacity)],isFormField:!0,listeners:{changecomplete:function(a,c){this.symbolizer.strokeOpacity=c/100;this.fireEvent("change",this.symbolizer)},scope:this},plugins:[new GeoExt.SliderTip({getText:function(a){return a.value+"%"}})]}],listeners:{collapse:function(){if(!1!==this.symbolizer.stroke)this.symbolizer.stroke=!1,this.fireEvent("change",this.symbolizer)},expand:function(){this.symbolizer.stroke= 1116!0;this.fireEvent("change",this.symbolizer)},scope:this}}];this.addEvents("change");gxp.StrokeSymbolizer.superclass.initComponent.call(this)},getDashArray:function(a){var b;a&&(a=a.split(/\s+/),a=a[0]/a[1],isNaN(a)||(b=1<=a?"4 4":"2 4"));return b}});Ext.reg("gxp_strokesymbolizer",gxp.StrokeSymbolizer);Ext.namespace("gxp"); 1117gxp.LineSymbolizer=Ext.extend(Ext.Panel,{symbolizer:null,initComponent:function(){this.items=[{xtype:"gxp_strokesymbolizer",symbolizer:this.symbolizer,listeners:{change:function(){this.fireEvent("change",this.symbolizer)},scope:this}}];this.addEvents("change");gxp.LineSymbolizer.superclass.initComponent.call(this)}});Ext.reg("gxp_linesymbolizer",gxp.LineSymbolizer);Ext.namespace("gxp"); 1118gxp.PointSymbolizer=Ext.extend(Ext.Panel,{symbolizer:null,graphicCircleText:"circle",graphicSquareText:"square",graphicTriangleText:"triangle",graphicStarText:"star",graphicCrossText:"cross",graphicXText:"x",graphicExternalText:"external",urlText:"URL",opacityText:"opacity",symbolText:"Symbol",sizeText:"Size",rotationText:"Rotation",pointGraphics:null,colorManager:null,external:null,layout:"form",initComponent:function(){if(!this.symbolizer)this.symbolizer={};if(!this.pointGraphics)this.pointGraphics= 1119[{display:this.graphicCircleText,value:"circle",mark:!0},{display:this.graphicSquareText,value:"square",mark:!0},{display:this.graphicTriangleText,value:"triangle",mark:!0},{display:this.graphicStarText,value:"star",mark:!0},{display:this.graphicCrossText,value:"cross",mark:!0},{display:this.graphicXText,value:"x",mark:!0},{display:this.graphicExternalText}];this.external=!!this.symbolizer.externalGraphic;this.markPanel=new Ext.Panel({border:!1,collapsed:this.external,layout:"form",items:[{xtype:"gxp_fillsymbolizer", 1120symbolizer:this.symbolizer,labelWidth:this.labelWidth,labelAlign:this.labelAlign,colorManager:this.colorManager,listeners:{change:function(){this.fireEvent("change",this.symbolizer)},scope:this}},{xtype:"gxp_strokesymbolizer",symbolizer:this.symbolizer,labelWidth:this.labelWidth,labelAlign:this.labelAlign,colorManager:this.colorManager,listeners:{change:function(){this.fireEvent("change",this.symbolizer)},scope:this}}]});this.urlField=new Ext.form.TextField({name:"url",fieldLabel:this.urlText,value:this.symbolizer.externalGraphic, 1121hidden:!this.external,listeners:{change:function(a,b){this.symbolizer.externalGraphic=b;this.fireEvent("change",this.symbolizer)},scope:this},width:100});this.graphicPanel=new Ext.Panel({border:!1,collapsed:!this.external,layout:"form",items:[this.urlField,{xtype:"slider",name:"opacity",fieldLabel:this.opacityText,value:[null==this.symbolizer.graphicOpacity?100:100*this.symbolizer.graphicOpacity],isFormField:!0,listeners:{changecomplete:function(a,b){this.symbolizer.graphicOpacity=b/100;this.fireEvent("change", 1122this.symbolizer)},scope:this},plugins:[new GeoExt.SliderTip({getText:function(a){return a.value+"%"}})],width:100}]});this.items=[{xtype:"combo",name:"mark",fieldLabel:this.symbolText,store:new Ext.data.JsonStore({data:{root:this.pointGraphics},root:"root",fields:["value","display","preview",{name:"mark",type:"boolean"}]}),value:this.external?0:this.symbolizer.graphicName,displayField:"display",valueField:"value",tpl:new Ext.XTemplate('<tpl for="."><div class="x-combo-list-item gx-pointsymbolizer-mark-item"><tpl if="preview"><img src="{preview}" alt="{display}"/></tpl><span>{display}</span></div></tpl>'), 1123mode:"local",allowBlank:!1,triggerAction:"all",editable:!1,listeners:{select:function(a,b){var c=b.get("mark"),d=b.get("value");if(c){if(this.external)this.external=!1,delete this.symbolizer.externalGraphic,this.updateGraphicDisplay();this.symbolizer.graphicName=d}else if(d?(this.urlField.hide(),this.symbolizer.externalGraphic=d):this.urlField.show(),!this.external)this.external=!0,c=this.urlField.getValue(),Ext.isEmpty(c)||(this.symbolizer.externalGraphic=c),delete this.symbolizer.graphicName,this.updateGraphicDisplay(); 1124this.fireEvent("change",this.symbolizer)},scope:this},width:100},{xtype:"textfield",name:"size",fieldLabel:this.sizeText,value:this.symbolizer.pointRadius&&2*this.symbolizer.pointRadius,listeners:{change:function(a,b){this.symbolizer.pointRadius=b/2;this.fireEvent("change",this.symbolizer)},scope:this},width:100},{xtype:"textfield",name:"rotation",fieldLabel:this.rotationText,value:this.symbolizer.rotation,listeners:{change:function(a,b){this.symbolizer.rotation=b;this.fireEvent("change",this.symbolizer)}, 1125scope:this},width:100},this.markPanel,this.graphicPanel];this.addEvents("change");gxp.PointSymbolizer.superclass.initComponent.call(this)},updateGraphicDisplay:function(){this.external?(this.markPanel.collapse(),this.graphicPanel.expand()):(this.graphicPanel.collapse(),this.markPanel.expand())}});Ext.reg("gxp_pointsymbolizer",gxp.PointSymbolizer); 1126OpenLayers.Control.ScaleLine=OpenLayers.Class(OpenLayers.Control,{maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null,geodesic:!1,draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop)this.eTop=document.createElement("div"),this.eTop.className=this.displayClass+"Top",this.div.appendChild(this.eTop),this.eTop.style.visibility=""==this.topOutUnits||""==this.topInUnits?"hidden":"visible",this.eBottom=
1126document.createElement("div"), 1127this.eBottom.className=this.displayClass+"Bottom",this.div.appendChild(this.eBottom),this.eBottom.style.visibility=""==this.bottomOutUnits||""==this.bottomInUnits?"hidden":"visible";this.map.events.register("moveend",this,this.update);this.update();return this.div},getBarLen:function(a){var b=parseInt(Math.log(a)/Math.log(10)),b=Math.pow(10,b),a=parseInt(a/b);return(5<a?5:2<a?2:1)*b},update:function(){var a=this.map.getResolution();if(a){var b=this.map.getUnits(),c=OpenLayers.INCHES_PER_UNIT,d=this.maxWidth* 1128a*c[b],e=1;!0===this.geodesic&&(e=(this.map.getGeodesicPixelSize().w||1.0E-6)*this.maxWidth/(d/c.km),d*=e);var f,g;1E5<d?(f=this.topOutUnits,g=this.bottomOutUnits):(f=this.topInUnits,g=this.bottomInUnits);var h=d/c[f],i=d/c[g],d=this.getBarLen(h),j=this.getBarLen(i),h=d/c[b]*c[f],i=j/c[b]*c[g],b=h/a/e,a=i/a/e;if("visible"==this.eBottom.style.visibility)this.eBottom.style.width=Math.round(a)+"px",this.eBottom.innerHTML=j+" "+g;if("visible"==this.eTop.style.visibility)this.eTop.style.width=Math.round(b)+ 1129"px",this.eTop.innerHTML=d+" "+f}},CLASS_NAME:"OpenLayers.Control.ScaleLine"});Ext.namespace("gxp"); 1130gxp.ScaleOverlay=Ext.extend(Ext.Panel,{map:null,zoomLevelText:"Zoom level",initComponent:function(){gxp.ScaleOverlay.superclass.initComponent.call(this);this.cls="map-overlay";if(this.map){if(this.map instanceof GeoExt.MapPanel)this.map=this.map.map;this.bind(this.map)}this.on("beforedestroy",this.unbind,this)},addToMapPanel:function(a){this.on({afterrender:function(){this.bind(a.map)},scope:this})},stopMouseEvents:function(a){a.stopEvent()},removeFromMapPanel:function(){var a=this.getEl();a.un("mousedown", 1131this.stopMouseEvents,this);a.un("click",this.stopMouseEvents,this);this.unbind()},addScaleLine:function(){var a=new Ext.BoxComponent({autoEl:{tag:"div",cls:"olControlScaleLine overlay-element overlay-scaleline"}});this.on("afterlayout",function(){a.getEl().dom.style.position="relative";a.getEl().dom.style.display="inline";this.getEl().on("click",this.stopMouseEvents,this);this.getEl().on("mousedown",this.stopMouseEvents,this)},this);a.on("render",function(){var b=new OpenLayers.Control.ScaleLine({geodesic:!0, 1132div:a.getEl().dom});this.map.addControl(b);b.activate()},this);this.add(a)},handleZoomEnd:function(){var a=this.zoomStore.queryBy(function(a){return this.map.getZoom()==a.data.level},this);0<a.length?(a=a.items[0],this.zoomSelector.setValue("1 : "+parseInt(a.data.scale,10))):this.zoomSelector.rendered&&this.zoomSelector.clearValue()},addScaleCombo:function(){this.zoomStore=new GeoExt.data.ScaleStore({map:this.map});this.zoomSelector=new Ext.form.ComboBox({emptyText:this.zoomLevelText,tpl:'<tpl for="."><div class="x-combo-list-item">1 : {[parseInt(values.scale)]}</div></tpl>', 1133editable:!1,triggerAction:"all",mode:"local",store:this.zoomStore,width:110});this.zoomSelector.on({click:this.stopMouseEvents,mousedown:this.stopMouseEvents,select:function(a,b){this.map.zoomTo(b.data.level)},scope:this});this.map.events.register("zoomend",this,this.handleZoomEnd);this.add(new Ext.Panel({items:[this.zoomSelector],cls:"overlay-element overlay-scalechooser",border:!1}))},bind:function(a){this.map=a;this.addScaleLine();this.addScaleCombo();this.doLayout()},unbind:function(){this.map&& 1134this.map.events&&this.map.events.unregister("zoomend",this,this.handleZoomEnd);this.zoomSelector=this.zoomStore=null}});Ext.reg("gxp_scaleoverlay",gxp.ScaleOverlay);Ext.namespace("gxp.plugins"); 1135gxp.plugins.Tool=Ext.extend(Ext.util.Observable,{ptype:"gxp_tool",autoActivate:!0,actionTarget:"map.tbar",showButtonText:!1,output:null,constructor:function(a){this.initialConfig=a||{};this.active=!1;Ext.apply(this,a);if(!this.id)this.id=Ext.id();this.output=[];this.addEvents("activate","deactivate");gxp.plugins.Tool.superclass.constructor.apply(this,arguments)},init:function(a){a.tools[this.id]=this;this.target=a;this.autoActivate&&this.activate();this.target.on("portalready",this.addActions,this)}, 1136activate:function(){if(!1===this.active)return this.active=!0,this.fireEvent("activate",this),!0},deactivate:function(){if(!0===this.active)return this.active=!1,this.fireEvent("deactivate",this),!0},getContainer:function(a){var b,c;b=a.split(".");if(c=b[0])if("map"==c)a=this.target.mapPanel;else{if(a=Ext.getCmp(c)||this.target.portal[c],!a)throw Error("Can't find component with id: "+c);}else a=this.target.portal;if(b=1<b.length&&b[1])a=(c={tbar:"getTopToolbar",bbar:"getBottomToolbar",fbar:"getFooterToolbar"}[b])? 1137a[c]():a[b];return a},addActions:function(a){a=a||this.actions;if(!a||null===this.actionTarget)this.addOutput();else{var b=this.actionTarget instanceof Array?this.actionTarget:[this.actionTarget],a=a instanceof Array?a:[a],c,d,e,f,g,h,i=null;for(e=b.length-1;0<=e;--e){if(c=b[e]){if(c instanceof Object)i=c.index,c=c.target;h=this.getContainer(c)}for(f=0,g=a.length;f<g;++f){if(!(a[f]instanceof Ext.Action||a[f]instanceof Ext.Component))if((d=Ext.getCmp(a[f]))&&(a[f]=d),"string"!=typeof a[f]){if(f==this.defaultAction)a[f].pressed= 1138!0;a[f]=new Ext.Action(a[f])}c=a[f];if(f==this.defaultAction&&c instanceof GeoExt.Action)c.isDisabled()?c.activateOnEnable=!0:c.control.activate();if(h){this.showButtonText&&c.setText(c.initialConfig.buttonText);h instanceof Ext.menu.Menu?c=Ext.apply(new Ext.menu.CheckItem(c),{text:c.initialConfig.menuText,group:c.initialConfig.toggleGroup,groupClass:null}):h instanceof Ext.Toolbar||(c=new Ext.Button(c));var j=null===i?h.add(c):h.insert(i,c);c=c instanceof Ext.Button?c:j;null!==i&&(i+=1);if(null!= 1139this.outputAction&&f==this.outputAction)c.on("click",function(){d?this.outputTarget?d.show():d.ownerCt.ownerCt.show():d=this.addOutput()},this)}}h&&(h.isVisible()?h.doLayout():h instanceof Ext.menu.Menu||h.show())}return this.actions=a}}
1139,addOutput:function(a){if(a||this.outputConfig){var a=a||{},b=this.outputTarget;b?(b=this.getContainer(b),a instanceof Ext.Component||Ext.apply(a,this.outputConfig)):(b=this.outputConfig||{},b=(new Ext.Window(Ext.apply({hideBorders:!0,shadow:!1,closeAction:"hide", 1140autoHeight:!b.height,layout:b.height?"fit":void 0,items:[{defaults:Ext.applyIf({autoHeight:!b.height&&!(b.defaults&&b.defaults.height)},b.defaults)}]},b))).show().items.get(0));if(b)return a=b.add(a),a.on("removed",function(a){this.output.remove(a)},this,{single:!0}),a instanceof Ext.Window?a.show():b.doLayout(),this.output.push(a),a;a=this.ptype;window.console&&console.error("Failed to create output for plugin with ptype: "+a)}},removeOutput:function(){for(var a,b=this.output.length-1;0<=b;--b)if(a= 1141this.output[b],this.outputTarget)if(a.ownerCt){if(a.ownerCt.remove(a),a.ownerCt instanceof Ext.Window)a.ownerCt[a.ownerCt.closeAction]()}else a.remove();else a.findParentBy(function(a){return a instanceof Ext.Window}).close();this.output=[]},getState:function(){return Ext.apply({},this.initialConfig)}});Ext.preg(gxp.plugins.Tool.prototype.ptype,gxp.plugins.Tool);Ext.namespace("gxp.data"); 1142gxp.data.WFSProtocolProxy=Ext.extend(GeoExt.data.ProtocolProxy,{setFilter:function(a){this.protocol.filter=a;this.protocol.options.filter=a},constructor:function(a){Ext.applyIf(a,{version:"1.1.0"});if(!(this.protocol&&this.protocol instanceof OpenLayers.Protocol))a.protocol=new OpenLayers.Protocol.WFS(Ext.apply({version:a.version,srsName:a.srsName,url:a.url,featureType:a.featureType,featureNS:a.featureNS,geometryName:a.geometryName,schema:a.schema,filter:a.filter,maxFeatures:a.maxFeatures,multi:a.multi}, 1143a.protocol));gxp.data.WFSProtocolProxy.superclass.constructor.apply(this,arguments)},doRequest:function(a,b,c,d,e,f,g){delete c.xaction;if(a===Ext.data.Api.actions.read)this.load(c,d,e,f,g);else{b instanceof Array||(b=[b]);var h=Array(b.length),i;Ext.each(b,function(a,b){h[b]=a.getFeature();i=h[b];i.modified=Ext.apply(i.modified||{},{attributes:Ext.apply(i.modified&&i.modified.attributes||{},a.modified)})},this);var j={action:a,records:b,callback:e,scope:f},a={callback:function(a){this.onProtocolCommit(a, 1144j)},scope:this};Ext.applyIf(a,c);this.protocol.commit(h,a)}},onProtocolCommit:function(a,b){if(a.success()){var c=a.reqFeatures,d,e,f=[],g=a.insertIds||[],h,i,j=0;for(h=0,i=c.length;h<i;++h)if(e=c[h],d=e.state){if(d==OpenLayers.State.DELETE)f.push(e);else if(d==OpenLayers.State.INSERT)e.fid=g[j],++j;else if(e.modified)e.modified={};e.state=null}for(h=0,i=f.length;h<i;++h)e=f[h],e.layer&&e.layer.destroyFeatures([e]);i=c.length;d=Array(i);for(h=0;h<i;++h){e=c[h];d[h]={id:e.id,feature:e,state:null}; 1145var f=b.records[h].fields,k;for(k in e.attributes)f.containsKey(k)&&(d[h][k]=e.attributes[k])}b.callback.call(b.scope,d,a.priv,!0)}else c=a.priv,200<=c.status&&300>c.status?this.fireEvent("exception",this,"remote",b.action,b,a.error,b.records):this.fireEvent("exception",this,"response",b.action,b,c),b.callback.call(b.scope,[],c,!1)}});Ext.namespace("gxp.data"); 1146gxp.data.WFSFeatureStore=Ext.extend(GeoExt.data.FeatureStore,{setOgcFilter:function(a){this.proxy.setFilter(a)},constructor:function(a){if(!(a.proxy&&a.proxy instanceof GeoExt.data.ProtocolProxy))a.proxy=new gxp.data.WFSProtocolProxy(Ext.apply({srsName:a.srsName,url:a.url,featureType:a.featureType,featureNS:a.featureNS,geometryName:a.geometryName,schema:a.schema,filter:a.ogcFilter,maxFeatures:a.maxFeatures,multi:a.multi},a.proxy));if(!a.writer)a.writer=new Ext.data.DataWriter({write:Ext.emptyFn}); 1147gxp.data.WFSFeatureStore.superclass.constructor.apply(this,arguments);this.reader.extractValues=function(a){return this.readRecords([a.feature]).records[0].data}.createDelegate(this.reader);this.reader.meta.idProperty="id";this.reader.getId=function(a){return a.id}}});Ext.namespace("gxp.plugins"); 1148gxp.plugins.FeatureManager=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_featuremanager",maxFeatures:100,paging:!0,pagingType:null,autoZoomPage:!1,autoSetLayer:!0,autoLoadFeatures:!1,layerRecord:null,featureStore:null,hitCountProtocol:null,featureLayer:null,schema:null,geometryType:null,toolsShowingLayer:null,selectStyle:null,style:null,pages:null,page:null,numberOfFeatures:null,numPages:null,pageIndex:null,constructor:function(a){this.addEvents("beforequery","query","beforelayerchange","layerchange","beforesetpage", 1149"setpage","beforeclearfeatures","clearfeatures","beforesave","exception");if(a&&!a.pagingType)this.pagingType=gxp.plugins.FeatureManager.QUADTREE_PAGING;if(a&&a.layer)this.autoSetLayer=!1;gxp.plugins.FeatureManager.superclass.constructor.apply(this,arguments)},init:function(a){gxp.plugins.FeatureManager.superclass.init.apply(this,arguments);this.toolsShowingLayer={};this.style={all:new OpenLayers.Style(null,{rules:[new OpenLayers.Rule({symbolizer:this.initialConfig.symbolizer||{Point:{pointRadius:4, 1150graphicName:"square",fillColor:"white",fillOpacity:1,strokeWidth:1,strokeOpacity:1,strokeColor:"#333333"},Line:{strokeWidth:4,strokeOpacity:1,strokeColor:"#ff9933"},Polygon:{strokeWidth:2,strokeOpacity:1,strokeColor:"#ff6633",fillColor:"white",fillOpacity:0.3}}})]}),selected:new OpenLayers.Style(null,{rules:[new OpenLayers.Rule({symbolizer:{display:"none"}})]})};this.featureLayer=new OpenLayers.Layer.Vector(this.id,{displayInLayerSwitcher:!1,visibility:!1,styleMap:new OpenLayers.StyleMap({select:Ext.applyIf(Ext.apply({display:""}, 1151this.selectStyle),OpenLayers.Feature.Vector.style.select),vertex:this.style.all},{extendDefault:!1})});this.target.on({ready:function(){this.target.mapPanel.map.addLayer(this.featureLayer)},scope:this});this.on({beforedestroy:function(){this.target.mapPanel.map.removeLayer(this.featureLayer)},scope:this})},activate:function(){if(gxp.plugins.FeatureManager.superclass.activate.apply(this,arguments)){if(this.autoSetLayer)this.target.on("beforelayerselectionchange",this.setLayer,this);this.layer&&this.target.createLayerRecord(Ext.apply({}, 1152this.layer),this.setLayer,this);this.on("layerchange",this.setSchema,this);return!0}},deactivate:function(){if(gxp.plugins.FeatureManager.superclass.deactivate.apply(this,arguments))return this.autoSetLayer&&this.target.un("beforelayerselectionchange",this.setLayer,this),this.un("layerchange",this.setSchema,this),this.setLayer(),!0},getPageExtent:function(){return this.pagingType===gxp.plugins.FeatureManager.QUADTREE_PAGING?this.page.extent:this.featureStore.layer.getDataExtent()},setLayer:function(a){var b= 1153this.fireEvent("beforelayerchange",this,a);if(!1!==b){if(a)this.featureLayer.projection=a.getLayer().projection;if(a!==this.layerRecord)this.clearFeatureStore(),(this.layerRecord=a)?!0===this.autoLoadFeatures?this.loadFeatures():this.setFeatureStore():this.fireEvent("layerchange",this,null)}return b},setSchema:function(a,b,c){this.schema=c},showLayer:function(a,b){this.toolsShowingLayer[a]=b||"all";this.setLayerDisplay()},hideLayer:function(a){delete this.toolsShowingLayer[a];this.setLayerDisplay()}, 1154setLayerDisplay:function(){var a=this.visible(),b=this.target.mapPanel.map;a?(a=this.style[a],a!==this.featureLayer.styleMap.styles["default"]&&(this.featureLayer.styleMap.styles["default"]=a,this.featureLayer.redraw()),this.featureLayer.setVisibility(!0),b.events.on({addlayer:this.raiseLayer,scope:this})):this.featureLayer.map&&(this.featureLayer.setVisibility(!1),b.events.un({addlayer:this.raiseLayer,scope:this}))},visible:function(){var a=!1,b;for(b in this.toolsShowingLayer)"all"!=a&&(a=this.toolsShowingLayer[b]); 1155return a},raiseLayer:function(){var a=this.featureLayer&&this.featureLayer.map;a&&a.setLayerIndex(this.featureLayer,a.layers.length)},loadFeatures:function(a,b,c){if(!1!==this.fireEvent("beforequery",this,a,b,c)){this.filter=a;this.pages=null;if(b){var d=this;d._activeQuery&&d.un("query",d._activeQuery);this.on("query",d._activeQuery=function(a,f){delete d._activeQuery;this.un("query",arguments.callee,this);f.getCount();0==f.getCount()?b.call(c,[]):this.featureLayer.events.register("featuresadded", 1156this,function(a){this.featureLayer.events.unregister("featuresadded",this,arguments.callee);b.call(c,a.features)})},this,{single:!0})}this.featureStore?(this.featureStore.setOgcFilter(a),this.paging?this.setPage():this.featureStore.load()):(this.paging&&this.on("layerchange",function(a,b,c){c&&(this.un("layerchange",arguments.callee,this),this.setPage())},this),this.setFeatureStore(a,!this.paging))}},clearFeatures:function(){var a=this.featureStore;if(a&&!1!==this.fireEvent("beforeclearfeatures", 1157this))a.removeAll(),this.fireEvent("clearfeatures",this),a=a.proxy,a.abortRequest
1157(),a.protocol.response&&a.protocol.response.abort()},getProjection:function(a){var b=this.target.mapPanel.map.getProjectionObject();(a=a.getLayer().projection)&&a.equals(b)&&(b=a);return b},setFeatureStore:function(a,b){var c=this.layerRecord,d=this.target.getSource(c);d&&d instanceof gxp.plugins.WMSSource?d.getSchema(c,function(d){if(!1===d)this.clearFeatureStore();else{var f=[],g,h=/gml:((Multi)?(Point|Line|Polygon|Curve|Surface|Geometry)).*/, 1158i={"xsd:boolean":"boolean","xsd:int":"int","xsd:integer":"int","xsd:short":"int","xsd:long":"int","xsd:date":"date","xsd:string":"string","xsd:float":"float","xsd:double":"float"};d.each(function(a){var b=h.exec(a.get("type"));if(b)g=a.get("name"),this.geometryType=b[1];else{b=i[a.get("type")];a={name:a.get("name"),type:i[b]};if("date"==b)a.dateFormat="Y-m-d\\Z";f.push(a)}},this);var j={srsName:this.getProjection(c).getCode(),url:d.url,featureType:d.reader.raw.featureTypes[0].typeName,featureNS:d.reader.raw.targetNamespace, 1159geometryName:g};this.hitCountProtocol=new OpenLayers.Protocol.WFS(Ext.apply({version:"1.1.0",readOptions:{output:"object"},resultType:"hits",filter:a},j));this.featureStore=new gxp.data.WFSFeatureStore(Ext.apply({fields:f,proxy:{protocol:{outputFormat:this.format,multi:this.multi}},maxFeatures:this.maxFeatures,layer:this.featureLayer,ogcFilter:a,autoLoad:b,autoSave:!1,listeners:{beforewrite:function(a,b,c,d){this.fireEvent("beforesave",this,a,d.params)},write:function(){this.redrawMatchingLayers(c)}, 1160load:function(a){this.fireEvent("query",this,a,this.filter)},scope:this}},j))}this.fireEvent("layerchange",this,c,d)},this):(this.clearFeatureStore(),this.fireEvent("layerchange",this,c,!1))},redrawMatchingLayers:function(a){var b=a.get("name"),c=a.get("source");this.target.mapPanel.layers.each(function(a){a.get("source")===c&&a.get("name")===b&&a.getLayer().redraw(!0)})},clearFeatureStore:function(){if(this.featureStore)this.featureStore.removeAll(),this.featureStore.unbind(),this.featureStore.destroy(), 1161this.geometryType=this.featureStore=this.numberOfFeatures=null},processPage:function(a,b,c,d){var b=b||{},e=b.lonLat?null:b.index,f=b.next,g=this.pages,h=this.pages.indexOf(a);this.setPageFilter(a);var i=f?h==(g.indexOf(f)||g.length)-1:!0,j=b.lonLat?a.extent.containsLonLat(b.lonLat):!0;j&&a.numFeatures&&a.numFeatures<=this.maxFeatures?c.call(this,a):j&&(h==e||i)&&this.hitCountProtocol.read({callback:function(h){var i=e,j=b.lonLat;f&&(i=(g.indexOf(f)||g.length)-1);!i&&j&&a.extent.containsLonLat(j)&& 1162(i=g.indexOf(a));a.numFeatures=h.numberOfFeatures;this.page||(a.numFeatures>this.maxFeatures?this.createLeaf(a,Ext.applyIf({index:i,next:f},b),c,d):0==a.numFeatures&&1<g.length?(g.remove(a),!1===b.allowEmpty&&this.setPage({index:e%this.pages.length,allowEmpty:!1})):this.pages.indexOf(a)==i&&c.call(this,a))},scope:this})},createLeaf:function(a,b,c,d){b=b||{};this.layerRecord.getLayer();var e=this.pages.indexOf(a);this.pages.remove(a);for(var f=a.extent,g=f.getCenterLonLat(),a=[f.left,g.lon,f.left, 1163g.lon],h=[g.lat,g.lat,f.bottom,f.bottom],i=[g.lon,f.right,g.lon,f.right],f=[f.top,f.top,g.lat,g.lat],j,g=3;0<=g;--g)j={extent:new OpenLayers.Bounds(a[g],h[g],i[g],f[g])},this.pages.splice(e,0,j),this.processPage(j,b,c,d)},getPagingExtent:function(a){var b=this.layerRecord.getLayer(),c=this.getSpatialFilter();if((a=c?c.value:this.target.mapPanel.map[a]())&&b.maxExtent&&a.containsBounds(b.maxExtent))a=b.maxExtent;return a},getSpatialFilter:function(){var a;if(this.filter instanceof OpenLayers.Filter.Spatial&& 1164this.filter.type===OpenLayers.Filter.Spatial.BBOX)a=this.filter;else if(this.filter instanceof OpenLayers.Filter.Logical&&this.filter.type===OpenLayers.Filter.Logical.AND)for(var b,c=this.filter.filters.length-1;0<=c;--c)if(b=this.filter.filters[c],b instanceof OpenLayers.Filter.Spatial&&b.type===OpenLayers.Filter.Spatial.BBOX){a=b;break}return a},setPageFilter:function(a){a.extent?(a=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,property:this.featureStore.geometryName,value:a.extent}), 1165a=this.filter?new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.filter,a]}):a):a=this.filter;this.featureStore.setOgcFilter(a);this.hitCountProtocol.filter=a;return this.hitCountProtocol.options.filter=a},nextPage:function(a,b){var c;this.pagingType===gxp.plugins.FeatureManager.QUADTREE_PAGING?(c=this.page,this.page=null,c=(this.pages.indexOf(c)+1)%this.pages.length):c=this.pageIndex+1%this.numPages;this.setPage({index:c,allowEmpty:!1},a,b)},previousPage:function(a){var b; 1166this.pagingType===gxp.plugins.FeatureManager.QUADTREE_PAGING?(b=this.pages.indexOf(this.page)-1,0>b&&(b=this.pages.length-1)):(b=this.pageIndex-1,0>b&&(b=this.numPages-1));this.setPage({index:b,allowEmpty:!1,next:this.page},a)},setPage:function(a,b,c){if(this.pagingType===gxp.plugins.FeatureManager.QUADTREE_PAGING)if(this.filter instanceof OpenLayers.Filter.FeatureId)this.featureStore.load({callback:function(){b&&b.call(c)}});else{if(!1!==this.fireEvent("beforesetpage",this,a,b,c)){if(!a){var d=this.getPagingExtent("getExtent"), 1167d=new OpenLayers.LonLat(d.left,d.top),e=this.target.mapPanel.map.getMaxExtent();e.containsLonLat(d,!0)||(d=new OpenLayers.LonLat(e.left,e.top));a={lonLat:d,allowEmpty:!1}}a.index=a.index||0;if("last"==a.index)a.index=this.pages.length-1,a.next=this.pages[0];this.page=null;if(this.pages){if(a.lonLat)for(d=this.pages.length-1;0<=d;--d)if(this.pages[d].extent.containsLonLat(a.lonLat)){a.index=d;break}}else this.layerRecord.getLayer(),this.pages=[{extent:this.getPagingExtent("getMaxExtent")}],a.index= 11680;this.processPage(this.pages[a.index],a,function(d){var e=this.target.mapPanel.map;this.page=d;this.setPageFilter(d);this.autoZoomPage&&!e.getExtent().containsLonLat(d.extent.getCenterLonLat())&&e.zoomToExtent(d.extent);e=this.pages.indexOf(this.page);this.fireEvent("setpage",this,a,b,c,e,this.pages.length);this.featureStore.load({callback:function(){b&&b.call(c,d)}})},this)}}else if(!1!==this.fireEvent("beforesetpage",this,a,b,c))if(a){if(null!=a.index)this.pageIndex="last"===a.index?this.numPages- 11691:"first"===a.index?0:a.index,d=this.pageIndex*this.maxFeatures,this.fireEvent("setpage",this,a,b,c,this.pageIndex,this.numPages),this.featureStore.load({startIndex:d,callback:function(){b&&b.call(c)}})}
1169else this.hitCountProtocol.read({filter:this.filter,callback:function(d){this.numberOfFeatures=d.numberOfFeatures;this.numPages=Math.ceil(this.numberOfFeatures/this.maxFeatures);this.pageIndex=0;this.fireEvent("setpage",this,a,b,c,this.pageIndex,this.numPages);this.featureStore.load({output:"object", 1170callback:function(){b&&b.call(c)}})},scope:this})}});gxp.plugins.FeatureManager.QUADTREE_PAGING=0;gxp.plugins.FeatureManager.WFS_PAGING=1;Ext.preg(gxp.plugins.FeatureManager.prototype.ptype,gxp.plugins.FeatureManager); 1171OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{EVENTMAP:{click:{"in":"click",out:"clickout"},mousemove:{"in":"over",out:"out"},dblclick:{"in":"dblclick",out:null},mousedown:{"in":null,out:null},mouseup:{"in":null,out:null},touchstart:{"in":"click",out:"clickout"}},feature:null,lastFeature:null,down:null,up:null,clickTolerance:4,geometryTypes:null,stopClick:!0,stopDown:!0,stopUp:!1,initialize:function(a,b,c,d){OpenLayers.Handler.prototype.initialize.apply(this,[a,c,d]);this.layer= 1172b},touchstart:function(a){this.startTouch();return OpenLayers.Event.isMultiTouch(a)?!0:this.mousedown(a)},touchmove:function(a){OpenLayers.Event.preventDefault(a)},mousedown:function(a){if(OpenLayers.Event.isLeftClick(a)||OpenLayers.Event.isSingleTouch(a))this.down=a.xy;return this.handle(a)?!this.stopDown:!0},mouseup:function(a){this.up=a.xy;return this.handle(a)?!this.stopUp:!0},click:function(a){return this.handle(a)?!this.stopClick:!0},mousemove:function(a){if(!this.callbacks.over&&!this.callbacks.out)return!0; 1173this.handle(a);return!0},dblclick:function(a){return!this.handle(a)},geometryTypeMatches:function(a){return null==this.geometryTypes||-1<OpenLayers.Util.indexOf(this.geometryTypes,a.geometry.CLASS_NAME)},handle:function(a){if(this.feature&&!this.feature.layer)this.feature=null;var b=a.type,c=!1,d=!!this.feature,e="click"==b||"dblclick"==b||"touchstart"==b;if((this.feature=this.layer.getFeatureFromEvent(a))&&!this.feature.layer)this.feature=null;if(this.lastFeature&&!this.lastFeature.layer)this.lastFeature= 1174null;this.feature?("touchstart"===b&&OpenLayers.Event.preventDefault(a),a=this.feature!=this.lastFeature,this.geometryTypeMatches(this.feature)?(d&&a?(this.lastFeature&&this.triggerCallback(b,"out",[this.lastFeature]),this.triggerCallback(b,"in",[this.feature])):(!d||e)&&this.triggerCallback(b,"in",[this.feature]),this.lastFeature=this.feature,c=!0):(this.lastFeature&&(d&&a||e)&&this.triggerCallback(b,"out",[this.lastFeature]),this.feature=null)):this.lastFeature&&(d||e)&&this.triggerCallback(b,"out", 1175[this.lastFeature]);return c},triggerCallback:function(a,b,c){if(b=this.EVENTMAP[a][b])"click"==a&&this.up&&this.down?(Math.sqrt(Math.pow(this.up.x-this.down.x,2)+Math.pow(this.up.y-this.down.y,2))<=this.clickTolerance&&this.callback(b,c),this.up=this.down=null):this.callback(b,c)},activate:function(){var a=!1;OpenLayers.Handler.prototype.activate.apply(this,arguments)&&(this.moveLayerToTop(),this.map.events.on({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this}),a=!0); 1176return a},deactivate:function(){var a=!1;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments))this.moveLayerBack(),this.up=this.down=this.lastFeature=this.feature=null,this.map.events.un({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this}),a=!0;return a},handleMapEvents:function(a){("removelayer"==a.type||"order"==a.property)&&this.moveLayerToTop()},moveLayerToTop:function(){this.layer.setZIndex(Math.max(this.map.Z_INDEX_BASE.Feature-1,this.layer.getZIndex())+ 11771)},moveLayerBack:function(){var a=this.layer.getZIndex()-1;a>=this.map.Z_INDEX_BASE.Feature?this.layer.setZIndex(a):this.map.setLayerZIndex(this.layer,this.map.getLayerIndex(this.layer))},CLASS_NAME:"OpenLayers.Handler.Feature"}); 1178OpenLayers.Layer.Vector.RootContainer=OpenLayers.Class(OpenLayers.Layer.Vector,{displayInLayerSwitcher:!1,layers:null,display:function(){},getFeatureFromEvent:function(a){for(var b=this.layers,c,d=0;d<b.length;d++)if(c=b[d].getFeatureFromEvent(a))return c},setMap:function(a){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);this.collectRoots();a.events.register("changelayer",this,this.handleChangeLayer)},removeMap:function(a){a.events.unregister("changelayer",this,this.handleChangeLayer); 1179this.resetRoots();OpenLayers.Layer.Vector.prototype.removeMap.apply(this,arguments)},collectRoots:function(){for(var a,b=0;b<this.map.layers.length;++b)a=this.map.layers[b],-1!=OpenLayers.Util.indexOf(this.layers,a)&&a.renderer.moveRoot(this.renderer)},resetRoots:function(){for(var a,b=0;b<this.layers.length;++b)a=this.layers[b],this.renderer&&a.renderer.getRenderLayerId()==this.id&&this.renderer.moveRoot(a.renderer)},handleChangeLayer:function(a){var b=a.layer;"order"==a.property&&-1!=OpenLayers.Util.indexOf(this.layers, 1180b)&&(this.resetRoots(),this.collectRoots())},CLASS_NAME:"OpenLayers.Layer.Vector.RootContainer"}); 1181OpenLayers.Control.SelectFeature=OpenLayers.Class(OpenLayers.Control,{multipleKey:null,toggleKey:null,multiple:!1,clickout:!0,toggle:!1,hover:!1,highlightOnly:!1,box:!1,onBeforeSelect:function(){},onSelect:function(){},onUnselect:function(){},scope:null,geometryTypes:null,layer:null,layers:null,callbacks:null,selectStyle:null,renderIntent:"select",handlers:null,initialize:function(a,b){OpenLayers.Control.prototype.initialize.apply(this,[b]);if(null===this.scope)this.scope=this;this.initLayer(a);var c= 1182{click:this.clickFeature,clickout:this.clickoutFeature};if(this.hover)c.over=this.overFeature,c.out=this.outFeature;this.callbacks=OpenLayers.Util.extend(c,this.callbacks);this.handlers={feature:new OpenLayers.Handler.Feature(this,this.layer,this.callbacks,{geometryTypes:this.geometryTypes})};if(this.box)this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},{boxDivClassName:"olHandlerBoxSelectFeature"})},initLayer:function(a){OpenLayers.Util.isArray(a)?(this.layers=a,this.layer= 1183new OpenLayers.Layer.Vector.RootContainer(this.id+"_container",{layers:a})):this.layer=a},destroy:function(){this.active&&this.layers&&this.map.removeLayer(this.layer);OpenLayers.Control.prototype.destroy.apply(this,arguments);this.layers&&this.layer.destroy()},activate:function(){this.active||(this.layers&&this.map.addLayer(this.layer),this.handlers.feature.activate(),this.box&&this.handlers.box&&this.handlers.box.activate());return OpenLayers.Control.prototype.activate.apply(this,arguments)},deactivate:function(){this.active&& 1184(this.handlers.feature.deactivate(),this.handlers.box&&this.handlers.box.deactivate(),this.layers&&this.map.removeLayer(this.layer));return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},unselectAll:function(a){var b=this.layers||[this.layer],c,d,e,f;for(e=0;e<b.length;++e)if(c=b[e],f=0,null!=c.selectedFeatures)for(;c.selectedFeatures.length>f;)d=c.selectedFeatures[f],!a||a.except!=d?this.unselect(d):++f},clickFeature:function(a){this.hover||(-1<OpenLayers.Util.indexOf(a.layer.selectedFeatures, 1185a)?this.toggleSelect()?this.unselect(a):this.multipleSelect()||this.unselectAll({except:a}):(this.multipleSelect()||this.unselectAll({except:a}),this.select(a)))},multipleSelect:function(){return this.multiple||this.handlers.feature.evt&&this.handlers.feature.evt[this.multipleKey]},toggleSelect:function(){return this.toggle||this.handlers.feature.evt&&this.handlers.feature.evt[this.toggleKey]},clickoutFeature:function(){!this.hover&&this.clickout&&this.unselectAll()},overFeature:function(a){var b= 1186a.layer;this.hover&&(this.highlightOnly?this.highlight(a):-1==OpenLayers.Util.indexOf(b.selectedFeatures,a)&&this.select(a))}
1186,outFeature:function(a){if(this.hover)if(this.highlightOnly){if(a._lastHighlighter==this.id)if(a._prevHighlighter&&a._prevHighlighter!=this.id){delete a._lastHighlighter;var b=this.map.getControl(a._prevHighlighter);b&&b.highlight(a)}else this.unhighlight(a)}else this.unselect(a)},highlight:function(a){var b=a.layer;if(!1!==this.events.triggerEvent("beforefeaturehighlighted", 1187{feature:a}))a._prevHighlighter=a._lastHighlighter,a._lastHighlighter=this.id,b.drawFeature(a,this.selectStyle||this.renderIntent),this.events.triggerEvent("featurehighlighted",{feature:a})},unhighlight:function(a){var b=a.layer;if(void 0==a._prevHighlighter)delete a._lastHighlighter;else{if(a._prevHighlighter!=this.id)a._lastHighlighter=a._prevHighlighter;delete a._prevHighlighter}b.drawFeature(a,a.style||a.layer.style||"default");this.events.triggerEvent("featureunhighlighted",{feature:a})},select:function(a){var b= 1188this.onBeforeSelect.call(this.scope,a),c=a.layer;if(!1!==b&&(b=c.events.triggerEvent("beforefeatureselected",{feature:a}),!1!==b)){c.selectedFeatures.push(a);this.highlight(a);if(!this.handlers.feature.lastFeature)this.handlers.feature.lastFeature=c.selectedFeatures[0];c.events.triggerEvent("featureselected",{feature:a});this.onSelect.call(this.scope,a)}},unselect:function(a){var b=a.layer;this.unhighlight(a);OpenLayers.Util.removeItem(b.selectedFeatures,a);b.events.triggerEvent("featureunselected", 1189{feature:a});this.onUnselect.call(this.scope,a)},selectBox:function(a){if(a instanceof OpenLayers.Bounds){var b=this.map.getLonLatFromPixel({x:a.left,y:a.bottom}),a=this.map.getLonLatFromPixel({x:a.right,y:a.top}),b=new OpenLayers.Bounds(b.lon,b.lat,a.lon,a.lat);this.multipleSelect()||this.unselectAll();a=this.multiple;this.multiple=!0;var c=this.layers||[this.layer];this.events.triggerEvent("boxselectionstart",{layers:c});for(var d,e=0;e<c.length;++e){d=c[e];for(var f=0,g=d.features.length;f<g;++f){var h= 1190d.features[f];h.getVisibility()&&(null==this.geometryTypes||-1<OpenLayers.Util.indexOf(this.geometryTypes,h.geometry.CLASS_NAME))&&b.toGeometry().intersects(h.geometry)&&-1==OpenLayers.Util.indexOf(d.selectedFeatures,h)&&this.select(h)}}this.multiple=a;this.events.triggerEvent("boxselectionend",{layers:c})}},setMap:function(a){this.handlers.feature.setMap(a);this.box&&this.handlers.box.setMap(a);OpenLayers.Control.prototype.setMap.apply(this,arguments)},setLayer:function(a){var b=this.active;this.unselectAll(); 1191this.deactivate();if(this.layers)this.layer.destroy(),this.layers=null;this.initLayer(a);this.handlers.feature.layer=this.layer;b&&this.activate()},CLASS_NAME:"OpenLayers.Control.SelectFeature"}); 1192OpenLayers.Format.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Format.XML,{layerIdentifier:"_layer",featureIdentifier:"_feature",regExes:{trimSpace:/^\s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g},gmlFormat:null,read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=a.documentElement;if(b)var c=this["read_"+b.nodeName],a=c?c.call(this,b):(new OpenLayers.Format.GML(this.options?this.options:{})).read(a);return a},read_msGMLOutput:function(a){var b= 1193[];if(a=this.getSiblingNodesByTagCriteria(a,this.layerIdentifier))for(var c=0,d=a.length;c<d;++c){var e=a[c],f=e.nodeName;e.prefix&&(f=f.split(":")[1]);f=f.replace(this.layerIdentifier,"");if(e=this.getSiblingNodesByTagCriteria(e,this.featureIdentifier))for(var g=0;g<e.length;g++){var h=e[g],i=this.parseGeometry(h),h=this.parseAttributes(h),h=new OpenLayers.Feature.Vector(i.geometry,h,null);h.bounds=i.bounds;h.type=f;b.push(h)}}return b},read_FeatureInfoResponse:function(a){for(var b=[],a=this.getElementsByTagNameNS(a, 1194"*","FIELDS"),c=0,d=a.length;c<d;c++){var e=a[c],f={},g,h=e.attributes.length;if(0<h)for(g=0;g<h;g++){var i=e.attributes[g];f[i.nodeName]=i.nodeValue}else{e=e.childNodes;for(g=0,h=e.length;g<h;++g)i=e[g],3!=i.nodeType&&(f[i.getAttribute("name")]=i.getAttribute("value"))}b.push(new OpenLayers.Feature.Vector(null,f,null))}return b},getSiblingNodesByTagCriteria:function(a,b){var c=[],d,e,f,g;if(a&&a.hasChildNodes()){d=a.childNodes;f=d.length;for(var h=0;h<f;h++){for(g=d[h];g&&1!=g.nodeType;)g=g.nextSibling, 1195h++;e=g?g.nodeName:"";0<e.length&&-1<e.indexOf(b)?c.push(g):(e=this.getSiblingNodesByTagCriteria(g,b),0<e.length&&(0==c.length?c=e:c.push(e)))}}return c},parseAttributes:function(a){var b={};if(1==a.nodeType)for(var a=a.childNodes,c=a.length,d=0;d<c;++d){var e=a[d];if(1==e.nodeType){var f=e.childNodes,e=e.prefix?e.nodeName.split(":")[1]:e.nodeName;if(0==f.length)b[e]=null;else if(1==f.length&&(f=f[0],3==f.nodeType||4==f.nodeType))f=f.no
1195deValue.replace(this.regExes.trimSpace,""),b[e]=f}}return b}, 1196parseGeometry:function(a){if(!this.gmlFormat)this.gmlFormat=new OpenLayers.Format.GML;var a=this.gmlFormat.parseFeature(a),b,c=null;a&&(b=a.geometry&&a.geometry.clone(),c=a.bounds&&a.bounds.clone(),a.destroy());return{geometry:b,bounds:c}},CLASS_NAME:"OpenLayers.Format.WMSGetFeatureInfo"});Ext.namespace("gxp.plugins"); 1197gxp.plugins.ClickableFeatures=Ext.extend(gxp.plugins.Tool,{featureManager:null,autoLoadFeature:!1,autoLoadedFeature:null,toleranceParameters:["BUFFER","RADIUS"],constructor:function(a){if(a&&"autoLoadFeatures"in a)a.autoLoadFeature=a.autoLoadFeatures,delete a.autoLoadFeatures,window.console&&console.warn("Deprecated config option 'autoLoadFeatures' for ptype: '"+a.ptype+"'. Use 'autoLoadFeature' instead.");gxp.plugins.ClickableFeatures.superclass.constructor.apply(this,[a])},noFeatureClick:function(a){if(!this.selectControl)this.selectControl= 1198new OpenLayers.Control.SelectFeature(this.target.tools[this.featureManager].featureLayer,this.initialConfig.controlOptions);var b=this.target.mapPanel.map.getLonLatFromPixel(a.xy),c=this.target.tools[this.featureManager],d=c.page;if(!("all"==c.visible()&&c.paging&&d&&d.extent.containsLonLat(b))&&(b=c.layerRecord&&c.layerRecord.getLayer())){var e=this.target.mapPanel.map,d=e.getSize(),d=Ext.applyIf({REQUEST:"GetFeatureInfo",BBOX:e.getExtent().toBBOX(),WIDTH:d.w,HEIGHT:d.h,X:parseInt(a.xy.x),Y:parseInt(a.xy.y), 1199QUERY_LAYERS:b.params.LAYERS,INFO_FORMAT:"application/vnd.ogc.gml",EXCEPTIONS:"application/vnd.ogc.se_xml",FEATURE_COUNT:1},b.params);if("number"===typeof this.tolerance)for(var f=0,g=this.toleranceParameters.length;f<g;++f)d[this.toleranceParameters[f]]=this.tolerance;e=e.getProjectionObject();(f=b.projection)&&f.equals(e)&&(e=f);1.3<=parseFloat(b.params.VERSION)?d.CRS=e.getCode():d.SRS=e.getCode();new GeoExt.data.FeatureStore({fields:{},proxy:new GeoExt.data.ProtocolProxy({protocol:new OpenLayers.Protocol.HTTP({url:"string"=== 1200typeof b.url?b.url:b.url[0],params:d,format:new OpenLayers.Format.WMSGetFeatureInfo})}),autoLoad:!0,listeners:{load:function(b,d){if(0<d.length){var e=d[0].get("fid"),f=new OpenLayers.Filter.FeatureId({fids:[e]}),g=function(){c.loadFeatures(f,function(a){if(a.length)this.autoLoadedFeature=a[0],this.select(a[0])},this)}.createDelegate(this),m=c.featureLayer.getFeatureByFid(e);m?this.select(m):c.paging&&c.pagingType===gxp.plugins.FeatureManager.QUADTREE_PAGING?(m=this.target.mapPanel.map.getLonLatFromPixel(a.xy), 1201c.setPage({lonLat:m},function(){var a=c.featureLayer.getFeatureByFid(e);a?this.select(a):!0===this.autoLoadFeature&&g()},this)):g()}},scope:this}})}},select:function(a){this.selectControl.unselectAll();this.selectControl.select(a)}});Ext.namespace("gxp.plugins"); 1202gxp.plugins.SchemaAnnotations={getAnnotationsFromSchema:function(a){var b=null,a=a.get("annotation");if(void 0!==a){var b={},c=GeoExt.Lang.locale.split("-").shift(),d,e;for(d=0,e=a.appinfo.length;d<e;++d){var f=Ext.decode(a.appinfo[d]);if(f.title&&f.title[c]){b.label=f.title[c];break}}for(d=0,e=a.documentation.length;d<e;++d)if(a.documentation[d].lang===c){b.helpText=a.documentation[d].textContent;break}}return b}};Ext.namespace("gxp.plugins"); 1203gxp.plugins.FeatureEditorGrid=Ext.extend(Ext.grid.PropertyGrid,{ptype:"gxp_editorgrid",xtype:"gxp_editorgrid",feature:null,schema:null,fields:null,excludeFields:null,propertyNames:null,readOnly:null,border:!1,initComponent:function(){if(!this.dateFormat)this.dateFormat=Ext.form.DateField.prototype.format;if(!this.timeFormat)this.timeFormat=Ext.form.TimeField.prototype.format;this.customRenderers=this.customRenderers||{};this.customEditors=this.customEditors||{};var a=this.feature,b;if(this.fields){b= 1204{};for(var c=0,d=this.fields.length;c<d;++c)b[this.fields[c]]=a.attributes[this.fields[c]]}else b=a.attributes;if(!this.excludeFields)this.excludeFields=[];if(this.schema){var e=this.fields?this.fields.join(",").toUpperCase().split(","):[];this.schema.each(function(c){var d=c.get("type");if(!d.match(/^[^:]*:?((Multi)?(Point|Line|Polygon|Curve|Surface|Geometry))/)){var f=c.get("name");this.fields&&-1==e.indexOf(f.toUpperCase())&&this.excludeFields.push(f);var j=a.attributes[f],k=GeoExt.form.recordToField(c); 1205if((c=this.getAnnotationsFromSchema(c))&&c.label)this.propertyNames=this.propertyNames||{},this.propertyNames[f]=c.label;var l;if("string"==typeof j){var m;switch(d.split(":").pop()){case "date":m=this.dateFormat;k.editable=!1;break;case "dateTime":if(!m)m=this.dateFormat+" "+this.timeFormat,k.editable=!0;k.format=m;l={startedit:function(a,b){if(!(b instanceof Date)){var c=Date.parseDate(b.replace(/Z$/,""),"c");c&&this.setValue(c)}}};this.customRenderers[f]=function(){return function(a){var b=a;"string"== 1206typeof a&&(b=Date.parseDate(a.replace(/Z$/,""),"c"));return b?b.format(m):a}}();break;case "boolean":l={startedit:function(a,b){this.setValue(Boolean(b))}}}}this.customEditors[f]=new Ext.grid.GridEditor({field:Ext.create(k),listeners:l});b[f]=j}},this);a.attributes=b}this.source=b;var f=this.excludeFields.length?this.excludeFields.join(",").toUpperCase().split(","):[];
1206this.viewConfig={forceFit:!0,getRowClass:function(a){if(-1!==f.indexOf(a.get("name").toUpperCase()))return"x-hide-nosize"}};this.listeners= 1207{beforeedit:function(){return this.featureEditor&&this.featureEditor.editing},propertychange:function(){this.featureEditor&&this.featureEditor.setFeatureState(this.featureEditor.getDirtyState())},scope:this};c=Ext.data.Store.prototype.sort;Ext.data.Store.prototype.sort=function(){};gxp.plugins.FeatureEditorGrid.superclass.initComponent.apply(this,arguments);Ext.data.Store.prototype.sort=c;this.propStore.isEditableValue=function(){return!0}},init:function(a){this.featureEditor=a;this.featureEditor.on("canceledit", 1208this.onCancelEdit,this);this.featureEditor.add(this);this.featureEditor.doLayout()},destroy:function(){if(this.featureEditor)this.featureEditor.un("canceledit",this.onCancelEdit,this),this.featureEditor=null;gxp.plugins.FeatureEditorGrid.superclass.destroy.call(this)},onCancelEdit:function(a,b){b&&this.setSource(b.attributes)}});Ext.override(gxp.plugins.FeatureEditorGrid,gxp.plugins.SchemaAnnotations);Ext.preg(gxp.plugins.FeatureEditorGrid.prototype.ptype,gxp.plugins.FeatureEditorGrid); 1209Ext.reg(gxp.plugins.FeatureEditorGrid.prototype.xtype,gxp.plugins.FeatureEditorGrid); 1210OpenLayers.Handler.Keyboard=OpenLayers.Class(OpenLayers.Handler,{KEY_EVENTS:["keydown","keyup"],eventListener:null,observeElement:null,initialize:function(a,b,c){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.eventListener=OpenLayers.Function.bindAsEventListener(this.handleKeyEvent,this)},destroy:function(){this.deactivate();this.eventListener=null;OpenLayers.Handler.prototype.destroy.apply(this,arguments)},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this, 1211arguments)){this.observeElement=this.observeElement||document;for(var a=0,b=this.KEY_EVENTS.length;a<b;a++)OpenLayers.Event.observe(this.observeElement,this.KEY_EVENTS[a],this.eventListener);return!0}return!1},deactivate:function(){var a=!1;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var a=0,b=this.KEY_EVENTS.length;a<b;a++)OpenLayers.Event.stopObserving(this.observeElement,this.KEY_EVENTS[a],this.eventListener);a=!0}return a},handleKeyEvent:function(a){this.checkModifiers(a)&& 1212this.callback(a.type,[a])},CLASS_NAME:"OpenLayers.Handler.Keyboard"}); 1213OpenLayers.Control.ModifyFeature=OpenLayers.Class(OpenLayers.Control,{documentDrag:!1,geometryTypes:null,clickout:!0,toggle:!0,standalone:!1,layer:null,feature:null,vertex:null,vertices:null,virtualVertices:null,handlers:null,deleteCodes:null,virtualStyle:null,vertexRenderIntent:null,mode:null,createVertices:!0,modified:!1,radiusHandle:null,dragHandle:null,onModificationStart:function(){},onModification:function(){},onModificationEnd:function(){},initialize:function(a,b){b=b||{};this.layer=a;this.vertices= 1214[];this.virtualVertices=[];this.virtualStyle=OpenLayers.Util.extend({},this.layer.style||this.layer.styleMap.createSymbolizer(null,b.vertexRenderIntent));this.virtualStyle.fillOpacity=0.3;this.virtualStyle.strokeOpacity=0.3;this.deleteCodes=[46,68];this.mode=OpenLayers.Control.ModifyFeature.RESHAPE;OpenLayers.Control.prototype.initialize.apply(this,[b]);if(!OpenLayers.Util.isArray(this.deleteCodes))this.deleteCodes=[this.deleteCodes];var c={documentDrag:this.documentDrag,stopDown:!1};this.handlers= 1215{keyboard:new OpenLayers.Handler.Keyboard(this,{keydown:this.handleKeypress}),drag:new OpenLayers.Handler.Drag(this,{down:function(){this.vertex=null;var a=this.layer.getFeatureFromEvent(this.handlers.drag.evt);if(a)this.dragStart(a);else if(this.clickout)this._unselect=this.feature},move:function(a){delete this._unselect;this.vertex&&this.dragVertex(this.vertex,a)},up:function(){this.handlers.drag.stopDown=!1;this._unselect&&(this.unselectFeature(this._unselect),delete this._unselect)},done:function(){this.vertex&& 1216this.dragComplete(this.vertex)}},c)}},destroy:function(){this.map&&this.map.events.un({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this});this.layer=null;OpenLayers.Control.prototype.destroy.apply(this,[])},activate:function(){return OpenLayers.Control.prototype.activate.apply(this,arguments)?(this.moveLayerToTop(),this.map.events.on({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this}),this.handlers.keyboard.activate()&&this.handlers.drag.activate()): 1217!1},deactivate:function(){var a=!1;if(OpenLayers.Control.prototype.deactivate.apply(this,arguments))this.moveLayerBack(),this.map.events.un({removelayer:this.handleMapEvents,changelayer:this.handleMapEvents,scope:this}),this.layer.removeFeatures(this.vertices,{silent:!0}),this.layer.removeFeatures(this.virtualVertices,{silent:!0}),this.vertices=[],this.handlers.drag.deactivate(),this.handlers.keyboard.deactivate(),(a=this.feature)&&a.geometry&&a.layer&&this.unselectFeature
1217(a),a=!0;return a},beforeSelectFeature:function(a){return this.layer.events.triggerEvent("beforefeaturemodified", 1218{feature:a})},selectFeature:function(a){if(!(this.feature===a||this.geometryTypes&&-1==OpenLayers.Util.indexOf(this.geometryTypes,a.geometry.CLASS_NAME))){if(!1!==this.beforeSelectFeature(a))this.feature&&this.unselectFeature(this.feature),this.feature=a,this.layer.selectedFeatures.push(a),this.layer.drawFeature(a,"select"),this.modified=!1,this.resetVertices(),this.onModificationStart(this.feature);var b=a.modified;if(a.geometry&&(!b||!b.geometry))this._originalGeometry=a.geometry.clone()}},unselectFeature:function(a){this.layer.removeFeatures(this.vertices, 1219{silent:!0});this.vertices=[];this.layer.destroyFeatures(this.virtualVertices,{silent:!0});this.virtualVertices=[];this.dragHandle&&(this.layer.destroyFeatures([this.dragHandle],{silent:!0}),delete this.dragHandle);this.radiusHandle&&(this.layer.destroyFeatures([this.radiusHandle],{silent:!0}),delete this.radiusHandle);this.layer.drawFeature(this.feature,"default");this.feature=null;OpenLayers.Util.removeItem(this.layer.selectedFeatures,a);this.onModificationEnd(a);this.layer.events.triggerEvent("afterfeaturemodified", 1220{feature:a,modified:this.modified});this.modified=!1},dragStart:function(a){var b="OpenLayers.Geometry.Point"==a.geometry.CLASS_NAME;if(!this.standalone&&(!a._sketch&&b||!a._sketch)){if(this.toggle&&this.feature===a)this._unselect=a;this.selectFeature(a)}if(a._sketch||b)this.vertex=a,this.handlers.drag.stopDown=!0},dragVertex:function(a,b){var c=this.map.getLonLatFromViewPortPx(b),d=a.geometry;d.move(c.lon-d.x,c.lat-d.y);this.modified=!0;if("OpenLayers.Geometry.Point"==this.feature.geometry.CLASS_NAME)this.layer.events.triggerEvent("vertexmodified", 1221{vertex:a.geometry,feature:this.feature,pixel:b});else{if(a._index)a.geometry.parent.addComponent(a.geometry,a._index),delete a._index,OpenLayers.Util.removeItem(this.virtualVertices,a),this.vertices.push(a);else if(a==this.dragHandle){if(this.layer.removeFeatures(this.vertices,{silent:!0}),this.vertices=[],this.radiusHandle)this.layer.destroyFeatures([this.radiusHandle],{silent:!0}),this.radiusHandle=null}else a!==this.radiusHandle&&this.layer.events.triggerEvent("vertexmodified",{vertex:a.geometry, 1222feature:this.feature,pixel:b});if(0<this.virtualVertices.length)this.layer.destroyFeatures(this.virtualVertices,{silent:!0}),this.virtualVertices=[];this.layer.drawFeature(this.feature,this.standalone?void 0:"select")}this.layer.drawFeature(a)},dragComplete:function(){this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature})},setFeatureState:function(){if(this.feature.state!=OpenLayers.State.INSERT&&this.feature.state!= 1223OpenLayers.State.DELETE&&(this.feature.state=OpenLayers.State.UPDATE,this.modified&&this._originalGeometry)){var a=this.feature;a.modified=OpenLayers.Util.extend(a.modified,{geometry:this._originalGeometry});delete this._originalGeometry}},resetVertices:function(){if(0<this.vertices.length)this.layer.removeFeatures(this.vertices,{silent:!0}),this.vertices=[];if(0<this.virtualVertices.length)this.layer.removeFeatures(this.virtualVertices,{silent:!0}),this.virtualVertices=[];if(this.dragHandle)this.layer.destroyFeatures([this.dragHandle], 1224{silent:!0}),this.dragHandle=null;if(this.radiusHandle)this.layer.destroyFeatures([this.radiusHandle],{silent:!0}),this.radiusHandle=null;this.feature&&"OpenLayers.Geometry.Point"!=this.feature.geometry.CLASS_NAME&&(this.mode&OpenLayers.Control.ModifyFeature.DRAG&&this.collectDragHandle(),this.mode&(OpenLayers.Control.ModifyFeature.ROTATE|OpenLayers.Control.ModifyFeature.RESIZE)&&this.collectRadiusHandle(),this.mode&OpenLayers.Control.ModifyFeature.RESHAPE&&(this.mode&OpenLayers.Control.ModifyFeature.RESIZE|| 1225this.collectVertices()))},handleKeypress:function(a){var b=a.keyCode;if(this.feature&&-1!=OpenLayers.Util.indexOf(this.deleteCodes,b)&&(b=this.layer.getFeatureFromEvent(this.handlers.drag.evt))&&-1!=OpenLayers.Util.indexOf(this.vertices,b)&&!this.handlers.drag.dragging&&b.geometry.parent)b.geometry.parent.removeComponent(b.geometry),this.layer.events.triggerEvent("vertexremoved",{vertex:b.geometry,feature:this.feature,pixel:a.xy}),this.layer.drawFeature(this.feature,this.standalone?void 0:"select"), 1226this.modified=!0,this.resetVertices(),this.setFeatureState(),this.onModification(this.feature),this.layer.events.triggerEvent("featuremodified",{feature:this.feature})},collectVertices:function(){function a(c){var d,e,f;if("OpenLayers.Geometry.Point"==c.CLASS_NAME)e=new OpenLayers.Feature.Vector(c),e._sketch=!0,e.renderIntent=b.vertexRenderIntent,b.vertices.push(e);else{f=c.components.length;"OpenLayers.Geometry.LinearRing"==c.CLASS_NAME&&(f-=1);for(d=0;d<f;++d)e=c.components[d],"OpenLayers.Geometry.Point"== 1227e.CLASS_NAME?(e=new OpenLayers.Feature.Vector(e),e._sketch=!0,e.renderIntent=b.vertexRenderIntent,b.vertices.push(e)):a(e);if(b.createVertices&&"OpenLayers.Geometry.MultiPoint"!=c.CLASS_NAME)for(d=0,f=c.components.length;d<f-1;++d){e=c.components[d];var g=c.components[d+1];if("OpenLayers.Geometry.Point"==e.CLASS_NAME&&"OpenLayers.Geometry.Point"==g.CLASS_NAME)e=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point((e.x+g.x)/2,(e.y+g.y)/2),null,b.virtualStyle),e.geometry.parent=c,e._index=d+ 12281,e._sketch=!0,b.virtualVertices.push(e)}}}this.vertices=[];this.virtualVertices=[];var b=this;a.call(this,this.feature.geometry);this.layer.addFeatures(this.virtualVertices,{silent:!0});this.layer.addFeatures(this.vertices,{silent:!0})},collectDragHandle:function(){var a=this.feature.geometry,b=a.getBounds().getCenterLonLat(),b=new OpenLayers.Geometry.Point(b.lon,b.lat),c=new OpenLayers.Feature.Vector(b);b.move=function(b,c){OpenLayers.Geometry.Point.prototype.move.call(this,b,c);a.move(b,c)};c._sketch= 1229!0;this.dragHandle=c;this.dragHandle.renderIntent=this.vertexRenderIntent;this.layer.addFeatures([this.dragHandle],{silent:!0})},collectRadiusHandle:function(){var a=this.feature.geometry,b=a.getBounds(),c=b.getCenterLonLat(),d=new OpenLayers.Geometry.Point(c.lon,c.lat),b=new OpenLayers.Geometry.Point(b.right,b.bottom),c=new OpenLayers.Feature.Vector(b),e=this.mode&OpenLayers.Control.ModifyFeature.RESIZE,f=this.mode&OpenLayers.Control.ModifyFeature.RESHAPE,g=this.mode&OpenLayers.Control.ModifyFeature.ROTATE; 1230b.move=function(b,c){OpenLayers.Geometry.Point.prototype.move.call(this,b,c);var j=this.x-d.x,k=this.y-d.y,l=j-b,m=k-c;if(g){var n=Math.atan2(m,l),n=Math.atan2(k,j)-n,n=n*(180/Math.PI);a.rotate(n,d)}if(e){var o;f?(k/=m,o=j/l/k):(l=Math.sqrt(l*l+m*m),k=Math.sqrt(j*j+k*k)/l);a.resize(k,d,o)}};c._sketch=!0;this.radiusHandle=c;this.radiusHandle.renderIntent=this.vertexRenderIntent;this.layer.addFeatures([this.radiusHandle],{silent:!0})},setMap:function(a){this.handlers.drag.setMap(a);OpenLayers.Control.prototype.setMap.apply(this, 1231arguments)},handleMapEvents:function(a){("removelayer"==a.type||"order"==a.property)&&this.moveLayerToTop()},moveLayerToTop:function(){this.layer.setZIndex(Math.max(this.map.Z_INDEX_BASE.Feature-1,this.layer.getZIndex())+1)},moveLayerBack:function(){var a=this.layer.getZIndex()-1;a>=this.map.Z_INDEX_BASE.Feature?this.layer.setZIndex(a):this.map.set
1231LayerZIndex(this.layer,this.map.getLayerIndex(this.layer))},CLASS_NAME:"OpenLayers.Control.ModifyFeature"});OpenLayers.Control.ModifyFeature.RESHAPE=1; 1232OpenLayers.Control.ModifyFeature.RESIZE=2;OpenLayers.Control.ModifyFeature.ROTATE=4;OpenLayers.Control.ModifyFeature.DRAG=8;Ext.namespace("gxp"); 1233gxp.FeatureEditPopup=Ext.extend(GeoExt.Popup,{closeMsgTitle:"Save Changes?",closeMsg:"This feature has unsaved changes. Would you like to save your changes?",deleteMsgTitle:"Delete Feature?",deleteMsg:"Are you sure you want to delete this feature?",editButtonText:"Edit",editButtonTooltip:"Make this feature editable",deleteButtonText:"Delete",deleteButtonTooltip:"Delete this feature",cancelButtonText:"Cancel",cancelButtonTooltip:"Stop editing, discard changes",saveButtonText:"Save",saveButtonTooltip:"Save changes", 1234layout:"fit",feature:null,schema:null,readOnly:!1,allowDelete:!1,editing:!1,editorPluginConfig:{ptype:"gxp_editorgrid"},modifyControl:null,geometry:null,attributes:null,cancelButton:null,saveButton:null,editButton:null,deleteButton:null,initComponent:function(){var b;this.addEvents("startedit","stopedit","beforefeaturemodified","featuremodified","canceledit","cancelclose");var a=this.feature;if(a instanceof GeoExt.data.FeatureRecord)b=this.feature=a.getFeature(),a=b;if(!this.location)this.location= 1235a;this.anchored=!this.editing;if(!this.title&&a.fid)this.title=a.fid;this.editButton=new Ext.Button({text:this.editButtonText,tooltip:this.editButtonTooltip,iconCls:"edit",handler:this.startEditing,scope:this});this.deleteButton=new Ext.Button({text:this.deleteButtonText,tooltip:this.deleteButtonTooltip,iconCls:"delete",hidden:!this.allowDelete,handler:this.deleteFeature,scope:this});this.cancelButton=new Ext.Button({text:this.cancelButtonText,tooltip:this.cancelButtonTooltip,iconCls:"cancel",hidden:!0, 1236handler:function(){this.stopEditing(!1)},scope:this});this.saveButton=new Ext.Button({text:this.saveButtonText,tooltip:this.saveButtonTooltip,iconCls:"save",hidden:!0,handler:function(){this.stopEditing(!0)},scope:this});this.plugins=[Ext.apply({feature:a,schema:this.schema,fields:this.fields,excludeFields:this.excludeFields,propertyNames:this.propertyNames,readOnly:this.readOnly},this.editorPluginConfig)];this.bbar=new Ext.Toolbar({hidden:this.readOnly,items:[this.editButton,this.deleteButton,this.saveButton, 1237this.cancelButton]});gxp.FeatureEditPopup.superclass.initComponent.call(this);this.on({show:function(){if(this.editing)this.editing=null,this.startEditing()},beforeclose:function(){if(this.editing){if(this.feature.state===this.getDirtyState())return Ext.Msg.show({title:this.closeMsgTitle,msg:this.closeMsg,buttons:Ext.Msg.YESNOCANCEL,fn:function(a){a&&"cancel"!==a?(this.stopEditing("yes"===a),this.close()):this.fireEvent("cancelclose",this)},scope:this,icon:Ext.MessageBox.QUESTION,animEl:this.getEl()}), 1238!1;this.stopEditing(!1)}},scope:this})},getDirtyState:function(){return this.feature.state===OpenLayers.State.INSERT?this.feature.state:OpenLayers.State.UPDATE},startEditing:function(){if(!this.editing)this.fireEvent("startedit",this),this.editing=!0,this.anc&&this.unanchorPopup(),this.editButton.hide(),this.deleteButton.hide(),this.saveButton.show(),this.cancelButton.show(),this.geometry=this.feature.geometry&&this.feature.geometry.clone(),this.attributes=Ext.apply({},this.feature.attributes),this.modifyControl= 1239new OpenLayers.Control.ModifyFeature(this.feature.layer,{standalone:!0,vertexRenderIntent:this.vertexRenderIntent}),this.feature.layer.map.addControl(this.modifyControl),this.modifyControl.activate(),this.feature.geometry&&this.modifyControl.selectFeature(this.feature)},stopEditing:function(a){if(this.editing){this.fireEvent("stopedit",this);this.modifyControl.deactivate();this.modifyControl.destroy();var b=this.feature;if(b.state===this.getDirtyState())if(!0===a){this.fireEvent("beforefeaturemodified", 1240this,b);if(this.schema){var c,d;for(d in b.attributes)c=this.schema.getAt(this.schema.findExact("name",d)),a=b.attributes[d],a instanceof Date&&(c=c.get("type").split(":").pop(),b.attributes[d]=a.format("date"==c?"Y-m-d":"c"))}this.fireEvent("featuremodified",this,b)}else b.state===OpenLayers.State.INSERT?(this.editing=!1,b.layer&&b.layer.destroyFeatures([b]),this.fireEvent("canceledit",this,null),this.close()):(d=b.layer,d.drawFeature(b,{display:"none"}),b.geometry=this.geometry,b.attributes=this.attributes, 1241this.setFeatureState(null),d.drawFeature(b),this.fireEvent("canceledit",this,b));this.isDestroyed||(this.cancelButton.hide(),this.saveButton.hide(),this.editButton.show(),this.allowDelete&&this.deleteButton.show());this.editing=!1}},deleteFeature:function(){Ext.Msg.show({title:this.deleteMsgTitle,msg:this.deleteMsg,buttons:Ext.Msg.YESNO,fn:function(a){"yes"===a&&(this.setFeatureState(OpenLayers.State.DELETE),this.fireEvent("featuremodified",this,this.feature),this.close())},scope:this,icon:Ext.MessageBox.QUESTION, 1242animEl:this.getEl()})},setFeatureState:function(a){this.feature.state=a;(a=this.feature.layer)&&a.events.triggerEvent("featuremodified",{feature:this.feature})}});Ext.reg("gxp_featureeditpopup",gxp.FeatureEditPopup); 1243OpenLayers.Control.DrawFeature=OpenLayers.Class(OpenLayers.Control,{layer:null,callbacks:null,multi:!1,featureAdded:function(){},initialize:function(a,b,c){OpenLayers.Control.prototype.initialize.apply(this,[c]);this.callbacks=OpenLayers.Util.extend({done:this.drawFeature,modify:function(a,b){this.layer.events.triggerEvent("sketchmodified",{vertex:a,feature:b})},create:function(a,b){this.layer.events.triggerEvent("sketchstarted",{vertex:a,feature:b})}},this.callbacks);this.layer=a;this.handlerOptions= 1244this.handlerOptions||{};this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{renderers:a.renderers,rendererOptions:a.rendererOptions});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, 1245this.handlerOptions)},drawFeature:function(a){a=new OpenLayers.Feature.Vector(a);if(!1!==this.layer.events.triggerEvent("sketchcomplete",{feature:a}))a.state=OpenLayers.State.INSERT,this.layer.addFeatures([a]),this.featureAdded(a),this.events.triggerEvent("featureadded",{feature:a})},insertXY:function(a,b){this.handler&&this.handler.line&&this.handler.insertXY(a,b)},insertDeltaXY:function(a,b){this.handler&&this.handler.line&&this.handler.insertDeltaXY(a,b)},insertDirectionLength:function(a,b){this.handler&& 1246this.handler.line&&this.handler.insertDirectionLength(a,b)},insertDeflectionLength:function(a,b){this.handler&&this.handler.line&&this.handler.insertDeflectionLength(a,b)},undo:function(){return this.handler.undo&&this.handler.undo()},redo:function(){return this.handler.redo&&this.handler.redo()},finishSketch:function(){this.handler.finishGeometry()},cancel:function(){this.handler.cancel()},CLASS_NAME:"OpenLayers.Control.DrawFeature"}); 1247OpenLayers.Handler.Point=OpenLayers.Class(OpenLayers.Handler,{point:null,layer:null,multi:!1,citeCompliant:!1,mouseDown:!1,stoppedDown:null,lastDown:null,lastUp:null,persist:!1,stopDown:!1,stopUp:!1,layerOptions:null,pixelTolerance:5,lastTouchPx:null,initialize:function(a,b,c){if(!c||!c.layerOptions||!c.layerOptions.styleMap)this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style["default"],{});OpenLayers.Handler.prototype.initialize.apply(this,arguments)},activate:function(){if(!OpenLayers.Handler.prototype.activate.apply(this, 1248arguments))return!1;var a=OpenLayers.Util.extend({displayInLayerSwitcher:!1,calculateInRange:OpenLayers.Function.True,wrapDateLine:this.citeCompliant},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,a);this.map.addLayer(this.layer);return!0}
1248,createFeature:function(a){a=this.layer.getLonLatFromViewPortPx(a);a=new OpenLayers.Geometry.Point(a.lon,a.lat);this.point=new OpenLayers.Feature.Vector(a);this.callback("create",[this.point.geometry,this.point]);this.point.geometry.clearBounds(); 1249this.layer.addFeatures([this.point],{silent:!0})},deactivate:function(){if(!OpenLayers.Handler.prototype.deactivate.apply(this,arguments))return!1;this.cancel();null!=this.layer.map&&(this.destroyFeature(!0),this.layer.destroy(!1));this.layer=null;return!0},destroyFeature:function(a){this.layer&&(a||!this.persist)&&this.layer.destroyFeatures();this.point=null},destroyPersistedFeature:function(){var a=this.layer;a&&1<a.features.length&&this.layer.features[0].destroy()},finalize:function(a){this.mouseDown= 1250!1;this.lastTouchPx=this.lastUp=this.lastDown=null;this.callback(a?"cancel":"done",[this.geometryClone()]);this.destroyFeature(a)},cancel:function(){this.finalize(!0)},click:function(a){OpenLayers.Event.stop(a);return!1},dblclick:function(a){OpenLayers.Event.stop(a);return!1},modifyFeature:function(a){this.point||this.createFeature(a);a=this.layer.getLonLatFromViewPortPx(a);this.point.geometry.x=a.lon;this.point.geometry.y=a.lat;this.callback("modify",[this.point.geometry,this.point,!1]);this.point.geometry.clearBounds(); 1251this.drawFeature()},drawFeature:function(){this.layer.drawFeature(this.point,this.style)},getGeometry:function(){var a=this.point&&this.point.geometry;a&&this.multi&&(a=new OpenLayers.Geometry.MultiPoint([a]));return a},geometryClone:function(){var a=this.getGeometry();return a&&a.clone()},mousedown:function(a){return this.down(a)},touchstart:function(a){this.startTouch();this.lastTouchPx=a.xy;return this.down(a)},mousemove:function(a){return this.move(a)},touchmove:function(a){this.lastTouchPx=a.xy; 1252return this.move(a)},mouseup:function(a){return this.up(a)},touchend:function(a){a.xy=this.lastTouchPx;return this.up(a)},down:function(a){this.mouseDown=!0;this.lastDown=a.xy;this.touch||this.modifyFeature(a.xy);this.stoppedDown=this.stopDown;return!this.stopDown},move:function(a){!this.touch&&(!this.mouseDown||this.stoppedDown)&&this.modifyFeature(a.xy);return!0},up:function(a){this.mouseDown=!1;this.stoppedDown=this.stopDown;return this.checkModifiers(a)&&(!this.lastUp||!this.lastUp.equals(a.xy))&& 1253this.lastDown&&this.passesTolerance(this.lastDown,a.xy,this.pixelTolerance)?(this.touch&&this.modifyFeature(a.xy),this.persist&&this.destroyPersistedFeature(),this.lastUp=a.xy,this.finalize(),!this.stopUp):!0},mouseout:function(a){if(OpenLayers.Util.mouseLeft(a,this.map.viewPortDiv))this.stoppedDown=this.stopDown,this.mouseDown=!1},passesTolerance:function(a,b,c){var d=!0;null!=c&&a&&b&&a.distanceTo(b)>c&&(d=!1);return d},CLASS_NAME:"OpenLayers.Handler.Point"}); 1254OpenLayers.Handler.Path=OpenLayers.Class(OpenLayers.Handler.Point,{line:null,maxVertices:null,doubleTouchTolerance:20,freehand:!1,freehandToggle:"shiftKey",timerId:null,redoStack:null,createFeature:function(a){a=this.layer.getLonLatFromViewPortPx(a);a=new OpenLayers.Geometry.Point(a.lon,a.lat);this.point=new OpenLayers.Feature.Vector(a);this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([this.point.geometry]));this.callback("create",[this.point.geometry,this.getSketch()]); 1255this.point.geometry.clearBounds();this.layer.addFeatures([this.line,this.point],{silent:!0})},destroyFeature:function(a){OpenLayers.Handler.Point.prototype.destroyFeature.call(this,a);this.line=null},destroyPersistedFeature:function(){var a=this.layer;a&&2<a.features.length&&this.layer.features[0].destroy()},removePoint:function(){this.point&&this.layer.removeFeatures([this.point])},addPoint:function(a){this.layer.removeFeatures([this.point]);a=this.layer.getLonLatFromViewPortPx(a);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(a.lon, 1256a.lat));this.line.geometry.addComponent(this.point.geometry,this.line.geometry.components.length);this.layer.addFeatures([this.point]);this.callback("point",[this.point.geometry,this.getGeometry()]);this.callback("modify",[this.point.geometry,this.getSketch()]);this.drawFeature();delete this.redoStack},insertXY:function(a,b){this.line.geometry.addComponent(new OpenLayers.Geometry.Point(a,b),this.getCurrentPointIndex());this.drawFeature();delete this.redoStack},insertDeltaXY:function(a,b){var c=this.line.geometry.components[this.getCurrentPointIndex()- 12571];c&&!isNaN(c.x)&&!isNaN(c.y)&&this.insertXY(c.x+a,c.y+b)},insertDirectionLength:function(a,b){var a=a*(Math.PI/180),c=b*Math.cos(a),d=b*Math.sin(a);this.insertDeltaXY(c,d)},insertDeflectionLength:function(a,b){var c=this.getCurrentPointIndex()-1;if(0<c){var d=this.line.geometry.components[c],c=this.line.geometry.components[c-1];this.insertDirectionLength(180*Math.atan2(d.y-c.y,d.x-c.x)/Math.PI+a,b)}},getCurrentPointIndex:function(){return this.line.geometry.components.length-1},undo:function(){var a= 1258this.line.geometry,b=a.components,c=this.getCurrentPointIndex()-1,d=b[c],e=a.removeComponent(d);if(e){if(this.touch&&0<c)b=a.components,a=b[c-1],c=this.getCurrentPointIndex(),b=b[c],b.x=a.x,b.y=a.y;if(!this.redoStack)this.redoStack=[];this.redoStack.push(d);this.drawFeature()}return e},redo:function(){var a=this.redoStack&&this.redoStack.pop();a&&(this.line.geometry.addComponent(a,this.getCurrentPointIndex()),this.drawFeature());return!!a},freehandMode:function(a){return this.freehandToggle&&a[this.freehandToggle]? 1259!this.freehand:this.freehand}
1259,modifyFeature:function(a,b){this.line||this.createFeature(a);var c=this.layer.getLonLatFromViewPortPx(a);this.point.geometry.x=c.lon;this.point.geometry.y=c.lat;this.callback("modify",[this.point.geometry,this.getSketch(),b]);this.point.geometry.clearBounds();this.drawFeature()},drawFeature:function(){this.layer.drawFeature(this.line,this.style);this.layer.drawFeature(this.point,this.style)},getSketch:function(){return this.line},getGeometry:function(){var a=this.line&& 1260this.line.geometry;a&&this.multi&&(a=new OpenLayers.Geometry.MultiLineString([a]));return a},touchstart:function(a){if(this.timerId&&this.passesTolerance(this.lastTouchPx,a.xy,this.doubleTouchTolerance))return this.finishGeometry(),window.clearTimeout(this.timerId),this.timerId=null,!1;if(this.timerId)window.clearTimeout(this.timerId),this.timerId=null;this.timerId=window.setTimeout(OpenLayers.Function.bind(function(){this.timerId=null},this),300);return OpenLayers.Handler.Point.prototype.touchstart.call(this, 1261a)},down:function(a){var b=this.stopDown;this.freehandMode(a)&&(b=!0,this.touch&&(this.modifyFeature(a.xy,!!this.lastUp),OpenLayers.Event.stop(a)));!this.touch&&(!this.lastDown||!this.passesTolerance(this.lastDown,a.xy,this.pixelTolerance))&&this.modifyFeature(a.xy,!!this.lastUp);this.mouseDown=!0;this.lastDown=a.xy;this.stoppedDown=b;return!b},move:function(a){if(this.stoppedDown&&this.freehandMode(a))return this.persist&&this.destroyPersistedFeature(),this.maxVertices&&this.line&&this.line.geometry.components.length=== 1262this.maxVertices?(this.removePoint(),this.finalize()):this.addPoint(a.xy),!1;!this.touch&&(!this.mouseDown||this.stoppedDown)&&this.modifyFeature(a.xy,!!this.lastUp);return!0},up:function(a){if(this.mouseDown&&(!this.lastUp||!this.lastUp.equals(a.xy)))if(this.stoppedDown&&this.freehandMode(a))this.persist&&this.destroyPersistedFeature(),this.removePoint(),this.finalize();else if(this.passesTolerance(this.lastDown,a.xy,this.pixelTolerance))this.touch&&this.modifyFeature(a.xy),null==this.lastUp&&this.persist&& 1263this.destroyPersistedFeature(),this.addPoint(a.xy),this.lastUp=a.xy,this.line.geometry.components.length===this.maxVertices+1&&this.finishGeometry();this.stoppedDown=this.stopDown;this.mouseDown=!1;return!this.stopUp},finishGeometry:function(){this.line.geometry.removeComponent(this.line.geometry.components[this.line.geometry.components.length-1]);this.removePoint();this.finalize()},dblclick:function(a){this.freehandMode(a)||this.finishGeometry();return!1},CLASS_NAME:"OpenLayers.Handler.Path"}); 1264OpenLayers.Handler.Polygon=OpenLayers.Class(OpenLayers.Handler.Path,{holeModifier:null,drawingHole:!1,polygon:null,createFeature:function(a){a=this.layer.getLonLatFromViewPortPx(a);a=new OpenLayers.Geometry.Point(a.lon,a.lat);this.point=new OpenLayers.Feature.Vector(a);this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LinearRing([this.point.geometry]));this.polygon=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([this.line.geometry]));this.callback("create",[this.point.geometry, 1265this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.polygon,this.point],{silent:!0})},addPoint:function(a){if(!this.drawingHole&&this.holeModifier&&this.evt&&this.evt[this.holeModifier])for(var b=this.point.geometry,c=this.control.layer.features,d,e=c.length-1;0<=e;--e)if(d=c[e].geometry,(d instanceof OpenLayers.Geometry.Polygon||d instanceof OpenLayers.Geometry.MultiPolygon)&&d.intersects(b)){b=c[e];this.control.layer.removeFeatures([b],{silent:!0});this.control.layer.events.registerPriority("sketchcomplete", 1266this,this.finalizeInteriorRing);this.control.layer.events.registerPriority("sketchmodified",this,this.enforceTopology);b.geometry.addComponent(this.line.geometry);this.polygon=b;this.drawingHole=!0;break}OpenLayers.Handler.Path.prototype.addPoint.apply(this,arguments)},getCurrentPointIndex:function(){return this.line.geometry.components.length-2},enforceTopology:function(a){var a=a.vertex,b=this.line.geometry.components;if(!this.polygon.geometry.intersects(a))b=b[b.length-3],a.x=b.x,a.y=b.y},finishGeometry:function(){this.line.geometry.removeComponent(this.line.geometry.components[this.line.geometry.components.length- 12672]);this.removePoint();this.finalize()},finalizeInteriorRing:function(){var a=this.line.geometry,b=0!==a.getArea();if(b){for(var c=this.polygon.geometry.components,d=c.length-2;0<=d;--d)if(a.intersects(c[d])){b=!1;break}if(b){d=c.length-2;a:for(;0<d;--d)for(var e=c[d].components,f=0,g=e.length;f<g;++f)if(a.containsPoint(e[f])){b=!1;break a}}}if(b){if(this.polygon.state!==OpenLayers.State.INSERT)this.polygon.state=OpenLayers.State.UPDATE}else this.polygon.geometry.removeComponent(a);
1267this.restoreFeature(); 1268return!1},cancel:function(){this.drawingHole&&(this.polygon.geometry.removeComponent(this.line.geometry),this.restoreFeature(!0));return OpenLayers.Handler.Path.prototype.cancel.apply(this,arguments)},restoreFeature:function(a){this.control.layer.events.unregister("sketchcomplete",this,this.finalizeInteriorRing);this.control.layer.events.unregister("sketchmodified",this,this.enforceTopology);this.layer.removeFeatures([this.polygon],{silent:!0});this.control.layer.addFeatures([this.polygon],{silent:!0}); 1269this.drawingHole=!1;a||this.control.layer.events.triggerEvent("sketchcomplete",{feature:this.polygon})},destroyFeature:function(a){OpenLayers.Handler.Path.prototype.destroyFeature.call(this,a);this.polygon=null},drawFeature:function(){this.layer.drawFeature(this.polygon,this.style);this.layer.drawFeature(this.point,this.style)},getSketch:function(){return this.polygon},getGeometry:function(){var a=this.polygon&&this.polygon.geometry;a&&this.multi&&(a=new OpenLayers.Geometry.MultiPolygon([a]));return a}, 1270CLASS_NAME:"OpenLayers.Handler.Polygon"});Ext.namespace("gxp.plugins"); 1271gxp.plugins.FeatureEditor=Ext.extend(gxp.plugins.ClickableFeatures,{ptype:"gxp_featureeditor",commitMessage:!1,splitButton:null,iconClsAdd:"gxp-icon-addfeature",closeOnSave:!1,supportAbstractGeometry:!1,supportNoGeometry:!1,iconClsEdit:"gxp-icon-editfeature",exceptionTitle:"Save Failed",exceptionText:"Trouble saving features",pointText:"Point",lineText:"Line",polygonText:"Polygon",noGeometryText:"Event",commitTitle:"Commit message",commitText:"Please enter a commit message for this edit:",createFeatureActionTip:"Create a new feature", 1272createFeatureActionText:"Create",editFeatureActionTip:"Edit existing feature",editFeatureActionText:"Modify",splitButtonText:"Edit",splitButtonTooltip:"Edit features on selected WMS layer",outputTarget:"map",snappingAgent:null,readOnly:!1,modifyOnly:!1,showSelectedOnly:!0,roles:["ROLE_ADMINISTRATOR"],createAction:null,editAction:null,activeIndex:0,drawControl:null,popup:null,schema:null,constructor:function(a){this.addEvents("layereditable","featureeditable");gxp.plugins.FeatureEditor.superclass.constructor.apply(this, 1273arguments)},init:function(a){gxp.plugins.FeatureEditor.superclass.init.apply(this,arguments);this.target.on("authorizationchange",this.onAuthorizationChange,this)},destroy:function(){this.target.un("authorizationchange",this.onAuthorizationChange,this);gxp.plugins.FeatureEditor.superclass.destroy.apply(this,arguments)},onAuthorizationChange:function(){this.target.isAuthorized(this.roles)||(this.selectControl.deactivate(),this.drawControl.deactivate());this.enableOrDisable()},addActions:function(){function a(a, 1274d){var f=Array.prototype.slice.call(arguments);f.splice(0,2);if(!e&&b&&!b.isDestroyed){if(b.editing){var g=function(){e=!0;h.call(this);"setLayer"===d?this.target.selectLayer(f[0]):"clearFeatures"===d?window.setTimeout(function(){a[d].call(a)}):a[d].apply(a,f)},h=function(){c.featureStore.un("write",g,this);b.un("canceledit",g,this);b.un("cancelclose",h,this)};c.featureStore.on("write",g,this);b.on({canceledit:g,cancelclose:h,scope:this});b.close()}return!b.editing}e=!1}var b,c=this.getFeatureManager(), 1275d=c.featureLayer,e=!1;c.on({beforequery:a.createDelegate(this,"loadFeatures",1),beforelayerchange:a.createDelegate(this,"setLayer",1),beforesetpage:a.createDelegate(this,"setPage",1),beforeclearfeatures:a.createDelegate(this,"clearFeatures",1),scope:this});this.drawControl=new OpenLayers.Control.DrawFeature(d,OpenLayers.Handler.Point,{eventListeners:{featureadded:function(a){if(!0===this.autoLoadFeature)this.autoLoadedFeature=a.feature},activate:function(){this.target.doAuthorized(this.roles,function(){c.showLayer(this.id, 1276this.showSelectedOnly&&"selected")},this)},deactivate:function(){c.hideLayer(this.id)},scope:this}});this.selectControl=new OpenLayers.Control.SelectFeature(d,{clickout:!1,multipleKey:"fakeKey",eventListeners:{activate:function(){this.target.doAuthorized(this.roles,function(){(!0===this.autoLoadFeature||c.paging)&&this.target.mapPanel.map.events.register("click",this,this.noFeatureClick);c.showLayer(this.id,this.showSelectedOnly&&"selected");this.selectControl.unselectAll(b&&b.editing&&{except:b.feature})}, 1277this)},deactivate:function(){(!0===this.autoLoadFeature||c.paging)&&this.target.mapPanel.map.events.unregister("click",this,this.noFeatureClick);if(b){if(b.editing)b.on("cancelclose",function(){this.selectControl.activate()},this,{single:!0});
1277b.on("close",function(){c.hideLayer(this.id)},this,{single:!0});b.close()}else c.hideLayer(this.id)},scope:this}});d.events.on({beforefeatureremoved:function(a){this.popup&&a.feature===this.popup.feature&&this.selectControl.unselect(a.feature)},featureunselected:function(a){(a= 1278a.feature)&&this.fireEvent("featureeditable",this,a,!1);a&&a.geometry&&b&&!b.hidden&&b.close()},beforefeatureselected:function(){if(b)return!b.editing},featureselected:function(a){var d=a.feature;d&&this.fireEvent("featureeditable",this,d,!0);var e=c.featureStore;if(!0===this._forcePopupForNoGeometry||this.selectControl.active&&null!==d.geometry)!1===this.readOnly&&(this.selectControl.deactivate(),c.showLayer(this.id,this.showSelectedOnly&&"selected")),b=this.addOutput({xtype:"gxp_featureeditpopup", 1279collapsible:!0,feature:e.getByFeature(d),vertexRenderIntent:"vertex",readOnly:this.readOnly,fields:this.fields,excludeFields:this.excludeFields,editing:d.state===OpenLayers.State.INSERT,schema:this.schema,allowDelete:!0,width:200,height:250}),b.on({close:function(){!1===this.readOnly&&this.selectControl.activate();d.layer&&-1!==d.layer.selectedFeatures.indexOf(d)&&this.selectControl.unselect(d);if(d===this.autoLoadedFeature)d.layer&&d.layer.removeFeatures([a.feature]),this.autoLoadedFeature=null}, 1280featuremodified:function(a,b){e.on({beforewrite:{fn:function(a,b,c,d){if(!0===this.commitMessage)d.params.handle=this._commitMsg,delete this._commitMsg},single:!0},beforesave:{fn:function(){a&&a.isVisible()&&a.disable();if(!0===this.commitMessage&&!this._commitMsg){var b=arguments.callee;Ext.Msg.show({prompt:!0,title:this.commitTitle,msg:this.commitText,buttons:Ext.Msg.OK,fn:function(a,c){if("ok"===a)this._commitMsg=c,e.un("beforesave",b,this),e.save()},scope:this,multiline:!0});return!1}},single:!0!== 1281this.commitMessage},write:{fn:function(){a&&(a.isVisible()&&a.enable(),this.closeOnSave&&a.close());var b=c.layerRecord;this.target.fireEvent("featureedit",c,{name:b.get("name"),source:b.get("source")})},single:!0},exception:{fn:function(b,d,f,g,h,i){b=this.exceptionText;"remote"===d?h.exceptionReport&&(b=gxp.util.getOGCExceptionText(h.exceptionReport)):b="Status: "+h.status;c.fireEvent("exception",c,h.exceptionReport||{},b,i);!1===c.hasListener("exception")&&!1===e.hasListener("exception")&&Ext.Msg.show({title:this.exceptionTitle, 1282msg:b,icon:Ext.MessageBox.ERROR,buttons:{ok:!0}});a&&a.isVisible()&&(a.enable(),a.startEditing())},single:!0},scope:this});if(b.state===OpenLayers.State.DELETE)e._removing=!0,e.remove(e.getRecordFromFeature(b)),delete e._removing;e.save()},canceledit:function(){e.commitChanges()},scope:this}),this.popup=b},sketchcomplete:function(){c.featureLayer.events.register("featuresadded",this,function(a){c.featureLayer.events.unregister("featuresadded",this,arguments.callee);this.drawControl.deactivate();this.selectControl.activate(); 1283this.selectControl.select(a.features[0])})},scope:this});var f=this.toggleGroup||Ext.id(),g=[],h={tooltip:this.createFeatureActionTip,menuText:this.initialConfig.createFeatureActionText,text:this.initialConfig.createFeatureActionText,iconCls:this.iconClsAdd,disabled:!0,hidden:this.modifyOnly||this.readOnly,toggleGroup:f,group:f,groupClass:null,enableToggle:!0,allowDepress:!0,control:this.drawControl,deactivateOnDisable:!0,map:this.target.mapPanel.map,listeners:{checkchange:this.onItemCheckchange, 1284scope:this}};if(!0===this.supportAbstractGeometry){var i=[];!0===this.supportNoGeometry&&i.push(new Ext.menu.CheckItem({text:this.noGeometryText,iconCls:"gxp-icon-event",groupClass:null,group:f,listeners:{checkchange:function(a,b){if(!0===b){var c=new OpenLayers.Feature.Vector(null);c.state=OpenLayers.State.INSERT;d.addFeatures([c]);this._forcePopupForNoGeometry=!0;d.events.triggerEvent("featureselected",{feature:c});delete this._forcePopupForNoGeometry}this.createAction.items[0]instanceof Ext.menu.CheckItem? 1285this.createAction.items[0].setChecked(!1):this.createAction.items[0].toggle(!1)},scope:this}}));var j=function(a,b,c){!0===b&&this.setHandler(c,!1);this.createAction.items[0]instanceof Ext.menu.CheckItem?this.createAction.items[0].setChecked(b):this.createAction.items[0].toggle(b)};i.push(new Ext.menu.CheckItem({groupClass:null,text:this.pointText,group:f,iconCls:"gxp-icon-point",listeners:{checkchange:j.createDelegate(this,[OpenLayers.Handler.Point],2)}}),new Ext.menu.CheckItem({groupClass:null, 1286text:this.lineText,group:f,iconCls:"gxp-icon-line",listeners:{checkchange:j.createDelegate(this,[OpenLayers.Handler.Path],2)}}),new Ext.menu.CheckItem({groupClass:null,text:this.polygonText,group:f,iconCls:"gxp-icon-polygon",listeners:{checkchange:j.createDelegate(this,[OpenLayers.Handler.Polygon],2)}}));g.push(new GeoExt.Action(Ext.apply(h,{menu:new Ext.menu.Menu({items:i})})))}else g.push(new GeoExt.Action(h));g.push(new GeoExt.Action({tooltip:this.editFeatureActionTip,text:this.initialConfig.editFeatureActionText, 1287menuText:this.initialConfig.editFeatureActionText,iconCls:this.iconClsEdit,disabled:!0,toggleGroup:f,group:f,groupClass:null,enableToggle:!0,allowDepress:!0,control:this.selectControl,deactivateOnDisable:!0,map:this.target.mapPanel.map,listeners:{checkchange:this.onItemCheckchange,scope:this}}));this.createAction=g[0];this.editAction=g[1];if(this.splitButton)this.splitButton=new Ext.SplitButton({menu:{items:[Ext.apply(new Ext.menu.CheckItem(g[0]),{text:this.createFeatureActionText}),Ext.apply(new Ext.menu.CheckItem(g[1]), 1288{text:this.editFeatureActionText})]},disabled:!0,buttonText:this.splitButtonText,tooltip:this.splitButtonTooltip,iconCls:this.iconClsAdd,enableToggle:!0,toggleGroup:this.toggleGroup,allowDepress:!0,handler:function(a){a.pressed&&a.menu.items.itemAt(this.activeIndex).setChecked(!0)},scope:this,listeners:{toggle:function(a,b){b||a.menu.items.each(function(a){a.setChecked(!1)})},render:function(a){Ext.ButtonToggleMgr.register(a)}}}),g=[this.splitButton];g=gxp.plugins.FeatureEditor.superclass.addActions.call(this, 1289g);c.on("layerchange",this.onLayerChange,this);
1289(f=this.getSnappingAgent())&&f.registerEditor(this);return g},onItemCheckchange:function(a,b){if(this.splitButton)this.activeIndex=a.ownerCt.items.indexOf(a),this.splitButton.toggle(b),b&&this.splitButton.setIconClass(a.iconCls)},getFeatureManager:function(){var a=this.target.tools[this.featureManager];if(!a)throw Error("Unable to access feature manager by id: "+this.featureManager);return a},getSnappingAgent:function(){var a,b=this.snappingAgent;if(b&& 1290(a=this.target.tools[b],!a))throw Error("Unable to locate snapping agent with id: "+b);return a},setHandler:function(a,b){var c=this.drawControl,d=c.active;d&&c.deactivate();c.handler.destroy();c.handler=new a(c,c.callbacks,Ext.apply(c.handlerOptions,{multi:b}));d&&c.activate()},enableOrDisable:function(){var a=!this.schema;this.splitButton&&this.splitButton.setDisabled(a);this.createAction.setDisabled(a);this.editAction.setDisabled(a);return a},onLayerChange:function(a,b,c){this.schema=c;if(this.enableOrDisable())this.fireEvent("layereditable", 1291this,b,!1);else{var c=this.createAction,d={Point:OpenLayers.Handler.Point,Line:OpenLayers.Handler.Path,Curve:OpenLayers.Handler.Path,Polygon:OpenLayers.Handler.Polygon,Surface:OpenLayers.Handler.Polygon},e=a.geometryType&&a.geometryType.replace("Multi","");(d=e&&d[e])?(this.setHandler(d,e!=a.geometryType),c.enable()):!0===this.supportAbstractGeometry&&a.geometryType&&"Geometry"===a.geometryType?c.enable():c.disable();this.fireEvent("layereditable",this,b,!0)}},select:function(a){this.selectControl.unselectAll(this.popup&& 1292this.popup.editing&&{except:this.popup.feature});this.selectControl.select(a)}});Ext.preg(gxp.plugins.FeatureEditor.prototype.ptype,gxp.plugins.FeatureEditor);Ext.namespace("GeoExt.grid"); 1293GeoExt.grid.FeatureSelectionModelMixin=function(){return{autoActivateControl:!0,layerFromStore:!0,selectControl:null,bound:!1,superclass:null,selectedFeatures:[],autoPanMapOnSelection:!1,constructor:function(a){a=a||{};if(a.selectControl instanceof OpenLayers.Control.SelectFeature){if(!a.singleSelect){var b=a.selectControl;a.singleSelect=!(b.multiple||b.multipleKey)}}else if(a.layer instanceof OpenLayers.Layer.Vector)this.selectControl=this.createSelectControl(a.layer,a.selectControl),delete a.layer, 1294delete a.selectControl;if(a.autoPanMapOnSelection)this.autoPanMapOnSelection=!0,delete a.autoPanMapOnSelection;this.superclass=arguments.callee.superclass;this.superclass.constructor.call(this,a)},initEvents:function(){this.superclass.initEvents.call(this);if(this.layerFromStore){var a=this.grid.getStore()&&this.grid.getStore().layer;if(a&&!(this.selectControl instanceof OpenLayers.Control.SelectFeature))this.selectControl=this.createSelectControl(a,this.selectControl)}this.selectControl&&this.bind(this.selectControl)}, 1295createSelectControl:function(a,b){var b=b||{},b=OpenLayers.Util.extend({toggle:!0,multipleKey:(void 0!==b.singleSelect?b.singleSelect:this.singleSelect)?null:Ext.isMac?"metaKey":"ctrlKey"},b),c=new OpenLayers.Control.SelectFeature(a,b);a.map.addControl(c);return c},bind:function(a,b){if(!this.bound){b=b||{};this.selectControl=a;if(a instanceof OpenLayers.Layer.Vector)this.selectControl=this.createSelectControl(a,b.controlConfig);this.autoActivateControl&&this.selectControl.activate();for(var c=this.getLayers(), 1296d=0,e=c.length;d<e;d++)c[d].events.on({featureselected:this.featureSelected,featureunselected:this.featureUnselected,scope:this});this.on("rowselect",this.rowSelected,this);this.on("rowdeselect",this.rowDeselected,this);this.bound=!0}return this.selectControl},unbind:function(){var a=this.selectControl;if(this.bound){for(var b=this.getLayers(),c=0,d=b.length;c<d;c++)b[c].events.un({featureselected:this.featureSelected,featureunselected:this.featureUnselected,scope:this});this.un("rowselect",this.rowSelected, 1297this);this.un("rowdeselect",this.rowDeselected,this);this.autoActivateControl&&a.deactivate();this.selectControl=null;this.bound=!1}return a},featureSelected:function(a){if(!this._selecting){var b=this.grid.store.findBy(function(b){return b.getFeature()==a.feature});if(-1!=b&&!this.isSelected(b))this._selecting=!0,this.selectRow(b,!this.singleSelect),this._selecting=!1,this.grid.getView().focusRow(b)}}
1297,featureUnselected:function(a){if(!this._selecting){var b=this.grid.store.findBy(function(b){return b.getFeature()== 1298a.feature});if(-1!=b&&this.isSelected(b))this._selecting=!0,this.deselectRow(b),this._selecting=!1,this.grid.getView().focusRow(b)}},rowSelected:function(a,b,c){a=c.getFeature();if(!this._selecting&&a){for(var b=this.getLayers(),c=0,d=b.length;c<d;c++)if(-1==b[c].selectedFeatures.indexOf(a)){this._selecting=!0;this.selectControl.select(a);this._selecting=!1;this.selectedFeatures.push(a);break}this.autoPanMapOnSelection&&this.recenterToSelectionExtent()}},rowDeselected:function(a,b,c){a=c.getFeature(); 1299if(!this._selecting&&a){for(var b=this.getLayers(),c=0,d=b.length;c<d;c++)if(-1!=b[c].selectedFeatures.indexOf(a)){this._selecting=!0;this.selectControl.unselect(a);this._selecting=!1;OpenLayers.Util.removeItem(this.selectedFeatures,a);break}this.autoPanMapOnSelection&&0<this.selectedFeatures.length&&this.recenterToSelectionExtent()}},getLayers:function(){return this.selectControl.layers||[this.selectControl.layer]},recenterToSelectionExtent:function(){var a=this.selectControl.map,b=this.getSelectionExtent(); 1300a.getZoomForExtent(b,!1)>a.getZoom()?a.setCenter(b.getCenterLonLat()):a.zoomToExtent(b)},getSelectionExtent:function(){var a=null,b=this.selectedFeatures;if(b&&0<b.length)for(var c=null,d=0,e=b.length;d<e;d++)if(c=b[d].geometry)null===a&&(a=new OpenLayers.Bounds),a.extend(c.getBounds());return a}}};GeoExt.grid.FeatureSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,new GeoExt.grid.FeatureSelectionModelMixin);Ext.namespace("gxp.grid"); 1301gxp.grid.FeatureGrid=Ext.extend(Ext.grid.GridPanel,{map:null,ignoreFields:null,includeFields:null,layer:null,columnsSortable:!0,columnMenuDisabled:!1,initComponent:function(){this.ignoreFields=["feature","state","fid"].concat(this.ignoreFields);if(this.store){if(this.cm=this.createColumnModel(this.store),this.map)this.layer=new OpenLayers.Layer.Vector(this.id+"_layer"),this.map.addLayer(this.layer)}else this.store=new Ext.data.Store,this.cm=new Ext.grid.ColumnModel({columns:[]});if(this.layer)this.sm= 1302this.sm||new GeoExt.grid.FeatureSelectionModel({layerFromStore:!1,layer:this.layer}),this.store instanceof GeoExt.data.FeatureStore&&this.store.bind(this.layer);if(!this.dateFormat)this.dateFormat=Ext.form.DateField.prototype.format;if(!this.timeFormat)this.timeFormat=Ext.form.TimeField.prototype.format;gxp.grid.FeatureGrid.superclass.initComponent.call(this)},onDestroy:function(){this.initialConfig&&this.initialConfig.map&&!this.initialConfig.layer&&(this.layer.destroy(),delete this.layer);gxp.grid.FeatureGrid.superclass.onDestroy.apply(this, 1303arguments)},setStore:function(a,b){if(b)this.schema=b;a?(this.store instanceof GeoExt.data.FeatureStore&&this.store.unbind(),this.layer&&(this.layer.destroyFeatures(),a.bind(this.layer)),this.reconfigure(a,this.createColumnModel(a))):this.reconfigure(new Ext.data.Store,new Ext.grid.ColumnModel({columns:[]}))},getColumns:function(a){function b(a){return function(b){var c=b;"string"==typeof b&&(c=Date.parseDate(b.replace(/Z$/,""),"c"));return c?c.format(a):b}}var c=[],d=this.customEditors||{},e=this.customRenderers|| 1304{},f,g,h,i,j;(this.schema||a.fields).each(function(a){if(this.schema)switch(f=a.get("name"),g=a.get("type").split(":").pop(),i=null,g){case "date":i=this.dateFormat;break;case "datetime":i=i?i:this.dateFormat+" "+this.timeFormat;h=void 0;j=b(i);break;case "boolean":h="booleancolumn";break;case "string":h="gridcolumn";break;default:h="numbercolumn"}else f=a.name;if(-1===this.ignoreFields.indexOf(f)&&(null===this.includeFields||0<=this.includeFields.indexOf(f)))c.push(Ext.apply({dataIndex:f,hidden:this.fieldVisibility? 1305!this.fieldVisibility[f]:!1,header:this.propertyNames?this.propertyNames[f]||f:f,sortable:this.columnsSortable,menuDisabled:this.columnMenuDisabled,xtype:h,editor:d[f]||{xtype:"textfield"},format:i,renderer:e[f]||(h?void 0:j)},this.columnConfig?this.columnConfig[f]:null))},this);return c},createColumnModel:function(a){a=this.getColumns(a);return new Ext.grid.ColumnModel(a)}});Ext.reg("gxp_featuregrid",gxp.grid.FeatureGrid);Ext.namespace("gxp.plugins"); 1306gxp.plugins.FeatureGrid=Ext.extend(gxp.plugins.ClickableFeatures,{ptype:"gxp_featuregrid",schema:null,showTotalResults:!1,alwaysDisplayOnMap:!1,displayMode:"all",autoExpand:!1,autoCollapse:!1,selectOnMap:!1,displayFeatureText:"Display on map",firstPageTip:"First page",previousPageTip:"Previous page",zoomPageExtentTip:"Zoom to page extent",nextPageTip:"Next page",lastPageTip:"Last page",totalMsg:"Features {1} to {2} of {0}",displayTotalResults:function(){var a=this.target.tools[this.featureManager]; 1307!0===this.showTotalResults&&this.displayItem.setText(null!==a.numberOfFeatures?String.format(this.totalMsg,a.numberOfFeatures,a.pageIndex*a.maxFeatures+Math.min(a.numberOfFeatures,1
1307),Math.min((a.pageIndex+1)*a.maxFeatures,a.numberOfFeatures)):"")},addOutput:function(a){function b(){var a=c.schema,b=["feature","state","fid"];a&&a.each(function(a){0==a.get("type").indexOf("gml:")&&b.push(a.get("name"))});f.ignoreFields=b;f.setStore(c.featureStore,a);c.featureStore||(f.lastPageButton.disable(),f.nextPageButton.disable(), 1308f.firstPageButton.disable(),f.prevPageButton.disable(),f.zoomToPageButton.disable(),this.displayTotalResults())}var c=this.target.tools[this.featureManager],d=this.target.mapPanel.map,e;this.selectControl=new OpenLayers.Control.SelectFeature(c.featureLayer,this.initialConfig.controlOptions);if(this.selectOnMap){if(this.autoLoadFeature||c.paging&&c.pagingType===gxp.plugins.FeatureManager.QUADTREE_PAGING)this.selectControl.events.on({activate:function(){d.events.register("click",this,this.noFeatureClick)}, 1309deactivate:function(){d.events.unregister("click",this,this.noFeatureClick)},scope:this});d.addControl(this.selectControl);e={selectControl:this.selectControl}}else e={selectControl:this.selectControl,singleSelect:!1,autoActivateControl:!1,listeners:{beforerowselect:function(){if(window.event&&"contextmenu"==window.event.type||this.selectControl.active||c.featureStore.getModifiedRecords().length)return!1},scope:this}};this.displayItem=new Ext.Toolbar.TextItem({});var a=Ext.apply({xtype:"gxp_featuregrid", 1310border:!1,sm:new GeoExt.grid.FeatureSelectionModel(e),autoScroll:!0,columnMenuDisabled:!!c.paging,bbar:(c.paging?[{iconCls:"x-tbar-page-first",ref:"../firstPageButton",tooltip:this.firstPageTip,disabled:!0,handler:function(){c.setPage({index:0})}},{iconCls:"x-tbar-page-prev",ref:"../prevPageButton",tooltip:this.previousPageTip,disabled:!0,handler:function(){c.previousPage()}},{iconCls:"gxp-icon-zoom-to",ref:"../zoomToPageButton",tooltip:this.zoomPageExtentTip,disabled:!0,hidden:c.pagingType!==gxp.plugins.FeatureManager.QUADTREE_PAGING|| 1311c.autoZoomPage,handler:function(){var a=c.getPageExtent();null!==a&&d.zoomToExtent(a)}},{iconCls:"x-tbar-page-next",ref:"../nextPageButton",tooltip:this.nextPageTip,disabled:!0,handler:function(){c.nextPage()}},{iconCls:"x-tbar-page-last",ref:"../lastPageButton",tooltip:this.lastPageTip,disabled:!0,handler:function(){c.setPage({index:"last"})}},{xtype:"tbspacer",width:10},this.displayItem]:[]).concat(["->"].concat(!this.alwaysDisplayOnMap?[{text:this.displayFeatureText,enableToggle:!0,toggleHandler:function(a, 1312b){this.selectOnMap&&this.selectControl[b?"activate":"deactivate"]();c[b?"showLayer":"hideLayer"](this.id,this.displayMode)},scope:this}]:[])),contextMenu:new Ext.menu.Menu({items:[]})},a||{}),f=gxp.plugins.FeatureGrid.superclass.addOutput.call(this,a);f.on({added:function(a,b){function d(){this.displayTotalResults();this.selectOnMap&&this.selectControl.deactivate();this.autoCollapse&&"function"==typeof b.collapse&&b.collapse()}c.on({query:function(a,c){c&&c.getCount()?(this.displayTotalResults(), 1313this.selectOnMap&&this.selectControl.activate(),this.autoExpand&&"function"==typeof b.expand&&b.expand()):d.call(this)},layerchange:d,clearfeatures:d,scope:this})},contextmenu:function(a){if(0<f.contextMenu.items.getCount()){var b=f.getView().findRowIndex(a.getTarget());!1!==b&&(f.getSelectionModel().selectRow(b),f.contextMenu.showAt(a.getXY()),a.stopEvent())}},scope:this});(this.alwaysDisplayOnMap||!0===this.selectOnMap&&"selected"===this.displayMode)&&c.showLayer(this.id,this.displayMode);c.paging&& 1314c.on({beforesetpage:function(){f.zoomToPageButton.disable()},setpage:function(a,b,c,d,e,l){a=0<l;f.zoomToPageButton.setDisabled(!a);b=a&&0!==e;f.firstPageButton.setDisabled(!b);f.prevPageButton.setDisabled(!b);e=a&&e!==l-1;f.lastPageButton.setDisabled(!e);f.nextPageButton.setDisabled(!e)},scope:this});c.featureStore&&b.call(this);c.on("layerchange",b,this);return f}});Ext.preg(gxp.plugins.FeatureGrid.prototype.ptype,gxp.plugins.FeatureGrid);Ext.namespace("gxp.plugins"); 1315gxp.plugins.StyleWriter=Ext.extend(Ext.util.Observable,{deletedStyles:null,constructor:function(a){this.initialConfig=a;Ext.apply(this,a);this.deletedStyles=[];gxp.plugins.StyleWriter.superclass.constructor.apply(this,arguments)},init:function(a){this.target=a;a.stylesStore.on({remove:function(a,c){var d=c.get("name");c.get("name")===d&&this.deletedStyles.push(d)},scope:this});
1315a.on({beforesaved:this.write,scope:this})},write:function(a){a.stylesStore.commitChanges();a.fireEvent("saved",a,a.selectedStyle.get("name"))}}); 1316Ext.namespace("gxp.plugins"); 1317gxp.plugins.GeoServerStyleWriter=Ext.extend(gxp.plugins.StyleWriter,{baseUrl:"/geoserver/rest",constructor:function(a){this.initialConfig=a;Ext.apply(this,a);gxp.plugins.GeoServerStyleWriter.superclass.constructor.apply(this,arguments)},write:function(a){delete this._failed;var a=a||{},b=[],c=this.target.stylesStore;c.each(function(a){(a.phantom||-1!==c.modified.indexOf(a))&&this.writeStyle(a,b)},this);var d=function(){var b=this.target;if(!0!==this._failed){this.deleteStyles();for(var c=this.target.stylesStore.getModifiedRecords(), 1318d=c.length-1;0<=d;--d)c[d].phantom=!1;b.stylesStore.commitChanges();a.success&&a.success.call(a.scope);b.fireEvent("saved",b,b.selectedStyle.get("name"))}else b.fireEvent("savefailed",b,b.selectedStyle.get("name"))};0<b.length?gxp.util.dispatch(b,function(){this.assignStyles(a.defaultStyle,d)},this):this.assignStyles(a.defaultStyle,d)},writeStyle:function(a,b){var c=a.get("userStyle").name;b.push(function(b){Ext.Ajax.request({method:!0===a.phantom?"POST":"PUT",url:this.baseUrl+"/styles"+(!0===a.phantom? 1319"":"/"+c+".xml"),headers:{"Content-Type":"application/vnd.ogc.sld+xml; charset=UTF-8"},xmlData:this.target.createSLD({userStyles:[c]}),failure:function(){this._failed=!0;b.call(this)},success:!0===a.phantom?function(){Ext.Ajax.request({method:"POST",url:this.baseUrl+"/layers/"+this.target.layerRecord.get("name")+"/styles.json",jsonData:{style:{name:c}},failure:function(){this._failed=!0;b.call(this)},success:b,scope:this})}:b,scope:this})})},assignStyles:function(a,b){var c=[];this.target.stylesStore.each(function(b){!a&& 1320!0===b.get("userStyle").isDefault&&(a=b.get("name"));b.get("name")!==a&&-1===this.deletedStyles.indexOf(b.id)&&c.push({name:b.get("name")})},this);Ext.Ajax.request({method:"PUT",url:this.baseUrl+"/layers/"+this.target.layerRecord.get("name")+".json",jsonData:{layer:{defaultStyle:{name:a},styles:0<c.length?{style:c}:{},enabled:!0}},success:b,failure:function(){this._failed=!0;b.call(this)},scope:this})},deleteStyles:function(){for(var a=0,b=this.deletedStyles.length;a<b;++a)Ext.Ajax.request({method:"DELETE", 1321url:this.baseUrl+"/styles/"+this.deletedStyles[a]+"?purge=true"});this.deletedStyles=[]}});Ext.preg("gxp_geoserverstylewriter",gxp.plugins.GeoServerStyleWriter);Ext.namespace("gxp.plugins"); 1322gxp.plugins.LayerSource=Ext.extend(Ext.util.Observable,{store:null,lazy:!1,hidden:!1,title:"",constructor:function(a){this.initialConfig=a;Ext.apply(this,a);this.addEvents("ready","failure");gxp.plugins.LayerSource.superclass.constructor.apply(this,arguments)},init:function(a){this.target=a;this.createStore()},getMapProjection:function(){var a=this.target.mapPanel.map.projection;return this.target.mapPanel.map.getProjectionObject()||a&&new OpenLayers.Projection(a)||new OpenLayers.Projection("EPSG:4326")}, 1323getProjection:function(a){var a=a.getLayer(),b=this.getMapProjection();return(a.projection?a.projection instanceof OpenLayers.Projection?a.projection:new OpenLayers.Projection(a.projection):b).equals(b)?b:null},createStore:function(){this.fireEvent("ready",this)},createLayerRecord:function(){},getConfigForRecord:function(a){var b=a.getLayer();return{source:a.get("source"),name:a.get("name"),title:a.get("title"),visibility:b.getVisibility(),opacity:b.opacity||void 0,group:a.get("group"),fixed:a.get("fixed"), 1324selected:a.get("selected")}},getState:function(){return Ext.apply({},this.initialConfig)}}); 1325OpenLayers.Layer.XYZ=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:!0,sphericalMercator:!1,zoomOffset:0,serverResolutions:null,initialize:function(a,b,c){if(c&&c.sphericalMercator||this.sphericalMercator)c=OpenLayers.Util.extend({projection:"EPSG:900913",numZoomLevels:19},c);OpenLayers.Layer.Grid.prototype.initialize.apply(this,[a||this.name,b||this.url,{},c])},clone:function(a){null==a&&(a=new OpenLayers.Layer.XYZ(this.name,this.url,this.getOptions()));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this, 1326[a])},getURL:function(a){var a=this.getXYZ(a),b=this.url;OpenLayers.Util.isArray(b)&&(b=this.selectUrl(""+a.x+a.y+a.z,b));return OpenLayers.String.format(b,a)},getXYZ:function(a){var b=this.getServerResolution(),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.getServerZoom();if(this.wrapDateLine)var d=Math.pow(2,b),c=(c%d+d)%d;return{x:c,y:a,z:b}},setMap:function(a){OpenLayers.Layer.Grid.prototype.setMap.apply(this, 1327arguments);if(!this.tileOrigin)this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.bottom)},CLASS_NAME:"OpenLayers.Layer.XYZ"}); 1328OpenLayers.Layer.Bing=OpenLayers.Class(OpenLayers.Layer.XYZ,{key:null,
1328serverResolutions:[156543.03390625,78271.516953125,39135.7584765625,19567.87923828125,9783.939619140625,4891.9698095703125,2445.9849047851562,1222.9924523925781,611.4962261962891,305.74811309814453,152.87405654907226,76.43702827453613,38.218514137268066,19.109257068634033,9.554628534317017,4.777314267158508,2.388657133579254,1.194328566789627,0.5971642833948135,0.29858214169740677,0.14929107084870338,0.07464553542435169],attributionTemplate:'<span class="olBingAttribution ${type}"><div><a target="_blank" href="http://www.bing.com/maps/"><img src="${logo}" /></a></div>${copyrights}<a style="white-space: nowrap" target="_blank" href="http://www.microsoft.com/maps/product/terms.html">Terms of Use</a></span>', 1329metadata:null,protocolRegex:/^http:/i,type:"Road",culture:"en-US",metadataParams:null,tileOptions:null,protocol:~window.location.href.indexOf("http")?"":"http:",initialize:function(a){a=OpenLayers.Util.applyDefaults({sphericalMercator:!0},a);OpenLayers.Layer.XYZ.prototype.initialize.apply(this,[a.name||"Bing "+(a.type||this.type),null,a]);this.tileOptions=OpenLayers.Util.extend({crossOriginKeyword:"anonymous"},this.options.tileOptions);this.loadMetadata()},loadMetadata:function(){this._callbackId= 1330"_callback_"+this.id.replace(/\./g,"_");window[this._callbackId]=OpenLayers.Function.bind(OpenLayers.Layer.Bing.processMetadata,this);var a=OpenLayers.Util.applyDefaults({key:this.key,jsonp:this._callbackId,include:"ImageryProviders"},this.metadataParams),a=this.protocol+"//dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.type+"?"+OpenLayers.Util.getParameterString(a),b=document.createElement("script");b.type="text/javascript";b.src=a;b.id=this._callbackId;document.getElementsByTagName("head")[0].appendChild(b)}, 1331initLayer:function(){var a=this.metadata.resourceSets[0].resources[0],b=a.imageUrl.replace("{quadkey}","${quadkey}"),b=b.replace("{culture}",this.culture),b=b.replace(this.protocolRegex,this.protocol);this.url=[];for(var c=0;c<a.imageUrlSubdomains.length;++c)this.url.push(b.replace("{subdomain}",a.imageUrlSubdomains[c]));this.addOptions({maxResolution:Math.min(this.serverResolutions[a.zoomMin],this.maxResolution||Number.POSITIVE_INFINITY),numZoomLevels:Math.min(a.zoomMax+1-a.zoomMin,this.numZoomLevels)}, 1332!0);this.isBaseLayer||this.redraw();this.updateAttribution()},getURL:function(a){if(this.url){for(var b=this.getXYZ(a),a=b.x,c=b.y,b=b.z,d=[],e=b;0<e;--e){var f="0",g=1<<e-1;0!=(a&g)&&f++;0!=(c&g)&&(f++,f++);d.push(f)}d=d.join("");a=this.selectUrl(""+a+c+b,this.url);return OpenLayers.String.format(a,{quadkey:d})}},updateAttribution:function(){var a=this.metadata;if(a.resourceSets&&this.map&&this.map.center){var b=a.resourceSets[0].resources[0],c=this.map.getExtent().transform(this.map.getProjectionObject(), 1333new OpenLayers.Projection("EPSG:4326")),d=b.imageryProviders||[],e=OpenLayers.Util.indexOf(this.serverResolutions,this.getServerResolution()),b="",f,g,h,i,j,k,l;for(g=0,h=d.length;g<h;++g){f=d[g];for(i=0,j=f.coverageAreas.length;i<j;++i)l=f.coverageAreas[i],k=OpenLayers.Bounds.fromArray(l.bbox,!0),c.intersectsBounds(k)&&e<=l.zoomMax&&e>=l.zoomMin&&(b+=f.attribution+" ")}a=a.brandLogoUri.replace(this.protocolRegex,this.protocol);this.attribution=OpenLayers.String.format(this.attributionTemplate,{type:this.t
1333ype.toLowerCase(), 1334logo:a,copyrights:b});this.map&&this.map.events.triggerEvent("changelayer",{layer:this,property:"attribution"})}},setMap:function(){OpenLayers.Layer.XYZ.prototype.setMap.apply(this,arguments);this.map.events.register("moveend",this,this.updateAttribution)},clone:function(a){null==a&&(a=new OpenLayers.Layer.Bing(this.options));return a=OpenLayers.Layer.XYZ.prototype.clone.apply(this,[a])},destroy:function(){this.map&&this.map.events.unregister("moveend",this,this.updateAttribution);OpenLayers.Layer.XYZ.prototype.destroy.apply(this, 1335arguments)},CLASS_NAME:"OpenLayers.Layer.Bing"});OpenLayers.Layer.Bing.processMetadata=function(a){this.metadata=a;this.initLayer();a=document.getElementById(this._callbackId);a.parentNode.removeChild(a);window[this._callbackId]=void 0;delete this._callbackId};Ext.namespace("gxp.plugins"); 1336gxp.plugins.BingSource=Ext.extend(gxp.plugins.LayerSource,{ptype:"gxp_bingsource",title:"Bing Layers",roadTitle:"Bing Roads",aerialTitle:"Bing Aerial",labeledAerialTitle:"Bing Aerial With Labels",apiKey:"AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf",createStore:function(){var a=[new OpenLayers.Layer.Bing({key:this.apiKey,name:this.roadTitle,type:"Road",buffer:1,transitionEffect:"resize"}),new OpenLayers.Layer.Bing({key:this.apiKey,name:this.aerialTitle,type:"Aerial",buffer:1,transitionEffect:"resize"}), 1337new OpenLayers.Layer.Bing({key:this.apiKey,name:this.labeledAerialTitle,type:"AerialWithLabels",buffer:1,transitionEffect:"resize"})];this.store=new GeoExt.data.LayerStore({layers:a,fields:[{name:"source",type:"string"},{name:"name",type:"string",mapping:"type"},{name:"abstract",type:"string",mapping:"attribution"},{name:"group",type:"string",defaultValue:"background"},{name:"fixed",type:"boolean",defaultValue:!0},{name:"selected",type:"boolean"}]});this.store.each(function(a){a.set("group","background")}); 1338this.fireEvent("ready",this)},createLayerRecord:function(a){var b,c=this.store.findExact("name",a.name);if(-1<c){b=this.store.getAt(c).copy(Ext.data.Record.id({}));c=b.getLayer().clone();a.title&&(c.setName(a.title),b.set("title",a.title));if("visibility"in a)c.visibility=a.visibility;b.set("selected",a.selected||!1);b.set("source",a.source);b.set("name",a.name);"group"in a&&b.set("group",a.group);b.data.layer=c;b.commit()}return b}});Ext.preg(gxp.plugins.BingSource.prototype.ptype,gxp.plugins.BingSource); 1339OpenLayers.Layer.SphericalMercator={getExtent:function(){var a=null;return a=this.sphericalMercator?this.map.calculateBounds():OpenLayers.Layer.FixedZoomLevels.prototype.getExtent.apply(this)},getLonLatFromViewPortPx:function(a){return OpenLayers.Layer.prototype.getLonLatFromViewPortPx.apply(this,arguments)},getViewPortPxFromLonLat:function(a){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]= 1340156543.03390625/Math.pow(2,a);this.units="m";this.projection=this.projection||"EPSG:900913"},forwardMercator:function(){var a=new OpenLayers.Projection("EPSG:4326"),b=new OpenLayers.Projection("EPSG:900913");return function(c,d){var e=OpenLayers.Projection.transform({x:c,y:d},a,b);return new OpenLayers.LonLat(e.x,e.y)}}(),inverseMercator:function(){var a=new OpenLayers.Projection("EPSG:4326"),b=new OpenLayers.Projection("EPSG:900913");return function(c,d){var e=OpenLayers.Projection.transform({x:c, 1341y:d},b,a);return new OpenLayers.LonLat(e.x,e.y)}}()}; 1342OpenLayers.Layer.EventPane=OpenLayers.Class(OpenLayers.Layer,{smoothDragPan:!0,isBaseLayer:!0,isFixed:!0,pane:null,mapObject:null,initialize:function(a,b){OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(null==this.pane)this.pane=OpenLayers.Util.createDiv(this.div.id+"_EventPane")},destroy:function(){this.pane=this.mapObject=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments)},setMap:function(a){OpenLayers.Layer.prototype.setMap.apply(this,arguments);this.pane.style.zIndex= 1343parseInt(this.div.style.zIndex)+1;this.pane.style.display=this.div.style.display;this.pane.style.width="100%";this.pane.style.height="100%";if("msie"==OpenLayers.BROWSER_NAME)this.pane.style.background="url("+OpenLayers.Util.getImageLocation("blank.gif")+")";this.isFixed?this.map.viewPortDiv.appendChild(this.pane):this.map.layerContainerDiv.appendChild(this.pane);this.loadMapObject();null==this.mapObject&&this.loadWarningMessage()},removeMap:function(a){this.pane&&this.pane.parentNode&&this.pane.parentNode.removeChild(this.pane); 1344OpenLayers.Layer.prototype.removeMap.apply(this,arguments)},loadWarningMessage:function(){this.div.style.backgroundColor="darkblue";var a=this.map.getSize(),b=Math.min(a.w,300),c=Math.min(a.h,200),b=new OpenLayers.Size(b,c),a=(new OpenLayers.Pixel(a.w/2,a.h/2)).add(-b.w/2,-b.h/2),a=OpenLayers.Util.createDiv(this.name+"_warning",a,b,null,null,null,"auto");a.style.padding="7px";a.style.backgroundColor="yellow";a.innerHTML=this.getWarningHTML();this.div.appendChild(a)},getWarningHTML:function(){return""}, 1345display:function(a){OpenLayers.Layer.prototype.display.apply(this,arguments);this.pane.style.display=this.div.style.display},setZIndex:function(a){OpenLayers.Layer.prototype.setZIndex.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1},moveByPx:function(a,b){OpenLayers.Layer.prototype.moveByPx.apply(this,arguments);this.dragPanMapObject?this.dragPanMapObject(a,-b):this.moveTo(this.map.getCachedCenter())},moveTo:function(a,b,c){OpenLayers.Layer.prototype.moveTo.apply(this, 1346arguments);if(null!=this.mapObject){var d=this.map.getCenter(),e=this.map.getZoom();if(null!=d){var f=this.getOLLonLatFromMapObjectLonLat(this.getMapObjectCenter()),g=this.getOLZoomFromMapObjectZoom(this.getMapObjectZoom());if(!d.equals(f)||e!=g)!b&&f&&this.dragPanMapObject&&this.smoothDragPan?(e=this.map.getViewPortPxFromLonLat(f),d=this.map.getViewPortPxFromLonLat(d),this.dragPanMapObject(d.x-e.x,e.y-d.y)):(d=this.getMapObjectLonLatFromOLLonLat(d),e=this.getMapObjectZoomFromOLZoom(e),this.setMapObjectCenter(d, 1347e,c))}}}
1347,getLonLatFromViewPortPx:function(a){var b=null;null!=this.mapObject&&null!=this.getMapObjectCenter()&&(b=this.getOLLonLatFromMapObjectLonLat(this.getMapObjectLonLatFromMapObjectPixel(this.getMapObjectPixelFromOLPixel(a))));return b},getViewPortPxFromLonLat:function(a){var b=null;null!=this.mapObject&&null!=this.getMapObjectCenter()&&(b=this.getOLPixelFromMapObjectPixel(this.getMapObjectPixelFromMapObjectLonLat(this.getMapObjectLonLatFromOLLonLat(a))));return b},getOLLonLatFromMapObjectLonLat:function(a){var b= 1348null;null!=a&&(b=this.getLongitudeFromMapObjectLonLat(a),a=this.getLatitudeFromMapObjectLonLat(a),b=new OpenLayers.LonLat(b,a));return b},getMapObjectLonLatFromOLLonLat:function(a){var b=null;null!=a&&(b=this.getMapObjectLonLatFromLonLat(a.lon,a.lat));return b},getOLPixelFromMapObjectPixel:function(a){var b=null;null!=a&&(b=this.getXFromMapObjectPixel(a),a=this.getYFromMapObjectPixel(a),b=new OpenLayers.Pixel(b,a));return b},getMapObjectPixelFromOLPixel:function(a){var b=null;null!=a&&(b=this.getMapObjectPixelFromXY(a.x, 1349a.y));return b},CLASS_NAME:"OpenLayers.Layer.EventPane"}); 1350OpenLayers.Layer.FixedZoomLevels=OpenLayers.Class({initialize:function(){},initResolutions:function(){for(var a=["minZoomLevel","maxZoomLevel","numZoomLevels"],b=0,c=a.length;b<c;b++){var d=a[b];this[d]=null!=this.options[d]?this.options[d]:this.map[d]}if(null==this.minZoomLevel||this.minZoomLevel<this.MIN_ZOOM_LEVEL)this.minZoomLevel=this.MIN_ZOOM_LEVEL;a=this.MAX_ZOOM_LEVEL-this.minZoomLevel+1;b=null==this.options.numZoomLevels&&null!=this.options.maxZoomLevel||null==this.numZoomLevels&&null!=this.maxZoomLevel? 1351this.maxZoomLevel-this.minZoomLevel+1:this.numZoomLevels;this.numZoomLevels=null!=b?Math.min(b,a):a;this.maxZoomLevel=this.minZoomLevel+this.numZoomLevels-1;if(null!=this.RESOLUTIONS){a=0;this.resolutions=[];for(b=this.minZoomLevel;b<=this.maxZoomLevel;b++)this.resolutions[a++]=this.RESOLUTIONS[b];this.maxResolution=this.resolutions[0];this.minResolution=this.resolutions[this.resolutions.length-1]}},getResolution:function(){if(null!=this.resolutions)return OpenLayers.Layer.prototype.getResolution.apply(this, 1352arguments);var a=null,b=this.map.getSize(),c=this.getExtent();null!=b&&null!=c&&(a=Math.max(c.getWidth()/b.w,c.getHeight()/b.h));return a},getExtent:function(){var a=this.map.getSize(),b=this.getLonLatFromViewPortPx({x:0,y:0}),a=this.getLonLatFromViewPortPx({x:a.w,y:a.h});return null!=b&&null!=a?new OpenLayers.Bounds(b.lon,a.lat,a.lon,b.lat):null},getZoomForResolution:function(a){return null!=this.resolutions?OpenLayers.Layer.prototype.getZoomForResolution.apply(this,arguments):this.getZoomForExtent(OpenLayers.Layer.prototype.getExtent.apply(this, 1353[]))},getOLZoomFromMapObjectZoom:function(a){var b=null;null!=a&&(b=a-this.minZoomLevel,this.map.baseLayer!==this&&(b=this.map.baseLayer.getZoomForResolution(this.getResolutionForZoom(b))));return b},getMapObjectZoomFromOLZoom:function(a){var b=null;null!=a&&(b=a+this.minZoomLevel,this.map.baseLayer!==this&&(b=this.getZoomForResolution(this.map.baseLayer.getResolutionForZoom(b))));return b},CLASS_NAME:"OpenLayers.Layer.FixedZoomLevels"}); 1354OpenLayers.Layer.Google=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:21,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,6.866455078125E-4,3.4332275390625E-4,1.71661376953125E-4,8.58306884765625E-5,4.291534423828125E-5,2.145767211914062E-5,1.072883605957031E-5,5.36441802978515E-6,2.68220901489257E-6,1.341104507446289E-6,6.705522537231445E-7], 1355type:null,wrapDateLine:!0,sphericalMercator:!1,version:null,initialize:function(a,b){b=b||{};if(!b.version)b.version="function"===typeof GMap2?"2":"3";var c=OpenLayers.Layer.Google["v"+b.version.replace(/\./g,"_")];if(c)OpenLayers.Util.applyDefaults(b,c);else throw"Unsupported Google Maps API version: "+b.version;OpenLayers.Util.applyDefaults(b,c.DEFAULTS);if(b.maxExtent)b.maxExtent=b.maxExtent.clone();OpenLayers.Layer.EventPane.prototype.initialize.apply(this,[a,b]);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this, 1356[a,b]);this.sphericalMercator&&(OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator),this.initMercatorParameters())},clone:function(){return new OpenLayers.Layer.Google(this.name,this.getOptions())},setVisibility:function(a){var b=null==this.opacity?1:this.opacity;OpenLayers.Layer.EventPane.prototype.setVisibility.apply(this,arguments);this.setOpacity(b)},display:function(a){this._dragging||this.setGMapVisibility(a);OpenLayers.Layer.EventPane.prototype.display.apply(this,arguments)},moveTo:function(a, 1357b,c){this._dragging=c;OpenLayers.Layer.EventPane.prototype.moveTo.apply(this,arguments);delete this._dragging}
1357,setOpacity:function(a){if(a!==this.opacity)null!=this.map&&this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"}),this.opacity=a;if(this.getVisibility()){var b=this.getMapContainer();OpenLayers.Util.modifyDOMElement(b,null,null,null,null,null,null,a)}},destroy:function(){if(this.map){this.setGMapVisibility(!1);var a=OpenLayers.Layer.Google.cache[this.map.id];a&&1>=a.count&& 1358this.removeGMapElements()}OpenLayers.Layer.EventPane.prototype.destroy.apply(this,arguments)},removeGMapElements:function(){var a=OpenLayers.Layer.Google.cache[this.map.id];if(a){var b=this.mapObject&&this.getMapContainer();b&&b.parentNode&&b.parentNode.removeChild(b);(b=a.termsOfUse)&&b.parentNode&&b.parentNode.removeChild(b);(a=a.poweredBy)&&a.parentNode&&a.parentNode.removeChild(a);this.mapObject&&window.google&&google.maps&&google.maps.event&&google.maps.event.clearListeners&&google.maps.event.clearListeners(this.mapObject, 1359"tilesloaded")}},removeMap:function(a){this.visibility&&this.mapObject&&this.setGMapVisibility(!1);var b=OpenLayers.Layer.Google.cache[a.id];b&&(1>=b.count?(this.removeGMapElements(),delete OpenLayers.Layer.Google.cache[a.id]):--b.count);delete this.termsOfUse;delete this.poweredBy;delete this.mapObject;delete this.dragObject;OpenLayers.Layer.EventPane.prototype.removeMap.apply(this,arguments)},getOLBoundsFromMapObjectBounds:function(a){var b=null;
1359null!=a&&(b=a.getSouthWest(),a=a.getNorthEast(),this.sphericalMercator? 1360(b=this.forwardMercator(b.lng(),b.lat()),a=this.forwardMercator(a.lng(),a.lat())):(b=new OpenLayers.LonLat(b.lng(),b.lat()),a=new OpenLayers.LonLat(a.lng(),a.lat())),b=new OpenLayers.Bounds(b.lon,b.lat,a.lon,a.lat));return b},getWarningHTML:function(){return OpenLayers.i18n("googleWarning")},getMapObjectCenter:function(){return this.mapObject.getCenter()},getMapObjectZoom:function(){return this.mapObject.getZoom()},getLongitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.lng(), 1361a.lat()).lon:a.lng()},getLatitudeFromMapObjectLonLat:function(a){return this.sphericalMercator?this.forwardMercator(a.lng(),a.lat()).lat:a.lat()},getXFromMapObjectPixel:function(a){return a.x},getYFromMapObjectPixel:function(a){return a.y},CLASS_NAME:"OpenLayers.Layer.Google"});OpenLayers.Layer.Google.cache={}; 1362OpenLayers.Layer.Google.v2={termsOfUse:null,poweredBy:null,dragObject:null,loadMapObject:function(){if(!this.type)this.type=G_NORMAL_MAP;var a,b,c,d=OpenLayers.Layer.Google.cache[this.map.id];if(d)a=d.mapObject,b=d.termsOfUse,c=d.poweredBy,++d.count;else{var d=this.map.viewPortDiv,e=document.createElement("div");e.id=this.map.id+"_GMap2Container";e.style.position="absolute";e.style.width="100%";e.style.height="100%";d.appendChild(e);try{a=new GMap2(e),b=e.lastChild,d.appendChild(b),b.style.zIndex= 1363"1100",b.style.right="",b.style.bottom="",b.className="olLayerGoogleCopyright",c=e.lastChild,d.appendChild(c),c.style.zIndex="1100",c.style.right="",c.style.bottom="",c.className="olLayerGooglePoweredBy gmnoprint"}catch(f){throw f;}OpenLayers.Layer.Google.cache[this.map.id]={mapObject:a,termsOfUse:b,poweredBy:c,count:1}}this.mapObject=a;this.termsOfUse=b;this.poweredBy=c;-1===OpenLayers.Util.indexOf(this.mapObject.getMapTypes(),this.type)&&this.mapObject.addMapType(this.type);"function"==typeof a.getDragObject? 1364this.dragObject=a.getDragObject():this.dragPanMapObject=null;!1===this.isBaseLayer&&this.setGMapVisibility("none"!==this.div.style.display)},onMapResize:function(){if(this.visibility&&this.mapObject.isLoaded())this.mapObject.checkResize();else{if(!this._resized)var a=this,b=GEvent.addListener(this.mapObject,"load",function(){GEvent.removeListener(b);delete a._resized;a.mapObject.checkResize();a.moveTo(a.map.getCenter(),a.map.getZoom())});this._resized=!0}}
1364,setGMapVisibility:function(a){var b=OpenLayers.Layer.Google.cache[this.map.id]; 1365if(b){var c=this.mapObject.getContainer();if(!0===a)this.mapObject.setMapType(this.type),c.style.display="",this.termsOfUse.style.left="",this.termsOfUse.style.display="",this.poweredBy.style.display="",b.displayed=this.id;else if(b.displayed===this.id&&delete b.displayed,!b.displayed)c.style.display="none",this.termsOfUse.style.display="none",this.termsOfUse.style.left="-9999px",this.poweredBy.style.display="none"}},getMapContainer:function(){return this.mapObject.getContainer()},getMapObjectBoundsFromOLBounds:function(a){var b= 1366null;null!=a&&(b=this.sphericalMercator?this.inverseMercator(a.bottom,a.left):new OpenLayers.LonLat(a.bottom,a.left),a=this.sphericalMercator?this.inverseMercator(a.top,a.right):new OpenLayers.LonLat(a.top,a.right),b=new GLatLngBounds(new GLatLng(b.lat,b.lon),new GLatLng(a.lat,a.lon)));return b},setMapObjectCenter:function(a,b){this.mapObject.setCenter(a,b)},dragPanMapObject:function(a,b){this.dragObject.moveBy(new GSize(-a,b))},getMapObjectLonLatFromMapObjectPixel:function(a){return this.mapObject.fromContainerPixelToLatLng(a)}, 1367getMapObjectPixelFromMapObjectLonLat:function(a){return this.mapObject.fromLatLngToContainerPixel(a)},getMapObjectZoomFromMapObjectBounds:function(a){return this.mapObject.getBoundsZoomLevel(a)}
1367,getMapObjectLonLatFromLonLat:function(a,b){var c;this.sphericalMercator?(c=this.inverseMercator(a,b),c=new GLatLng(c.lat,c.lon)):c=new GLatLng(b,a);return c},getMapObjectPixelFromXY:function(a,b){return new GPoint(a,b)}}; 1368OpenLayers.Layer.Google.v3={DEFAULTS:{sphericalMercator:!0,projection:"EPSG:900913"},animationEnabled:!0,loadMapObject:function(){if(!this.type)this.type=google.maps.MapTypeId.ROADMAP;var a,b=OpenLayers.Layer.Google.cache[this.map.id];b?(a=b.mapObject,++b.count):(a=this.map.getCenter(),b=document.createElement("div"),b.className="olForeignContainer",b.style.width="100%",b.style.height="100%",a=new google.maps.Map(b,{center:a?new google.maps.LatLng(a.lat,a.lon):new google.maps.LatLng(0,0),zoom:this.map.getZoom()|| 13690,mapTypeId:this.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,streetViewControl:!1}),b=document.createElement("div"),b.style.width="100%",b.style.height="100%",a.controls[google.maps.ControlPosition.TOP_LEFT].push(b),b={googleControl:b,mapObject:a,count:1},OpenLayers.Layer.Google.cache[this.map.id]=b);this.mapObject=a;this.setGMapVisibility(this.visibility)},onMapResize:function(){this.visibility&&google.maps.event.trigger(this.mapObject,"resize")},
1370setGMapVisibility:function(a){var b=OpenLayers.Layer.Google.cache[this.map.id],c=this.map;if(b){for(var d=this.type,e=c.layers,f,g=e.length-1;0<=g;--g)if(f=e[g],f instanceof OpenLayers.Layer.Google&&!0===f.visibility&&!0===f.inRange){d=f.type;a=!0;break}e=this.mapObject.getDiv();if(!0===a){if(e.parentNode!==c.div)if(b.rendered)c.div.appendChild(e),b.googleControl.appendChild(c.viewPortDiv),google.maps.event.trigger(this.mapObject,"resize");else{var h=this;google.maps.event.addListenerOnce(this.mapObject, 1371"tilesloaded",function(){b.rendered=!0;h.setGMapVisibility(h.getVisibility());h.moveTo(h.map.getCenter())})}this.mapObject.setMapTypeId(d)}else b.googleControl.hasChildNodes()&&(c.div.appendChild(c.viewPortDiv),c.div.removeChild(e))}},getMapContainer:function(){return this.mapObject.getDiv()},getMapObjectBoundsFromOLBounds:function(a){var b=null;null!=a&&(b=this.sphericalMercator?this.inverseMercator(a.bottom,a.left):new OpenLayers.LonLat(a.bottom,a.left),a=this.sphericalMercator?this.inverseMercator(a.top, 1372a.right):new OpenLayers.LonLat(a.top,a.right),b=new google.maps.LatLngBounds(new google.maps.LatLng(b.lat,b.lon),new google.maps.LatLng(a.lat,a.lon)));return b},getMapObjectLonLatFromMapObjectPixel:function(a){var b=this.map.getSize(),c=this.getLongitudeFromMapObjectLonLat(this.mapObject.center),d=this.getLatitudeFromMapObjectLonLat(this.mapObject.center),e=this.map.getResolution(),a=new OpenLayers.LonLat(c+(a.x-b.w/2)*e,d-(a.y-b.h/2)*e);this.wrapDateLine&&(a=a.wrapDateLine(this.maxExtent));
1372return this.getMapObjectLonLatFromLonLat(a.lon, 1373a.lat)},getMapObjectPixelFromMapObjectLonLat:function(a){var b=this.getLongitudeFromMapObjectLonLat(a),a=this.getLatitudeFromMapObjectLonLat(a),c=this.map.getResolution(),d=this.map.getExtent();return this.getMapObjectPixelFromXY(1/c*(b-d.left),1/c*(d.top-a))},setMapObjectCenter:function(a,b){if(!1===this.animationEnabled&&b!=this.mapObject.zoom){var c=this.getMapContainer();google.maps.event.addListenerOnce(this.mapObject,"idle",function(){c.style.visibility=""});c.style.visibility="hidden"}this.mapObject.setOptions({center:a, 1374zoom:b})},getMapObjectZoomFromMapObjectBounds:function(a){return this.mapObject.getBoundsZoomLevel(a)},getMapObjectLonLatFromLonLat:function(a,b){var c;this.sphericalMercator?(c=this.inverseMercator(a,b),c=new google.maps.LatLng(c.lat,c.lon)):c=new google.maps.LatLng(b,a);return c},getMapObjectPixelFromXY:function(a,b){return new google.maps.Point(a,b)}};Ext.namespace("gxp.plugins"); 1375gxp.plugins.GoogleSource=Ext.extend(gxp.plugins.LayerSource,{ptype:"gxp_googlesource",timeout:7E3,title:"Google Layers",roadmapAbstract:"Show street map",satelliteAbstract:"Show satellite imagery",hybridAbstract:"Show imagery with street names",terrainAbstract:"Show street map with terrain",otherParams:"sensor=false",constructor:function(a){this.config=a;gxp.plugins.GoogleSource.superclass.constructor.apply(this,arguments)},createStore:function(){gxp.plugins.GoogleSource.loader.onLoad({otherParams:this.otherParams, 1376timeout:this.timeout,callback:this.syncCreateStore,errback:function(){delete this.store;this.fireEvent("failure",this,"The Google Maps script failed to load within the provided timeout ("+this.timeout/1E3+" s).")},scope:this})},syncCreateStore:function(){var a={ROADMAP:{"abstract":this.roadmapAbstract,MAX_ZOOM_LEVEL:20},SATELLITE:{"abstract":this.satelliteAbstract},HYBRID:{"abstract":this.hybridAbstract},TERRAIN:{"abstract":this.terrainAbstract,MAX_ZOOM_LEVEL:15}},b=[],c,d;for(c in a)d=google.maps.MapTypeId[c], 1377b.push(new OpenLayers.Layer.Google("Google "+d.replace(/\w/,function(a){return a.toUpperCase()}),{type:d,typeName:c,MAX_ZOOM_LEVEL:a[c].MAX_ZOOM_LEVEL,maxExtent:new OpenLayers.Bounds(-2.003750834E7,-2.003750834E7,2.003750834E7,2.003750834E7),restrictedExtent:new OpenLayers.Bounds(-2.003750834E7,-2.003750834E7,2.003750834E7,2.003750834E7),projection:this.projection}));this.store=new GeoExt.data.LayerStore({layers:b,fields:[{name:"source",type:"string"},{name:"name",type:"string",mapping:"typeName"}, 1378{name:"abstract",type:"string"},{name:"group",type:"string",defaultValue:"background"},{name:"fixed",type:"boolean",defaultValue:!0},{name:"selected",type:"boolean"}]});this.store.each(function(b){b.set("abstract",a[b.get("name")]["abstract"])});this.fireEvent("ready",this)},createLayerRecord:function(a){var b,c=function(b){return b.get("name")===a.name};if(-1==this.target.mapPanel.layers.findBy(c)){b=this.store.getAt(this.store.findBy(c)).clone();c=b.getLayer();a.title&&(c.setName(a.title),b.set("title", 1379a.title));if("visibility"in a)c.visibility=a.visibility;b.set("selected",a.selected||!1);b.set("source",a.source);b.set("name",a.name);"group"in a&&b.set("group",a.group);b.commit()}return b}}); 1380gxp.plugins.GoogleSource.loader=new (Ext.extend(Ext.util.Observable,{ready:!(!window.google||!google.maps),loading:!1,constructor:function(){this.addEvents("ready","failure");return Ext.util.Observable.prototype.constructor.apply(this,arguments)},onScriptLoad:function(){var a=gxp.plugins.GoogleSource.loader;if(!a.ready)a.ready=!0,a.loading=!1,a.fireEvent("ready")},onLoad:function(a){if(this.ready)window.setTimeout(function(){a.callback.call(a.scope)},0);else if(this.loading)this.on({ready:a.callback, 1381failure:a.errback||Ext.emptyFn,scope:a.scope});else this.loadScript(a)},loadScript:function(a){function b(){document.getElementsByTagName("head")[0].appendChild(d)}var c={autoload:Ext.encode({modules:[{name:"maps",version:3.3,nocss:"true",callback:"gxp.plugins.GoogleSource.loader.onScriptLoad",other_params:a.otherParams}]})},d=document.createElement("script");d.src="http://www.google.com/jsapi?"+Ext.urlEncode(c);var e=a.errback||Ext.emptyFn,c=a.timeout||gxp.plugins.GoogleSource.prototype.timeout; 1382window.setTimeout(function(){if(!gxp.plugins.GoogleSource.loader.ready)this.ready=this.loading=!1,document.getElementsByTagName("head")[0].removeChild(d),e.call(a.scope),this.fireEvent("failure"),this.purgeListeners()}.createDelegate(this),c);this.on({ready:a.callback,scope:a.scope});this.loading=!0;if(document.body)b();else Ext.onReady(b)}}));Ext.preg(gxp.plugins.GoogleSource.prototype.ptype,gxp.plugins.GoogleSource);Ext.namespace("gxp.plugins"); 1383gxp.plugins.OLSource=Ext.extend(gxp.plugins.LayerSource,{ptype:"gxp_olsource",createLayerRecord:function(a){var b,c=window;b=a.type.split(".");for(var d=0,e=b.length;d<e&&!(c=c[b[d]],!c);++d);if(c&&c.prototype&&c.prototype.initialize){b=function(){c.prototype.initialize.apply(this,a.args
1383)};b.prototype=c.prototype;b=new b;if("visibility"in a)b.visibility=a.visibility;b=new (GeoExt.data.LayerRecord.create([{name:"name",type:"string"},{name:"source",type:"string"},{name:"group",type:"string"},{name:"fixed", 1384type:"boolean"},{name:"selected",type:"boolean"},{name:"type",type:"string"},{name:"args"}]))({layer:b,title:b.name,name:a.name||b.name,source:a.source,group:a.group,fixed:"fixed"in a?a.fixed:!1,selected:"selected"in a?a.selected:!1,type:a.type,args:a.args,properties:"properties"in a?a.properties:void 0},b.id)}else throw Error("Cannot construct OpenLayers layer from given type: "+a.type);return b},getConfigForRecord:function(a){var b=gxp.plugins.OLSource.superclass.getConfigForRecord.apply(this,arguments); 1385a.getLayer();return Ext.apply(b,{type:a.get("type"),args:a.get("args")})}});Ext.preg(gxp.plugins.OLSource.prototype.ptype,gxp.plugins.OLSource); 1386OpenLayers.Layer.OSM=OpenLayers.Class(OpenLayers.Layer.XYZ,{name:"OpenStreetMap",url:["http://a.tile.openstreetmap.org/${z}/${x}/${y}.png","http://b.tile.openstreetmap.org/${z}/${x}/${y}.png","http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"],attribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",sphericalMercator:!0,wrapDateLine:!0,tileOptions:null,initialize:function(a,b,c){OpenLayers.Layer.XYZ.prototype.initialize.apply(this,arguments);this.tileOptions= 1387OpenLayers.Util.extend({crossOriginKeyword:"anonymous"},this.options&&this.options.tileOptions)},clone:function(a){null==a&&(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"});Ext.namespace("gxp.plugins"); 1388gxp.plugins.OSMSource=Ext.extend(gxp.plugins.LayerSource,{ptype:"gxp_osmsource",title:"OpenStreetMap Layers",mapnikAttribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",osmarenderAttribution:"Data CC-By-SA by <a href='http://openstreetmap.org/' target='_blank'>OpenStreetMap</a>",createStore:function(){var a={projection:"EPSG:900913",maxExtent:new OpenLayers.Bounds(-2.00375083392E7,-2.00375083392E7,2.00375083392E7,2.00375083392E7),maxResolution:156543.03390625, 1389numZoomLevels:19,units:"m",buffer:1,transitionEffect:"resize"},a=[new OpenLayers.Layer.OSM("OpenStreetMap",["http://a.tile.openstreetmap.org/${z}/${x}/${y}.png","http://b.tile.openstreetmap.org/${z}/${x}/${y}.png","http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"],OpenLayers.Util.applyDefaults({attribution:this.mapnikAttribution,type:"mapnik"},a))];this.store=new GeoExt.data.LayerStore({layers:a,fields:[{name:"source",type:"string"},{name:"name",type:"string",mapping:"type"},{name:"abstract",type:"string", 1390mapping:"attribution"},{name:"group",type:"string",defaultValue:"background"},{name:"fixed",type:"boolean",defaultValue:!0},{name:"selected",type:"boolean"}]});this.store.each(function(a){a.set("group","background")});this.fireEvent("ready",this)},createLayerRecord:function(a){var b,c=this.store.findExact("name",a.name);if(-1<c){b=this.store.getAt(c).copy(Ext.data.Record.id({}));c=b.getLayer().clone();a.title&&(c.setName(a.title),b.set("title",a.title));if("visibility"in a)c.visibility=a.visibility; 1391b.set("selected",a.selected||!1);b.set("source",a.source);b.set("name",a.name);"group"in a&&b.set("group",a.group);b.data.layer=c;b.commit()}return b}});Ext.preg(gxp.plugins.OSMSource.prototype.ptype,gxp.plugins.OSMSource); 1392OpenLayers.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.Grid,{serviceVersion:"1.0.0",layername:null,type:null,isBaseLayer:!0,tileOrigin:null,serverResolutions:null,zoomOffset:0,initialize:function(a,b,c){var d=[];d.push(a,b,{},c);OpenLayers.Layer.Grid.prototype.initialize.apply(this,d)},clone:function(a){null==a&&(a=new OpenLayers.Layer.TMS(this.name,this.url,this.getOptions()));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},getURL:function(a){var a=this.adjustBounds(a),b=this.getServerResolution(), 1393c=Math.round((a.left-this.tileOrigin.lon)/(b*this.tileSize.w)),a=Math.round((a.bottom-this.tileOrigin.lat)/(b*this.tileSize.h)),c=this.serviceVersion+"/"+this.layername+"/"+this.getServerZoom()+"/"+c+"/"+a+"."+this.type,a=this.url;OpenLayers.Util.isArray(a)&&(a=this.selectUrl(c,a));return a+c},setMap:function(a){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin)this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom)},CLASS_NAME:"OpenLayers.Layer.TMS"}); 1394Ext.namespace("gxp.plugins"); 1395gxp.plugins.MapBoxSource=Ext.extend(gxp.plugins.LayerSource,{ptype:"gxp_mapboxsource",title:"MapBox Layers",blueMarbleTopoB
1395athyJanTitle:"Blue Marble Topography & Bathymetry (January)",blueMarbleTopoBathyJulTitle:"Blue Marble Topography & Bathymetry (July)",blueMarbleTopoJanTitle:"Blue Marble Topography (January)",blueMarbleTopoJulTitle:"Blue Marble Topography (July)",controlRoomTitle:"Control Room",geographyClassTitle:"Geography Class",naturalEarthHypsoTitle:"Natural Earth Hypsometric",naturalEarthHypsoBathyTitle:"Natural Earth Hypsometric & Bathymetry", 1396naturalEarth1Title:"Natural Earth I",naturalEarth2Title:"Natural Earth II",worldDarkTitle:"World Dark",worldLightTitle:"World Light",worldGlassTitle:"World Glass",worldPrintTitle:"World Print",createStore:function(){for(var a={projection:"EPSG:900913",numZoomLevels:19,serverResolutions:[156543.03390625,78271.516953125,39135.7584765625,19567.87923828125,9783.939619140625,4891.9698095703125,2445.9849047851562,1222.9924523925781,611.4962261962891,305.74811309814453,152.87405654907226,76.43702827453613, 139738.218514137268066,19.109257068634033,9.554628534317017,4.777314267158508,2.388657133579254,1.194328566789627,0.5971642833948135],buffer:1},b=[{name:"blue-marble-topo-bathy-jan",numZoomLevels:9},{name:"blue-marble-topo-bathy-jul",numZoomLevels:9},{name:"blue-marble-topo-jan",numZoomLevels:9},{name:"blue-marble-topo-jul",numZoomLevels:9},{name:"control-room",numZoomLevels:9},{name:"geography-class",numZoomLevels:9},{name:"natural-earth-hypso",numZoomLevels:7},{name:"natural-earth-hypso-bathy",numZoomLevels:7}, 1398{name:"natural-earth-1",numZoomLevels:7},{name:"natural-earth-2",numZoomLevels:7},{name:"world-dark",numZoomLevels:12},{name:"world-light",numZoomLevels:12},{name:"world-glass",numZoomLevels:11},{name:"world-print",numZoomLevels:10}],c=b.length,d=Array(c),e,f=0;f<c;++f)e=b[f],d[f]=new OpenLayers.Layer.TMS(this[OpenLayers.String.camelize(e.name)+"Title"],["http://a.tiles.mapbox.com/mapbox/","http://b.tiles.mapbox.com/mapbox/","http://c.tiles.mapbox.com/mapbox/","http://d.tiles.mapbox.com/mapbox/"], 1399OpenLayers.Util.applyDefaults({attribution:/^world/.test(name)?"<a href='http://mapbox.com'>MapBox</a> | Some Data © OSM CC-BY-SA | <a href='http://mapbox.com/tos'>Terms of Service</a>":"<a href='http://mapbox.com'>MapBox</a> | <a href='http://mapbox.com/tos'>Terms of Service</a>",type:"png",tileOrigin:new OpenLayers.LonLat(-2.003750834E7,-2.003750834E7),layername:e.name,"abstract":'<div class="thumb-mapbox thumb-mapbox-'+e.name+'"></div>',numZoomLevels:e.numZoomLevels},a));this.store=new GeoExt.data.LayerStore({layers:d, 1400fields:[{name:"source",type:"string"},{name:"name",type:"string",mapping:"layername"},{name:"abstract",type:"string"},{name:"group",type:"string"},{name:"fixed",type:"boolean"},{name:"selected",type:"boolean"}]});this.fireEvent("ready",this)},createLayerRecord:function(a){var b,c=this.store.findExact("name",a.name);if(-1<c){b=this.store.getAt(c).copy(Ext.data.Record.id({}));c=b.getLayer().clone();a.title&&(c.setName(a.title),b.set("title",a.title));if("visibility"in a)c.visibility=a.visibility;b.set("selected", 1401a.selected||!1);b.set("source",a.source);b.set("name",a.name);"group"in a&&b.set("group",a.group);b.data.layer=c;b.commit()}return b}});Ext.preg(gxp.plugins.MapBoxSource.prototype.ptype,gxp.plugins.MapBoxSource);Ext.namespace("gxp.plugins"); 1402gxp.plugins.MapQuestSource=Ext.extend(gxp.plugins.LayerSource,{ptype:"gxp_mapquestsource",title:"MapQuest Layers",osmAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>",osmTitle:"MapQuest OpenStreetMap",naipAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 1403naipTitle:"MapQuest Imagery",createStore:function(){var a={projection:"EPSG:900913",maxExtent:new OpenLayers.Bounds(-2.00375083392E7,-2.00375083392E7,2.00375083392E7,2.00375083392E7),maxResolution:156543.03390625,numZoomLevels:19,units:"m",buffer:1,transitionEffect:"resize",tileOptions:{crossOriginKeyword:null}}
1403,a=[new OpenLayers.Layer.OSM(this.osmTitle,["http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png","http://otile2.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png","http://otile3.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png", 1404"http://otile4.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png"],OpenLayers.Util.applyDefaults({attribution:this.osmAttribution,type:"osm"},a)),new OpenLayers.Layer.OSM(this.naipTitle,["http://otile1.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.png","http://otile2.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.png","http://otile3.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.png","http://otile4.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.png"],OpenLayers.Util.applyDefaults({attribution:this.naipAttribution,type:"naip"}, 1405a))];this.store=new GeoExt.data.LayerStore({layers:a,fields:[{name:"source",type:"string"},{name:"name",type:"string",mapping:"type"},{name:"abstract",type:"string",mapping:"attribution"},{name:"group",type:"string",defaultValue:"background"},{name:"fixed",type:"boolean",defaultValue:!0},{name:"selected",type:"boolean"}]});this.store.each(function(a){a.set("group","background")});this.fireEvent("ready",this)},createLayerRecord:function(a){var b,c=this.store.findExact("name",a.name);if(-1<c){b=this.store.getAt(c).copy(Ext.data.Record.id({})); 1406c=b.getLayer().clone();a.title&&(c.setName(a.title),b.set("title",a.title));if("visibility"in a)c.visibility=a.visibility;b.set("selected",a.selected||!1);b.set("source",a.source);b.set("name",a.name);"group"in a&&b.set("group",a.group);b.data.layer=c;b.commit()}return b}});Ext.preg(gxp.plugins.MapQuestSource.prototype.ptype,gxp.plugins.MapQuestSource);Ext.namespace("gxp.plugins"); 1407gxp.plugins.QueryForm=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_queryform",featureManager:null,autoHide:!1,schema:null,queryActionText:"Query",cancelButtonText:"Cancel",queryMenuText:"Query layer",queryActionTip:"Query the selected layer",queryByLocationText:"Query by current map extent",queryByAttributesText:"Query by attributes",queryMsg:"Querying...",noFeaturesTitle:"No Match",noFeaturesMessage:"Your query did not return any results.",outputAction:0,autoExpand:null,addActions:function(a){!this.initialConfig.actions&& 1408!a&&(a=[{text:this.queryActionText,menuText:this.queryMenuText,iconCls:"gxp-icon-find",tooltip:this.queryActionTip,disabled:!0,toggleGroup:this.toggleGroup,enableToggle:!0,allowDepress:!0,toggleHandler:function(a,c){if(this.autoExpand&&0<this.output.length){var d=Ext.getCmp(this.autoExpand);d[c?"expand":"collapse"]();c?(d.expand(),d.ownerCt&&d.ownerCt instanceof Ext.Panel&&d.ownerCt.expand()):this.target.tools[this.featureManager].loadFeatures()}},scope:this}]);this.actions=gxp.plugins.QueryForm.superclass.addActions.apply(this, 1409a);if(null!==this.actionTarget&&this.actions)this.target.tools[this.featureManager].on("layerchange",function(a,c,d){for(a=this.actions.length-1;0<=a;--a)this.actions[a].setDisabled(!d)},this)},addOutput:function(a){var b=this.target.tools[this.featureManager],a=Ext.apply({border:!1,bodyStyle:"padding: 10px",layout:"form",width:320,autoScroll:!0,items:[{xtype:"fieldset",ref:"spatialFieldset",title:this.queryByLocationText,anchor:"97%",style:"margin-bottom:0; border-left-color:transparent; border-right-color:transparent; border-width:1px 1px 0 1px; padding-bottom:0", 1410checkboxToggle:!0},{xtype:"fieldset",ref:"attributeFieldset",title:this.queryByAttributesText,anchor:"97%",style:"margin-bottom:0",checkboxToggle:!0}],bbar:["->",{text:this.cancelButtonText,iconCls:"cancel",handler:function(){var a=this.outputTarget?c.ownerCt:c.ownerCt.ownerCt;a&&a instanceof Ext.Window&&a.hide();g(b,b.layerRecord,b.schema);b.loadFeatures()}},{text:this.queryActionText,iconCls:"gxp-icon-find",handler:function(){var a=[];!0!==c.spatialFieldset.collapsed&&a.push(new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX, 1411property:b.featureStore.geometryName,value:this.target.mapPanel.map.getExtent()}));if(!0!==c.attributeFieldset.collapsed){var d=c.filterBuilder.getFilter();d&&a.push(d)}b.loadFeatures(1<a.length?new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:a}):a[0])},scope:this}]},a||{}),c=gxp.plugins.QueryForm.superclass.addOutput.call(this,a),d=null,e=!0;if(this.autoExpand){var d=Ext.getCmp(this.autoExpand),f=function(){e&&(d.un("expand",f),d.un("collapse",f),d=null);e=!0};d.on({expand:f, 1412collapse:f})}var g=function(a,b,f){c.attributeFieldset.removeAll();c.setDisabled(!f);d&&(e=!1,d[f?"expand":"collapse"](),f&&d&&d.ownerCt&&d.ownerCt instanceof Ext.Panel&&d.ownerCt.expand());f?(c.attributeFieldset.add({xtype:"gxp_filterbuilder",ref:"../filterBuilder",attributes:f,allowBlank:!0,allowGroups:!1}),c.spatialFieldset.expand(),c.attributeFieldset.expand()):(c.attributeFieldset.rendered&&c.attributeFieldset.collapse(),c.spatialFieldset.rendered&&c.spatialFieldset.collapse());c.attributeFieldset.doLayout()}; 1413b.on("layerchange",g);g(b,b.layerRecord,b.schema);b.on({beforequery:function(){(new Ext.LoadMask(c.getEl(),{store:b.featureStore,msg:this.queryMsg})).show()},query:function(a,b){if(b&&null!==this.target.tools[this.featureManager].featureStore&&(b.getCount()||Ext.Msg.show({title:this.noFeaturesTitle,msg:this.noFeaturesMessage,buttons:Ext.Msg.OK,icon:Ext.Msg.INFO}),this.autoHide)){var d=this.outputTarget?c.ownerCt:c.ownerCt.ownerCt;d instanceof Ext.Window&&d.hide()}},scope:this});return c}}); 1414Ext.preg(gxp.plugins.QueryForm.prototype.ptype,gxp.plugins.QueryForm);OpenLayers.Format.WMSCapabilities=OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC,{defaultVersion:"1.1.1",profile:null,CLASS_NAME:"OpenLayers.Format.WMSCapabilities"}); 1415OpenLayers.Format.WMSCapabilities.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{wms:"http://www.opengis.net/wms",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"wms",read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=a;if(a&&9==a.nodeType)a=a.documentElement;var c={};this.readNode(a,c);if(void 0===c.service)a=new OpenLayers.Format.OGCExceptionReport,c.error=a.read(b);return c},readers:{wms:{Service:function(a, 1416b){b.service={};this.readChildNodes(a,b.service)},Name:function(a,b){b.name=this.getChildValue(a)},Title:function(a,b){b.title=this.getChildValue(a)},Abstract:function(a,b){b["abstract"]=this.getChildValue(a)},BoundingBox:function(a){var b={};b.bbox=[parseFloat(a.getAttribute("minx")),parseFloat(a.getAttribute("miny")),parseFloat(a.getAttribute("maxx")),parseFloat(a.getAttribute("maxy"))];a={x:parseFloat(a.getAttribute("resx")),y:parseFloat(a.getAttribute("resy"))};if(!isNaN(a.x)||!isNaN(a.y))b.res= 1417a;return b},OnlineResource:function(a,b){b.href=this.getAttributeNS(a,this.namespaces.xlink,"href")},ContactInformation:function(a,b){b.contactInformation={};this.readChildNodes(a,b.contactInformation)},ContactPersonPrimary:function(a,b){b.personPrimary={};this.readChildNodes(a,b.personPrimary)},ContactPerson:function(a,b){b.person=this.getChildValue(a)},ContactOrganization:function(a,b){b.organization=this.getChildValue(a)},ContactPosition:function(a,b){b.position=this.getChildValue(a)},ContactAddress:function(a, 1418b){b.contactAddress={};this.readChildNodes(a,b.contactAddress)},AddressType:function(a,b){b.type=this.getChildValue(a)},Address:function(a,b){b.address=this.getChildValue(a)},City:function(a,b){b.city=this.getChildValue(a)},StateOrProvince:function(a,b){b.stateOrProvince=this.getChildValue(a)}
1418,PostCode:function(a,b){b.postcode=this.getChildValue(a)},Country:function(a,b){b.country=this.getChildValue(a)},ContactVoiceTelephone:function(a,b){b.phone=this.getChildValue(a)},ContactFacsimileTelephone:function(a, 1419b){b.fax=this.getChildValue(a)},ContactElectronicMailAddress:function(a,b){b.email=this.getChildValue(a)},Fees:function(a,b){var c=this.getChildValue(a);if(c&&"none"!=c.toLowerCase())b.fees=c},AccessConstraints:function(a,b){var c=this.getChildValue(a);if(c&&"none"!=c.toLowerCase())b.accessConstraints=c},Capability:function(a,b){b.capability={nestedLayers:[],layers:[]};this.readChildNodes(a,b.capability)},Request:function(a,b){b.request={};this.readChildNodes(a,b.request)},GetCapabilities:function(a, 1420b){b.getcapabilities={formats:[]};this.readChildNodes(a,b.getcapabilities)},Format:function(a,b){OpenLayers.Util.isArray(b.formats)?b.formats.push(this.getChildValue(a)):b.format=this.getChildValue(a)},DCPType:function(a,b){this.readChildNodes(a,b)},HTTP:function(a,b){this.readChildNodes(a,b)},Get:function(a,b){b.get={};this.readChildNodes(a,b.get);if(!b.href)b.href=b.get.href},Post:function(a,b){b.post={};this.readChildNodes(a,b.post);if(!b.href)b.href=b.get.href},GetMap:function(a,b){b.getmap={formats:[]}; 1421this.readChildNodes(a,b.getmap)},GetFeatureInfo:function(a,b){b.getfeatureinfo={formats:[]};this.readChildNodes(a,b.getfeatureinfo)},Exception:function(a,b){b.exception={formats:[]};this.readChildNodes(a,b.exception)},Layer:function(a,b){var c,d;b.capability?(d=b.capability,c=b):d=b;var e=a.getAttributeNode("queryable"),f=e&&e.specified?a.getAttribute("queryable"):null,g=(e
1421=a.getAttributeNode("cascaded"))&&e.specified?a.getAttribute("cascaded"):null,e=(e=a.getAttributeNode("opaque"))&&e.specified? 1422a.getAttribute("opaque"):null,h=a.getAttribute("noSubsets"),i=a.getAttribute("fixedWidth"),j=a.getAttribute("fixedHeight"),k=c||{},l=OpenLayers.Util.extend;c={nestedLayers:[],styles:c?[].concat(c.styles):[],srs:c?l({},k.srs):{},metadataURLs:[],bbox:c?l({},k.bbox):{},llbbox:k.llbbox,dimensions:c?l({},k.dimensions):{},authorityURLs:c?l({},k.authorityURLs):{},identifiers:{},keywords:[],queryable:f&&""!==f?"1"===f||"true"===f:k.queryable||!1,cascaded:null!==g?parseInt(g):k.cascaded||0,opaque:e?"1"=== 1423e||"true"===e:k.opaque||!1,noSubsets:null!==h?"1"===h||"true"===h:k.noSubsets||!1,fixedWidth:null!=i?parseInt(i):k.fixedWidth||0,fixedHeight:null!=j?parseInt(j):k.fixedHeight||0,minScale:k.minScale,maxScale:k.maxScale,attribution:k.attribution};b.nestedLayers.push(c);c.capability=d;this.readChildNodes(a,c);delete c.capability;if(c.name){f=c.name.split(":");g=d.request;e=g.getfeatureinfo;if(0<f.length)c.prefix=f[0];d.layers.push(c);if(void 0===c.formats)c.formats=g.getmap.formats;if(void 0===c.infoFormats&& 1424e)c.infoFormats=e.formats}},Attribution:function(a,b){b.attribution={};this.readChildNodes(a,b.attribution)},LogoURL:function(a,b){b.logo={width:a.getAttribute("width"),height:a.getAttribute("height")};this.readChildNodes(a,b.logo)},Style:function(a,b){var c={};b.styles.push(c);this.readChildNodes(a,c)},LegendURL:function(a,b){var c={width:a.getAttribute("width"),height:a.getAttribute("height")};b.legend=c;this.readChildNodes(a,c)},MetadataURL:function(a,b){var c={type:a.getAttribute("type")};b.metadataURLs.push(c); 1425this.readChildNodes(a,c)},DataURL:function(a,b){b.dataURL={};this.readChildNodes(a,b.dataURL)},FeatureListURL:function(a,b){b.featureListURL={};this.readChildNodes(a,b.featureListURL)},AuthorityURL:function(a,b){var c=a.getAttribute("name"),d={};this.readChildNodes(a,d);b.authorityURLs[c]=d.href},Identifier:function(a,b){var c=a.getAttribute("authority");b.identifiers[c]=this.getChildValue(a)},KeywordList:function(a,b){this.readChildNodes(a,b)},SRS:function(a,b){b.srs[this.getChildValue(a)]=!0}}}, 1426CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1"}); 1427OpenLayers.Format.WMSCapabilities.v1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1,{readers:{wms:OpenLayers.Util.applyDefaults({WMT_MS_Capabilities:function(a,b){this.readChildNodes(a,b)},Keyword:function(a,b){b.keywords&&b.keywords.push(this.getChildValue(a))},DescribeLayer:function(a,b){b.describelayer={formats:[]};this.readChildNodes(a,b.describelayer)},GetLegendGraphic:function(a,b){b.getlegendgraphic={formats:[]};this.readChildNodes(a,b.getlegendgraphic)},GetStyles:function(a,b){b.getstyles= 1428{formats:[]};this.readChildNodes(a,b.getstyles)},PutStyles:function(a,b){b.putstyles={formats:[]};this.readChildNodes(a,b.putstyles)},UserDefinedSymbolization:function(a,b){var c={supportSLD:1==parseInt(a.getAttribute("SupportSLD")),userLayer:1==parseInt(a.getAttribute("UserLayer")),userStyle:1==parseInt(a.getAttribute("UserStyle")),remoteWFS:1==parseInt(a.getAttribute("RemoteWFS"))};b.userSymbols=c},LatLonBoundingBox:function(a,b){b.llbbox=[parseFloat(a.getAttribute("minx")),parseFloat(a.getAttribute("miny")), 1429parseFloat(a.getAttribute("maxx")),parseFloat(a.getAttribute("maxy"))]},BoundingBox:function(a,b){var c=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms.BoundingBox.apply(this,[a,b]);c.srs=a.getAttribute("SRS");b.bbox[c.srs]=c},ScaleHint:function(a,b){var c=a.getAttribute("min"),d=a.getAttribute("max"),e=Math.pow(2,0.5),f=OpenLayers.INCHES_PER_UNIT.m;if(0!=c)b.maxScale=parseFloat((c/e*f*OpenLayers.DOTS_PER_INCH).toPrecision(13));if(d!=Number.POSITIVE_INFINITY)b.minScale=parseFloat((d/e* 1430f*OpenLayers.DOTS_PER_INCH).toPrecision(13))},Dimension:function(a,b){var c={name:a.getAttribute("name").toLowerCase(),units:a.getAttribute("units"),unitsymbol:a.getAttribute("unitSymbol")};b.dimensions[c.name]=c},Extent:function(a,b){var c=a.getAttribute("name").toLowerCase();if(c in b.dimensions){c=b.dimensions[c];c.nearestVal="1"===a.getAttribute("nearestValue");c.multipleVal="1"===a.getAttribute("multipleValues");c.current="1"===a.getAttribute("current");c["default"]=a.getAttribute("default")|| 1431"";var d=this.getChildValue(a);c.values=d.split(",")}}},OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1"});OpenLayers.Format.WMSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.0",readers:{wms:OpenLayers.Util.applyDefaults({SRS:function(a,b){for(var c=this.getChildValue(a).split(/ +/),d=0,e=c.length;d<e;d++)b.srs[c[d]]=!0}},OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_0"}); 1432OpenLayers.Format.WMSCapabilities.v1_1_1=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1,{version:"1.1.1",readers:{wms:OpenLayers.Util.applyDefaults({SRS:function(a,b){b.srs[this.getChildValue(a)]=!0}},OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_1"}); 1433OpenLayers.Format.WMSCapabilities.v1_3=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1,{readers:{wms:OpenLayers.Util.applyDefaults({WMS_Capabilities:function(a,b){this.readChildNodes(a,b)},LayerLimit:function(a,b){b.layerLimit=parseInt(this.getChildValue(a))},MaxWidth:function(a,b){b.maxWidth=parseInt(this.getChildValue(a))},MaxHeight:function(a,b){b.maxHeight=parseInt(this.getChildValue(a))},BoundingBox:function(a,b){var c=OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms.BoundingBox.apply(this, 1434[a,b]);c.srs=a.getAttribute("CRS");b.bbox[c.srs]=c},CRS:function(a,b){this.readers.wms.SRS.apply(this,[a,b])},EX_GeographicBoundingBox:function(a,b){b.llbbox=[];this.readChildNodes(a,b.llbbox)},westBoundLongitude:function(a,b){b[0]=this.getChildValue(a)},eastBoundLongitude:function(a,b){b[2]=this.getChildValue(a)},southBoundLatitude:function(a,b){b[1]=this.getChildValue(a)},northBoundLatitude:function(a,b){b[3]=this.getChildValue(a)},MinScaleDenominator:function(a,b){b.maxScale=parseFloat(this.getChildValue(a)).toPrecision(16)}, 1435MaxScaleDenominator:function(a,b){b.minScale=parseFloat(this.getChildValue(a)).toPrecision(16)},Dimension:function(a,b){var c={name:a.getAttribute("name").toLowerCase(),units:a.getAttribute("units"),unitsymbol:a.getAttribute("unitSymbol"),nearestVal:"1"===a.getAttribute("nearestValue"),multipleVal:"1"===a.getAttribute("multipleValues"),"default":a.getAttribute("default")||"",current:"1"===a.getAttribute("current"),values:this.getChildValue(a).split(",")};b.dimensions[c.name]=c},Keyword:function(a, 1436b){var c={value:this.getChildValue(a),vocabulary:a.getAttribute("vocabulary")}
1436;b.keywords&&b.keywords.push(c)}},OpenLayers.Format.WMSCapabilities.v1.prototype.readers.wms),sld:{UserDefinedSymbolization:function(a,b){this.readers.wms.UserDefinedSymbolization.apply(this,[a,b]);b.userSymbols.inlineFeature=1==parseInt(a.getAttribute("InlineFeature"));b.userSymbols.remoteWCS=1==parseInt(a.getAttribute("RemoteWCS"))},DescribeLayer:function(a,b){this.readers.wms.DescribeLayer.apply(this,[a,b])},GetLegendGraphic:function(a, 1437b){this.readers.wms.GetLegendGraphic.apply(this,[a,b])}}},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_3"});OpenLayers.Format.WMSCapabilities.v1_3_0=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_3,{version:"1.3.0",CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_3_0"});Ext.namespace("GeoExt.data"); 1438GeoExt.data.WMSCapabilitiesReader=function(a,b){a=a||{};if(!a.format)a.format=new OpenLayers.Format.WMSCapabilities;"function"!==typeof b&&(b=GeoExt.data.LayerRecord.create(b||a.fields||[{name:"name",type:"string"},{name:"title",type:"string"},{name:"abstract",type:"string"},{name:"queryable",type:"boolean"},{name:"opaque",type:"boolean"},{name:"noSubsets",type:"boolean"},{name:"cascaded",type:"int"},{name:"fixedWidth",type:"int"},{name:"fixedHeight",type:"int"},{name:"minScale",type:"float"},{name:"maxScale", 1439type:"float"},{name:"prefix",type:"string"},{name:"formats"},{name:"styles"},{name:"srs"},{name:"dimensions"},{name:"bbox"},{name:"llbbox"},{name:"attribution"},{name:"keywords"},{name:"identifiers"},{name:"authorityURLs"},{name:"metadataURLs"},{name:"infoFormats"}]));GeoExt.data.WMSCapabilitiesReader.superclass.constructor.call(this,a,b)}; 1440Ext.extend(GeoExt.data.WMSCapabilitiesReader,Ext.data.DataReader,{attributionCls:"gx-attribution",read:function(a){var b=a.responseXML;if(!b||!b.documentElement)b=a.responseText;return this.readRecords(b)},serviceExceptionFormat:function(a){return-1<OpenLayers.Util.indexOf(a,"application/vnd.ogc.se_inimage")?"application/vnd.ogc.se_inimage":-1<OpenLayers.Util.indexOf(a,"application/vnd.ogc.se_xml")?"application/vnd.ogc.se_xml":a[0]},imageFormat:function(a){var b=a.formats;return a.opaque&&-1<OpenLayers.Util.indexOf(b, 1441"image/jpeg")?"image/jpeg":-1<OpenLayers.Util.indexOf(b,"image/png")?"image/png":-1<OpenLayers.Util.indexOf(b,"image/png; mode=24bit")?"image/png; mode=24bit":-1<OpenLayers.Util.indexOf(b,"image/gif")?"image/gif":b[0]},imageTransparent:function(a){return void 0==a.opaque||!a.opaque},readRecords:function(a){if("string"===typeof a||a.nodeType)a=this.meta.format.read(a);if(a.error)throw new Ext.data.DataReader.Error("invalid-response",a.error);var b=a.version,c=a.capability||{},a=c.request&&c.request.getmap&& 1442c.request.getmap.href,d=c.layers,c=this.serviceExceptionFormat(c.exception?c.exception.formats:[]),e=[];if(a&&d)for(var f=this.recordType.prototype.fields,g,h,i,j,k=0,l=d.length;k<l;k++)if(g=d[k],g.name){h={};for(var m=0,n=f.length;m<n;m++)i=f.items[m],j=g[i.mapping||i.name]||i.defaultValue,j=i.convert(j),h[i.name]=j;i={attribution:g.attribution?this.attributionMarkup(g.attribution):void 0,minScale:g.minScale,maxScale:g.maxScale};this.meta.layerOptions&&Ext.apply(i,this.meta.layerOptions);j={layers:g.name, 1443exceptions:c,format:this.imageFormat(g),transparent:this.imageTransparent(g),version:b};this.meta.layerParams&&Ext.apply(j,this.meta.layerParams);h.layer=new OpenLayers.Layer.WMS(g.title||g.name,a,j,i);e.push(new this.recordType(h,h.layer.id))}return{totalRecords:e.length,success:!0,records:e}},attributionMarkup:function(a){var b=[];a.logo&&b.push("<img class='"+this.attributionCls+"-image' src='"+a.logo.href+"' />");
1443a.title&&b.push("<span class='"+this.attributionCls+"-title'>"+a.title+"</span>"); 1444if(a.href)for(var c=0;c<b.length;c++)b[c]="<a class='"+this.attributionCls+"-link' href="+a.href+">"+b[c]+"</a>";return b.join(" ")}});Ext.namespace("GeoExt.data");GeoExt.data.WMSCapabilitiesStore=function(a){a=a||{};GeoExt.data.WMSCapabilitiesStore.superclass.constructor.call(this,Ext.apply(a,{proxy:a.proxy||(!a.data?new Ext.data.HttpProxy({url:a.url,disableCaching:!1,method:"GET"}):void 0),reader:new GeoExt.data.WMSCapabilitiesReader(a,a.fields)}))};Ext.extend(GeoExt.data.WMSCapabilitiesStore,Ext.data.Store); 1445Ext.namespace("GeoExt.data");GeoExt.data.WMSDescribeLayerStore=function(a){a=a||{};GeoExt.data.WMSDescribeLayerStore.superclass.constructor.call(this,Ext.apply(a,{proxy:a.proxy||(!a.data?new Ext.data.HttpProxy({url:a.url,disableCaching:!1,method:"GET"}):void 0),reader:new GeoExt.data.WMSDescribeLayerReader(a,a.fields)}))};Ext.extend(GeoExt.data.WMSDescribeLayerStore,Ext.data.Store); 1446(function(){function a(a){var c=this.meta.format;if("string"===typeof a||a.nodeType){var a=c.read(a),d=c.read;c.read=function(){c.read=d;return a}}this.raw=a}Ext.intercept(GeoExt.data.WMSCapabilitiesReader.prototype,"readRecords",a);GeoExt.data.AttributeReader&&Ext.intercept(GeoExt.data.AttributeReader.prototype,"readRecords",a)})();Ext.namespace("gxp.plugins"); 1447gxp.plugins.WMSSource=Ext.extend(gxp.plugins.LayerSource,{ptype:"gxp_wmssource",baseParams:null,format:null,describeLayerStore:null,describedLayers:null,schemaCache:null,ready:!1,requiredProperties:["title","bbox"],constructor:function(a){if(a&&!0===a.forceLazy)a.requiredProperties=[],delete a.forceLazy,window.console&&console.warn("Deprecated config option 'forceLazy: true' for layer source '"+a.id+"'. Use 'requiredProperties: []' instead.");gxp.plugins.WMSSource.superclass.constructor.apply(this, 1448arguments);if(!this.format)this.format=new OpenLayers.Format.WMSCapabilities({keepData:!0})},init:function(a){gxp.plugins.WMSSource.superclass.init.apply(this,arguments);this.target.on("authorizationchange",this.onAuthorizationChange,this)},onAuthorizationChange:function(){this.store&&"/"===this.url.charAt(0)&&this.store.reload()},destroy:function(){this.target.un("authorizationchange",this.onAuthorizationChange,this);gxp.plugins.WMSSource.superclass.destroy.apply(this,arguments)},isLazy:function(){var a= 1449!0,b=this.target.initialConfig.map;if(b&&b.layers)for(var c,d=0,e=b.layers.length;d<e&&!(c=b.layers[d],c.source===this.id&&(a=this.layerConfigComplete(c),!1===a));++d);return a},layerConfigComplete:function(a){var b=!0;if(!Ext.isObject(a.capability))for(var c=this.requiredProperties,d=c.length-1;0<=d&&!(b=!!a[c[d]],!1===b);--d);return b},createStore:function(){var a=this.baseParams||{SERVICE:"WMS",REQUEST:"GetCapabilities"};if(this.version)a.VERSION=this.version;var b=this.isLazy();this.store=new GeoExt.data.WMSCapabilitiesStore({url:this.trimUrl(this.url, 1450a),baseParams:a,format:this.format,autoLoad:!b,layerParams:{exceptions:null},listeners:{load:function(){if(!this.store.reader.raw||!this.store.reader.raw.service)this.fireEvent("failure",this,"Invalid capabilities document.");else{if(!this.title)this.title=this.store.reader.raw.service.title;this.ready?this.lazy=!1:(this.ready=!0,this.fireEvent("ready",this))}delete this.format.data},exception:function(a,b,e,f,g,h){delete this.store;a="";"response"===b?"string"==typeof h?b=h:(b="Invalid response from server.", 1451(a=this.format&&this.format.data)&&a.parseError&&(b+=" "+a.parseError.reason+" - line: "+a.parseError.line),g=g.status,a=200<=g&&300>g?gxp.util.getOGCExceptionText(h&&h.arg&&h.arg.exceptionReport):"Status: "+g):(b="Trouble creating layer store from response.",a="Unable to handle response.");this.fireEvent("failure",this,b,a);delete this.format.data},scope:this}});if(b)this.lazy=!0,Ext.Ajax.request({method:"GET",url:this.url,params:{SERVICE:"WMS"},callback:function(a,b,e){a=e.status;200<=a&&403>a&& 1452e.responseText?(this.ready=!0,this.fireEvent("ready",this)):this.fireEvent("failure",this,"Layer source not available.","Unable to contact WMS service.")},scope:this})},trimUrl:function(a,b){var c=OpenLayers.Util.getParameters(a),b=Ope
1452nLayers.Util.upperCaseObject(b),d=0,e;for(e in c)++d,e.toUpperCase()in b&&(--d,delete c[e]);return a.split("?").shift()+(d?"?"+OpenLayers.Util.getParameterString(c):"")},createLazyLayerRecord:function(a){var a=Ext.apply({},a),b=a.srs||this.target.map.projection;a.srs= 1453{};a.srs[b]=!0;var c=a.bbox||this.target.map.maxExtent||OpenLayers.Projection.defaults[b].maxExtent;a.bbox={};a.bbox[b]={bbox:c};c=this.store&&this.store instanceof GeoExt.data.WMSCapabilitiesStore?new this.store.recordType(a):new GeoExt.data.LayerRecord(a);c.setLayer(new OpenLayers.Layer.WMS(a.title||a.name,a.url||this.url,{layers:a.name,transparent:"transparent"in a?a.transparent:!0,cql_filter:a.cql_filter,format:a.format},{projection:b}));c.json=a;return c},createLayerRecord:function(a){var b, 1454c,d=this.store.findExact("name",a.name);-1<d?c=this.store.getAt(d):Ext.isObject(a.capability)?c=this.store.reader.readRecords({capability:{request:{getmap:{href:this.trimUrl(this.url,this.baseParams)}},layers:[a.capability]}}).records[0]:this.layerConfigComplete(a)&&(c=this.createLazyLayerRecord(a));if(c){b=c.getLayer().clone();var d=this.getMapProjection(),e=this.getProjection(c);e&&b.addOptions({projection:e});var e=(e||d).getCode(),f=c.get("bbox"),g;if(f&&f[e])g=OpenLayers.Bounds.fromArray(f[e].bbox, 1455b.reverseAxisOrder());else if(e=c.get("llbbox"))d=OpenLayers.Bounds.fromArray(e).transform("EPSG:4326",d),0<1/d.getHeight()&&0<1/d.getWidth()&&(g=d);b.mergeNewParams({STYLES:a.styles,FORMAT:a.format,TRANSPARENT:a.transparent,CQL_FILTER:a.cql_filter});d=!1;"tiled"in a?d=!a.tiled:c.data.dimensions&&c.data.dimensions.time&&(d=!0);b.setName(a.title||b.name);b.addOptions({attribution:b.attribution,maxExtent:g,restrictedExtent:g,singleTile:d,ratio:a.ratio||1,visibility:"visibility"in a?a.visibility:!0, 1456opacity:"opacity"in a?a.opacity:1,buffer:"buffer"in a?a.buffer:1,dimensions:c.data.dimensions,transitionEffect:d?"resize":null,minScale:a.minscale,maxScale:a.maxscale});g=Ext.applyIf({title:b.name,group:a.group,infoFormat:a.infoFormat,getFeatureInfo:a.getFeatureInfo,source:a.source,properties:"gxp_wmslayerpanel",fixed:a.fixed,selected:"selected"in a?a.selected:!1,restUrl:this.restUrl,layer:b},c.data);var h=[{name:"source",type:"string"},{name:"group",type:"string"},{name:"properties",type:"string"}, 1457{name:"fixed",type:"boolean"},{name:"selected",type:"boolean"},{name:"restUrl",type:"string"},{name:"infoFormat",type:"string"},{name:"getFeatureInfo"}];c.fields.each(function(a){h.push(a)});b=new (GeoExt.data.LayerRecord.create(h))(g,b.id);b.json=a}else window.console&&0<this.store.getCount()&&void 0!==a.name&&console.warn("Could not create layer record for layer '"+a.name+"'. Check if the layer is found in the WMS GetCapabilities response.");return b},getProjection:function(a){var b=this.getMapProjection(), 1458c=b,a=a.get("srs");if(!a[b.getCode()]){var c=null,d,e;for(e in a)if((d=new OpenLayers.Projection(e)).equals(b)){c=d;break}}return c},initDescribeLayerStore:function(){var a=this.store.reader.raw;this.lazy&&(a={capability:{request:{describelayer:{href:this.url}}},version:this.version||"1.1.1"});var b=a.capability.request.describelayer;if(b)a=a.version,1.1<parseFloat(a)&&(a="1.1.1"),a={SERVICE:"WMS",VERSION:a,REQUEST:"DescribeLayer"},this.describeLayerStore=new GeoExt.data.WMSDescribeLayerStore({url:this.trimUrl(b.href, 1459a),baseParams:a})},describeLayer:function(a,b,c){function d(a){window.setTimeout(function(){b.call(c,a)},0)}this.describeLayerStore||this.initDescribeLayerStore();if(this.describeLayerStore){if(!this.describedLayers)this.describedLayers={};var e=a.getLayer().params.LAYERS,a=function(){for(var a=Ext.isArray(arguments[1])?arguments[1]:arguments[0],d,g,k=a.length-1;0<=k;k--){d=a[k];g=d.get("layerName");if(g==e){this.describeLayerStore.un("load",arguments.callee,this);this.describedLayers[g]=!0;b.call(c, 1460d);return}"function"==typeof this.describedLayers[g]&&(d=this.describedLayers[g],this.describeLayerStore.un("load",d,this),d.apply(this,arguments))}delete f[e];b.call(c,!1)},f=this.describedLayers,g;if(f[e])if(-1==(g=this.describeLayerStore.findExact("layerName",e)))this.describeLayerStore.on("load",a,this);else d(this.describeLayerStore.getAt(g));else f[e]=a,this.describeLayerStore.load({params:{LAYERS:e},add:!0,callback:a,scope:this})}else d(!1)},fetchSchema:function(a,b,c,d){var e=this.schemaCache[b]; 1461if(e)if(0==e.getCount())e.on("load",function(){c.call(d,e)},this,{single:!0});else c.call(d,e);else e=new GeoExt.data.AttributeStore({url:a,baseParams:{SERVICE:"WFS",VERSION:"1.1.0",REQUEST:"DescribeFeatureType",TYPENAME:b},autoLoad:!0,listeners:{load:function(){c.call(d,e)},scope:this}}),this.schemaCache[b]=e},getSchema:function(a,b,c){if(!this.schemaCache)this.schemaCache={};this.describeLayer(a,function(d){if(d&&"WFS"==d.get("owsType")){var e=d.get("typeName");this.fetchSchema(d.get("owsURL"), 1462e,b,c)}else d?b.call(c,!1):this.fetchSchema(this.url,a.get("name"),b,c)},this)}
1462,getWFSProtocol:function(a,b,c){this.getSchema(a,function(d){var e=!1;if(d){var f,g=/gml:((Multi)?(Point|Line|Polygon|Curve|Surface|Geometry)).*/;d.each(function(a){g.exec(a.get("type"))&&(f=a.get("name"))},this);e=new OpenLayers.Protocol.WFS({version:"1.1.0",srsName:a.getLayer().projection.getCode(),url:d.url,featureType:d.reader.raw.featureTypes[0].typeName,featureNS:d.reader.raw.targetNamespace,geometryName:f})}b.call(c, 1463e,d,a)},this)},getConfigForRecord:function(a){var b=Ext.applyIf(gxp.plugins.WMSSource.superclass.getConfigForRecord.apply(this,arguments),a.json),c=a.getLayer(),d=c.params,e=c.options,f=b.name,g=this.store.reader.raw;if(g)for(var g=g.capability.layers,h=g.length-1;0<=h;--h)if(g[h].name===f){b.capability=Ext.apply({},g[h]);f={};f[c.projection.getCode()]=!0;b.capability.srs=f;break}if(!b.capability){if(c.maxExtent)b.bbox=c.maxExtent.toArray();b.srs=c.projection.getCode()}return Ext.apply(b,{format:d.FORMAT, 1464styles:d.STYLES,tiled:!e.singleTile,transparent:d.TRANSPARENT,cql_filter:d.CQL_FILTER,minscale:e.minScale,maxscale:e.maxScale,infoFormat:a.get("infoFormat")})},getState:function(){var a=gxp.plugins.WMSSource.superclass.getState.apply(this,arguments);return Ext.applyIf(a,{title:this.title})}});Ext.preg(gxp.plugins.WMSSource.prototype.ptype,gxp.plugins.WMSSource);Ext.namespace("GeoExt.data"); 1465GeoExt.data.WMSDescribeLayerReader=function(a,b){a=a||{};if(!a.format)a.format=new OpenLayers.Format.WMSDescribeLayer;"function"!==typeof b&&(b=Ext.data.Record.create(b||a.fields||[{name:"owsType",type:"string"},{name:"owsURL",type:"string"},{name:"typeName",type:"string"}]));GeoExt.data.WMSDescribeLayerReader.superclass.constructor.call(this,a,b)}; 1466Ext.extend(GeoExt.data.WMSDescribeLayerReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML;if(!b||!b.documentElement)b=a.responseText;return this.readRecords(b)},readRecords:function(a){if("string"===typeof a||a.nodeType)a=this.meta.format.read(a);if(a.error)throw new Ext.data.DataReader.Error("invalid-response",a.error);for(var b=[],c,d=0,e=a.length;d<e;d++)(c=a[d])&&b.push(new this.recordType(c));return{totalRecords:b.length,success:!0,records:b}}}); 1467OpenLayers.Format.WMSCapabilities.v1_1_1_WMSC=OpenLayers.Class(OpenLayers.Format.WMSCapabilities.v1_1_1,{version:"1.1.1",profile:"WMSC",readers:{wms:OpenLayers.Util.applyDefaults({VendorSpecificCapabilities:function(a,b){b.vendorSpecific={tileSets:[]};this.readChildNodes(a,b.vendorSpecific)},TileSet:function(a,b){var c={srs:{},bbox:{},resolutions:[]};this.readChildNodes(a,c);b.tileSets.push(c)},Resolutions:function(a,b){for(var c=this.getChildValue(a).split(" "),d=0,e=c.length;d<e;d++)""!=c[d]&&b.resolutions.push(parseFloat(c[d]))}, 1468Width:function(a,b){b.width=parseInt(this.getChildValue(a))},Height:function(a,b){b.height=parseInt(this.getChildValue(a))},Layers:function(a,b){b.layers=this.getChildValue(a)},Styles:function(a,b){b.styles=this.getChildValue(a)}},OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers.wms)},CLASS_NAME:"OpenLayers.Format.WMSCapabilities.v1_1_1_WMSC"});Ext.namespace("gxp.plugins"); 1469gxp.plugins.WMSCSource=Ext.extend(gxp.plugins.WMSSource,{ptype:"gxp_wmscsource",version:"1.1.1",constructor:function(a){a.baseParams={SERVICE:"WMS",REQUEST:"GetCapabilities",TILED:!0};if(!a.format)this.format=new OpenLayers.Format.WMSCapabilities({keepData:!0,profile:"WMSC",allowFallback:!0});gxp.plugins.WMSCSource.superclass.constructor.apply(this,arguments)},createLayerRecord:function(a){var b=gxp.plugins.WMSCSource.superclass.createLayerRecord.apply(this,arguments);if(b){var c,d;if(this.store.reader.raw)c= 1470this.store.reader.raw.capability;var e=c&&c.vendorSpecific?c.vendorSpecific.tileSets:a.capability&&a.capability.tileSets;c=b.get("layer");if(e)for(var f=this.getProjection(b)||this.getMapProjection(),g=0,h=e.length;g<h;g++){var i=e[g];if(i.layers===c.params.LAYERS){var j;for(d in i.srs){j=new OpenLayers.Projection(d);break}if(f.equals(j)){d=i.bbox[d].bbox;c.projection=j;c.addOptions({resolutions:i.resolutions,tileSize:new OpenLayers.Size(i.width,i.height),tileOrigin:new OpenLayers.LonLat(d[0],d[1])}); 1471break}}}else if(this.lazy&&(j=a.tileSize,d=a.tileOrigin,c.addOptions({resolutions:a.resolutions,tileSize:j?new OpenLayers.Size(j[0],j[1]):void 0,tileOrigin:d?OpenLayers.LonLat.fromArray(d):void 0}
1471),!d&&(this.target.map.maxExtent?j=this.target.map.maxExtent:(d=a.srs||this.target.map.projection,j=OpenLayers.Projection.defaults[d].maxExtent),j)))c.tileOrigin=OpenLayers.LonLat.fromArray(j);c.params.TILED=!1!==a.cached&&!0;return b}},getConfigForRecord:function(a){var b=gxp.plugins.WMSCSource.superclass.getConfigForRecord.apply(this, 1472arguments),c=b.name,d,e=a.getLayer();if(b.capability&&this.store.reader.raw){d=this.store.reader.raw.capability;var f=d.vendorSpecific&&d.vendorSpecific.tileSets;if(f)for(var g=f.length-1;0<=g;--g)if(d=f[g],d.layers===c&&d.srs[e.projection]){b.capability.tileSets=[d];break}}if(!b.capability||!b.capability.tileSets){if(c=e.options.tileSize)b.tileSize=[c.w,c.h];b.tileOrigin=e.options.tileOrigin;b.resolutions=e.options.resolutions}return Ext.applyIf(b,{cached:!!e.params.TILED})}}); 1473Ext.preg(gxp.plugins.WMSCSource.prototype.ptype,gxp.plugins.WMSCSource);Ext.namespace("gxp.plugins"); 1474gxp.plugins.ZoomToExtent=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_zoomtoextent",menuText:"Zoom To Max Extent",tooltip:"Zoom To Max Extent",extent:null,closest:!0,iconCls:"gxp-icon-zoomtoextent",closest:!0,constructor:function(a){gxp.plugins.ZoomToExtent.superclass.constructor.apply(this,arguments);if(this.extent instanceof Array)this.extent=OpenLayers.Bounds.fromArray(this.extent)},addActions:function(){return gxp.plugins.ZoomToExtent.superclass.addActions.apply(this,[{text:this.buttonText,menuText:this.menuText, 1475iconCls:this.iconCls,tooltip:this.tooltip,handler:function(){var a=this.target.mapPanel.map,b="function"==typeof this.extent?this.extent():this.extent;if(!b)for(var c,d=0,e=a.layers.length;d<e;++d)c=a.layers[d],c.getVisibility()&&(c=c.restrictedExtent||c.maxExtent,b?b.extend(c):c&&(b=c.clone()));b&&((d=a.restrictedExtent||a.maxExtent)&&(b=new OpenLayers.Bounds(Math.max(b.left,d.left),Math.max(b.bottom,d.bottom),Math.min(b.right,d.right),Math.min(b.top,d.top))),a.zoomToExtent(b,this.closest))},scope:this}])}}); 1476Ext.preg(gxp.plugins.ZoomToExtent.prototype.ptype,gxp.plugins.ZoomToExtent); 1477OpenLayers.Control.NavigationHistory=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOGGLE,previous:null,previousOptions:null,next:null,nextOptions:null,limit:50,autoActivate:!0,clearOnDeactivate:!1,registry:null,nextStack:null,previousStack:null,listeners:null,restoring:!1,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a]);this.registry=OpenLayers.Util.extend({moveend:this.getState},this.registry);a={trigger:OpenLayers.Function.bind(this.previousTrigger, 1478this),displayClass:this.displayClass+" "+this.displayClass+"Previous"};OpenLayers.Util.extend(a,this.previousOptions);this.previous=new OpenLayers.Control.Button(a);a={trigger:OpenLayers.Function.bind(this.nextTrigger,this),displayClass:this.displayClass+" "+this.displayClass+"Next"};OpenLayers.Util.extend(a,this.nextOptions);this.next=new OpenLayers.Control.Button(a);this.clear()},onPreviousChange:function(a){a&&!this.previous.active?this.previous.activate():!a&&this.previous.active&&this.previous.deactivate()}, 1479onNextChange:function(a){a&&!this.next.active?this.next.activate():!a&&this.next.active&&this.next.deactivate()},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this);this.previous.destroy();this.next.destroy();this.deactivate();for(var a in this)this[a]=null},setMap:function(a){this.map=a;this.next.setMap(a);this.previous.setMap(a)},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.next.draw();this.previous.draw()},previousTrigger:function(){var a=this.previousStack.shift(), 1480b=this.previousStack.shift();void 0!=b?(this.nextStack.unshift(a),this.previousStack.unshift(b),this.restoring=!0,this.restore(b),this.restoring=!1,this.onNextChange(this.nextStack[0],this.nextStack.length),this.onPreviousChange(this.previousStack[1],this.previousStack.length-1)):this.previousStack.unshift(a);return b},nextTrigger:function(){var a=this.nextStack.shift();if(void 0!=a)this.previousStack.unshift(a),this.restoring=!0,this.restore(a),this.restoring=!1,this.onNextChange(this.nextStack[0], 1481this.nextStack.length),this.onPreviousChange(this.previousStack[1],this.previousStack.length-1);return a},clear:function(){this.previousStack=[];this.previous.deactivate();this.nextStack=[];this.next.deactivate()},getState:function(){return{center:this.map.getCenter(),resolution:this.map.getResolution(),projection:this.map.getProjectionObject(),units:this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units}},restore:function(a){var b,c;if(this.map.getProjectionObject()== 1482a.projection)c=this.map.getZoomForResolution(a.resolution),b=a.center;else{b=a.center.clone();b.transform(a.projection,this.map.getProjectionObject());c=a.units;var d=this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units;c=this.map.getZoomForResolution((c&&d?OpenLayers.INCHES_PER_UNIT[c]/Ope
1482nLayers.INCHES_PER_UNIT[d]:1)*a.resolution)}this.map.setCenter(b,c)},setListeners:function(){this.listeners={};for(var a in this.registry)this.listeners[a]=OpenLayers.Function.bind(function(){if(!this.restoring){this.previousStack.unshift(this.registry[a].apply(this, 1483arguments));if(1<this.previousStack.length)this.onPreviousChange(this.previousStack[1],this.previousStack.length-1);this.previousStack.length>this.limit+1&&this.previousStack.pop();if(0<this.nextStack.length)this.nextStack=[],this.onNextChange(null,0)}return!0},this)},activate:function(){var a=!1;if(this.map&&OpenLayers.Control.prototype.activate.apply(this)){null==this.listeners&&this.setListeners();for(var b in this.listeners)this.map.events.register(b,this,this.listeners[b]);a=!0;0==this.previousStack.length&& 1484this.initStack()}return a},initStack:function(){this.map.getCenter()&&this.listeners.moveend()},deactivate:function(){var a=!1;if(this.map&&OpenLayers.Control.prototype.deactivate.apply(this)){for(var b in this.listeners)this.map.events.unregister(b,this,this.listeners[b]);this.clearOnDeactivate&&this.clear();a=!0}return a},CLASS_NAME:"OpenLayers.Control.NavigationHistory"});Ext.namespace("gxp.plugins"); 1485gxp.plugins.NavigationHistory=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_navigationhistory",previousMenuText:"Zoom To Previous Extent",nextMenuText:"Zoom To Next Extent",previousTooltip:"Zoom To Previous Extent",nextTooltip:"Zoom To Next Extent",constructor:function(a){gxp.plugins.NavigationHistory.superclass.constructor.apply(this,arguments)},addActions:function(){var a=new OpenLayers.Control.NavigationHistory;this.target.mapPanel.map.addControl(a);a=[new GeoExt.Action({menuText:this.previousMenuText, 1486iconCls:"gxp-icon-zoom-previous",tooltip:this.previousTooltip,disabled:!0,control:a.previous}),new GeoExt.Action({menuText:this.nextMenuText,iconCls:"gxp-icon-zoom-next",tooltip:this.nextTooltip,disabled:!0,control:a.next})];return gxp.plugins.NavigationHistory.superclass.addActions.apply(this,[a])}});Ext.preg(gxp.plugins.NavigationHistory.prototype.ptype,gxp.plugins.NavigationHistory);Ext.namespace("gxp.plugins"); 1487gxp.plugins.Zoom=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_zoom",zoomMenuText:"Zoom Box",zoomInMenuText:"Zoom In",zoomOutMenuText:"Zoom Out",zoomTooltip:"Zoom by dragging a box",zoomInTooltip:"Zoom in",zoomOutTooltip:"Zoom out",constructor:function(a){gxp.plugins.Zoom.superclass.constructor.apply(this,arguments)},addActions:function(){var a=[{menuText:this.zoomInMenuText,iconCls:"gxp-icon-zoom-in",tooltip:this.zoomInTooltip,handler:function(){this.target.mapPanel.map.zoomIn()},scope:this},{menuText:this.zoomOutMenuText, 1488iconCls:"gxp-icon-zoom-out",tooltip:this.zoomOutTooltip,handler:function(){this.target.mapPanel.map.zoomOut()},scope:this}];this.showZoomBoxAction&&a.unshift(new GeoExt.Action({menuText:this.zoomText,iconCls:"gxp-icon-zoom",tooltip:this.zoomTooltip,control:new OpenLayers.Control.ZoomBox(this.controlOptions),map:this.target.mapPanel.map,enableToggle:!0,allowDepress:!1,toggleGroup:this.toggleGroup}));return gxp.plugins.Zoom.superclass.addActions.apply(this,[a])}}); 1489Ext.preg(gxp.plugins.Zoom.prototype.ptype,gxp.plugins.Zoom); 1490OpenLayers.Control.Measure=OpenLayers.Class(OpenLayers.Control,{callbacks:null,displaySystem:"metric",geodesic:!1,displaySystemUnits:{geographic:["dd"],english:["mi","ft","in"],metric:["km","m"]},partialDelay:300,delayedTrigger:null,persist:!1,immediate:!1,initialize:function(a,b){OpenLayers.Control.prototype.initialize.apply(this,[b]);var c={done:this.measureComplete,point:this.measurePartial};if(this.immediate)c.modify=this.measureImmediate;this.callbacks=OpenLayers.Util.extend(c,this.callbacks); 1491this.handlerOptions=OpenLayers.Util.extend({persist:this.persist},this.handlerOptions);this.handler=new a(this,this.callbacks,this.handlerOptions)},deactivate:function(){this.cancelDelay();return OpenLayers.Control.prototype.deactivate.apply(this,arguments)},cancel:function(){this.cancelDelay();this.handler.cancel()},setImmediate:function(a){(this.immediate=a)?this.callbacks.modify=this.measureImmediate:delete this.callbacks.modify},updateHandler:function(a,b){var c=this.active;c&&this.deactivate(); 1492this.handler=new a(this,this.callbacks,b);c&&this.activate()},measureComplete:function(a){this.cancelDelay();this.measure(a,"measure")},measurePartial:function(a,b){this.cancelDelay();b=b.clone();this.handler.freehandMode(this.handler.evt)?this.measure(b,"measurepartial"):this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this.delayedTrigger=null;this.measure(b,"measurepartial")},this),this.partialDelay)},measureImmediate:function(a,b,c){c&&!this.handler.freehandMode(this.handler.evt)&& 1493(this.cancelDelay(),this.measure(b.geometry,"measurepartial"))},cancelDelay:function(){if(null!==this.delayedTrigger)window.clearTimeout(this.delayedTrigger),this.delayedTrigger=null},measure:function(a,b){var c,d;-1<a.CLASS_NAME.indexOf("LineString")?(c=this.getBestLength(a),d=1):(c=this.getBestArea(a),d=2);this.events.triggerEvent(b,{measure:c[0],units:c[1],order:d,geometry:a})},getBestArea:function(a){for(var b=this.displaySystemUnits[this.displaySystem],c,d,e=0,f=b.length;e<f&&!(c=b[e],d=this.getArea(a, 1494c),1<d);++e);return[d,c]},getArea:function(a,b){var c,d;this.geodesic?(c=a.getGeodesicArea(this.map.getProjectionObject()),d="m"):(c=a.getArea(),d=this.map.getUnits());var e=OpenLayers.INCHES_PER_UNIT[b];e&&(c*=Math.pow(OpenLayers.INCHES_PER_UNIT[d]/e,2));return c},getBestLength:function(a){for(var b=this.displaySystemUnits[this.displaySystem],c,d,e=0,f=b.length;
1494e<f&&!(c=b[e],d=this.getLength(a,c),1<d);++e);return[d,c]},getLength:function(a,b){var c,d;this.geodesic?(c=a.getGeodesicLength(this.map.getProjectionObject()), 1495d="m"):(c=a.getLength(),d=this.map.getUnits());var e=OpenLayers.INCHES_PER_UNIT[b];e&&(c*=OpenLayers.INCHES_PER_UNIT[d]/e);return c},CLASS_NAME:"OpenLayers.Control.Measure"});Ext.namespace("gxp.plugins"); 1496gxp.plugins.Measure=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_measure",outputTarget:"map",buttonText:"Measure",lengthMenuText:"Length",areaMenuText:"Area",lengthTooltip:"Measure length",areaTooltip:"Measure area",measureTooltip:"Measure",constructor:function(a){gxp.plugins.Measure.superclass.constructor.apply(this,arguments)},destroy:function(){this.button=null;gxp.plugins.Measure.superclass.destroy.apply(this,arguments)},createMeasureControl:function(a,b){var c=new OpenLayers.StyleMap({"default":new OpenLayers.Style(null, 1497{rules:[new OpenLayers.Rule({symbolizer:{Point:{pointRadius:4,graphicName:"square",fillColor:"white",fillOpacity:1,strokeWidth:1,strokeOpacity:1,strokeColor:"#333333"},Line:{strokeWidth:3,strokeOpacity:1,strokeColor:"#666666",strokeDashstyle:"dash"},Polygon:{strokeWidth:2,strokeOpacity:1,strokeColor:"#666666",fillColor:"white",fillOpacity:0.3}}})]})}),d=function(){f&&f.destroy()},e=function(a){var b=a.measure,c=a.units;h.displaySystem="english";var d=-1<a.geometry.CLASS_NAME.indexOf("LineString")? 1498h.getBestLength(a.geometry):h.getBestArea(a.geometry),e=d[0],d=d[1];h.displaySystem="metric";a=2==a.order?"<sup>2</sup>":"";return b.toFixed(2)+" "+c+a+"<br>"+e.toFixed(2)+" "+d+a},f,g=Ext.apply({},this.initialConfig.controlOptions);Ext.applyIf(g,{geodesic:!0,persist:!0,handlerOptions:{layerOptions:{styleMap:c}},eventListeners:{measurepartial:function(a){d();f=this.addOutput({xtype:"tooltip",html:e(a),title:b,autoHide:!1,closable:!0,draggable:!1,mouseOffset:[0,0],showDelay:1,listeners:{hide:d}}); 1499if(0<a.measure){var a=h.handler.lastUp,c=this.target.mapPanel.getPosition();f.targetXY=[c[0]+a.x,c[1]+a.y];f.show()}},deactivate:d,scope:this}});var h=new OpenLayers.Control.Measure(a,g);return h},addActions:function(){this.activeIndex=0;this.button=new Ext.SplitButton({iconCls:"gxp-icon-measure-length",tooltip:this.measureTooltip,buttonText:this.buttonText,enableToggle:!0,toggleGroup:this.toggleGroup,allowDepress:!0,handler:function(a){a.pressed&&a.menu.items.itemAt(this.activeIndex).setChecked(!0)}, 1500scope:this,listeners:{toggle:function(a,b){b||a.menu.items.each(function(a){a.setChecked(!1)})},render:function(a){Ext.ButtonToggleMgr.register(a)}},menu:new Ext.menu.Menu({items:[new Ext.menu.CheckItem(new GeoExt.Action({text:this.lengthMenuText,iconCls:"gxp-icon-measure-length",toggleGroup:this.toggleGroup,group:this.toggleGroup,listeners:{checkchange:function(a,b){this.activeIndex=0;this.button.toggle(b);b&&this.button.setIconClass(a.iconCls)},scope:this},map:this.target.mapPanel.map,control:this.createMeasureControl(OpenLayers.Handler.Path, 1501this.lengthTooltip)})),new Ext.menu.CheckItem(new GeoExt.Action({text:this.areaMenuText,iconCls:"gxp-icon-measure-area",toggleGroup:this.toggleGroup,group:this.toggleGroup,allowDepress:!1,listeners:{checkchange:function(a,b){this.activeIndex=1;this.button.toggle(b);b&&this.button.setIconClass(a.iconCls)},scope:this},map:this.target.mapPanel.map,control:this.createMeasureControl(OpenLayers.Handler.Polygon,this.areaTooltip)}))]})});return gxp.plugins.Measure.superclass.addActions.apply(this,[this.button])}}); 1502Ext.preg(gxp.plugins.Measure.prototype.ptype,gxp.plugins.Measure); 1503OpenLayers.Handler.Hover=OpenLayers.Class(OpenLayers.Handler,{delay:500,pixelTolerance:null,stopMove:!1,px:null,timerId:null,mousemove:function(a){if(this.passesTolerance(a.xy))this.clearTimer(),this.callback("move",[a]),this.px=a.xy,a=OpenLayers.Util.extend({},a),this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,a),this.delay);return!this.stopMove},mouseout:function(a){OpenLayers.Util.mouseLeft(a,this.map.viewPortDiv)&&(this.clearTimer(),this.callback("move",[a]));return!0}, 1504passesTolerance:function(a){var b=!0;this.pixelTolerance&&this.px&&Math.sqrt(Math.pow(this.px.x-a.x,2)+Math.pow(this.px.y-a.y,2))<this.pixelTolerance&&(b=!1);return b},clearTimer:function(){if(null!=this.timerId)window.clearTimeout(this.timerId),this.timerId=null},delayedCall:function(a){this.callback("pause",[a])},deactivate:function(){var a=!1;OpenLayers.Handler.prototype.deactivate.apply(this,arguments)&&(this.clearTimer(),a=!0);return a},CLASS_NAME:"OpenLayers.Handler.Hover"}); 1505OpenLayers.Control.WMSGetFeatureInfo=OpenLayers.Class(OpenLayers.Control,{hover:!1,drillDown:!1,maxFeatures:10,clickCallback:"click",output:"features",layers:null,queryVisible:!1,url:null,layerUrls:null,infoFormat:"text/html",vendorParams:{},format:null,formatOptions:null,handler:null,hoverRequest:null,initialize:function(a){a=a||{};a.handlerOptions=a.handlerOptions||{};OpenLayers.Control.prototype.initialize.apply(this,[a]);if(!this.format)this.format=new OpenLayers.Format.WMSGetFeatureInfo(a.formatOptions); 1506if(!0===this.drillDown)this.hover=!1;this.hover?this.handler=new OpenLayers.Handler.Hover(this,{move:this.cancelHover,pause:this.getInfoForHover},OpenLayers.Util.extend(this.handlerOptions.hover||{},{delay:250})):(a={},a[this.clickCallback]=this.getInfoForClick,this.handler=new OpenLayers.Handler.Click(this,a,this.handlerOptions.click||{}))},getInfoForClick:function(a){this.events.triggerEvent("beforegetfeatureinfo",{xy:a.xy});OpenLayers.Element.addClass(this.map.viewPortDiv,"olCursorWait");this.request(a.xy, 1507{})},getInfoForHover:function(a){this.events.triggerEvent("beforegetfeatureinfo",{xy:a.xy});this.request(a.xy,{hover:!0})},cancelHover:function(){if(this.hoverRequest)this.hoverRequest.abort(),this.hoverRequest=null},findLayers:function(){for(var a=this.layers||this.map.layers,b=[],c,d,e=a.length-1;0<=e;--e)if(c=a[e],c instanceof OpenLayers.Layer.WMS&&(!this.queryVisible||c.getVisibility())){d=OpenLayers.Util.isArray(c.url)?c.url[0]:c.url;if(!1===this.drillDown&&!this.url)this.url=d;(!0===this.drillDown|| 1508this.urlMatches(d))&&b.push(c)}return b}
1508,urlMatches:function(a){var b=OpenLayers.Util.isEquivalentUrl(this.url,a);if(!b&&this.layerUrls)for(var c=0,d=this.layerUrls.length;c<d;++c)if(OpenLayers.Util.isEquivalentUrl(this.layerUrls[c],a)){b=!0;break}return b},buildWMSOptions:function(a,b,c,d){for(var e=[],f=[],g=0,h=b.length;g<h;g++)null!=b[g].params.LAYERS&&(e=e.concat(b[g].params.LAYERS),f=f.concat(this.getStyleNames(b[g])));b=b[0];g=this.map.getProjection();(h=b.projection)&&h.equals(this.map.getProjectionObject())&& 1509(g=h.getCode());d=OpenLayers.Util.extend({service:"WMS",version:b.params.VERSION,request:"GetFeatureInfo",exceptions:b.params.EXCEPTIONS,bbox:this.map.getExtent().toBBOX(null,b.reverseAxisOrder()),feature_count:this.maxFeatures,height:this.map.getSize().h,width:this.map.getSize().w,format:d,info_format:b.params.INFO_FORMAT||this.infoFormat},1.3<=parseFloat(b.params.VERSION)?{crs:g,i:parseInt(c.x),j:parseInt(c.y)}:{srs:g,x:parseInt(c.x),y:parseInt(c.y)});0!=e.length&&(d=OpenLayers.Util.extend({layers:e, 1510query_layers:e,styles:f},d));OpenLayers.Util.applyDefaults(d,this.vendorParams);return{url:a,params:OpenLayers.Util.upperCaseObject(d),callback:function(b){this.handleResponse(c,b,a)},scope:this}},getStyleNames:function(a){return a.params.STYLES?a.params.STYLES:OpenLayers.Util.isArray(a.params.LAYERS)?Array(a.params.LAYERS.length):a.params.LAYERS.replace(/[^,]/g,"")},request:function(a,b){var c=this.findLayers();if(0==c.length)this.events.triggerEvent("nogetfeatureinfo"),OpenLayers.Element.removeClass(this.map.viewPortDiv, 1511"olCursorWait");else if(b=b||{},!1===this.drillDown){var c=this.buildWMSOptions(this.url,c,a,c[0].params.FORMAT),d=OpenLayers.Request.GET(c);if(!0===b.hover)this.hoverRequest=d}else{this._numRequests=this._requestCount=0;this.features=[];for(var d={},e,f=0,g=c.length;f<g;f++){var h=c[f];e=OpenLayers.Util.isArray(h.url)?h.url[0]:h.url;e in d?d[e].push(h):(this._numRequests++,d[e]=[h])}for(e in d)c=d[e],c=this.buildWMSOptions(e,c,a,c[0].params.FORMAT),OpenLayers.Request.GET(c)}},triggerGetFeatureInfo:function(a, 1512b,c){this.events.triggerEvent("getfeatureinfo",{text:a.responseText,features:c,request:a,xy:b});OpenLayers.Element.removeClass(this.map.viewPortDiv,"olCursorWait")},handleResponse:function(a,b,c){var d=b.responseXML;if(!d||!d.documentElement)d=b.responseText;d=this.format.read(d);!1===this.drillDown?this.triggerGetFeatureInfo(b,a,d):(this._requestCount++,this._features="object"===this.output?(this._features||[]).concat({url:c,features:d}):(this._features||[]).concat(d),this._requestCount===this._numRequests&& 1513(this.triggerGetFeatureInfo(b,a,this._features.concat()),delete this._features,delete this._requestCount,delete this._numRequests))},CLASS_NAME:"OpenLayers.Control.WMSGetFeatureInfo"});Ext.namespace("gxp.plugins"); 1514gxp.plugins.WMSGetFeatureInfo=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_wmsgetfeatureinfo",outputTarget:"map",popupCache:null,infoActionTip:"Get Feature Info",popupTitle:"Feature Info",buttonText:"Identify",format:"html",addActions:function(){var a;this.popupCache={};var b=gxp.plugins.WMSGetFeatureInfo.superclass.addActions.call(this,[{tooltip:this.infoActionTip,iconCls:"gxp-icon-getfeatureinfo",buttonText:this.buttonText,toggleGroup:this.toggleGroup,enableToggle:!0,allowDepress:!0,toggleHandler:function(b, 1515c){for(var d=0,h=a.length;d<h;d++)c?a[d].activate():a[d].deactivate()}}]),c=this.actions[0].items[0];a=[];var d=function(){for(var b=this.target.mapPanel.layers.queryBy(function(a){return a.get("queryable")}),d=this.target.mapPanel.map,g,h=0,i=a.length;h<i;h++)g=a[h],g.deactivate(),g.destroy();a=[];b.each(function(b){var e=b.getLayer(),g=Ext.apply({},this.vendorParams),h;if(this.layerParams)for(var i=this.layerParams.length-1;0<=i;--i)h=this.layerParams[i].toUpperCase(),g[h]=e.params[h];var o=b.get("infoFormat"); 1516void 0===o&&(o="html"==this.format?"text/html":"application/vnd.ogc.gml");e=new OpenLayers.Control.WMSGetFeatureInfo(Ext.applyIf({url:e.url,queryVisible:!0,layers:[e],infoFormat:o,vendorParams:g,eventListeners:{getfeatureinfo:function(a){var c=b.get("title")||b.get("name");if("text/html"==o){var d=a.text.match(/<body[^>]*>([\s\S]*)<\/body>/);d&&!d[1].match(/^\s*$/)&&this.displayPopup(a,c,d[1])}else"text/plain"==o?this.displayPopup(a,c,"<pre>"+a.text+"</pre>"):a.features&&0<a.features.length&&this.displayPopup(a, 1517c,null,b.get("getFeatureInfo"))},scope:this}},this.controlOptions));d.addControl(e);a.push(e);c.pressed&&e.activate()},this)};this.target.mapPanel.layers.on("update",d,this);this.target.mapPanel.layers.on("add",d,this);this.target.mapPanel.layers.on("remove",d,this);return b},displayPopup:function(a,b,c,d){var e,f=a.xy.x+"."+a.xy.y,d=d||{};f in this.popupCache?e=this.popupCache[f]:(e=this.addOutput({xtype:"gx_popup",title:this.popupTitle,layout:"accordion",fill:!1,autoScroll:!0,location:a.xy,map:this.target.mapPanel, 1518width:250,height:300,defaults:{layout:"fit",autoScroll:!0,autoHeight:!0,autoWidth:!0,collapsible:!0}}),e.on({close:function(a){return function(){delete this.popupCache[a]}}(f),scope:this}),this.popupCache[f]=e);a=a.features;f=[];if(!c&&a)for(var g=0,h=a.length;g<h;++g)c=a[g],f.push(Ext.apply({xtype:"gxp_editorgrid",readOnly:!0,listeners:{beforeedit:function(){return!1}},title:c.fid?c.fid:b,feature:c,fields:d.fields,propertyNames:d.propertyNames},this.itemConfig));else c&&f.push(Ext.apply({title:b, 1519html:c},this.itemConfig));e.add(f);e.doLayout()}});Ext.preg(gxp.plugins.WMSGetFeatureInfo.prototype.ptype,gxp.plugins.WMSGetFeatureInfo);Ext.namespace("gxp.plugins"); 1520gxp.plugins.Navigation=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_navigation",menuText:"Pan Map",tooltip:"Pan Map",constructor:function(a){gxp.plugins.Navigation.superclass.constructor.apply(this,arguments)},addActions:function(){var a;this.controlOptions?(this.controlOptions=this.controlOptions||{},Ext.applyIf(this.controlOptions,{dragPanOptions:{enableKinetic:!0}}),a=new OpenLayers.Control.Navigation(this.controlOptions)):(candidates=this.target.mapPanel.map.getControlsByClass("OpenLayers.Control.Navigation"), 1521candidates.length&&(a=candidates[0]));a=[new GeoExt.Action({tooltip:this.tooltip,menuText:this.menuText,iconCls:"gxp-icon-pan",enableToggle:!0,pressed:!0,allowDepress:!1,control:a,map:a.map?null:this.target.mapPanel.map,toggleGroup:this.toggleGroup})];return gxp.plugins.Navigation.superclass.addActions.apply(this,[a])}});Ext.preg(gxp.plugins.Navigation.prototype.ptype,gxp.plugins.Navigation);Ext.namespace("gxp.plugins"); 1522gxp.plugins.LayerTree=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_layertree",shortTitle:"Layers",rootNodeText:"Layers",overlayNodeText:"Overlays",baseNodeText:"Base Layers",groups:null,defaultGroup:"default",treeNodeUI:null,constructor:function(a){gxp.plugins.LayerTree.superclass.constructor.apply(this,arguments);if(!this.groups)this.groups={"default":this.overlayNodeText,background:{title:this.baseNodeText,exclusive:!0}};if(!this.treeNodeUI)this.treeNodeUI=Ext.extend(GeoExt.tree.LayerNo
1522deUI,new GeoExt.tree.TreeNodeUIEventMixin)}, 1523addOutput:function(a){a=Ext.apply(this.createOutputConfig(),a||{});a=gxp.plugins.LayerTree.superclass.addOutput.call(this,a);a.on({contextmenu:this.handleTreeContextMenu,beforemovenode:this.handleBeforeMoveNode,scope:this});return a},createOutputConfig:function(){var a=new Ext.tree.TreeNode({text:this.rootNodeText,expanded:!0,isTarget:!1,allowDrop:!1}),b;if(this.initialConfig.loader&&this.initialConfig.loader.baseAttrs)b=this.initialConfig.loader.baseAttrs;var c=this.defaultGroup,d=this,e,f,g;for(g in this.groups)e= 1524"string"==typeof this.groups[g]?{title:this.groups[g]}:this.groups[g],f=e.exclusive,a.appendChild(new GeoExt.tree.LayerContainer(Ext.apply({text:e.title,iconCls:"gxp-folder",expanded:!0,group:g==this.defaultGroup?void 0:g,loader:new GeoExt.tree.LayerLoader({baseAttrs:f?Ext.apply({checkedGroup:Ext.isString(f)?f:g},b):b,store:this.target.mapPanel.layers,filter:function(a){return function(b){return(b.get("group")||c)==a&&!0==b.getLayer().displayInLayerSwitcher}}(g),createNode:function(a){d.configureLayerNode(this, 1525a);return GeoExt.tree.LayerLoader.prototype.createNode.apply(this,arguments)}}),singleClickExpand:!0,allowDrag:!1,listeners:{append:function(a,b){b.expand()}}},e)));return{xtype:"treepanel",root:a,rootVisible:!1,shortTitle:this.shortTitle,border:!1,enableDD:!0,selModel:new Ext.tree.DefaultSelectionModel({listeners:{beforeselect:this.handleBeforeSelect,scope:this}}),contextMenu:new Ext.menu.Menu({items:[]})}},configureLayerNode:function(a,b){b.uiProvider=this.treeNodeUI;var c=b.layer,d=b.layerStore; 1526if(c&&d){var e=d.getAt(d.findBy(function(a){return a.getLayer()===c}));if(e){b.qtip=e.get("abstract");if(!e.get("queryable")&&!b.iconCls)b.iconCls="gxp-tree-rasterlayer-icon";if(e.get("fixed"))b.allowDrag=!1;b.listeners={rendernode:function(a){e===this.target.selectedLayer&&a.select();this.target.on("layerselectionchange",function(b){!this.selectionChanging&&b===e&&a.select()},this)},scope:this}}}},handleBeforeSelect:function(a,b){var c=!0,d=b&&b.layer,e;if(d)c=b.layerStore,e=c.getAt(c.findBy(function(a){return a.getLayer()=== 1527d}));this.selectionChanging=!0;c=this.target.selectLayer(e);this.selectionChanging=!1;return c},handleTreeContextMenu:function(a,b){if(a&&a.layer){a.select();var c=a.getOwnerTree();if(c.getSelectionModel().getSelectedNode()===a)c=c.contextMenu,c.contextNode=a,0<c.items.getCount()&&c.showAt(b.getXY())}},handleBeforeMoveNode:function(a,b,c,d){if(c!==d)a=d.loader.store,c=a.findBy(function(a){return a.getLayer()===b.layer}),a.getAt(c).set("group",d.attributes.group)}}); 1528Ext.preg(gxp.plugins.LayerTree.prototype.ptype,gxp.plugins.LayerTree);Ext.namespace("GeoExt.plugins"); 1529GeoExt.plugins.TreeNodeComponent=Ext.extend(Ext.util.Observable,{constructor:function(a){Ext.apply(this.initialConfig,Ext.apply({},a));Ext.apply(this,a);GeoExt.plugins.TreeNodeComponent.superclass.constructor.apply(this,arguments)},init:function(a){a.on({rendernode:this.onRenderNode,beforedestroy:this.onBeforeDestroy,scope:this})},onRenderNode:function(a){var b=a.attributes.component||this.component;if(!a.rendered&&b){var c=Ext.DomHelper.append(a.ui.elNode,[{tag:"div"}]);"function"==typeof b?b=b(a, 1530c):"object"==typeof b&&"function"==typeof b.fn&&(b=b.fn.apply(b.scope,[a,c]));"object"==typeof b&&"string"==typeof b.xtype&&(b=Ext.ComponentMgr.create(b));if(b instanceof Ext.Component)b.render(c),a.component=b}},onBeforeDestroy:function(a){a.un("rendernode",this.onRenderNode,this);a.un("beforedestroy",this.onBeforeDestroy,this)}});Ext.preg("gx_treenodecomponent",GeoExt.plugins.TreeNodeComponent);Ext.namespace("gxp.plugins"); 1531gxp.plugins.LayerManager=Ext.extend(gxp.plugins.LayerTree,{ptype:"gxp_layermanager",baseNodeText:"Base Maps",createOutputConfig:function(){var a=gxp.plugins.LayerManager.superclass.createOutputConfig.apply(this,arguments);Ext.applyIf(a,Ext.apply({cls:"gxp-layermanager-tree",lines:!1,useArrows:!0,plugins:[{ptype:"gx_treenodecomponent"}]},this.treeConfig));return a},configureLayerNode:function(a,b){gxp.plugins.LayerManager.superclass.configureLayerNode.apply(this,arguments);var c;OpenLayers.Layer.WMS&& 1532b.layer instanceof OpenLayers.Layer.WMS?c="gx_wmslegend":OpenLayers.Layer.Vector&&b.layer instanceof OpenLayers.Layer.Vector&&(c="gx_vectorlegend");if(c){var d;if(a&&a.baseAttrs&&a.baseAttrs.baseParams)d=a.baseAttrs.baseParams;Ext.apply(b,{component:{xtype:c,baseParams:Ext.apply({transparent:!0,format:"image/png",legend_options:"fontAntiAliasing:true;fontSize:11;fontName:Arial"},d),layerRecord:this.target.mapPanel.layers.getByLayer(b.layer),showTitle:!1,cls:"legend"}})}}}); 1533Ext.preg(gxp.plugins.LayerManager.prototype.ptype,gxp.plugins.LayerManager);Ext.namespace("gxp"); 1534gxp.NewSourceDialog=Ext.extend(Ext.Panel,{title:"Add New Server...",cancelText:"Cancel",addServerText:"Add Server",invalidURLText:"Enter a valid URL to a WMS/TMS/REST endpoint (e.g. http://example.com/geoserver/wms)",contactingServerText:"Contacting Server...",bodyStyle:"padding: 0px",error:null,initComponent:function(){this.addEvents("urlselected");this.urlTextField=new Ext.form.TextField({fieldLabel:"URL",allowBlank:!1,width:240,msgTarget:"under",validator:this.urlValidator.createDelegate(this), 1535listeners:{specialkey:function(a,b){b.getKey()===b.ENTER&&this.addServer()},scope:this}});this.form=new Ext.form.FormPanel({items:[{xtype:"combo",width:240,name:"type",fieldLabel:"Type",value:"WMS",mode:"local",triggerAction:"all",store:[["WMS","Web Map Service (WMS)"],["TMS","Tiled Map Service (TMS)"],["REST","ArcGIS REST Service (REST)"]]},this.urlTextField],border:!1,labelWidth:30,bodyStyle:"padding: 5px",autoWidth:!0,autoHeight:!0,listeners:{afterrender:function(){this.urlTextField.focus(!1,!0)}, 1536scope:this}});this.bbar=[new Ext.Button({text:this.cancelText,handler:this.hide,scope:this}),new Ext.Toolbar.Fill,new Ext.Button({text:this.addServerText,iconCls:"add",handler:this.addServer,scope:this})];this.items=this.form;gxp.NewSourceDialog.superclass.initComponent.call(this);this.form.on("render",function(){this.loadMask=new Ext.LoadMask(this.form.getEl(),{msg:this.contactingServerText})},this);this.on({hide:this.reset,removed:this.reset,scope:this});this.on("urlselected",function(a,b){this.setLoading(); 1537this.addSource(b,this.hide,function(){this.setError(this.sourceLoadFailureMessage)},this)},this)},addServer:function(){this.error=null;this.urlTextField.validate()&&this.fireEvent("urlselected",this,this.urlTextField.getValue(),this.form.getForm().findField("type").getValue())},reset:function(){this.error=null;this.urlTextField.reset();this.loadMask.hide()},urlRegExp:/^(http(s)?:)?\/\/([\w%]+:[\w%]+@)?([^@\/:]+)(:\d+)?\//i,urlValidator:function(a){a=this.urlRegExp.test(a)?!this.error||this.error: 1538this.invalidURLText;this.error=null;return a}
1538,setLoading:function(){this.loadMask.show()},setError:function(a){this.loadMask.hide();this.error=a;this.urlTextField.validate()},addSource:function(){}});Ext.reg("gxp_newsourcedialog",gxp.NewSourceDialog);Ext.namespace("gxp.plugins"); 1539gxp.plugins.FeedGetFeatureInfo=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_getfeedfeatureinfo",init:function(a){gxp.plugins.FeedGetFeatureInfo.superclass.init.apply(this,arguments);this.target.mapPanel.layers.on({add:this.addLayer,remove:this.removeLayer,scope:this})},addLayer:function(a,b){for(var c=0,d=b.length;c<d;++c){var e=b[c],f=this.target.getSource(e),e=e.getLayer();if(f instanceof gxp.plugins.FeedSource)null==this.target.selectControl?(this.target.selectControl=new OpenLayers.Control.SelectFeature(e, 1540{clickout:!0,listeners:{clickoutFeature:function(){}},scope:this}),this.target.mapPanel.map.addControl(this.target.selectControl)):(f=this.target.selectControl.layers?this.target.selectControl.layers:this.target.selectControl.layer?[this.target.selectControl.layer]:[],f.push(e),this.target.selectControl.setLayer(f))}this.target.selectControl&&this.target.selectControl.activate()},removeLayer:function(a,b){b.length||(b=[b]);for(var c=0,d=b.length;c<d;++c){var e=b[c].getLayer(),f=this.target.selectControl; 1541if(null!=f)if(f.layers)for(var g=0;g<f.layers.length;g++){var h=f.layers;f.layers[g].id===e.id&&(h.splice(g,1),f.setLayer(h))}else null!=f.layer&&e.id===f.layer.id&&f.setLayer([])}}});Ext.preg(gxp.plugins.FeedGetFeatureInfo.prototype.ptype,gxp.plugins.FeedGetFeatureInfo); 1542OpenLayers.Format.GeoRSS=OpenLayers.Class(OpenLayers.Format.XML,{rssns:"http://backend.userland.com/rss2",featureNS:"http://mapserver.gis.umn.edu/mapserver",georssns:"http://www.georss.org/georss",geons:"http://www.w3.org/2003/01/geo/wgs84_pos#",featureTitle:"Untitled",featureDescription:"No Description",gmlParser:null,xy:!1,createGeometryFromItem:function(a){var b=this.getElementsByTagNameNS(a,this.georssns,"point"),c=this.getElementsByTagNameNS(a,this.geons,"lat"),d=this.getElementsByTagNameNS(a, 1543this.geons,"long"),e=this.getElementsByTagNameNS(a,this.georssns,"line"),f=this.getElementsByTagNameNS(a,this.georssns,"polygon"),g=this.getElementsByTagNameNS(a,this.georssns,"where"),a=this.getElementsByTagNameNS(a,this.georssns,"box");if(0<b.length||0<c.length&&0<d.length){0<b.length?(c=OpenLayers.String.trim(b[0].firstChild.nodeValue).split(/\s+/),2!=c.length&&(c=OpenLayers.String.trim(b[0].firstChild.nodeValue).split(/\s*,\s*/))):c=[parseFloat(c[0].firstChild.nodeValue),parseFloat(d[0].firstChild.nodeValue)]; 1544var h=new OpenLayers.Geometry.Point(c[1],c[0])}else if(0<e.length){c=OpenLayers.String.trim(this.getChildValue(e[0])).split(/\s+/);d=[];e=0;for(f=c.length;e<f;e+=2)b=new OpenLayers.Geometry.Point(c[e+1],c[e]),d.push(b);h=new OpenLayers.Geometry.LineString(d)}else if(0<f.length){c=OpenLayers.String.trim(this.getChildValue(f[0])).split(/\s+/);d=[];e=0;for(f=c.length;e<f;e+=2)b=new OpenLayers.Geometry.Point(c[e+1],c[e]),d.push(b);h=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(d)])}else if(0< 1545g.length){if(!this.gmlParser)this.gmlParser=new OpenLayers.Format.GML({xy:this.xy});h=this.gmlParser.parseFeature(g[0]).geometry}else 0<a.length&&(c=OpenLayers.String.trim(a[0].firstChild.nodeValue).split(/\s+/),d=[],3<c.length&&(b=new OpenLayers.Geometry.Point(c[1],c[0]),d.push(b),b=new OpenLayers.Geometry.Point(c[1],c[2]),d.push(b),b=new OpenLayers.Geometry.Point(c[3],c[2]),d.push(b),b=new OpenLayers.Geometry.Point(c[3],c[0]),d.push(b),b=new OpenLayers.Geometry.Point(c[1],c[0]),d.push(b)),h=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(d)])); 1546h&&this.internalProjection&&this.externalProjection&&h.transform(this.externalProjection,this.internalProjection);return h},createFeatureFromItem:function(a){var b=this.createGeometryFromItem(a),c=this._getChildValue(a,"*","title",this.featureTitle),d=this._getChildValue(a,"*","description",this._getChildValue(a,"*","content",this._getChildValue(a,"*","summary",this.featureDescription))),e=this._getChildValue(a,"*","link");if(!e)try{e=this.getElementsByTagNameNS(a,"*","link")[0].getAttribute("href")}catch(f){e= 1547null}a=this._getChildValue(a,"*","id",null);b=new OpenLayers.Feature.Vector(b,{title:c,description:d,link:e});b.fid=a;return b},_getChildValue:function(a,b,c,d){return(a=this.getElementsByTagNameNS(a,b,c))&&a[0]&&a[0].firstChild&&a[0].firstChild.nodeValue?this.getChildValue(a[0]):void 0==d?"":d},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));var b=null,b=this.getElementsByTagNameNS(a,"*","item");0==b.length&&(b=this.getElementsByTagNameNS(a,"*","entry")); 1548for(var a=b.length,c=Array(a),d=0;d<a;d++)c[d]=this.createFeatureFromItem(b[d]);return c},write:function(a){var b;if(OpenLayers.Util.isArray(a)){b=this.createElementNS(this.rssns,"rss");for(var c=0,d=a.length;c<d;c++)b.appendChild(this.createFeatureXML(a[c]))}else b=this.createFeatureXML(a);return OpenLayers.Format.XML.prototype.write.apply(this,[b])},createFeatureXML:function(a){var b=this.buildGeometryNode(a.geometry),c=this.createElementNS(this.rssns,"item"),d=this.createElementNS(this.rssns,"title"); 1549d.appendChild(this.createTextNode(a.attributes.title?a.attributes.title:""));var e=this.createElementNS(this.rssns,"description");e.appendChild(this.createTextNode(a.attributes.description?a.attributes.description:""));c.appendChild(d);c.appendChild(e);a.attributes.link&&(d=this.createElementNS(this.rssns,"link"),d.appendChild(this.createTextNode(a.attributes.link)),c.appendChild(d));for(var f in a.attributes)"link"==f||"title"==f||"description"==f||(d=this.createTextNode(a.attributes[f]),e=f,-1!= 1550f.search(":")&&(e=f.split(":")[1]),e=this.createElementNS(this.featureNS,"feature:"+e),e.appendChild(d),c.appendChild(e));c.appendChild(b);return c},buildGeometryNode:function(a){this.internalProjection&&this.externalProjection&&(a=a.clone(),a.transform(this.internalProjection,this.externalProjection));var b;if("OpenLayers.Geometry.Polygon"==a.CLASS_NAME)b=this.createElementNS(this.georssns,"georss:polygon"),b.appendChild(this.buildCoordinatesNode(a.components[0]));else if("OpenLayers.Geometry.LineString"== 1551a.CLASS_NAME)b=this.createElementNS(this.georssns,"georss:line"),b.appendChild(this.buildCoordinatesNode(a));else if("OpenLayers.Geometry.Point"==a.CLASS_NAME)b=this.createElementNS(this.georssns,"georss:point"),b.appendChild(this.buildCoordinatesNode(a));else throw"Couldn't parse "+a.CLASS_NAME;return b},buildCoordinatesNode:function(a){var b=null;if(a.components)b=a.components;if(b){for(var a=b.length,c=Array(a),d=0;d<a;d++)c[d]=b[d].y+" "+b[d].x;b=c.join(" ")}
1551else b=a.y+" "+a.x;return this.createTextNode(b)}, 1552CLASS_NAME:"OpenLayers.Format.GeoRSS"}); 1553OpenLayers.Format.QueryStringFilter=function(){function a(a){a=a.replace(/%/g,"\\%");a=a.replace(/\\\\\.(\*)?/g,function(a,b){return b?a:"\\\\_"});a=a.replace(/\\\\\.\*/g,"\\\\%");a=a.replace(/(\\)?\.(\*)?/g,function(a,b,c){return b||c?a:"_"});a=a.replace(/(\\)?\.\*/g,function(a,b){return b?a:"%"});a=a.replace(/\\\./g,".");return a=a.replace(/(\\)?\\\*/g,function(a,b){return b?a:"*"})}var b={};b[OpenLayers.Filter.Comparison.EQUAL_TO]="eq";b[OpenLayers.Filter.Comparison.NOT_EQUAL_TO]="ne";b[OpenLayers.Filter.Comparison.LESS_THAN]= 1554"lt";b[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO]="lte";b[OpenLayers.Filter.Comparison.GREATER_THAN]="gt";b[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO]="gte";b[OpenLayers.Filter.Comparison.LIKE]="ilike";return OpenLayers.Class(OpenLayers.Format,{wildcarded:!1,srsInBBOX:!1,write:function(c,d){var d=d||{},e=c.CLASS_NAME,e=e.substring(e.lastIndexOf(".")+1);switch(e){case "Spatial":switch(c.type){case OpenLayers.Filter.Spatial.BBOX:d.bbox=c.value.toArray();this.srsInBBOX&&c.projection&& 1555d.bbox.push(c.projection.getCode());break;case OpenLayers.Filter.Spatial.DWITHIN:d.tolerance=c.distance;case OpenLayers.Filter.Spatial.WITHIN:d.lon=c.value.x;d.lat=c.value.y;break;default:OpenLayers.Console.warn("Unknown spatial filter type "+c.type)}break;case "Comparison":e=b[c.type];if(void 0!==e){var f=c.value;c.type==OpenLayers.Filter.Comparison.LIKE&&(f=a(f),this.wildcarded&&(f="%"+f+"%"));d[c.property+"__"+e]=f;d.queryable=d.queryable||[];d.queryable.push(c.property)}else OpenLayers.Console.warn("Unknown comparison filter type "+ 1556c.type);break;case "Logical":if(c.type===OpenLayers.Filter.Logical.AND){e=0;for(f=c.filters.length;e<f;e++)d=this.write(c.filters[e],d)}else OpenLayers.Console.warn("Unsupported logical filter type "+c.type);break;default:OpenLayers.Console.warn("Unknown filter type "+e)}return d},CLASS_NAME:"OpenLayers.Format.QueryStringFilter"})}(); 1557OpenLayers.Strategy=OpenLayers.Class({layer:null,options:null,active:null,autoActivate:!0,autoDestroy:!0,initialize:function(a){OpenLayers.Util.extend(this,a);this.options=a;this.active=!1},destroy:function(){this.deactivate();this.options=this.layer=null},setLayer:function(a){this.layer=a},activate:function(){return!this.active?this.active=!0:!1},deactivate:function(){return this.active?(this.active=!1,!0):!1},CLASS_NAME:"OpenLayers.Strategy"}); 1558OpenLayers.Strategy.BBOX=OpenLayers.Class(OpenLayers.Strategy,{bounds:null,resolution:null,ratio:2,resFactor:null,response:null,activate:function(){var a=OpenLayers.Strategy.prototype.activate.call(this);a&&(this.layer.events.on({moveend:this.update,refresh:this.update,visibilitychanged:this.update,scope:this}),this.update());return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);a&&this.layer.events.un({moveend:this.update,refresh:this.update,visibilitychanged:this.update, 1559scope:this});return a},update:function(a){var b=this.getMapBounds();if(null!==b&&(a&&a.force||this.layer.visibility&&this.layer.calculateInRange()&&this.invalidBounds(b)))this.calculateBounds(b),this.resolution=this.layer.map.getResolution(),this.triggerRead(a)},getMapBounds:function(){if(null===this.layer.map)return null;var a=this.layer.map.getExtent();a&&!this.layer.projection.equals(this.layer.map.getProjectionObject())&&(a=a.clone().transform(this.layer.map.getProjectionObject(),this.layer.projection)); 1560return a},invalidBounds:function(a){a||(a=this.getMapBounds());a=!this.bounds||!this.bounds.containsBounds(a);!a&&this.resFactor&&(a=this.resolution/this.layer.map.getResolution(),a=a>=this.resFactor||a<=1/this.resFactor);return a},calculateBounds:function(a){a||(a=this.getMapBounds());var b=a.getCenterLonLat(),c=a.getWidth()*this.ratio,a=a.getHeight()*this.ratio;this.bounds=new OpenLayers.Bounds(b.lon-c/2,b.lat-a/2,b.lon+c/2,b.lat+a/2)},triggerRead:function(a){this.response&&!(a&&!0===a.noAbort)&& 1561(this.layer.protocol.abort(this.response),this.layer.events.triggerEvent("loadend"));var b={filter:this.createFilter()};this.layer.events.triggerEvent("loadstart",b);this.response=this.layer.protocol.read(OpenLayers.Util.applyDefaults({filter:b.filter,callback:this.merge,scope:this},a))},createFilter:function(){var a=new OpenLayers.Filter.Spatial({type:Ope
1561nLayers.Filter.Spatial.BBOX,value:this.bounds,projection:this.layer.projection});this.layer.filter&&(a=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND, 1562filters:[this.layer.filter,a]}));return a},merge:function(a){this.layer.destroyFeatures();if(a.success()){var b=a.features;if(b&&0<b.length){var c=this.layer.projection,d=this.layer.map.getProjectionObject();if(!d.equals(c))for(var e,f=0,g=b.length;f<g;++f)(e=b[f].geometry)&&e.transform(c,d);this.layer.addFeatures(b)}}else this.bounds=null;this.response=null;this.layer.events.triggerEvent("loadend",{response:a})},CLASS_NAME:"OpenLayers.Strategy.BBOX"}); 1563OpenLayers.Strategy.Fixed=OpenLayers.Class(OpenLayers.Strategy,{preload:!1,activate:function(){var a=OpenLayers.Strategy.prototype.activate.apply(this,arguments);if(a)if(this.layer.events.on({refresh:this.load,scope:this}),!0==this.layer.visibility||this.preload)this.load();else this.layer.events.on({visibilitychanged:this.load,scope:this});return a},deactivate:function(){var a=OpenLayers.Strategy.prototype.deactivate.call(this);a&&this.layer.events.un({refresh:this.load,visibilitychanged:this.load, 1564scope:this});return a},load:function(a){var b=this.layer;b.events.triggerEvent("loadstart",{filter:b.filter});b.protocol.read(OpenLayers.Util.applyDefaults({callback:this.merge,filter:b.filter,scope:this},a));b.events.un({visibilitychanged:this.load,scope:this})},merge:function(a){var b=this.layer;b.destroyFeatures();var c=a.features;if(c&&0<c.length){var d=b.projection,e=b.map.getProjectionObject();if(!e.equals(d))for(var f,g=0,h=c.length;g<h;++g)(f=c[g].geometry)&&f.transform(d,e);b.addFeatures(c)}b.events.triggerEvent("loadend", 1565{response:a})},CLASS_NAME:"OpenLayers.Strategy.Fixed"});Ext.namespace("gxp.plugins"); 1566gxp.plugins.FeedSource=Ext.extend(gxp.plugins.LayerSource,{ptype:"gxp_feedsource",title:"Feed Source",format:"OpenLayers.Format.GeoRSS",popupTemplate:'<a target="_blank" href="{link}">{description}</a>',fixed:!0,createLayerRecord:function(a){var b=new OpenLayers.Layer.Vector(a.name,{projection:"projection"in a?a.projection:"EPSG:4326",visibility:"visibility"in a?a.visibility:!0,strategies:[this.fixed?new OpenLayers.Strategy.Fixed:new OpenLayers.Strategy.BBOX({resFactor:1,ratio:1})],protocol:new OpenLayers.Protocol.HTTP({url:this.url, 1567params:a.params,format:this.getFormat(a)}),styleMap:this.getStyleMap(a)});this.configureInfoPopup(b);var c=GeoExt.data.LayerRecord.create([{name:"name",type:"string"},{name:"source",type:"string"},{name:"group",type:"string"},{name:"fixed",type:"boolean"},{name:"selected",type:"boolean"},{name:"visibility",type:"boolean"},{name:"format",type:"string"},{name:"defaultStyle"},{name:"selectStyle"},{name:"params"}]),d="format"in a?a.format:this.format;return new c({layer:b,name:a.name,source:a.source, 1568group:a.group,fixed:"fixed"in a?a.fixed:!1,selected:"selected"in a?a.selected:!1,params:"params"in a?a.params:{},visibility:"visibility"in a?a.visibility:!1,format:d instanceof String?d:null,defaultStyle:"defaultStyle"in a?a.defaultStyle:{},selectStyle:"selectStyle"in a?a.selectStyle:{}},b.id)},getConfigForRecord:function(a){var b=gxp.plugins.FeedSource.superclass.getConfigForRecord.apply(this,arguments);return Ext.apply(b,{name:a.get("name"),group:a.get("group"),fixed:a.get("fixed"),selected:a.get("selected"), 1569params:a.get("params"),visibility:a.getLayer().getVisibility(),format:a.get("format"),defaultStyle:a.getLayer().styleMap.styles["default"].defaultStyle,selectStyle:a.getLayer().styleMap.styles.select.defaultStyle})},getFormat:function(a){var b=window,a="format"in a?a.format:this.format;if("string"==typeof a||a instanceof String){for(var a=a.split("."),c=0,d=a.length;c<d&&!(b=b[a[c]],!b);++c);if(b&&b.prototype&&b.prototype.initialize)return a=function(){b.prototype.initialize.apply(this)},a.prototype= 1570b.prototype,new a}else return a},configureInfoPopup:function(a){var b=new Ext.XTemplate(this.popupTemplate);a.events.on({featureselected:function(a){a=a.feature;if(this.target.selectControl)this.target.selectControl.popup&&this.target.selectControl.popup.close(),this.target.selectControl.popup=new GeoExt.Popup({title:a.attributes.title,closeAction:"destroy",location:a,html:b.apply(a.attributes)}),this.target.selectControl.popup.show()},featureunselected:function(){this.target.selectControl&&this.target.selectControl.popup&& 1571this.target.selectControl.popup.close()},scope:this})},getStyleMap:function(a){return new OpenLayers.StyleMap({"default":new OpenLayers.Style("defaultStyle"in a?a.defaultStyle:{graphicName:"
1571circle",pointRadius:5,fillOpacity:0.7,fillColor:"Red"},{title:a.name}),select:new OpenLayers.Style("selectStyle"in a?a.selectStyle:{graphicName:"circle",pointRadius:10,fillOpacity:1,fillColor:"Yellow"})})}});Ext.preg(gxp.plugins.FeedSource.prototype.ptype,gxp.plugins.FeedSource);Ext.namespace("gxp.plugins"); 1572gxp.plugins.PicasaFeedSource=Ext.extend(gxp.plugins.FeedSource,{ptype:"gxp_picasasource",url:"http://picasaweb.google.com/data/feed/base/all?thumbsize=160c&",format:"OpenLayers.Format.Picasa",title:"Picasa Photos",pointRadius:14,popupTemplate:'<tpl for="."><a target="_blank" href="{link}"><img title="{title}" src="{thumbnail}"/></a></tpl>',fixed:!1,createLayerRecord:function(a){Ext.isEmpty(a.params["max-results"])&&(a.params["max-results"]=50);a.url=this.url;this.format=new OpenLayers.Format.GeoRSS({createFeatureFromItem:function(a){var b= 1573OpenLayers.Format.GeoRSS.prototype.createFeatureFromItem.apply(this,arguments);b.attributes.thumbnail=this.getElementsByTagNameNS(a,"http://search.yahoo.com/mrss/","thumbnail")[0].getAttribute("url");b.attributes.content=OpenLayers.Util.getXmlNodeValue(this.getElementsByTagNameNS(a,"*","summary")[0]);return b}});var b=gxp.plugins.PicasaFeedSource.superclass.createLayerRecord.apply(this,arguments);b.getLayer().protocol.filterToParams=function(a,b){if(a.type===OpenLayers.Filter.Spatial.BBOX){var e= 1574a.value.toArray();b.bbox=[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]}return b};return b},configureInfoPopup:function(a){var b=new Ext.XTemplate(this.popupTemplate);a.events.on({featureselected:function(a){a=a.feature;null!=this.target.selectControl.popup&&this.target.selectControl.popup.close();var d=document.createElement("div");d.innerHTML=a.attributes.content;d={link:d.getElementsByTagName("a")[0].getAttribute("href"),title:a.attributes.title,thumbnail:a.attributes.thumbnail}; 1575this.target.selectControl.popup=new GeoExt.Popup({title:a.attributes.title,closeAction:"destroy",location:a,width:175,height:200,html:b.apply(d)});this.target.selectControl.popup.show()},featureunselected:function(){this.target.selectControl&&this.target.selectControl.popup&&this.target.selectControl.popup.close()},scope:this})},getStyleMap:function(){return new OpenLayers.StyleMap({"default":new OpenLayers.Style({externalGraphic:"${thumbnail}",pointRadius:this.pointRadius},{title:this.title}),select:new OpenLayers.Style({pointRadius:this.pointRadius+ 15765})})}});Ext.preg(gxp.plugins.PicasaFeedSource.prototype.ptype,gxp.plugins.PicasaFeedSource);Ext.namespace("gxp.plugins"); 1577gxp.plugins.YouTubeFeedSource=Ext.extend(gxp.plugins.FeedSource,{ptype:"gxp_youtubesource",url:"http://gdata.youtube.com/feeds/api/videos?v=2&prettyprint=true&",format:"OpenLayers.Format.YouTube",title:"Youtube Videos",pointRadius:24,popupTemplate:'<tpl for="."><a target="_blank" href="{link}"><img height="180" width="240" title="{title}" src="{thumbnail}"/></a></tpl>',fixed:!1,createLayerRecord:function(a){a.params["max-results"]=Ext.isEmpty(a.params["max-results"])?50:Math.min(a.params["max-results"], 157850);a.url=this.url;this.format=new OpenLayers.Format.GeoRSS({createFeatureFromItem:function(a){var b=Ope
1578nLayers.Format.GeoRSS.prototype.createFeatureFromItem.apply(this,arguments);b.attributes.thumbnail=this.getElementsByTagNameNS(a,"http://search.yahoo.com/mrss/","thumbnail")[4].getAttribute("url");b.attributes.content=OpenLayers.Util.getXmlNodeValue(this.getElementsByTagNameNS(a,"*","summary")[0]);return b}});var b=gxp.plugins.YouTubeFeedSource.superclass.createLayerRecord.apply(this,arguments); 1579b.getLayer().protocol.filterToParams=function(a,b){if(a.type===OpenLayers.Filter.Spatial.BBOX){var e=a.value,f=e.getCenterLonLat(),e=Math.min(2*((6378.137*e.right/180/3.1415926-6378.137*e.left/180/3.1415926)/2),1E3);Ext.apply(b,{location:""+f.lat+","+f.lon,"location-radius":e+"km"})}return b};return b},configureInfoPopup:function(a){var b=new Ext.XTemplate(this.popupTemplate);a.events.on({featureselected:function(a){a=a.feature;null!=this.target.selectControl.popup&&this.target.selectControl.popup.close(); 1580this.target.selectControl.popup=new GeoExt.Popup({title:a.attributes.title,location:a,width:240,height:220,closeAction:"destroy",html:b.apply(a.attributes)});this.target.selectControl.popup.show()},featureunselected:function(){this.target.selectControl&&this.target.selectControl.popup&&this.target.selectControl.popup.close()},scope:this})},getStyleMap:function(){return new OpenLayers.StyleMap({"default":new OpenLayers.Style({externalGraphic:"${thumbnail}",pointRadius:24},{title:this.title}),select:new OpenLayers.Style({pointRadius:this.pointRadius+ 15815})})}});Ext.preg(gxp.plugins.YouTubeFeedSource.prototype.ptype,gxp.plugins.YouTubeFeedSource);Ext.namespace("gxp"); 1582gxp.FeedSourceDialog=Ext.extend(Ext.Container,{feedTypeText:"Source",addPicasaText:"Picasa Photos",addYouTubeText:"YouTube Videos",addRSSText:"GeoRSS Feed",addFeedText:"Add to Map",addTitleText:"Title",keywordText:"Keyword",doneText:"Done",titleText:"Add Feeds",maxResultsText:"Max Items",width:300,autoHeight:!0,closeAction:"destroy",initComponent:function(){this.addEvents("addfeed");if(!this.feedTypes)this.feedTypes=[[gxp.plugins.PicasaFeedSource.ptype,this.addPicasaText],[gxp.plugins.YouTubeFeedSource.ptype, 1583this.addYouTubeText],[gxp.plugins.FeedSource.ptype,this.addRSSText]];var a=new Ext.data.ArrayStore({fields:["type","name"],data:this.feedTypes}),b=new Ext.form.ComboBox({store:a,fieldLabel:this.feedTypeText,displayField:"name",valueField:"type",typeAhead:!0,width:180,mode:"local",triggerAction:"all",emptyText:"Select a feed source...",selectOnFocus:!0,listeners:{select:function(a){a.value==gxp.plugins.FeedSource.ptype?(c.show(),d.hide(),f.hide(),g.show()):(c.hide(),d.show(),f.show(),g.hide());h.setDisabled(null== 1584a.value)},scope:this}}),c=new Ext.form.TextField({fieldLabel:"URL",allowBlank:!1,width:180,msgTarget:"right",validator:this.urlValidator.createDelegate(this)}),d=new Ext.form.TextField({fieldLabel:this.keywordText,allowBlank:!0,hidden:!0,width:180,msgTarget:"right"}),e=new Ext.form.TextField({fieldLabel:this.addTitleText,allowBlank:!0,width:180,msgTarget:"right"}),f=new Ext.form.ComboBox({fieldLabel:this.maxResultsText,hidden:!0,hiddenName:"max-results",store:new Ext.data.ArrayStore({fields:["max-results"], 1585data:[[10],[25],[50],[100]]}),displayField:"max-results",mode:"local",triggerAction:"all",emptyText:"Cho
1585ose number...",labelWidth:70,width:180,defaults:{labelWidth:70,width:180}}),g=new gxp.PointSymbolizer({bodyStyle:{padding:"10px"},width:280,border:!1,hidden:!0,labelWidth:70,defaults:{labelWidth:70},symbolizer:{pointGraphics:"circle",pointRadius:"5"}});g.find("name","rotation")[0].hidden=!0;if("Point"===this.symbolType&&this.pointGraphics)cfg.pointGraphics=this.pointGraphics;var h=new Ext.Button({text:this.addFeedText, 1586iconCls:"gxp-icon-addlayers",disabled:!0,handler:function(){var a=b.getValue(),h={name:e.getValue()};if("gxp_feedsource"!=a)h.params={q:d.getValue(),"max-results":f.getValue()};else{h.url=c.getValue();var k=g.symbolizer;h.defaultStyle={};h.selectStyle={};Ext.apply(h.defaultStyle,k);Ext.apply(h.selectStyle,k);Ext.apply(h.selectStyle,{fillColor:"Yellow",pointRadius:parseInt(k.pointRadius)+2})}this.fireEvent("addfeed",a,h)},scope:this}),a=["->",h,new Ext.Button({text:this.doneText,handler:function(){this.hide()}, 1587scope:this})];this.items=this.panel=new Ext.Panel({bbar:a,autoScroll:!0,items:[b,e,c,d,f,g],layout:"form",border:!1,labelWidth:100,bodyStyle:"padding: 5px",autoWidth:!0,autoHeight:!0});gxp.FeedSourceDialog.superclass.initComponent.call(this)},urlRegExp:/^(http(s)?:)?\/\/([\w%]+:[\w%]+@)?([^@\/:]+)(:\d+)?\//i,urlValidator:function(a){a=this.urlRegExp.test(a)?!this.error||this.error:this.invalidURLText;this.error=null;return a}});Ext.reg("gxp_feedsourcedialog",gxp.FeedSourceDialog);Ext.namespace("gxp.plugins"); 1588gxp.plugins.CatalogueSource=Ext.extend(gxp.plugins.WMSSource,{url:null,title:null,lazy:!0,hidden:!0,proxyOptions:null,describeLayer:function(a,b,c){a=new (Ext.data.Record.create([{name:"owsType",type:"string"},{name:"owsURL",type:"string"},{name:"typeName",type:"string"}]))({owsType:"WFS",owsURL:a.get("url"),typeName:a.get("name")});b.call(c,a)},destroy:function(){this.store&&this.store.destroy();this.store=null;gxp.plugins.CatalogueSource.superclass.destroy.apply(this,arguments)}});Ext.namespace("gxp.plugins"); 1589gxp.plugins.GeoNodeCatalogueSource=Ext.extend(gxp.plugins.CatalogueSource,{ptype:"gxp_geonodecataloguesource",rootProperty:"results",baseParams:null,fields:[{name:"title",convert:function(a){return[a]}},{name:"abstract",mapping:"description"},{name:"bounds",mapping:"bbox",convert:function(a){return{left:a.minx,right:a.maxx,bottom:a.miny,top:a.maxy}}},{name:"URI",mapping:"links",convert:function(a){var b=[],c;for(c in a)b.push({value:a[c].url});return b}}],createStore:function(){this.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy(Ext.apply({url:this.url, 1590method:"GET"},this.proxyOptions||{})),baseParams:Ext.apply({type:"layer"},this.baseParams),reader:new Ext.data.JsonReader({root:this.rootProperty},this.fields)});gxp.plugins.LayerSource.prototype.createStore.apply(this,arguments)},getPagingParamNames:function(){return{start:"startIndex",limit:"limit"}},filter:function(a){var b=void 0;if(void 0!==a.filters)for(var c=0,d=a.filters.length;c<d;++c){var e=a.filters[c];if(e instanceof OpenLayers.Filter.Spatial){b=e.value.toBBOX();break}}Ext.apply(this.store.baseParams, 1591{q:a.queryString});void 0!==a.limit&&Ext.apply(this.store.baseParams,{limit:a.limit});void 0!==b?Ext.apply(this.store.baseParams,{bbox:b}):delete this.store.baseParams.bbox;this.store.load()},createLayerRecord:function(a){a.restUrl=this.restUrl;a.queryable=!0;return gxp.plugins.GeoNodeCatalogueSource.superclass.createLayerRecord.apply(this,arguments)}});Ext.preg(gxp.plugins.GeoNodeCatalogueSource.prototype.ptype,gxp.plugins.GeoNodeCatalogueSource);Ext.namespace("gxp.form"); 1592gxp.form.CSWFilterField=Ext.extend(Ext.form.CompositeField,{clearTooltip:"
1592Clear the filter for this category",emptyText:"Select filter",property:null,map:null,type:OpenLayers.Filter.Comparison.EQUAL_TO,name:null,comboFieldLabel:null,comboStoreData:null,target:null,getFilter:function(){return"BoundingBox"===this.property?new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,property:this.property,projection:"EPSG:4326",value:this.map.getExtent().transform(this.map.getProjectionObject(), 1593new OpenLayers.Projection("EPSG:4326"))}):new OpenLayers.Filter.Comparison({type:this.type,property:this.property,value:this.combo.getValue()})},initComponent:function(){this.items=[{ref:"combo",xtype:"combo",fieldLabel:this.comboFieldLabel,store:new Ext.data.ArrayStore({fields:["id","value"],data:this.comboStoreData}),displayField:"value",valueField:"id",mode:"local",listeners:{select:function(){this.filter&&this.target.removeFilter(this.filter);this.filter=this.getFilter();this.target.addFilter(this.filter); 1594return!1},scope:this},emptyText:this.emptyText,triggerAction:"all"},{xtype:"button",iconCls:"gxp-icon-removelayers",tooltip:this.clearTooltip,handler:function(){this.target.removeFilter(this.filter);this.hide()},scope:this}];this.hidden=!0;gxp.form.CSWFilterField.superclass.initComponent.apply(this,arguments)},destroy:function(){this.map=this.target=this.filter=null;gxp.form.CSWFilterField.superclass.destroy.call(this)}});Ext.reg("gxp_cswfilterfield",gxp.form.CSWFilterField);Ext.namespace("gxp"); 1595gxp.CatalogueSearchPanel=Ext.extend(Ext.Panel,{border:!1,maxRecords:10,map:null,
1595selectedSource:null,sources:null,searchFieldEmptyText:"Search",searchButtonText:"Search",addTooltip:"Create filter",addMapTooltip:"Add to map",advancedTitle:"Advanced",datatypeLabel:"Data type",extentLabel:"Spatial extent",categoryLabel:"Category",datasourceLabel:"Data source",filterLabel:"Filter search by",removeSourceTooltip:"Switch back to original source",initComponent:function(){this.addEvents("addlayer");this.filters= 1596[];var a=[],b;for(b in this.sources)a.push([b,this.sources[b].title]);if(1<=a.length)this.selectedSource=a[0][0];b=[["datatype","data type"],["extent","spatial extent"],["category","category"]];1<a.length&&b.push(["csw","data source"]);this.items=[{xtype:"form",border:!1,ref:"form",hideLabels:!0,autoHeight:!0,style:"margin-left: 5px; margin-right: 5px; margin-bottom: 5px; margin-top: 5px",items:[{xtype:"compositefield",items:[{xtype:"textfield",emptyText:this.searchFieldEmptyText,ref:"../../search", 1597name:"search",listeners:{specialkey:function(a,b){b.getKey()==b.ENTER&&this.performQuery()},scope:this},width:250},{xtype:"button",text:this.searchButtonText,handler:this.performQuery,scope:this}]},{xtype:"fieldset",collapsible:!0,collapsed:!0,hideLabels:!1,hidden:!0,title:this.advancedTitle,items:[{xtype:"gxp_cswfilterfield",name:"datatype",property:"apiso:Type",comboFieldLabel:this.datatypeLabel,comboStoreData:[["dataset","Dataset"],["datasetcollection","Dataset collection"],["application","Application"], 1598["service","Service"]],target:this},{xtype:"gxp_cswfilterfield",name:"extent",property:"BoundingBox",map:this.map,comboFieldLabel:this.extentLabel,comboStoreData:[["map","spatial extent of the map"]],target:this},{xtype:"gxp_cswfilterfield",name:"category",property:"apiso:TopicCategory",comboFieldLabel:this.categoryLabel,comboStoreData:[["farming","Farming"],["biota","Biota"],["boundaries","Boundaries"],["climatologyMeteorologyAtmosphere","Climatology/Meteorology/Atmosphere"],["economy","Economy"], 1599["elevation","Elevation"],["environment","Environment"],["geoscientificinformation","Geoscientific Information"],["health","Health"],["imageryBaseMapsEarthCover","Imagery/Base Maps/Earth Cover"],["intelligenceMilitary","Intelligence/Military"],["inlandWaters","Inland Waters"],["location","Location"],["oceans","Oceans"],["planningCadastre","Planning Cadastre"],["society","Society"],["structure","Structure"],["transportation","Transportation"],["utilitiesCommunications","Utilities/Communications"]], 1600target:this},{xtype:"compositefield",id:"csw",ref:"../../cswCompositeField",hidden:!0,items:[{xtype:"combo",ref:"../../../sourceCombo",fieldLabel:this.datasourceLabel,store:new Ext.data.ArrayStore({fields:["id","value"],data:a}),displayField:"value",valueField:"id",mode:"local",listeners:{select:function(a){this.setSource(a.getValue())},render:function(){this.sourceCombo.setValue(this.selectedSource)},scope:this},triggerAction:"all"},{xtype:"button",iconCls:"gxp-icon-removelayers",tooltip:this.removeSourceTooltip, 1601handler:function(){this.setSource(this.initialConfig.selectedSource);this.sourceCombo.setValue(this.initialConfig.selectedSource);this.cswCompositeField.hide()},scope:this}]},{xtype:"compositefield",items:[{xtype:"combo",fieldLabel:this.filterLabel,store:new Ext.data.ArrayStore({fields:["id","value"],data:b}),displayField:"value",valueField:"id",mode:"local",triggerAction:"all"},{xtype:"button",iconCls:"gxp-icon-addlayers",tooltip:this.addTooltip,handler:function(a){a.ownerCt.items.each(function(a){if("combo"=== 1602a.getXType()){var b=a.getValue();a.clearValue();(a=this.form.getForm().findField(b))&&a.show()}},this)},scope:this}]}]},{xtype:"grid",width:"100%",anchor:"99%",viewConfig:{scrollOffset:0,forceFit:!0},border:!1,ref:"../grid",bbar:new Ext.PagingToolbar({paramNames:this.sources[this.selectedSource].getPagingParamNames(),store:this.sources[this.selectedSource].store,pageSize:this.maxRecords}),loadMask:!0,hideHeaders:!0,store:this.sources[this.selectedSource].store,columns:[{id:"title",xtype:"templatecolumn", 1603tpl:new Ext.XTemplate("<b>{title}</b><br/>{abstract}"),sortable:!0},{xtype:"actioncolumn",width:30,items:[{getClass:function(a,b,e){if(!1!==this.findWMS(e.get("URI"))||!1!==this.findWMS(e.get("references")))return"gxp-icon-addlayers"},tooltip:this.addMapTooltip,handler:function(a,b){this.addLayer(this.grid.store.getAt(b))},scope:this}]}],autoExpandColumn:"title",autoHeight:!0}]}];gxp.CatalogueSearchPanel.superclass.initComponent.apply(this,arguments)},destroy:function(){this.map=this.sources=null; 1604gxp.CatalogueSearchPanel.superclass.destroy.call(this)},setSource:function(a){this.selectedSource=a;a=this.sources[a].store;this.grid.reconfigure(a,this.grid.getColumnModel());this.grid.getBottomToolbar().bindStore(a)},performQuery:function(){this.sources[this.selectedSource].filter({queryString:this.search.getValue(),limit:this.maxRecords,filters:this.filters})},addFilter:function(a){this.filters.push(a)},removeFilter:function(a){this.filters.remove(a)},findWMS:function(a){var b=["OGC:WMS-1.1.1-HTTP-GET-MAP", 1605"OGC:WMS"],c=null,d=null,e,f,g;for(e=0,f=a.length;e<f;++e)if(g=a[e],g.protocol&&-1!==b.indexOf(g.protocol.toUpperCase())&&g.value&&g.name){c=g.value;d=g.name;break}if(null===c)for(e=0,f=a.length;e<f;++e)if(g=a[e],g.value&&0<g.value.toLowerCase().indexOf("service=wms")){a=OpenLayers.Util.createUrlObject(g.value);c=a.protocol+"//"+a.host+":"+a.port+a.pathname;d=a.args.layers;break}return null!==c&&null!==d?{url:c,name:d}:!1},addLayer:function(a){var b=a.get("URI"),c=a.get("bounds"),d=c.left,e=c.right, 1606f=c.bottom,g=c.top,c=Math.min(d,e),d=Math.max(d,e),e=Math.min(f,g),f=Math.max(f,g),b=this.findWMS(b);!1===b&&(b=this.findWMS(a.get("references")));!1!==b&&this.fireEvent("addlayer",this,this.selectedSource,Ext.apply({title:a.get("title")[0],bbox:[c,e,d,f],srs:"EPSG:4326"},b))}});Ext.reg("gxp_cataloguesearchpanel",gxp.CatalogueSearchPanel); 1607OpenLayers.Format.TMSCapabilities=OpenLayers.Class(OpenLayers.Format.XML,{defaultPrefix:"tms",readers:{tms:{Services:function(a,b){b.services=[];this.readChildNodes(a,b)},TileMapService:function(a,b){b.services?b.services.push({service:"TMS",version:a.getAttribute("version"),title:a.getAttribute("title"),href:a.getAttribute("href")}):this.readChildNodes(a,b)},TileMaps:function(a,b){b.tileMaps=[];this.readChildNodes(a,b)},TileMap:function(a,b){b.tileMaps?b.tileMaps.push({href:a.getAttribute("href"), 1608srs:a.getAttribute("srs"),title:a.getAttribute("title"),profile:a.getAttribute("profile")}):(b.version=a.getAttribute("version"),b.tileMapService=a.getAttribute("tilemapservice"),this.readChildNodes(a,b))},Title:function(a,b){b.title=this.getChildValue(a)},Abstract:function(a,b){b["abstract"]=this.getChildValue(a)},SRS:function(a,b){b.srs=this.getChildValue(a)},BoundingBox:function(a,b){b.bbox=new OpenLayers.Bounds(a.getAttribute("minx"),a.getAttribute("miny"),a.getAttribute("maxx"),a.getAttribute("maxy"))}, 1609Origin:function(a,b){b.origin=new OpenLayers.LonLat(a.getAttribute("x"),a.getAttribute("y"))},TileFormat:function(a,b){b.tileFormat={width:parseInt(a.getAttribute("width"),10),height:parseInt(a.getAttribute("height"),10),mimeType:a.getAttribute("mime-type"),extension:a.getAttribute("extension")}},TileSets:function(a,b){b.tileSets=[];this.readChildNodes(a,b)},TileSet:function(a,b){b.tileSets.push({href:a.getAttribute("href"),unitsPerPixel:parseFloat(a.getAttribute("units-per-pixel")),order:parseInt(a.getAttribute("order"), 161010)})},TileMapServerError:function(a,b){b.error=!0},Message:function(a,b){b.message=this.getChildValue(a)}}},read:function(a){"string"==typeof a&&(a=OpenLayers.Format.XML.prototype.read.apply(this,[a]));if(a&&9==a.nodeType)a=a.documentElement;var b={};this.readNode(a,b);return b},CLASS_NAME:"OpenLayers.Format.TMSCapabilities"});Ext.ns("gxp.data","gxp.plugins"); 1611gxp.data.TMSCapabilitiesReader=Ext.extend(Ext.data.DataReader,{constructor:function(a,b){a=a||{};if(!a.format)a.format=new OpenLayers.Format.TMSCapabilities;"function"!==typeof b&&(b=GeoExt.data.LayerRecord.create(b||a.fields||[{name:"name",type:"string"},{name:"title",type:"string"},{name:"tileMapUrl",type:"string"}]));gxp.data.TMSCapabilitiesReader.superclass.constructor.call(this,a,b)},read:function(a){var b=a.responseXML;if(!b||!b.documentElement)b=a.responseText;return this.readRecords(b)},readRecords:function(a){var b= 1612[],c,d,e;if("string"===typeof a||a.nodeType)if(this.raw=a=this.meta.format.read(a),a.tileMaps)for(c=0,d=a.tileMaps.length;c<d;++c){var f=a.tileMaps[c];e=new OpenLayers.Projection(f.srs);if(this.meta.mapProjection.equals(e)){e=f.href;var g=e.substring(e.indexOf(this.meta.version+"/")+6);b.push(new this.recordType({layer:new OpenLayers.Layer.TMS(f.title,-1!==this.meta.baseUrl.indexOf(this.meta.version)?this.meta.baseUrl.replace(this.meta.version+"/",""):this.meta.baseUrl,{layername:g}),title:f.title, 1613name:f.title,tileMapUrl:e}))}}else if(a.tileSets&&(e=new OpenLayers.Projection(a.srs),this.meta.mapProjection.equals(e))){f=[];for(c=0,d=a.tileSets.length;c<d;++c)f.push(a.tileSets[c].unitsPerPixel);e=this.meta.baseUrl;c=e.substring(e.indexOf(this.meta.version)+this.meta.version.length+1,e.lastIndexOf("/"));b.push(new this.recordType({layer:new OpenLayers.Layer.TMS(a.title,a.tileMapService.replace("/"+this.meta.version,""),{serverResolutions:f,type:a.tileFormat.extension,layername:c}
1613),title:a.title, 1614name:a.title,tileMapUrl:this.meta.baseUrl}))}return{totalRecords:b.length,success:!0,records:b}}}); 1615gxp.plugins.TMSSource=Ext.extend(gxp.plugins.LayerSource,{ptype:"gxp_tmssource",version:"1.0.0",constructor:function(a){gxp.plugins.TMSSource.superclass.constructor.apply(this,arguments);this.format=new OpenLayers.Format.TMSCapabilities;"/"!==this.url.slice(-1)&&(this.url+="/")},createStore:function(){this.store=new Ext.data.Store({autoLoad:!0,listeners:{load:function(){this.title=this.store.reader.raw.title;this.fireEvent("ready",this)},exception:function(){this.fireEvent("failure",this,"Trouble creating TMS layer store from response.", 1616"Unable to handle response.")},scope:this},proxy:new Ext.data.HttpProxy({url:-1===this.url.indexOf(this.version)?this.url+this.version:this.url,disableCaching:!1,method:"GET"}),reader:new gxp.data.TMSCapabilitiesReader({baseUrl:this.url,version:this.version,mapProjection:this.getMapProjection()})})},createLayerRecord:function(a,b,c){var d=this.store.findExact("name",a.name);if(-1<d){var d=this.store.getAt(d),e=d.getLayer();if(null!==e.serverResolutions)return d;Ext.Ajax.request({url:d.get("tileMapUrl"), 1617success:function(d){for(var g=[],d=this.format.read(d.responseText),h=0,i=d.tileSets.length;h<i;++h)g.push(d.tileSets[h].unitsPerPixel);e.addOptions({serverResolutions:g,type:d.tileFormat.extension});this.target.createLayerRecord({source:this.id,name:a.name},b,c)},scope:this})}}});Ext.preg(gxp.plugins.TMSSource.prototype.ptype,gxp.plugins.TMSSource); 1618OpenLayers.Layer.ArcGIS93Rest=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{format:"png"},isBaseLayer:!0,initialize:function(a,b,c,d){var e=[],c=OpenLayers.Util.upperCaseObject(c);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.params.TRANSPARENT&&"true"==this.params.TRANSPARENT.toString().toLowerCase()){if(null==d||!d.isBaseLayer)this.isBaseLayer=!1;if("jpg"== 1619this.params.FORMAT)this.params.FORMAT=OpenLayers.Util.alphaHack()?"gif":"png"}},clone:function(a){null==a&&(a=new OpenLayers.Layer.ArcGIS93Rest(this.name,this.url,this.params,this.getOptions()));return a=OpenLayers.Layer.Grid.prototype.clone.apply(this,[a])},getURL:function(a){var a=this.adjustBounds(a),b=this.projection.getCode().split(":"),b=b[b.length-1],c=this.getImageSize(),a={BBOX:a.toBBOX(),SIZE:c.w+","+c.h,F:"image",BBOXSR:b,IMAGESR:b};if(this.layerDefs){var b=[],d;for(d in this.layerDefs)this.layerDefs.hasOwnProperty(d)&& 1620this.layerDefs[d]&&(b.push(d),b.push(":"),b.push(this.layerDefs[d]),b.push(";"));0<b.length&&(a.LAYERDEFS=b.join(""))}return this.getFullRequestString(a)},setLayerFilter:function(a,b){if(!this.layerDefs)this.layerDefs={};b?this.layerDefs[a]=b:delete this.layerDefs[a]},clearLayerFilter:function(a){a?delete this.layerDefs[a]:delete this.layerDefs},mergeNewParams:function(a){a=[OpenLayers.Util.upperCaseObject(a)];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,a)},CLASS_NAME:"OpenLayers.Layer.ArcGIS93Rest"}); 1621Ext.namespace("gxp.plugins"); 1622gxp.plugins.ArcRestSource=Ext.extend(gxp.plugins.LayerSource,{ptype:"gxp_arcrestsource",requiredProperties:["name"],constructor:function(a){this.config=a;gxp.plugins.ArcRestSource.superclass.constructor.apply(this,arguments)},createStore:function(){var a=this.url.split("?")[0],b=this,c=function(c){var f=Ext.decode(c.responseText),g=b.getArcProjection(f.spatialReference.wkid),h=[];if(null!=g)for(c=0;c<f.layers.length;c++){var i=f.layers[c];h.push(new OpenLayers.Layer.ArcGIS93Rest(i.name,a+"/export", 1623{layers:"show:"+i.id,TRANSPARENT:!0},{isBaseLayer:!1,ratio:1,displayInLayerSwitcher:!0,visibility:!0,projection:g,queryable:f.capabilities&&f.capabilities.Identify}))}else d(c);b.title=f.documentInfo.Title;b.store=new GeoExt.data.LayerStore({layers:h,fields:[{name:"source",type:"string"},{name:"name",type:"string",mapping:"name"},{name:"layerid",type:"string"},{name:"group",type:"string",defaultValue:this.title},{name:"fixed",type:"boolean",defaultValue:!0},{name:"tiled",type:"boolean",defaultValue:!0}, 1624{name:"queryable",type:"boolean",defaultValue:!0},{name:"selected",type:"boolean"}]});b.fireEvent("ready",b)},d=function(){Ext.Msg.alert("No ArcGIS Layers","Could not find any compatible layers at "+b.config.url);b.fireEvent("failure",b)};(this.lazy=this.isLazy())?this.fireEvent("ready"):Ext.Ajax.request({url:a,params:{f:"json",pretty:"false",keepPostParams:"true"},method:"POST",success:c,failure:d})},isLazy:function(){var a=!0,b=!1,c=this.target.initialConfig.map;if(c&&c.layers)for(var d,e=0,f= 1625c.layers.length;e<f&&!(d=c.layers[e],d.source===this.id&&(b=!0,a=this.layerConfigComplete(d),!1===a));++e);return a&&b},layerConfigComplete:function(a){for(var b=!0,c=this.requiredProperties,d=c.length-1;0<=d&&!(b=!!a[c[d]],!1===b);--d);return b},createLayerRecord:function(a){var b,c;c=function(b){return b.get("name")===a.name};var d=this.lazy||this.store&&-1<this.store.findBy(c);if(-1==this.target.mapPanel.layers.findBy(c)&&d){b=!this.lazy&&-1<this.store.findBy(c)?this.store.getAt(this.store.findBy(c)).clone(): 1626this.createLazyLayerRecord(a);c=b.getLayer();a.title&&(c.setName(a.title),b.set("title",a.title));if("visibility"in a)c.visibility=a.visibility;if("opacity"in a)c.opacity=a.opacity;if("format"in a)c.params.FORMAT=a.format,b.set("format",a.format);c=!1;"tiled"in a&&(c=!a.tiled);b.set("tiled",!c);b.set("selected",a.selected||!1);b.set("queryable",a.queryable||!0);b.set("source",a.source);b.set("name",a.name);b.set("layerid",a.layerid);b.set("properties","gxp_wmslayerpanel");"group"in a&&b.set("group", 1627a.group);b.commit()}return b},getArcProjection:function(a){var b=this.getMapProjection(),c=b,a="EPSG:"+a+"";if(a!==b.getCode()&&(c=null,(p=new OpenLayers.Projection(a)).equals(b)))c=p;return c},createLazyLayerRecord:function(a){var b=a.srs||this.target.map.projection;a.srs={};a.srs[b]=!0;var c=a.bbox||this.target.map.maxExtent||OpenLayers.Projection.defaults[b].maxExtent;a.bbox={};a.bbox[b]={bbox:c};c=new GeoExt.data.LayerRecord(a);c.set("name",a.name);c.set("layerid",a.layerid||"show:0");c.set("format", 1628a.format||"png");c.set("tiled","tiled"in a?a.tiled:!0);c.setLayer(new OpenLayers.Layer.ArcGIS93Rest(a.name,this.url.split("?")[0]+"/export",{layers:a.layerid,TRANSPARENT:!0,FORMAT:"format"in a?a.format:"png"},{isBaseLayer:!1,displayInLayerSwitcher:!0,projection:b,singleTile:"tiled"in a?!a.tiled:!1,queryable:"queryable"in a?a.queryable:!1}));return c},getConfigForRecord:function(a){var b=a.getLayer();return{source:a.get("source"),name:a.get("name"),title:a.get("title"),tiled:a.get("tiled"),visibility:b.getVisibility(), 1629layerid:b.params.LAYERS,format:b.params.FORMAT,opacity:b.opacity||void 0,group:a.get("group"),fixed:a.get("fixed"),selected:a.get("selected")}}});Ext.preg(gxp.plugins.ArcRestSource.prototype.ptype,gxp.plugins.ArcRestSource);Ext.namespace("gxp.plugins"); 1630gxp.plugins.AddLayers=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_addlayers",addActionMenuText:"Add layers",findActionMenuText:"Find layers",addFeedActionMenuText:"Add feeds",addActionTip:"Add layers",addServerText:"Add a New Server",addButtonText:"Add layers",untitledText:"Untitled",addLayerSourceErrorText:"Error getting {type} capabilities ({msg}).\nPlease check the url and try again.",availableLayersText:"Available Layers",searchText:"Search for layers",expanderTemplateText:"<p><b>Abstract:</b> {abstract}</p>", 1631panelTitleText:"Title",layerSelectionText:"View available data from:",doneText:"Done",uploadRoles:["ROLE_ADMINISTRATOR"],uploadText:"Upload layers",relativeUploadOnly:!0,startSourceId:null,catalogSourceKey:null,
1631selectedSource:null,addServerId:null,constructor:function(a){this.addEvents("sourceselected");gxp.plugins.AddLayers.superclass.constructor.apply(this,arguments)},addActions:function(){var a={tooltip:this.addActionTip,text:this.addActionText,menuText:this.addActionMenuText,disabled:!0,iconCls:"gxp-icon-addlayers"}, 1632b;if(this.initialConfig.search||this.uploadSource){var c=[new Ext.menu.Item({iconCls:"gxp-icon-addlayers",text:this.addActionMenuText,handler:this.showCapabilitiesGrid,scope:this})];this.initialConfig.search&&c.push(new Ext.menu.Item({iconCls:"gxp-icon-addlayers",text:this.findActionMenuText,handler:this.showCatalogueSearch,scope:this}));this.initialConfig.feeds&&c.push(new Ext.menu.Item({iconCls:"gxp-icon-addlayers",text:this.addFeedActionMenuText,handler:this.showFeedDialog,scope:this}));this.uploadSource&& 1633(b=this.createUploadButton(Ext.menu.Item))&&c.push(b);a=Ext.apply(a,{menu:new Ext.menu.Menu({items:c})})}else a=Ext.apply(a,{handler:this.showCapabilitiesGrid,scope:this});var d=gxp.plugins.AddLayers.superclass.addActions.apply(this,[a]);this.target.on("ready",function(){if(this.uploadSource){var a=this.target.layerSources[this.uploadSource];a?this.setSelectedSource(a):(delete this.uploadSource,b&&b.hide())}d[0].enable()},this);return d},showCatalogueSearch:function(){var a=this.initialConfig.search.selectedSource, 1634b={},c;for(c in this.target.layerSources){var d=this.target.layerSources[c];if(d instanceof gxp.plugins.CatalogueSource){var e={};e[c]=d;Ext.apply(b,e)}}a=gxp.plugins.AddLayers.superclass.addOutput.apply(this,[{sources:b,title:this.searchText,height:300,width:315,selectedSource:a,xtype:"gxp_cataloguesearchpanel",map:this.target.mapPanel.map}]);a.on({addlayer:function(a,b,c){var a=this.target.layerSources[b],d=OpenLayers.Bounds.fromArray(c.bbox),e=this.target.mapPanel.map.getProjection(),d=d.transform(c.srs, 1635e);c.srs=e;c.bbox=d.toArray();c.source=null!==this.initialConfig.catalogSourceKey?this.initialConfig.catalogSourceKey:b;this.target.mapPanel.layers.add(a.createLayerRecord(c));d&&this.target.mapPanel.map.zoomToExtent(d)},scope:this});(b=a.findParentByType("window"))&&b.center();return a},showCapabilitiesGrid:function(){this.capGrid?this.capGrid instanceof Ext.Window||this.addOutput(this.capGrid):this.initCapGrid();this.capGrid.show()},showFeedDialog:function(){if(!this.feedDialog){var a=this.outputTarget? 1636Ext.Panel:Ext.Window;this.feedDialog=new a(Ext.apply({closeAction:"hide",autoScroll:!0,title:this.addFeedActionMenuText,items:[{xtype:"gxp_feedsourcedialog",target:this.target,listeners:{addfeed:function(a,c){var d={config:{ptype:a}};if(c.url)d.config.url=c.url;d=this.target.addLayerSource(d);c.source=d.id;this.target.mapPanel.layers.add([d.createLayerRecord(c)]);this.feedDialog.hide()},scope:this}}]},this.initialConfig.outputConfig));a===Ext.Panel&&this.addOutput(this.feedDialog)}this.feedDialog instanceof 1637Ext.Window||this.addOutput(this.feedDialog);this.feedDialog.show()},initCapGrid:function(){function a(){function a(b){d&&d.push(b);e--;0===e&&this.addLayers(d)}for(var b=this.selectedSource,c=h.getSelectionModel().getSelections(),d=[],e=c.length,f=0,g=c.length;f<g;++f){var i=b.createLayerRecord({name:c[f].get("name"),source:b.id},a,this);i&&a.call(this,i)}}var b,c=[],d=this.target,e;for(e in d.layerSources)b=d.layerSources[e],b.store&&!b.hidden&&c.push([e,b.title||e,b.url]);var f=new Ext.data.ArrayStore({fields:["id", 1638"title","url"],data:c});e=this.createExpander();var g=0;null!==this.startSourceId&&f.each(function(a){a.get("id")===this.startSourceId&&(g=f.indexOf(a))},this);b=this.target.layerSources[c[g][0]];var h=new Ext.grid.GridPanel({store:b.store,autoScroll:!0,autoExpandColumn:"title",plugins:[e],loadMask:!0,colModel:new Ext.grid.ColumnModel([e,{id:"title",header:this.panelTitleText,dataIndex:"title",sortable:!0},{header:"Id",dataIndex:"name",width:120,sortable:!0}]),listeners:{rowdblclick:a,scope:this}}), 1639i=new Ext.form.ComboBox({ref:"../../sourceComboBox",width:165,store:f,valueField:"id",displayField:"title",tpl:'<tpl for="."><div ext:qtip="{url}" class="x-combo-list-item">{title}</div></tpl>',triggerAction:"all",editable:!1,allowBlank:!1,forceSelection:!0,mode:"local",value:c[g][0],listeners:{select:function(a,b){var c=b.get("id");c===this.addServerId?(k.outputTarget?k.addOutput(j):(new Ext.Window({title:gxp.NewSourceDialog.prototype.title,modal:!0,hideBorders:!0,width:300,items:j})).show(),i.reset()): 1640(c=this.target.layerSources[c],h.reconfigure(c.store,h.getColumnModel()),h.getView().focusRow(0),this.setSelectedSource(c),function(){a.triggerBlur();a.el.blur()}.defer(100))},focus:function(a){d.proxy&&a.reset()},scope:this}});b=null;if(this.target.proxy||1<c.length)b=new Ext.Container({cls:"gxp-addlayers-sourceselect",items:[new Ext.Toolbar.TextItem({text:this.layerSelectionText}),i]}),b=[b];if(this.target.proxy)this.addServerId=Ext.id(),f.loadData([[this.addServerId,this.addServerText+"..."]], 1641!0);var j={xtype:"gxp_newsourcedialog",header:!1,listeners:{hide:function(a){this.outputTarget||a.ownerCt.hide()},urlselected:function(a,b,c){a.setLoading();var d;switch(c){case "TMS":d="gxp_tmssource";break;case "REST":d="gxp_arcrestsource";break;default:d="gxp_wmscsource"}this.target.addLayerSource({config:{url:b,ptype:d},callback:function(b){b=new f.recordType({id:b,title:this.target.layerSources[b].title||this.untitledText});f.insert(0,[b]);i.onSelect(b,0);a.hide()},fallback:function(b,d){a.setError((new Ext.Template(this.addLayerSourceErrorText)).apply({type:c, 1642msg:d}))},scope:this})},scope:this}},k=this;e={xtype:"container",region:"center",layout:"fit",hideBorders:!0,items:[h]};this.instructionsText&&e.items.push({xtype:"box",autoHeight:!0,autoEl:{tag:"p",cls:"x-form-item",style:"padding-left: 5px; padding-right: 5px"},html:this.instructionsText});var l=["->",new Ext.Button({text:this.addButtonText,iconCls:"gxp-icon-addlayers",handler:a,scope:this}),new Ext.Button({text:this.doneText,handler:function(){this.capGrid.hide()},scope:this})],m;this.uploadSource|| 1643(m=this.createUploadButton())&&l.unshift(m);m=this.outputTarget?Ext.Panel:Ext.Window;this.capGrid=new m(Ext.apply({title:this.availableLayersText,closeAction:"hide",layout:"border",height:300,width:315,modal:!0,items:e,tbar:b,bbar:l,listeners:{hide:function(){h.getSelectionModel().clearSelections()},show:function(){null===this.selectedSource?this.setSelectedSource(this.target.layerSources[c[g][0]]):this.setSelectedSource(this.selectedSource)},scope:this}},this.initialConfig.outputConfig));m===Ext.Panel&& 1644this.addOutput(this.capGrid)},addLayers:function(a,b){for(var c=this.selectedSource,d=this.target.mapPanel.layers,e,f,g,h=0,i=a.length;h<i;++h)if(f=c.createLayerRecord({name:a[h].get("name"),source:c.id})||a[h])g=f.getLayer(),g.maxExtent&&(e?e.extend(f.getLayer().maxExtent):e=f.getLayer().maxExtent.clone()),"background"===f.get("group")?d.insert(1,[f]):d.add([f]);e&&this.target.mapPanel.map.zoomToExtent(e);
1644if(1===a.length&&f&&(this.target.selectLayer(f),b&&this.postUploadAction)){var j,c=this.postUploadAction; 1645if(!Ext.isString(c))j=c.outputConfig,c=c.plugin;this.target.tools[c].addOutput(j)}},setSelectedSource:function(a){this.selectedSource=a;this.fireEvent("sourceselected",this,a);this.capGrid&&a.lazy&&a.store.load({callback:function(){var a=this.capGrid.sourceComboBox,c=a.store,d=a.valueField,e=c.findExact(d,a.getValue()),e=c.getAt(e),f=this.target.layerSources[e.get("id")];f?f.title!==e.get("title")&&!Ext.isEmpty(f.title)&&(e.set("title",f.title),a.setValue(e.get(d))):c.remove(e)}.createDelegate(this)})}, 1646createUploadButton:function(a){var a=a||Ext.Button,b,c=this.initialConfig.upload||!!this.initialConfig.uploadSource,d;if(c){"boolean"===typeof c&&(c={});b=new a({text:this.uploadText,iconCls:"gxp-icon-filebrowse",hidden:!this.uploadSource,handler:function(){this.target.doAuthorized(this.uploadRoles,function(){var a=new gxp.LayerUploadPanel(Ext.apply({title:this.outputTarget?this.uploadText:void 0,url:d,width:300,border:!1,bodyStyle:"padding: 10px 10px 0 10px;",labelWidth:65,autoScroll:!0,defaults:{anchor:"99%", 1647allowBlank:!1,msgTarget:"side"},listeners:{uploadcomplete:function(a,c){for(var d=c["import"].tasks[0].items,e,f={},g=0,o=d.length;g<o;++g){e=d[g];if("ERROR"===e.state){Ext.Msg.alert(e.originalName,e.errorMessage);return}e=e.resource;e=e.featureType||e.coverage;f[e.namespace.name+":"+e.name]=!0}this.selectedSource.store.load({callback:function(){var a,b;this.capGrid&&this.capGrid.isVisible()&&(a=this.capGrid.get(0).get(0),b=a.getSelectionModel(),b.clearSelections());var c=[],d=0;this.selectedSource.store.each(function(a, 1648b){a.get("name")in f&&(d=b,c.push(a))});a?window.setTimeout(function(){b.selectRecords(c);a.getView().focusRow(d)},100):this.addLayers(c,!0)},scope:this});this.outputTarget?a.hide():b.close()},scope:this}},c)),b;this.outputTarget?this.addOutput(a):(b=new Ext.Window({title:this.uploadText,modal:!0,resizable:!1,items:[a]}),b.show())},this)},scope:this});var e={},f=function(a,b,c){a in e?window.setTimeout(function(){b.call(c,e[a])},0):Ext.Ajax.request({url:a,disableCaching:!1,callback:function(d,f,l){d= 1649l.status;e[a]=d;b.call(c,d)}})};this.on({sourceselected:function(a,c){b[this.uploadSource?"show":"hide"]();this.isEligibleForUpload(c)&&(d=this.getGeoServerRestUrl(c.url),this.target.isAuthorized()&&f(d+"/imports",function(a){b.setVisible(200===a)},this))},scope:this})}return b},getGeoServerRestUrl:function(a){a=a.split("/");a.pop();a.push("rest");return a.join("/")},isEligibleForUpload:function(a){return a.url&&(this.relativeUploadOnly?"/"===a.url.charAt(0):!0)&&-1===(this.nonUploadSources||[]).indexOf(a.id)}, 1650createExpander:function(){return new Ext.grid.RowExpander({tpl:new Ext.Template(this.expanderTemplateText)})}});Ext.preg(gxp.plugins.AddLayers.prototype.ptype,gxp.plugins.AddLayers);Ext.namespace("gxp.plugins"); 1651gxp.plugins.RemoveLayer=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_removelayer",removeMenuText:"Remove layer",removeActionTip:"Remove layer",addActions:function(){var a,b=gxp.plugins.RemoveLayer.superclass.addActions.apply(this,[{menuText:this.removeMenuText,iconCls:"gxp-icon-removelayers",disabled:!0,tooltip:this.removeActionTip,handler:function(){var b=a;b&&this.target.mapPanel.layers.remove(b)},scope:this}]),c=b[0];this.target.on("layerselectionchange",function(b){a=b;c.setDisabled(1>=this.target.mapPanel.layers.getCount()|| 1652!b)},this);var d=function(b){c.setDisabled(!a||1>=b.getCount())};this.target.mapPanel.layers.on({add:d,remove:d});return b}});Ext.preg(gxp.plugins.RemoveLayer.prototype.ptype,gxp.plugins.RemoveLayer);Ext.namespace("gxp.plugins"); 1653gxp.plugins.LayerProperties=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_layerproperties",menuText:"Layer Properties",toolTip:"Layer Properties",constructor:function(a){gxp.plugins.LayerProperties.superclass.constructor.apply(this,arguments);if(!this.outputConfig)this.outputConfig={width:325,autoHeight:!0}},addActions:function(){var a=gxp.plugins.LayerProperties.superclass.addActions.apply(this,[{menuText:this.menuText,iconCls:"gxp-icon-layerproperties",disabled:!0,tooltip:this.toolTip,handler:function(){this.removeOutput(); 1654this.addOutput()},scope:this}]),b=a[0];this.target.on("layerselectionchange",function(a){b.setDisabled(!a||!a.get("properties"))},this);return a},addOutput:function(a){var a=a||{},b=this.target.selectedLayer;this.outputConfig.title=(this.initialConfig.outputConfig||{}).title||this.menuText+": "+b.get("title");this.outputConfig.shortTitle=b.get("title");var c=b.get("properties")||"gxp_layerpanel",d=this.layerPanelConfig;d&&d[c]&&Ext.apply(a,d[c]);a=gxp.plugins.LayerProperties.superclass.addOutput.call(this, 1655Ext.apply({xtype:c,authorized:this.target.isAuthorized(),layerRecord:b,source:this.target.getSource(b),defaults:{style:"padding: 10px",autoHeight:this.outputConfig.autoHeight}},a));
1655a.on({added:function(a){if(!this.outputTarget)a.on("afterrender",function(){a.ownerCt.ownerCt.center()},this,{single:!0})},scope:this});return a}});Ext.preg(gxp.plugins.LayerProperties.prototype.ptype,gxp.plugins.LayerProperties);Ext.namespace("gxp.plugins"); 1656gxp.plugins.ZoomToLayerExtent=Ext.extend(gxp.plugins.ZoomToExtent,{ptype:"gxp_zoomtolayerextent",menuText:"Zoom to layer extent",tooltip:"Zoom to layer extent",iconCls:"gxp-icon-zoom-to",destroy:function(){this.selectedRecord=null;gxp.plugins.ZoomToLayerExtent.superclass.destroy.apply(this,arguments)},extent:function(){var a=this.selectedRecord.getLayer(),b;OpenLayers.Layer.Vector&&(b=a instanceof OpenLayers.Layer.Vector&&a.getDataExtent());return a.restrictedExtent||b||a.maxExtent||map.maxExtent}, 1657addActions:function(){var a=gxp.plugins.ZoomToLayerExtent.superclass.addActions.apply(this,arguments);a[0].disable();this.target.on("layerselectionchange",function(b){this.selectedRecord=b;a[0].setDisabled(!b||!b.get("layer"))},this);return a}});Ext.preg(gxp.plugins.ZoomToLayerExtent.prototype.ptype,gxp.plugins.ZoomToLayerExtent);Ext.namespace("gxp.plugins"); 1658gxp.plugins.ZoomToSelectedFeatures=Ext.extend(gxp.plugins.ZoomToExtent,{ptype:"gxp_zoomtoselectedfeatures",menuText:"Zoom to selected features",tooltip:"Zoom to selected features",closest:!1,layer:null,iconCls:"gxp-icon-zoom-to",extent:function(){for(var a,b,c=this.target.tools[this.featureManager].featureLayer.selectedFeatures,d=c.length-1;0<=d;--d)if(b=c[d].geometry)b=b.getBounds(),a?a.extend(b):a=b.clone();return a},addActions:function(){function a(){this.layer&&this.layer.events.un(c);if(this.layer= 1659d.featureLayer)this.layer.events.on(c)}var b=gxp.plugins.ZoomToSelectedFeatures.superclass.addActions.apply(this,arguments);b[0].disable();var c={featureselected:function(a){b[0].isDisabled()&&null!==a.feature.geometry&&b[0].enable()},featureunselected:function(){0===this.layer.selectedFeatures.length&&b[0].disable()},scope:this},d=this.target.tools[this.featureManager];this.target.on("layerselectionchange",a);d.on("query",function(){b[0].disable()});a.call(this);return b}}); 1660Ext.preg(gxp.plugins.ZoomToSelectedFeatures.prototype.ptype,gxp.plugins.ZoomToSelectedFeatures);Ext.namespace("gxp.plugins"); 1661gxp.plugins.Legend=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_legend",menuText:"Legend",tooltip:"Show Legend",actionTarget:null,constructor:function(a){gxp.plugins.Legend.superclass.constructor.apply(this,arguments);if(!this.outputConfig)this.outputConfig={width:300,height:400};Ext.applyIf(this.outputConfig,{title:this.menuText})},addActions:function(){return gxp.plugins.Legend.superclass.addActions.apply(this,[[{menuText:this.menuText,iconCls:"gxp-icon-legend",tooltip:this.tooltip,handler:function(){this.removeOutput(); 1662this.addOutput()},scope:this}]])},getLegendPanel:function(){return this.output[0]},addOutput:function(a){return gxp.plugins.Legend.superclass.addOutput.call(this,Ext.apply({xtype:"gx_legendpanel",ascending:!1,border:!1,hideMode:"offsets",layerStore:this.target.mapPanel.layers,defaults:{cls:"gxp-legend-item"}},a))}});Ext.preg(gxp.plugins.Legend.prototype.ptype,gxp.plugins.Legend);Ext.namespace("gxp.plugins"); 1663gxp.plugins.Print=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_print",printService:null,printCapabilities:null,customParams:null,includeLegend:!1,menuText:"Print Map",tooltip:"Print Map",buttonText:"Print",notAllNotPrintableText:"Not All Layers Can Be Printed",nonePrintableText:"None of your current map layers can be printed",previewText:"Print Preview",openInNewWindow:!1,constructor:function(a){gxp.plugins.Print.superclass.constructor.apply(this,arguments)},addActions:function(){if(null!==this.printService|| 1664null!=this.printCapabilities){var a=new GeoExt.data.PrintProvider({capabilities:this.printCapabilities,url:this.printService,customParams:this.customParams,autoLoad:!1,listeners:{beforedownload:function(a,b){if(!0===this.openInNewWindow)return window.open(b),!1},beforeencodelegend:function(a,b,c){if(c&&"gxp_layermanager"===c.ptype){var d=[];(c=c.output)&&c[0]&&c[0].getRootNode().cascade(function(a){if(a.component&&!a.component.hidden){var a=a.component,c=this.encoders.legends[a.getXType()];d=d.concat(c.call(this, 1665a,b.pages[0].scale))}},a);b.legends=d;return!1}},beforeprint:function(){d.items.get(0).printMapPanel.layers.each(function(a){var a=a.get("layer").params,b;for(b in a)a[b]instanceof Array&&(a[b]=a[b].join(","))})},loadcapabilities:function(){if(c)c.initialConfig.disabled=!1,c.enable()},print:function(){try{d.close()}catch(a){}},printException:function(a,b){this.target.displayXHRTrouble&&this.target.displayXHRTrouble(b)},scope:this}}),b=gxp.plugins.Print.superclass.addActions.call(this,[{menuText:this.menuText, 1666buttonText:this.buttonText,tooltip:this.tooltip,iconCls:"gxp-icon-print",disabled:null!==this.printCapabilities?!1:!0,handler:function(){if(0<g().length){var a=i.call(this);j.call(this);return a}Ext.Msg.alert(this.notAllNotPrintableText,this.nonePrintableText)},scope:this,listeners:{render:function(){a.loadCapabilities()}}}]),c=b[0].items[0],d,e=function(){if(d){try{d.items.first().printMapPanel.printPage.destroy()}catch(a){}d=null}},f=this.target.mapPanel,g=function(){var a=[];f.layers.each(function(b){b= 1667b.getLayer();h(b)&&a.push(b)});return a},h=function(a){return!0===a.getVisibility()&&(a instanceof OpenLayers.Layer.WMS||a instanceof OpenLayers.Layer.OSM)},i=function(){var b=null;if(!0===this.includeLegend){var c,g;for(c in this.target.tools)if(g=this.target.tools[c],"gxp_legend"===g.ptype){b=g.getLegendPanel
1667();break}if(null===b)for(c in this.target.tools)if(g=this.target.tools[c],"gxp_layermanager"===g.ptype){b=g;break}}return d=new Ext.Window({title:this.previewText,modal:!0,border:!1,autoHeight:!0, 1668resizable:!1,width:360,items:[new GeoExt.ux.PrintPreview({minWidth:336,mapTitle:this.target.about&&this.target.about.title,comment:this.target.about&&this.target.about["abstract"],printMapPanel:{autoWidth:!0,height:Math.min(420,Ext.get(document.body).getHeight()-150),limitScales:!0,map:Ext.applyIf({controls:[new OpenLayers.Control.Navigation({zoomWheelEnabled:!1,zoomBoxEnabled:!1}),new OpenLayers.Control.PanPanel,new OpenLayers.Control.ZoomPanel,new OpenLayers.Control.Attribution],eventListeners:{preaddlayer:function(a){return h(a.layer)}}}, 1669f.initialConfig.map),items:[{xtype:"gx_zoomslider",vertical:!0,height:100,aggressive:!0}],listeners:{afterlayout:function(){d.setWidth(Math.max(360,this.getWidth()+24));d.center()}}},printProvider:a,includeLegend:this.includeLegend,legend:b,sourceMap:f})],listeners:{beforedestroy:e}})},j=function(){d.show();d.setWidth(0);var a=0;d.items.get(0).items.get(0).items.each(function(b){b.getEl()&&(a+=b.getWidth())});d.setWidth(Math.max(d.items.get(0).printMapPanel.getWidth(),a+20));d.center()};return b}}}); 1670Ext.preg(gxp.plugins.Print.prototype.ptype,gxp.plugins.Print);Ext.namespace("gxp.plugins"); 1671gxp.plugins.WMSRasterStylesDialog={isRaster:null,init:function(a){Ext.apply(a,gxp.plugins.WMSRasterStylesDialog)},createRule:function(){var a=[new OpenLayers.Symbolizer[this.isRaster?"Raster":this.symbolType]];return new OpenLayers.Rule({symbolizers:a})},addRule:function(){var a=this.items.get(2).items.get(0);this.isRaster?(a.rules.push(this.createPseudoRule()),1==a.rules.length&&a.rules.push(this.createPseudoRule()),this.savePseudoRules()):(this.selectedStyle.get("userStyle").rules.push(this.createRule()), 1672a.update(),this.selectedStyle.store.afterEdit(this.selectedStyle));this.updateRuleRemoveButton()},removeRule:function(){if(this.isRaster){var a=this.items.get(2).items.get(0),b=this.selectedRule;a.unselect();a.rules.remove(b);1==a.rules.length&&a.rules.remove(a.rules[0]);this.savePseudoRules()}else gxp.WMSStylesDialog.prototype.removeRule.apply(this,arguments)},duplicateRule:function(){var a=this.items.get(2).items.get(0);if(this.isRaster)a.rules.push(this.createPseudoRule({quantity:this.selectedRule.name, 1673label:this.selectedRule.title,color:this.selectedRule.symbolizers[0].fillColor,opacity:this.selectedRule.symbolizers[0].fillOpacity})),this.savePseudoRules();else{var b=this.selectedRule.clone();b.name=gxp.util.uniqueName((b.title||b.name)+" (copy)");delete b.title;this.selectedStyle.get("userStyle").rules.push(b);a.update()}this.updateRuleRemoveButton()},editRule:function(){this.isRaster?this.editPseudoRule():gxp.WMSStylesDialog.prototype.editRule.apply(this,arguments)},editPseudoRule:function(){var a= 1674this,b=this.selectedRule,c=new Ext.Window({title:"Color Map Entry: "+b.name,width:340,autoHeight:!0,modal:!0,items:[{bodyStyle:"padding-top: 5px",border:!1,defaults:{autoHeight:!0,hideMode:"offsets"},items:[{xtype:"form",border:!1,labelAlign:"top",defaults:{border:!1},style:{padding:"0.3em 0 0 1em"},items:[{layout:"column",defaults:{border:!1,style:{"padding-right":"1em"}},items:[{layout:"form",width:70,items:[{xtype:"numberfield",anchor:"95%",value:b.name,allowBlank:!1,fieldLabel:"Quantity",validator:function(c){for(var d= 1675a.items.get(2).items.get(0).rules,g=d.length-1;0<=g;g--)if(b!==d[g]&&d[g].name==c)return"Quantity "+c+" is already defined";return!0},listeners:{valid:function(a){this.selectedRule.name=""+a.getValue();this.savePseudoRules()},scope:this}}]},{layout:"form",width:130,items:[{xtype:"textfield",fieldLabel:"Label",anchor:"95%",value:b.title,listeners:{valid:function(a){this.selectedRule.title=a.getValue();this.savePseudoRules()},scope:this}}]},{layout:"form",width:70,items:[new GeoExt.FeatureRenderer({symbolType:this.symbolType, 1676symbolizers:[b.symbolizers[0]],isFormField:!0,fieldLabel:"Appearance"})]}]}]},{xtype:"gxp_polygonsymbolizer",symbolizer:b.symbolizers[0],bodyStyle:{padding:"10px"},border:!1,labelWidth:70,defaults:{labelWidth:70},listeners:{change:function(a){var b=c.findByType(GeoExt.FeatureRenderer)[0];b.setSymbolizers([a],{draw:b.rendered});this.selectedRule.symbolizers[0]=a;this.savePseudoRules()},scope:this}}]}]}),d=c.findByType("gxp_strokesymbolizer")[0];d.ownerCt.remove(d);c.show()},savePseudoRules:function(){var a= 1677this.selectedStyle,b=this.items.get(2).items.get(0),a=a.get("userStyle"),b=b.rules;b.sort(function(a,b){var c=parseFloat(a.name),d=parseFloat(b.name);return c===d?0:c<d?-1:1});a=a.rules[0].symbolizers[0];a.colorMap=0<b.length?Array(b.length):void 0;for(var c,d=0,e=b.length;d<e;++d)c=b[d],a.colorMap[d]={quantity:parseFloat(c.name),label:c.title||void 0,color:c.symbolizers[0].fillColor||void 0,opacity:!1==c.symbolizers[0].fill?0:c.symbolizers[0].fillOpacity};this.afterRuleChange(this.selectedRule)}, 1678createLegend:function(a,b){var c=OpenLayers.Symbolizer.Raster;c&&a[0]&&a[0].symbolizers[0]instanceof c?(this.getComponent("rulesfieldset").setTitle("C
1678olor Map Entries"),this.isRaster=!0,this.addRasterLegend(a,b)):(this.isRaster=!1,this.addVectorLegend(a))},addRasterLegend:function(a,b){for(var b=b||{},c=a[0].symbolizers[0].colorMap||[],d=[],e=0,f=c.length;e<f;e++)d.push(this.createPseudoRule(c[e]));this.selectedRule=null!=b.selectedRuleIndex?d[b.selectedRuleIndex]:null;return this.addVectorLegend(d, 1679{symbolType:"Polygon",enableDD:!1})},createPseudoRule:function(a){var b=-1;if(!a){var c=this.items.get(2);if(c.items){rules=c.items.get(0).rules;for(c=rules.length-1;0<=c;c--)b=Math.max(b,parseFloat(rules[c].name))}}a=Ext.applyIf(a||{},{quantity:++b,color:"#000000",opacity:1});return new OpenLayers.Rule({title:a.label,name:""+a.quantity,symbolizers:[new OpenLayers.Symbolizer.Polygon({fillColor:a.color,fillOpacity:a.opacity,stroke:!1,fill:0!==a.opacity})]})},updateRuleRemoveButton:function(){this.items.get(3).items.get(1).setDisabled(!this.selectedRule|| 1680!1===this.isRaster&&1>=this.items.get(2).items.get(0).rules.length)}};Ext.preg("gxp_wmsrasterstylesdialog",gxp.plugins.WMSRasterStylesDialog);Ext.namespace("gxp.plugins"); 1681gxp.plugins.Styler=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_styler",menuText:"Edit Styles",tooltip:"Manage layer styles",roles:["ROLE_ADMINISTRATOR"],sameOriginStyling:!0,rasterStyling:!1,requireDescribeLayer:!0,constructor:function(a){gxp.plugins.Styler.superclass.constructor.apply(this,arguments);if(!this.outputConfig)this.outputConfig={autoHeight:!0,width:265};Ext.applyIf(this.outputConfig,{closeAction:"close"})},init:function(a){gxp.plugins.Styler.superclass.init.apply(this,arguments);this.target.on("authorizationchange", 1682this.enableOrDisable,this)},destroy:function(){this.target.un("authorizationchange",this.enableOrDisable,this);gxp.plugins.Styler.superclass.destroy.apply(this,arguments)},enableOrDisable:function(){this.target&&null!==this.target.selectedLayer&&this.handleLayerChange(this.target.selectedLayer)},addActions:function(){var a=gxp.plugins.Styler.superclass.addActions.apply(this,[{menuText:this.menuText,iconCls:"gxp-icon-palette",disabled:!0,tooltip:this.tooltip,handler:function(){this.target.doAuthorized(this.roles, 1683this.addOutput,this)},scope:this}]);this.launchAction=a[0];this.target.on({layerselectionchange:this.handleLayerChange,scope:this});return a},handleLayerChange:function(a){this.launchAction.disable();if(a){var b=this.target.getSource(a);b instanceof gxp.plugins.WMSSource&&b.describeLayer(a,function(b){this.checkIfStyleable(a,b)},this)}},checkIfStyleable:function(a,b){if(b){var c=["WFS"];!0===this.rasterStyling&&c.push("WCS")}if(b?-1!==c.indexOf(b.get("owsType")):!this.requireDescribeLayer){var c= 1684!1,c=this.target.layerSources[a.get("source")],d;d=(d=a.get("restUrl"))?d+"/styles":c.url.split("?").shift().replace(/\/(wms|ows)\/?$/,"/rest/styles");if(this.sameOriginStyling){if(c="/"===d.charAt(0),this.target.authenticate&&c){this.launchAction.enable();return}}else c=!0;c&&this.target.isAuthorized()&&this.enableActionIfAvailable(d)}},enableActionIfAvailable:function(a){Ext.Ajax.request({method:"PUT",url:a,callback:function(a,c,d){this.launchAction.setDisabled(405!==d.status)},scope:this})},addOutput:function(a){var a= 1685a||{},b=this.target.selectedLayer;this.outputConfig.title=(this.initialConfig.outputConfig||{}).title||this.menuText+": "+b.get("title");this.outputConfig.shortTitle=b.get("title");Ext.apply(a,gxp.WMSStylesDialog.createGeoServerStylerConfig(b));!0===this.rasterStyling&&a.plugins.push({ptype:"gxp_wmsrasterstylesdialog"});Ext.applyIf(a,{style:"padding: 10px"});var c=gxp.plugins.Styler.superclass.addOutput.call(this,a);if(!(c.ownerCt.ownerCt instanceof Ext.Window))c.dialogCls=Ext.Panel,c.showDlg=function(a){a.layout= 1686"fit";a.autoHeight=!1;c.ownerCt.add(a)};c.stylesStore.on("load",function(){!this.outputTarget&&c.ownerCt.ownerCt instanceof Ext.Window&&c.ownerCt.ownerCt.center()})}});Ext.preg(gxp.plugins.Styler.prototype.ptype,gxp.plugins.Styler);Ext.namespace("gxp.plugins"); 1687gxp.plugins.GoogleEarth=Ext.extend(gxp.plugins.Tool,{ptype:"gxp_googleearth",timeout:7E3,menuText:"3D Viewer",tooltip:"Switch to 3D Viewer",tooltipMap:"Switch back to normal map view",constructor:function(a){gxp.plugins.GoogleEarth.superclass.constructor.apply(this,arguments)},addActions:function(){return gxp.plugins.GoogleEarth.superclass.addActions.apply(this,[[{menuText:this.menuText,enableToggle:!0,iconCls:"gxp-icon-googleearth",tooltip:this.tooltip,toggleHandler:function(a,b){this.actions[0].each(function(a){a.toggle&& 1688a.toggle(!1,!0)});this.togglePanelDisplay(b)},scope:this}]])},togglePanelDisplay:function(a){var b=this.target.mapPanel.ownerCt,c=b&&b.getLayout();if(c&&c instanceof Ext.layout.CardLayout)if(!0===a)gxp.plugins.GoogleEarth.loader.onLoad({callback:function(){c.setActiveItem(1);this.actions[0].enable();this.actions[0].items[0].setTooltip(this.tooltipMap);this.actions[0].each(function(a){a.toggle&&a.toggle(!0,!0)})},scope:this});
1688else c.setActiveItem(0),this.actions[0].items[0].setTooltip(this.tooltip)}, 1689getHost:function(){return window.location.host.split(":").shift()+":"+(window.location.port||"80")}}); 1690gxp.plugins.GoogleEarth.loader=new (Ext.extend(Ext.util.Observable,{ready:!(!window.google||!window.google.earth),loading:!1,constructor:function(){this.addEvents("ready","failure");return Ext.util.Observable.prototype.constructor.apply(this,arguments)},onScriptLoad:function(){var a=gxp.plugins.GoogleEarth.loader;if(!a.ready)a.ready=!0,a.loading=!1,a.fireEvent("ready")},onLoad:function(a){if(this.ready)window.setTimeout(function(){a.callback.call(a.scope)},0);else if(this.loading)this.on({ready:a.callback, 1691failure:a.errback||Ext.emptyFn,scope:a.scope});else this.loadScript(a)},loadScript:function(a){function b(){document.getElementsByTagName("head")[0].appendChild(d)}window.google&&delete google.loader;var c={autoload:Ext.encode({modules:[{name:"earth",version:"1",callback:"gxp.plugins.GoogleEarth.loader.onScriptLoad"}]})},d=document.createElement("script");d.src="//www.google.com/jsapi?"+Ext.urlEncode(c);c=a.timeout||gxp.plugins.GoogleSource.prototype.timeout;window.setTimeout(function(){gxp.plugins.GoogleEarth.loader.ready|| 1692(this.fireEvent("failure"),this.unload())}.createDelegate(this),c);this.on({ready:a.callback,failure:a.errback||Ext.emptyFn,scope:a.scope});this.loading=!0;if(document.body)b();else Ext.onReady(b);this.script=d},unload:function(){this.purgeListeners();this.script&&(document.getElementsByTagName("head")[0].removeChild(this.script),delete this.script);this.ready=this.loading=!1;delete google.loader;delete google.earth}}));Ext.preg(gxp.plugins.GoogleEarth.prototype.ptype,gxp.plugins.GoogleEarth);Ext.ns("Ext.ux.form"); 1693Ext.ux.form.FileUploadField=Ext.extend(Ext.form.TextField,{buttonText:"Browse...",buttonOnly:!1,buttonOffset:3,readOnly:!0,autoSize:Ext.emptyFn,initComponent:function(){Ext.ux.form.FileUploadField.superclass.initComponent.call(this);this.addEvents("fileselected")},onRender:function(a,b){Ext.ux.form.FileUploadField.superclass.onRender.call(this,a,b);this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-file-wrap"});this.el.addClass("x-form-file-text");this.el.dom.removeAttribute("name");this.createFileInput(); 1694var c=Ext.applyIf(this.buttonCfg||{},{text:this.buttonText});this.button=new Ext.Button(Ext.apply(c,{renderTo:this.wrap,cls:"x-form-file-btn"+(c.iconCls?" x-btn-icon":"")}));this.buttonOnly&&(this.el.hide(),this.wrap.setWidth(this.button.getEl().getWidth()));this.bindListeners();this.resizeEl=this.positionEl=this.wrap},bindListeners:function(){this.fileInput.on({scope:this,mouseenter:function(){this.button.addClass(["x-btn-over","x-btn-focus"])},mouseleave:function(){this.button.removeClass(["x-btn-over", 1695"x-btn-focus","x-btn-click"])},mousedown:function(){this.button.addClass("x-btn-click")},mouseup:function(){this.button.removeClass(["x-btn-over","x-btn-focus","x-btn-click"])},change:function(){var a=this.fileInput.dom.value;this.setValue(a);this.fireEvent("fileselected",this,a)}})},createFileInput:function(){this.fileInput=this.wrap.createChild({id:this.getFileInputId(),name:this.name||this.getId(),cls:"x-form-file",tag:"input",type:"file",size:1})},reset:function(){this.fileInput.remove();this.createFileInput(); 1696this.bindListeners();Ext.ux.form.FileUploadField.superclass.reset.call(this)},getFileInputId:function(){return this.id+"-file"},onResize:function(a,b){Ext.ux.form.FileUploadField.superclass.onResize.call(this,a,b);this.wrap.setWidth(a);this.buttonOnly||(a=this.wrap.getWidth()-this.button.getEl().getWidth()-this.buttonOffset,this.el.setWidth(a))},onDestroy:function(){Ext.ux.form.FileUploadField.superclass.onDestroy.call(this);Ext.destroy(this.fileInput,this.button,this.wrap)},onDisable:function(){Ext.ux.form.FileUploadField.superclass.onDisable.call(this); 1697this.doDisable(!0)},onEnable:function(){Ext.ux.form.FileUploadField.superclass.onEnable.call(this);this.doDisable(!1)},doDisable:function(a){this.fileInput.dom.disabled=a;this.button.setDisabled(a)},preFocus:Ext.emptyFn,alignErrorIcon:function(){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}});Ext.reg("fileuploadfield",Ext.ux.form.FileUploadField);Ext.form.FileUploadField=Ext.ux.form.FileUploadField; 1698Ext.grid.RowExpander=function(a){Ext.apply(this,a);
1698this.addEvents({beforeexpand:!0,expand:!0,beforecollapse:!0,collapse:!0});Ext.grid.RowExpander.superclass.constructor.call(this);if(this.tpl){if("string"==typeof this.tpl)this.tpl=new Ext.Template(this.tpl);this.tpl.compile()}this.state={};this.bodyContent={}}; 1699Ext.extend(Ext.grid.RowExpander,Ext.util.Observable,{header:"",width:20,sortable:!1,fixed:!0,menuDisabled:!0,dataIndex:"",id:"expander",lazyRender:!0,enableCaching:!0,getRowClass:function(a,b,c){c.cols-=1;var d=this.bodyContent[a.id];!d&&!this.lazyRender&&(d=this.getBodyContent(a,b));if(d)c.body=d;return this.state[a.id]?"x-grid3-row-expanded":"x-grid3-row-collapsed"},init:function(a){this.grid=a;var b=a.getView();b.getRowClass=this.getRowClass.createDelegate(this);b.enableRowBody=!0;a.on("render", 1700function(){b.mainBody.on("mousedown",this.onMouseDown,this)},this)},getBodyContent:function(a){if(!this.enableCaching)return this.tpl.apply(a.data);var b=this.bodyContent[a.id];b||(b=this.tpl.apply(a.data),this.bodyContent[a.id]=b);return b},onMouseDown:function(a,b){"x-grid3-row-expander"==b.className&&(a.stopEvent(),this.toggleRow(a.getTarget(".x-grid3-row")))},renderer:function(a,b){b.cellAttr='rowspan="2"';return'<div class="x-grid3-row-expander"> </div>'},beforeExpand:function(a,b,c){if(!1!== 1701this.fireEvent("beforeexpand",this,a,b,c)){if(this.tpl&&this.lazyRender)b.innerHTML=this.getBodyContent(a,c);return!0}return!1},toggleRow:function(a){"number"==typeof a&&(a=this.grid.view.getRow(a));this[Ext.fly(a).hasClass("x-grid3-row-collapsed")?"expandRow":"collapseRow"](a)},expandRow:function(a){"number"==typeof a&&(a=this.grid.view.getRow(a));var b=this.grid.store.getAt(a.rowIndex),c=Ext.DomQuery.selectNode("tr:nth(2) div.x-grid3-row-body",a);this.beforeExpand(b,c,a.rowIndex)&&(this.state[b.id]= 1702!0,Ext.fly(a).replaceClass("x-grid3-row-collapsed","x-grid3-row-expanded"),this.fireEvent("expand",this,b,c,a.rowIndex))},collapseRow:function(a){"number"==typeof a&&(a=this.grid.view.getRow(a));var b=this.grid.store.getAt(a.rowIndex),c=Ext.fly(a).child("tr:nth(1) div.x-grid3-row-body",!0);!1!==this.fireEvent("beforecollapse",this,b,c,a.rowIndex)&&(this.state[b.id]=!1,Ext.fly(a).replaceClass("x-grid3-row-expanded","x-grid3-row-collapsed"),this.fireEvent("collapse",this,b,c,a.rowIndex))}});Ext.namespace("Ext.ux"); 1703Ext.ux.ColorPicker=function(a){a.bodyStyle={padding:"3px"};Ext.ux.ColorPicker.superclass.constructor.call(this,a);this.initialize(a)}; 1704Ext.extend(Ext.ux.ColorPicker,Ext.util.Observable,{HCHARS:"0123456789ABCDEF",initialize:function(a){this.events={};this.config=this.config||a;this.config.captions=this.config.captions||{};this.config.pickerHotPoint=this.config.pickerHotPoint||{x:3,y:3};this._HSV={h:0,s:100,v:100};this._RGB={r:255,g:255,b:255};this._HEX="000000";this.lastXYRgb={x:0,y:0};this.lastYHue=0;this.domElement=this.config.renderTo||Ext.DomHelper.append(document.body,{},!0);this.domElement.addClass("x-cp-panel");this.cpCreateDomObjects(); 1705this.config.hidePanel&&this.formContainer.hide();this.rgbPicker.on("mousedown",this.rgbPickerClick.createDelegate(this),this);this.huePicker.on("mousedown",this.huePickerClick.createDelegate(this),this);this.wsColorContainer.on("mousedown",this.setColorFromWebsafe.createDelegate(this),this);this.inColorContainer.on("mousedown",this.setColorFromInvert.createDelegate(this),this);Ext.getCmp("redValue"+this.domElement.id).on("change",this.changeRGBField.createDelegate(this));Ext.getCmp("greenValue"+this.domElement.id).on("change", 1706this.changeRGBField.createDelegate(this));Ext.getCmp("blueValue"+this.domElement.id).on("change",this.changeRGBField.createDelegate(this));Ext.getCmp("hueValue"+this.domElement.id).on("change",this.changeHSVField.createDelegate(this));Ext.getCmp("saturationValue"+this.domElement.id).on("change",this.changeHSVField.createDelegate(this));Ext.getCmp("brightnessValue"+this.domElement.id).on("change",this.changeHSVField.createDelegate(this));Ext.getCmp("colorValue"+this.domElement.id).on("change",this.changeHexaField.createDelegate(this)); 1707Ext.getCmp("redValue"+this.domElement.id).on("specialkey",this.changeRGBField.createDelegate(this));Ext.getCmp("greenValue"+this.domElement.id).on("specialkey",this.changeRGBField.createDelegate(this));Ext.getCmp("blueValue"+this.domElement.id).on("specialkey",this.changeRGBField.createDelegate(this));Ext.getCmp("hueValue"+this.domElement.id).on("specialkey",this.changeHSVField.createDelegate(this));Ext.getCmp("saturationValue"+this.domElement.id).on("specialkey",this.changeHSVField.createDelegate(this)); 1708Ext.getCmp("brightnessValue"+this.domElement.id).on("specialkey",this.changeHSVField.createDelegate(this));Ext.getCmp("colorValue"+this.domElement.id).on({specialkey:function(a,c){c.getKey()===c.ENTER&&this.changeHexaField(a,a.getValue())},scope:this});this.checkConfig();this.addEvents({pickcolor:!0,changergb:!0,changehsv:!0,changehexa:!0})},cpCreateDomObjects:function(){this.rgbPicker=Ext.DomHelper.append(this.domElement,{tag:"div",cls:"x-cp-rgb-msk"},!0);this.rgbPointer=Ext.DomHelper.append(this.rgbPicker, 1709{tag:"div",cls:"x-cp-rgb-picker"},!0);this.rgbPointer.setXY([this.rgbPicker.getLeft()-this.config.pickerHotPoint.x,this.rgbPicker.getTop()-this.config.pickerHotPoint.y]);this.huePicker=Ext.DomHelper.append(this.domElement,{tag:"div",cls:"x-cp-hue-msk"},!0);this.huePointer=Ext.DomHelper.append(this.huePicker,{tag:"div",cls:"x-cp-hue-picker"},!0);this.huePointer.setXY([this.huePicker.getLeft()+this.huePointer.getWidth()/2+1,this.huePicker.getTop()-this.config.pickerHotPoint.y]);this.formContainer=Ext.DomHelper.append(Ext.DomHelper.append(this.domElement, 1710{tag:"div",cls:"x-cp-control-container x-unselectable"},!0),{tag:"div",cls:"x-cp-rgb-container x-unselectable",style:"clear:both"},!0);this.colorContainer=Ext.DomHelper.append(this.formContainer,{cls:"x-cp-coloro-container x-unselectable"},!0).update(this.config.captions.color||"Color");this.form=new Ext.FormPanel({frame:!0,width:"auto",height:227,cls:"x-cp-form",labelWidth:12,items:[{xtype:"fieldset",title:"RGB",autoHeight:!0,style:"padding: 2px",defaultType:"numberfield",items:[{fieldLabel:"Red", 1711id:"redValue"+this.domElement.id},{fieldLabel:"Green",id:"greenValue"+this.domElement.id},{fieldLabel:"Blue",id:"blueValue"+this.domElement.id}]},{xtype:"fieldset",title:"HSV",autoHeight:!0,style:"padding: 2px",defaultType:"numberfield",items:[{fieldLabel:"Hue",id:"hueValue"+this.domElement.id},{fieldLabel:"Satur.",id:"saturationValue"+this.domElement.id},{fieldLabel:"Bright.",id:"brightnessValue"+this.domElement.id}]},{xtype:"fieldset",title:"Color",autoHeight:!0,style:"padding: 2px",defaultType:"textfield", 1712items:[{fieldLabel:"Color",id:"colorValue"+this.domElement.id}]}]});this.form.render(this.formContainer);var a=Ext.DomHelper.append(this.form.body,{cls:"x-cp-colors-container x-unselectable"},!0);this.wsColorContainer=Ext.DomHelper.append(a,{cls:"x-cp-color-container x-unselectable"},!0).update(this.config.captions.websafe||"Websafe");this.inColorContainer=Ext.DomHelper.append(a,{cls:"x-cp-color-container x-unselectable"},!0).update(this.config.captions.inverse||"Inverse");Ext.DomHelper.append(a, 1713{tag:"div",style:"height:0px;border:none;clear:both;font-size:1px;"});this.form.render(this.formContainer);Ext.DomHelper.append(this.domElement,{tag:"div",style:"height:0px;border:none;clear:both;font-size:1px;"})},realToDec:function(a){return Math.min(255,Math.round(256*a))},hsvToRgb:function(a,b,c){if(a instanceof Array)return this.hsvToRgb.call(this,a[0],a[1],a[2]);var d,e,f,g,h,i;g=Math.floor(a/60%6);h=a/60-g;a=c*(1-b);i=c*(1-h*b);b=c*(1-(1-h)*b);switch(g){case 0:d=c;e=b;f=a;break;case 1:d=i; 1714e=c;f=a;break;case 2:d=a;e=c;f=b;break;case 3:d=a;e=i;f=c;break;case 4:d=b;e=a;f=c;break;case 5:d=c,e=a,f=i}return[this.realToDec(d),this.realToDec(e),this.realToDec(f)]},rgbToHsv:function(a,b,c){if(a instanceof Array)return this.rgbToHsv.call(this,a[0],a[1],a[2]);var a=a/255,b=b/255,c=c/255,d,e,f,g;d=Math.min(Math.min(a,b),c);e=Math.max(Math.max(a,b),c);f=e-d;switch(e){case d:g=0;break;case a:g=60*(b-c)/f;b<c&&(g+=360);break;case b:g=60*(c-a)/f+120;break;case c:g=60*(a-b)/f+240}return[Math.round(g), 17150===e?0:1-d/e,e]},rgbToHex:function(a,b,c){return a instanceof Array?this.rgbToHex.call(this,a[0],a[1],a[2]):this.decToHex(a)+this.decToHex(b)+this.decToHex(c)},decToHex:function(a){a=parseInt(a,10);a=!isNaN(a)?a:0;a=255<a||0>a?0:a;return this.HCHARS.charAt((a-a%16)/16)+this.HCHARS.charAt(a%16)},getHCharPos:function(a){return this.HCHARS.indexOf(a.toUpperCase())},hexToDec:function(a){a=a.split("");return 16*this.getHCharPos(a[0])+this.getHCharPos(a[1])},hexToRgb:function(a){return[this.hexToDec(a.substr(0, 17162)),this.hexToDec(a.substr(2,2)),this.hexToDec(a.substr(4,2))]}
1716,checkSafeNumber:function(a){if(!isNaN(a)){var a=Math.min(Math.max(0,a),255),b,c;for(b=0;256>b;b+=51)if(c=b+51,a>=b&&a<=c)return 25<a-b?c:b}return a},websafe:function(a,b,c){return a instanceof Array?this.websafe.call(this,a[0],a[1],a[2]):[this.checkSafeNumber(a),this.checkSafeNumber(b),this.checkSafeNumber(c)]},invert:function(a,b,c){return a instanceof Array?this.invert.call(this,a[0],a[1],a[2]):[255-a,255-b,255-c]},getHue:function(a){a= 1717360-Math.round(360*((this.huePicker.getHeight()-a)/this.huePicker.getHeight()));return 360===a?0:a},getHPos:function(a){return a*(this.huePicker.getHeight()/360)},getSaturation:function(a){return a/this.rgbPicker.getWidth()},getSPos:function(a){return a*this.rgbPicker.getWidth()},getValue:function(a){return(this.rgbPicker.getHeight()-a)/this.rgbPicker.getHeight()},getVPos:function(a){return this.rgbPicker.getHeight()-a*this.rgbPicker.getHeight()},updateColorsFromRGBPicker:function(){this._HSV={h:this._HSV.h, 1718s:this.getSaturation(this.lastXYRgb.x),v:this.getValue(this.lastXYRgb.y)}},updateColorsFromHUEPicker:function(){this._HSV.h=this.getHue(this.lastYHue);var a=this.hsvToRgb(this._HSV.h,1,1),a=this.rgbToHex(a[0],a[1],a[2]);this.rgbPicker.setStyle({backgroundColor:"#"+a})},updateColorsFromRGBFields:function(){var a=this.rgbToHsv(Ext.getCmp("redValue"+this.domElement.id).getValue(),Ext.getCmp("greenValue"+this.domElement.id).getValue(),Ext.getCmp("blueValue"+this.domElement.id).getValue());this._HSV={h:a[0], 1719s:a[1],v:a[2]}},updateColorsFromHexaField:function(){var a=this.hexToRgb(this._HEX);this._RGB={r:a[0],g:a[1],b:a[2]};a=this.rgbToHsv(a[0],a[1],a[2]);this._HSV={h:a[0],s:a[1],v:a[2]}},updateColorsFromHSVFields:function(){var a=this.hsvToRgb(this._HSV.h,this._HSV.s,this._HSV.v);this._RGB={r:a[0],g:a[1],b:a[2]}},updateRGBFromHSV:function(){var a=this.hsvToRgb(this._HSV.h,this._HSV.s,this._HSV.v);this._RGB={r:a[0],g:a[1],b:a[2]}},updateInputFields:function(){Ext.getCmp("redValue"+this.domElement.id).setValue(this._RGB.r); 1720Ext.getCmp("greenValue"+this.domElement.id).setValue(this._RGB.g);Ext.getCmp("blueValue"+this.domElement.id).setValue(this._RGB.b);Ext.getCmp("hueValue"+this.domElement.id).setValue(this._HSV.h);Ext.getCmp("saturationValue"+this.domElement.id).setValue(Math.round(100*this._HSV.s));Ext.getCmp("brightnessValue"+this.domElement.id).setValue(Math.round(100*this._HSV.v));Ext.getCmp("colorValue"+this.domElement.id).setValue(this._HEX)},updateColor:function(){this._HEX=this.rgbToHex(this._RGB.r,this._RGB.g, 1721this._RGB.b);this.colorContainer.setStyle({backgroundColor:"#"+this._HEX});this.colorContainer.set({title:"#"+this._HEX});var a=this.rgbToHex(this.websafe(this._RGB.r,this._RGB.g,this._RGB.b));this.wsColorContainer.setStyle({backgroundColor:"#"+a});this.wsColorContainer.set({title:"#"+a});this.wsColorContainer.setStyle({color:"#"+this.rgbToHex(this.invert(this.websafe(this._RGB.r,this._RGB.g,this._RGB.b)))});a=this.rgbToHex(this.invert(this._RGB.r,this._RGB.g,this._RGB.b));this.inColorContainer.setStyle({backgroundColor:"#"+ 1722a});this.inColorContainer.setStyle({color:"#"+this._HEX});this.inColorContainer.set({title:"#"+a});this.colorContainer.setStyle({color:"#"+a});this.updateInputFields();this.fireEvent("pickcolor",this,this._HEX)},updatePickers:function(){this.lastXYRgb={x:this.getSPos(this._HSV.s),y:this.getVPos(this._HSV.v)};this.rgbPointer.setXY([this.lastXYRgb.x-this.config.pickerHotPoint.x+this.rgbPicker.getLeft(),this.lastXYRgb.y-this.config.pickerHotPoint.y+this.rgbPicker.getTop()],this.config.animate);this.lastYHue= 1723this.getHPos(this._HSV.h);this.huePointer.setXY([this.huePicker.getLeft()+this.huePointer.getWidth()/2+1,this.lastYHue+this.huePicker.getTop()-this.config.pickerHotPoint.y],this.config.animate);var a=this.hsvToRgb(this._HSV.h,1,1),a=this.rgbToHex(a[0],a[1],a[2]);this.rgbPicker.setStyle({backgroundColor:"#"+a})},rgbPickerClick:function(a){this.lastXYRgb={x:a.getPageX()-this.rgbPicker.getLeft(),y:a.getPageY()-this.rgbPicker.getTop()};this.rgbPointer.setXY([a.getPageX()-this.config.pickerHotPoint.x, 1724a.getPageY()-this.config.pickerHotPoint.y],this.config.animate);this.updateColorsFromRGBPicker();this.updateRGBFromHSV();this.updateColor()},huePickerClick:function(a){this.lastYHue=a.getPageY()-this.huePicker.getTop();this.huePointer.setY([a.getPageY()-3],this.config.animate);this.updateColorsFromHUEPicker();this.updateRGBFromHSV();this.updateColor()},changeRGBField:function(a,b){b instanceof String||(b=a.getValue());0>b&&(b=0);255<b&&(b=255);if(a==Ext.getCmp("redValue"+this.domElement.id))this._RGB.r= 1725b;else if(a==Ext.getCmp("greenValue"+this.domElement.id))this._RGB.g=b;else if(a==Ext.getCmp("blueValue"+this.domElement.id))this._RGB.b=b;this.updateColorsFromRGBFields();this.updateColor();this.updatePickers();this.fireEvent("changergb",this,this._RGB)},changeHSVField:function(a,b){b instanceof String||(b=a.getValue());if(a==Ext.getCmp("hueValue"+this.domElement.id))0>b&&(b=0),360<b&&(b=360),this._HSV.h=b;else if(0>b&&(b=0),100<b&&(b=100),a==Ext.getCmp("saturationValue"+this.domElement.id))this._HSV.s= 1726b/100;else if(a==Ext.getCmp("brightnessValue"+this.domElement.id))this._HSV.v=b/100;this.updateColorsFromHSVFields();this.updateColor();this.updatePickers();this.fireEvent("changehsv",this,this._HSV)},changeHexaField:function(a,b){b=b.trim().substring(0,6);3===b.length&&(b=b[0]+b[0]+b[1]+b[1]+b[2]+b[2]);b.match(/^[0-9a-f]{6}$/i)||(b="000000");this._HEX=b;this.updateColorsFromHexaField();this.updateColor();this.updatePickers();this.fireEvent("changehexa",this,this._HEX)},setColorFromWebsafe:function(){this.setColor(this.wsColorContainer.getColor("backgroundColor", 1727"",""))},setColorFromInvert:function(){this.setColor(this.inColorContainer.getColor("backgroundColor","",""))},checkConfig:function(){this.config&&(this.config.color?this.setColor(this.config.color):this.config.hsv?this.setHSV(this.config.hsv):this.config.rgb&&this.setRGB(this.config.rgb))},setColor:function(a){a=this.hexToRgb(a);this._RGB={r:a[0],g:a[1],b:a[2]};a=this.rgbToHsv(a);this._HSV={h:a[0],s:a[1],v:a[2]};this.updateColor();this.updatePickers()},setRGB:function(a){this._RGB=a;a=this.rgbToHsv(a.r, 1728a.g,a.b);this._HSV={h:a[0],s:a[1],v:a[2]};this.updateColor();this.updatePickers()},setHSV:function(a){this._HSV={h:a.h,s:a.s/100,v:a.v/100};a=this.hsvToRgb(a.h,a.s/100,a.v/100);this._RGB={r:a[0],g:a[1],b:a[2]};this.updateColor();this.updatePickers()},getColor:function(a){return(a?"":"#")+this._HEX},getRGB:function(){return this._RGB},getHSV:function(){return this._HSV},setPanelVisible:function(a,b){return this.formContainer.setVisible(a,b)},isPanelVisible:function(){return this.formContainer.isDisplayed()}, 1729showPicker:function(){this.domElement.show()},hidePicker:function(){this.domElement.hide()}});Ext.ux.ColorPanel=function(a){this.config=a;this.config.renderTo=this.config.renderTo||Ext.DomHelper.append(document.body,{},!0);Ext.ux.ColorPanel.superclass.constructor.call(this,a);this.domElement=Ext.get(this.config.renderTo);this.render(this.domElement);this.config.renderTo=this.body;this.initialize(this.config);this.getEl().addClass("x-cp-panel");this.domElement.removeClass("x-cp-panel");this.body.setStyle({padding:"5px"})}; 1730Ext.extend(Ext.ux.ColorPanel,Ext.Panel);Ext.applyIf(Ext.ux.ColorPanel.prototype,Ext.ux.ColorPicker.prototype); 1731Ext.ux.ColorDialog=function(a){this.config=a;this.config.resizable=!1;this.config.renderTo=this.config.renderTo||Ext.DomHelper.append(document.body,{},!0);Ext.ux.ColorDialog.superclass.constructor.call(this,a);this.domElement=Ext.get(this.config.renderTo);this.render(this.domElement);this.config.renderTo=this.body;this.initialize(this.config);this.body.addClass("x-cp-panel");this.body.setStyle({padding:"5px"});this.setSize(398,300)};Ext.extend(Ext.ux.ColorDialog,Ext.Window); 1732Ext.applyIf(Ext.ux.ColorDialog.prototype,Ext.ux.ColorPicker.prototype);Ext.namespace("Styler");Styler.ColorManager=function(a){Ext.apply(this,a)}; 1733Ext.apply(Styler.ColorManager.prototype,{field:null,init:function(a){this.register(a)},destroy:function(){this.field&&this.unregister(this.field)},register:function(a){this.field&&this.unregister(this.field);this.field=a;
1733a.on({focus:this.fieldFocus,destroy:this.destroy,scope:this})},unregister:function(a){a.un("focus",this.fieldFocus,this);a.un("destroy",this.destroy,this);Styler.ColorManager.picker&&a==this.field&&Styler.ColorManager.picker.un("pickcolor",this.setFieldValue,this);this.field=null}, 1734fieldFocus:function(){if(!Styler.ColorManager.pickerWin)Styler.ColorManager.picker=new Ext.ux.ColorPanel({hidePanel:!1,autoHeight:!1}),Styler.ColorManager.pickerWin=new Ext.Window({title:"Color Picker",layout:"fit",closeAction:"hide",width:405,height:300,plain:!0,items:Styler.ColorManager.picker});Styler.ColorManager.picker.purgeListeners();this.setPickerValue();Styler.ColorManager.picker.on({pickcolor:this.setFieldValue,scope:this});Styler.ColorManager.pickerWin.show()},setFieldValue:function(a, 1735b){this.field.isVisible()&&this.field.setValue("#"+b)},setPickerValue:function(){var a=this.field;(a=a.getHexValue?a.getHexValue():a.getValue())&&Styler.ColorManager.picker.setColor(a.substring(1))}});(function(){Ext.util.Observable.observeClass(gxp.form.ColorField);gxp.form.ColorField.on({render:function(a){(new Styler.ColorManager).register(a)}})})();Styler.ColorManager.picker=null;Styler.ColorManager.pickerWin=null;Ext.namespace("GeoExt.ux"); 1736GeoExt.ux.PrintPreview=Ext.extend(Ext.Container,{paperSizeText:"Paper size:",resolutionText:"Resolution:",printText:"Print",emptyTitleText:"Enter map title here.",includeLegendText:"Include legend?",emptyCommentText:"Enter comments here.",creatingPdfText:"Creating PDF...",printProvider:null,sourceMap:null,printMapPanel:null,mapTitleField:"mapTitle",commentField:"comment",legend:null,includeLegend:!1,mapTitle:null,comment:null,addMapOverlay:!0,busyMask:null,form:null,autoEl:"center",cls:"x-panel-body x-panel-body-noheader", 1737initComponent:function(){var a={sourceMap:this.sourceMap,printProvider:this.printProvider};if(this.printMapPanel){if(!(this.printMapPanel instanceof GeoExt.PrintMapPanel))a.xtype="gx_printmappanel",this.printMapPanel=new GeoExt.PrintMapPanel(Ext.applyIf(this.printMapPanel,a))}else this.printMapPanel=new GeoExt.PrintMapPanel(a);this.sourceMap=this.printMapPanel.sourceMap;this.printProvider=this.printMapPanel.printProvider;this.form=this.createForm();if(!this.items)this.items=[];this.items.push(this.createToolbar(), 1738{xtype:"container",cls:"gx-printpreview",autoHeight:this.autoHeight,autoWidth:this.autoWidth,items:[this.form,this.printMapPanel]});GeoExt.ux.PrintPreview.superclass.initComponent.call(this);this.addMapOverlay&&this.printMapPanel.add(this.createMapOverlay());this.printMapPanel.on({resize:this.updateSize,scope:this});this.on({render:function(){if(!this.busyMask)this.busyMask=new Ext.LoadMask(this.getEl(),{msg:this.creatingPdfText});this.printProvider.on({beforeprint:this.busyMask.show,print:this.busyMask.hide, 1739printexception:this.busyMask.hide,scope:this.busyMask})},scope:this})},createToolbar:function(){var a=[];1<this.printProvider.layouts.getCount()&&a.push(this.paperSizeText,{xtype:"combo",width:98,plugins:new GeoExt.plugins.PrintProviderField({printProvider:this.printProvider}),store:this.printProvider.layouts,displayField:"name",typeAhead:!0,mode:"local",forceSelection:!0,triggerAction:"all",selectOnFocus:!0}," ");1<this.printProvider.dpis.getCount()&&a.push(this.resolutionText,{xtype:"combo", 1740width:62,plugins:new GeoExt.plugins.PrintProviderField({printProvider:this.printProvider}),store:this.printProvider.dpis,displayField:"name",tpl:'<tpl for="."><div class="x-combo-list-item">{name} dpi</div></tpl>',typeAhead:!0,mode:"local",forceSelection:!0,triggerAction:"all",selectOnFocus:!0,setValue:function(a){a=parseInt(a)+" dpi";Ext.form.ComboBox.prototype.setValue.apply(this,arguments)}}," ");a.push("->",{text:this.printText,iconCls:"icon-print",handler:function(){this.printMapPanel.print(this.includeLegend&& 1741{legend:this.legend})},scope:this});return{xtype:"toolbar",items:a}},createForm:function(){var a={xtype:"textfield",name:this.mapTitleField,value:this.mapTitle,emptyText:this.emptyTitleText,margins:"0 5 0 0",flex:1,anchor:"100%",hideLabel:!0,plugins:new GeoExt.plugins.PrintProviderField({printProvider:this.printProvider})};if(this.legend)var b=new Ext.form.Checkbox({name:"legend",checked:this.includeLegend,boxLabel:this.includeLegendText,hideLabel:!0,ctCls:"gx-item-nowrap",handler:function(a,b){this.includeLegend= 1742b},scope:this});return new Ext.form.FormPanel({autoHeight:!0,border:!1,defaults:{anchor:"100%"},items:[this.legend?{xtype:"container",layout:"hbox",cls:"x-form-item",items:[a,b]}
1742:a,{xtype:"textarea",name:this.commentField,value:this.comment,emptyText:this.emptyCommentText,hideLabel:!0,plugins:new GeoExt.plugins.PrintProviderField({printProvider:this.printProvider})}]})},createMapOverlay:function(){var a=this.printMapPanel.map,b=new OpenLayers.Control.ScaleLine({geodesic:!(a.getProjectionObject()|| 1743new OpenLayers.Projection(a.projection||"EPSG:4326")).equals("EPSG:4326")});a.addControl(b);b.activate();return new Ext.Panel({cls:"gx-map-overlay",layout:"column",width:235,bodyStyle:"padding:5px",items:[{xtype:"box",el:b.div,width:b.maxWidth},{xtype:"container",layout:"form",style:"padding: .2em 5px 0 0;",columnWidth:1,cls:"x-small-editor x-form-item",items:{xtype:"combo",name:"scale",anchor:"100%",hideLabel:!0,store:this.printMapPanel.previewScales,displayField:"name",typeAhead:!0,mode:"local", 1744forceSelection:!0,triggerAction:"all",selectOnFocus:!0,getListParent:function(){return this.el.up(".x-window")||document.body},plugins:new GeoExt.plugins.PrintPageField({printPage:this.printMapPanel.printPage})}},{xtype:"box",autoEl:{tag:"div",cls:"gx-northarrow"}}],listeners:{render:function(){function a(b){b.stopPropagation()}this.getEl().on({click:a,dblclick:a,mousedown:a})}}})},updateSize:function(){this.suspendEvents();var a=this.printMapPanel.getWidth();this.form.setWidth(a);this.form.items.get(0).setWidth(a); 1745var b=this.initialConfig.minWidth||0;this.items.get(0).setWidth(this.form.ownerCt.el.getPadding("lr")+Math.max(a,b));(a=this.ownerCt)&&a instanceof Ext.Window&&this.ownerCt.syncShadow();this.resumeEvents()},beforeDestroy:function(){this.busyMask&&(this.printProvider.un("beforeprint",this.busyMask.show,this.busyMask),this.printProvider.un("print",this.busyMask.hide,this.busyMask));this.printMapPanel.un("resize",this.updateSize,this);GeoExt.ux.PrintPreview.superclass.beforeDestroy.apply(this,arguments)}}); 1746Ext.reg("gxux_printpreview",GeoExt.ux.PrintPreview);Ext.USE_NATIVE_JSON=!0;Ext.override(Ext.dd.DragTracker,{onMouseMove:function(a){if(this.active&&Ext.isIE&&!Ext.isIE9&&!a.browserEvent.button)a.preventDefault(),this.onMouseUp(a);else{a.preventDefault();var b=a.getXY(),c=this.startXY;this.lastXY=b;if(!this.active)if(Math.abs(c[0]-b[0])>this.tolerance||Math.abs(c[1]-b[1])>this.tolerance)this.triggerStart(a);else return;this.fireEvent("mousemove",this,a);this.onDrag(a);this.fireEvent("drag",this,a)}}}); 1747(function(){Ext.preg("gx_wmssource",gxp.plugins.WMSSource);Ext.preg("gx_olsource",gxp.plugins.OLSource);Ext.preg("gx_googlesource",gxp.plugins.GoogleSource);Ext.preg("gx_bingsource",gxp.plugins.BingSource);Ext.preg("gx_osmsource",gxp.plugins.OSMSource);Ext.preg("gxp_layertree",gxp.plugins.LayerManager)})(); 1748var GeoExplorer=Ext.extend(gxp.Viewer,{zoomSliderText:"<div>Zoom Level: {zoom}</div><div>Scale: 1:{scale}</div>",loadConfigErrorText:"Trouble reading saved configuration: <br />",loadConfigErrorDefaultText:"Server Error.",xhrTroubleText:"Communication Trouble: Status ",layersText:"Layers",titleText:"Title",bookmarkText:"Bookmark URL",permakinkText:"Permalink",appInfoText:"GeoExplorer",aboutText:"About GeoExplorer",mapInfoText:"Map Info",descriptionText:"Description",contactText:"Contact",aboutThisMapText:"About this Map", 1749mapPanel:null,constructor:function(a){this.mapItems=[{xtype:"gxp_scaleoverlay"},{xtype:"gx_zoomslider",vertical:!0,height:100,plugins:new GeoExt.ZoomSliderTip({template:this.zoomSliderText})}];a.viewerTools=[{hidden:!0,actions:["layerchooser"],checked:!0},{hidden:!0,actions:["-"],checked:!0},{leaf:!0,text:gxp.plugins.Print.prototype.tooltip,ptype:"gxp_print",iconCls:"gxp-icon-print",customParams:{outputFilename:"GeoExplorer-print"},printService:a.printService,checked:!0},{leaf:!0,text:gxp.plugins.Navigation.prototype.tooltip, 1750checked:!0,iconCls:"gxp-icon-pan",ptype:"gxp_navigation",toggleGroup:"navigation"},{leaf:!0,text:gxp.plugins.WMSGetFeatureInfo.prototype.infoActionTip,checked:!0,iconCls:"gxp-icon-getfeatureinfo",ptype:"gxp_wmsgetfeatureinfo",format:"grid",toggleGroup:"interaction"},{leaf:!0,text:gxp.plugins.Measure.prototype.measureTooltip,checked:!0,iconCls:"gxp-icon-measure-length",ptype:"gxp_measure",controlOptions:{immediate:!0},toggleGroup:"interaction"},{leaf:!0,text:gxp.plugins.Zoom.prototype.zoomInTooltip+ 1751" / "+gxp.plugins.Zoom.prototype.zoomOutTooltip,checked:!0,iconCls:"gxp-icon-zoom-in",ptype:"gxp_zoom"},{leaf:!0,text:gxp.plugins.NavigationHistory.prototype.previousTooltip+" / "+gxp.plugins.NavigationHistory.prototype.nextTooltip,checked:!0,iconCls:"gxp-icon-zoom-previous",ptype:"gxp_navigationhistory"},{leaf:!0,text:gxp.plugins.ZoomToExtent.prototype.tooltip,checked:!0,iconCls:gxp.plugins.ZoomToExtent.prototype.iconCls,ptype:"gxp_zoomtoextent"},{leaf:!0,text:gxp.plugins.Legend.prototype.tooltip, 1752checked:!0,iconCls:"gxp-icon-legend",ptype:"gxp_legend"},{leaf:!0,text:gxp.plugins.GoogleEarth.prototype.tooltip,checked:!0,iconCls:"gxp-icon-googleearth",ptype:"gxp_googleearth"},{hidden:!0,actions:["->"],checked:!0},{hidden:!0,actions:["aboutbutton"],checked:!0}];GeoExplorer.superclass.constructor.apply(this,arguments)},loadConfig:function(a){var b=window.location.hash.substr(1),c=b.match(/^maps\/(\d+)$/);if(c)this.id=Number(c[1]),Ext.Ajax.request({url:"../"+b,success:function(b){b=Ext.util.JSON.decode(b.responseText); 1753delete b.tools;this.applyConfig(Ext.applyIf(b,a))},failure:function(b){var c;try{c=Ext.util.JSON.decode(b.responseText)}catch(d){}var e=this.loadConfigErrorText,e=c&&c.error?e+c.error:e+this.loadConfigErrorDefaultText;this.on({ready:function(){this.displayXHRTrouble(e,b.status)},scope:this});delete this.id;window.location.hash="";this.applyConfig(a)},scope:this});else{if(b=Ext.urlDecode(document.location.search.substr(1))){b.q&&(c=Ext.util.JSON.decode(b.q),Ext.apply(a,c));if(b.layers)for(var c=b.layers.split(/\s*,\s*/), 1754d=0,e=c.length;d<e;++d)a.map.layers.push({source:"local",name:c[d],visibility:!0,bbox:b.lazy&&b.bbox?b.bbox.split(","):void 0});if(b.bbox)delete a.map.zoom,delete a.map.center,a.map.extent=b.bbox.split(/\s*,\s*/);if(b.lazy&&a.sources.local)a.sources.local.requiredProperties=[]}this.applyConfig(a)}},displayXHRTrouble:function(a,b){Ext.Msg.show({title:this.xhrTroubleText+b,msg:a,icon:Ext.MessageBox.WARNING})},initPortal:function(){this.createTools();GeoExplorer.superclass.initPortal.apply(this,arguments)}, 1755createTools:function(){new Ext.Button({id:"aboutbutton",text:this.appInfoText,iconCls:"icon-geoexplorer",handler:this.displayAppInfo,scope:this})},showUrl:function(){var a=new Ext.Window({title:this.bookmarkText,layout:"form",labelAlign:"top",modal:!0,bodyStyle:"padding: 5px",width:300,items:[{xtype:"textfield",fieldLabel:this.permakinkText,readOnly:!0,anchor:"100%",selectOnFocus:!0,value:window.location.href}]});a.show();a.items.first().selectText()},getBookmark:function(){var a=Ext.apply(OpenLayers.Util.getParameters(), 1756{q:Ext.util.JSON.encode(this.getState())});return document.location.href.split("?").shift()+"?"+Ext.urlEncode(a)},displayAppInfo:function(){var a=new Ext.Panel({title:this.appInfoText,html:"<iframe style='border: none; height: 100%; width: 100%' src='../about.html' frameborder='0' border='0'><a target='_blank' href='../about.html'>"+this.aboutText+"</a> </iframe>"}),b=Ext.applyIf(this.about,{title:"","abstract":"",contact:""}),b=new Ext.Panel({title:this.mapInfoText,html:'<div class="gx-info-panel"><h2>'+ 1757this.titleText+"</h2><p>"+b.title+"</p><h2>"+this.descriptionText+"</h2><p>"+b["abstract"]+"</p> <h2>"+this.contactText+"</h2><p>"+b.contact+"</p></div>",height:"auto",width:"auto"}),a=new Ext.TabPanel({activeTab:0,items:[b,a]});
1757(new Ext.Window({title:this.aboutThisMapText,modal:!0,layout:"fit",width:300,height:300,items:[a]})).show()},getState:function(){var a=GeoExplorer.superclass.getState.apply(this,arguments);delete a.tools;return a}}); 1758GeoExplorer.Composer=Ext.extend(GeoExplorer,{cookieParamName:"geoexplorer-user",mapText:"Map",saveMapText:"Save map",exportMapText:"Export map",toolsTitle:"Choose tools to include in the toolbar:",previewText:"Preview",backText:"Back",nextText:"Next",loginText:"Login",logoutText:"Logout, {user}",loginErrorText:"Invalid username or password.",userFieldText:"User",passwordFieldText:"Password",tableText:"Table",queryText:"Query",logoutConfirmTitle:"Warning",logoutConfirmMessage:"Logging out will undo any unsaved changes, remove any layers you may have added, and reset the map composition. Do you want to save your composition first?", 1759constructor:function(a){if(401===a.authStatus)this.authorizedRoles=[];else if(404!==a.authStatus)this.authorizedRoles=["ROLE_ADMINISTRATOR"];delete a.authStatus;a.tools=[{ptype:"gxp_layermanager",outputConfig:{id:"layers",tbar:[],autoScroll:!0},outputTarget:"tree"},{ptype:"gxp_addlayers",actionTarget:"layers.tbar",outputTarget:"tree",uploadSource:"local",postUploadAction:{plugin:"styler"}},{ptype:"gxp_removelayer",actionTarget:["layers.tbar","layers.contextMenu"]},{ptype:"gxp_layerproperties",id:"layerproperties", 1760outputConfig:{defaults:{autoScroll:!0},width:320},actionTarget:["layers.tbar","layers.contextMenu"],outputTarget:"tree"},{ptype:"gxp_styler",id:"styler",outputConfig:{autoScroll:!0,width:320},actionTarget:["layers.tbar","layers.contextMenu"],outputTarget:"tree"},{ptype:"gxp_zoomtolayerextent",actionTarget:{target:"layers.contextMenu",index:0}},{ptype:"gxp_googleearth",actionTarget:["map.tbar","globe.tbar"]},{ptype:"gxp_navigation",toggleGroup:"navigation"},{ptype:"gxp_zoom",toggleGroup:"navigation", 1761showZoomBoxAction:!0,controlOptions:{zoomOnClick:!1}},{ptype:"gxp_navigationhistory"},{ptype:"gxp_zoomtoextent"},{actions:["aboutbutton"],actionTarget:"paneltbar"},{actions:["-"],actionTarget:"paneltbar"},{actions:["mapmenu"],actionTarget:"paneltbar"},{ptype:"gxp_print",customParams:{outputFilename:"GeoExplorer-print"},printService:a.printService,actionTarget:"paneltbar",showButtonText:!0},{actions:["-"],actionTarget:"paneltbar"},{ptype:"gxp_wmsgetfeatureinfo",format:"grid",toggleGroup:"interaction", 1762showButtonText:!0,actionTarget:"paneltbar"},{ptype:"gxp_featuremanager",id:"querymanager",selectStyle:{cursor:""},autoLoadFeatures:!0,maxFeatures:50,paging:!0,pagingType:gxp.plugins.FeatureManager.WFS_PAGING},{ptype:"gxp_queryform",featureManager:"querymanager",autoExpand:"query",actionTarget:"paneltbar",outputTarget:"query"},{ptype:"gxp_featuregrid",featureManager:"querymanager",showTotalResults:!0,autoLoadFeature:!1,alwaysDisplayOnMap:!0,controlOptions:{multiple:!0},displayMode:"selected",outputTarget:"table", 1763outputConfig:{id:"featuregrid",columnsSortable:!1}},{ptype:"gxp_zoomtoselectedfeatures",featureManager:"querymanager",actionTarget:["featuregrid.contextMenu","featuregrid.bbar"]},{ptype:"gxp_measure",toggleGroup:"interaction",controlOptions:{immediate:!0},showButtonText:!0,actionTarget:"paneltbar"},{ptype:"gxp_featuremanager",id:"featuremanager",maxFeatures:20,paging:!1},{ptype:"gxp_featureeditor",featureManager:"featuremanager",autoLoadFeature:!0,splitButton:!0,showButtonText:!0,toggleGroup:"interaction", 1764actionTarget:"paneltbar"},{actions:["->"],actionTarget:"paneltbar"},{actions:["loginbutton"],actionTarget:"paneltbar"}];GeoExplorer.Composer.superclass.constructor.apply(this,arguments)},loadConfig:function(a){GeoExplorer.Composer.superclass.loadConfig.apply(this,arguments);var b=Ext.urlDecode(document.location.search.substr(1));if(b&&b.styler){for(var c=a.map.layers.length-1;0<=c;--c)delete a.map.layers[c].selected;a.map.layers.push({source:"local",name:b.styler,selected:!0,bbox:b.lazy&&b.bbox?b.bbox.split(","): 1765void 0});this.on("layerselectionchange",function(a){var c=this.tools.styler;(a=a.getLayer().maxExtent)&&!b.bbox&&this.mapPanel.map.zoomToExtent(a);this.doAuthorized(c.roles,c.addOutput,c)},this,{single:!0})}}
1765,setCookieValue:function(a,b){document.cookie=a+"="+escape(b)},clearCookieValue:function(a){document.cookie=a+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"},getCookieValue:function(a){var b,c,d,e=document.cookie.split(";");for(b=0;b<e.length;b++)if(c=e[b].substr(0,e[b].indexOf("=")),d=e[b].substr(e[b].indexOf("=")+ 17661),c=c.replace(/^\s+|\s+$/g,""),c==a)return unescape(d);return null},logout:function(){var a=function(){this.clearCookieValue("JSESSIONID");this.clearCookieValue(this.cookieParamName);this.setAuthorizedRoles([]);window.location.reload()};Ext.Msg.show({title:this.logoutConfirmTitle,msg:this.logoutConfirmMessage,buttons:Ext.Msg.YESNOCANCEL,icon:Ext.MessageBox.WARNING,fn:function(b){"yes"===b?this.save(a,this):"no"===b&&a.call(this)},scope:this})},authenticate:function(){function a(){b.buttons[0].disable(); 1767b.getForm().submit({success:function(a){Ext.getCmp("paneltbar").items.each(function(a){!0===a.needsAuthorization&&a.enable()});a=a.findField("username").getValue();this.setCookieValue(this.cookieParamName,a);this.setAuthorizedRoles(["ROLE_ADMINISTRATOR"]);this.showLogout(a);c.un("beforedestroy",this.cancelAuthentication,this);c.close()},failure:function(a){this.authorizedRoles=[];b.buttons[0].enable();a.markInvalid({username:this.loginErrorText,password:this.loginErrorText})},scope:this})}var b=new Ext.FormPanel({url:"../login/", 1768frame:!0,labelWidth:60,defaultType:"textfield",errorReader:{read:function(a){var b=!1,c=[];200===a.status?b=!0:c=[{data:{id:"username",msg:this.loginErrorText}},{data:{id:"password",msg:this.loginErrorText}}];return{success:b,records:c}}},items:[{fieldLabel:this.userFieldText,name:"username",width:137,allowBlank:!1,listeners:{render:function(){this.focus(!0,100)}}},{fieldLabel:this.passwordFieldText,name:"password",width:137,inputType:"password",allowBlank:!1}],buttons:[{text:this.loginText,formBind:!0, 1769handler:a,scope:this}],keys:[{key:[Ext.EventObject.ENTER],handler:a,scope:this}]}),c=new Ext.Window({title:this.loginText,layout:"fit",width:235,height:130,plain:!0,border:!1,modal:!0,items:[b],listeners:{beforedestroy:this.cancelAuthentication,scope:this}});c.show()},applyLoginState:function(a,b,c,d){var e=Ext.getCmp("loginbutton");e.setIconClass(a);e.setText(b);e.setHandler(c,d)},showLogin:function(){this.applyLoginState("login",this.loginText,this.authenticate,this)},showLogout:function(a){var b= 1770this.logout;this.applyLoginState("logout",(new Ext.Template(this.logoutText)).applyTemplate({user:a}),b,this)},initPortal:function(){var a=new gxp.CrumbPanel({id:"tree",region:"west",width:320,split:!0,collapsible:!0,collapseMode:"mini",hideCollapseTool:!0,header:!1}),b=new Ext.Panel({region:"south",id:"south",height:220,border:!1,split:!0,collapsible:!0,collapseMode:"mini",collapsed:!0,hideCollapseTool:!0,header:!1,layout:"border",items:[{region:"center",id:"table",title:this.tableText,layout:"fit"}, 1771{region:"west",width:320,id:"query",title:this.queryText,split:!0,collapsible:!0,collapseMode:"mini",collapsed:!0,hideCollapseTool:!0,layout:"fit"}]}),c=new Ext.Toolbar({disabled:!0,id:"paneltbar",items:[]});this.on("ready",function(){var a=c.items.filterBy(function(a){return a.initialConfig&&a.initialConfig.disabled});c.enable();a.each(function(a){a.disable()})});var d=new gxp.GoogleEarthPanel({mapPanel:this.mapPanel,id:"globe",tbar:[],listeners:{beforeadd:function(a){return"background"!==a.get("group")}}}), 1772e=[];d.on("show",function(){e.length=0;c.items.each(function(a){a.disabled&&e.push(a)});c.disable();for(var a in this.tools){var b=this.tools[a];"map"===b.outputTarget&&b.removeOutput()}if(a=(a=Ext.getCmp("tree"))&&a.getTopToolbar())a.items.each(function(a){a.disabled&&e.push(a)}),a.disable()},this);d.on("hide",function(){c.enable();var a=Ext.getCmp("tree");(a=a&&a.getTopToolbar())&&a.enable();for(var a=0,b=e.length;a<b;++a)e[a].disable()},this);this.mapPanelContainer=new Ext.Panel({layout:"card", 1773region:"center",defaults:{border:!1},items:[this.mapPanel,d],activeItem:0});this.portalItems=[{region:"center",layout:"border",tbar:c,items:[this.mapPanelContainer,a,b]}];GeoExplorer.Composer.superclass.initPortal.apply(this,arguments)},createTools:function(){GeoExplorer.Composer.superclass.createTools.apply(this,arguments);new Ext.Button({id:"loginbutton"});if(this.authorizedRoles)if(0===this.authorizedRoles.length)this.showLogin();else{var a=this.getCookieValue(this.cookieParamName);null===a&&(a= 1774"unknown");this.showLogout(a)}new Ext.Button({id:"mapmenu",text:this.mapText,iconCls:"icon-map",menu:new Ext.menu.Menu({items:[{text:this.exportMapText,handler:function(){this.doAuthorized(["ROLE_ADMINISTRATOR"],function(){this.save(this.showEmbedWindow)},this)},scope:this,iconCls:"icon-export"},{text:this.saveMapText,handler:function(){this.doAuthorized(["ROLE_ADMINISTRATOR"],function(){this.save(this.showUrl)},this)},scope:this,iconCls:"icon-save"}]})})},openPreview:function(a){a=new Ext.Window({title:this.previewText, 1775layout:"fit",resizable:!1,items:[{border:!1,html:a.getIframeHTML()}]});a.show();var a=a.items.get(0).body,b=a.dom.firstChild,c=new Ext.LoadMask(a);c.show();Ext.get(b).on("load",function(){c.hide()})},showEmbedWindow:function(){var a=new Ext.tree.TreePanel({title:this.toolsTitle,autoScroll:!0,root:{nodeType:"async",expanded:!0,children:this.viewerTools},rootVisible:!1,id:"geobuilder-0"}),b=function(a){var b=Ext.getCmp("geobuilder-wizard-panel").getLayout(),c=b.activeItem.id.split("geobuilder-")[1], 1776c=parseInt(c,10)+a;b.setActiveItem(c);Ext.getCmp("wizard-prev").setDisabled(0==c);Ext.getCmp("wizard-next").setDisabled(1==c);1==a&&this.save()},c=new gxp.EmbedMapDialog({id:"geobuilder-1",url:"../viewer/#maps/"+this.id}),a={id:"geobuilder-wizard-panel",border:!1,layout:"card",activeItem:0,defaults:{border:!1,hideMode:"offsets"},bbar:[{id:"preview",text:this.previewText,handler:function(){this.save(this.openPreview.createDelegate(this,[c]))},scope:this},"->",{id:"wizard-prev",text:this.backText,handler:b.createDelegate(this, 1777[-1]),scope:this,disabled:!0},{id:"wizard-next",text:this.nextText,handler:b.createDelegate(this,[1]),scope:this}],items:[a,c]};(new Ext.Window({layout:"fit",width:500,height:300,title:this.exportMapText,items:[a]})).show()}});Ext.namespace("GeoExplorer"); 1778GeoExplorer.Viewer=Ext.extend(GeoExplorer,{applyConfig:function(a){for(var b=a.viewerTools||this.viewerTools,c=[],d,e=0,f=b.length;e<f;e++)if(d=b[e],!0===d.checked){var g="checked,iconCls,id,leaf,loader,text".split(","),h;for(h in g)delete d[g[h]];d=Ext.applyIf({actionTarget:"paneltbar"},d);c.push(d)}a.tools=c;GeoExplorer.Viewer.superclass.applyConfig.call(this,a)}
1778,initPortal:function(){this.toolbar=new Ext.Toolbar({disabled:!0,id:"paneltbar"});this.on("ready",function(){this.toolbar.enable()},this); 1779this.mapPanelContainer=new Ext.Panel({layout:"card",region:"center",defaults:{border:!1},items:[this.mapPanel,new gxp.GoogleEarthPanel({mapPanel:this.mapPanel,listeners:{beforeadd:function(a){return"background"!==a.get("group")}}})],activeItem:0});this.portalItems=[{region:"center",layout:"border",tbar:this.toolbar,items:[this.mapPanelContainer]}];GeoExplorer.Viewer.superclass.initPortal.apply(this,arguments)},createTools:function(){GeoExplorer.Viewer.superclass.createTools.apply(this,arguments); 1780Ext.getCmp("aboutbutton").setText(null).setIconClass("icon-about");new Ext.Button({id:"layerchooser",tooltip:"Layer Switcher",iconCls:"icon-layer-switcher",menu:new gxp.menu.LayerMenu({layers:this.mapPanel.layers})})}});Ext.namespace("GeoExt"); 1781GeoExt.Lang=new (Ext.extend(Ext.util.Observable,{locale:navigator.language||navigator.userLanguage,dict:null,constructor:function(){this.addEvents("localize");this.dict={};Ext.util.Observable.constructor.apply(this,arguments)},add:function(a,b){var c=this.dict[a];if(c)for(var d in b)c[d]=Ext.apply(c[d]||{},b[d]);else this.dict[a]=Ext.apply({},b);!a||a===this.locale?this.set(a):0===this.locale.indexOf(a+"-")&&this.set(this.locale)},set:function(a){for(var b=a?a.split("-"):[],c="",d={},e,f=0,g=b.length;f< 1782g;++f)if(c+=(c&&"-"||"")+b[f],c in this.dict){e=this.dict[c];for(var h in e)h in d?Ext.apply(d[h],e[h]):d[h]=Ext.apply({},e[h])}for(h in d){b=window;c=h.split(".");e=!1;f=0;for(g=c.length;f<g;++f){var i=c[f];if(i in b)b=b[i];else{e=!0;break}}e||Ext.apply(b,d[h])}this.locale=a;this.fireEvent("localize",a)}})); 1783 1784GeoExt.Lang.add("it", { 1785 1786 "gxp.menu.LayerMenu.prototype": { 1787 layerText: "Layer" 1788 }, 1789 1790 "gxp.plugins.AddLayers.prototype": { 1791 addActionMenuText: "Aggiungi dei layer", 1792 addActionTip: "Aggiungi dei layer", 1793 addServerText: "Aggiungi Nuovo Server", 1794 addButtonText: "Aggiungi layer", 1795 untitledText: "Senza titolo", 1796 addLayerSourceErrorText: "Errore nel recupero delle WMS capabilities ({msg}).\nPer favore verificate la url e riprovare.", 1797 availableLayersText: "Layer disponibili", 1798 expanderTemplateText: "<p><b>In sintesi:</b> {abstract}</p>", 1799 panelTitleText: "Titolo", 1800 layerSelectionText: "Visualizza i dati disponibili da:", 1801 doneText: "Fatto", 1802 uploadText: "Upload dei layer", 1803 addFeedActionMenuText: "Aggiungi feed", 1804 searchText: "Ricerca dei layer" 1805 }, 1806 1807 "gxp.plugins.BingSource.prototype": { 1808 title: "Layer di Bing", 1809 roadTitle: "Bing Stradale", 1810 aerialTitle: "Bing Aereo", 1811 labeledAerialTitle: "Bing Aereo con Etichette" 1812 }, 1813 1814 "gxp.plugins.FeatureEditor.prototype": { 1815 splitButtonText: "Modifica", 1816 createFeatureActionText: "Crea", 1817 editFeatureActionText: "Modifica", 1818 createFeatureActionTip: "Crea una nuova feature", 1819 editFeatureActionTip: "Modifica una feature esistente", 1820 commitTitle: "Messaggio di completamento", 1821 commitText: "Per favore inserire un messaggio di completamento per questa modifica:" 1822 }, 1823 1824 "gxp.plugins.FeatureGrid.prototype": { 1825 displayFeatureText: "Visualizza sulla mappa", 1826 firstPageTip: "Prima pagina", 1827 previousPageTip: "Pagina precedente", 1828 zoomPageExtentTip: "Zoom all'estensione della pagina", 1829 nextPageTip: "Prossima pagina", 1830 lastPageTip: "Ultima pagina", 1831 totalMsg: "Le Feature da {1} a {2} di {0}" 1832 }, 1833 1834 "gxp.plugins.GoogleEarth.prototype": { 1835 menuText: "Visualizzatore 3D", 1836 tooltip: "Passa al Visualizzatore 3D" 1837 }, 1838 1839 "gxp.plugins.GoogleSource.prototype": { 1840 title: "Layer di Google", 1841 roadmapAbstract: "Mostra mappa stradale", 1842 satelliteAbstract: "Mostra immagine satellitare", 1843 hybridAbstract: "Mostra immagine con nomi stradali", 1844 terrainAbstract: "Mostra mappa stradale con vista terreno" 1845 }, 1846 1847 "gxp.plugins.LayerProperties.prototype": { 1848 menuText: "ProprietàLayer", 1849 toolTip: "ProprietàLayer" 1850 }, 1851 1852 "gxp.plugins.LayerTree.prototype": { 1853 shortTitle: "Layer", 1854 rootNodeText: "Layer", 1855 overlayNodeText: "Sovrapposizioni", 1856 baseNodeText: "Layer di base" 1857 }, 1858 1859 "gxp.plugins.LayerManager.prototype": { 1860 baseNodeText: "Mappe di base" 1861 }, 1862 1863 "gxp.plugins.Legend.prototype": { 1864 menuText: "Mostra legenda", 1865 tooltip: "Mostra legenda" 1866 }, 1867 1868 "gxp.plugins.LoadingIndicator.prototype": { 1869 loadingMapMessage: "Mappa in caricamento..." 1870 }, 1871 1872 "gxp.plugins.MapBoxSource.prototype": { 1873 title: "Layer di MapBox",
1874 blueMarbleTopoBathyJanTitle: "Topografia & Batimetria (Gennaio) di Blue Marble", 1875 blueMarbleTopoBathyJulTitle: "Topografia & Batimetria (Luglio) di Blue Marble", 1876 blueMarbleTopoJanTitle: "Topografia (Gennaio) di Blue Marble", 1877 blueMarbleTopoJulTitle: "Topografia (Luglio) di Blue Marble", 1878 controlRoomTitle: "Punto di Controllo", 1879 geographyClassTitle: "Classe geografica", 1880 naturalEarthHypsoTitle: "Ipsometria Natural Earth", 1881 naturalEarthHypsoBathyTitle: "Ipsometria e Batimetria Natural Earth", 1882 naturalEarth1Title: "Natural Earth I", 1883 naturalEarth2Title: "Natural Earth II", 1884 worldDarkTitle: "World Dark", 1885 worldLightTitle: "World Light", 1886 worldPrintTitle: "World Print" 1887 }, 1888 1889 "gxp.plugins.Measure.prototype": { 1890 buttonText: "Misura", 1891 lengthMenuText: "Lunghezza", 1892 areaMenuText: "Area", 1893 lengthTooltip: "Misura lunghezza", 1894 areaTooltip: "Misura area", 1895 measureTooltip: "Misura" 1896 }, 1897 1898 "gxp.plugins.Navigation.prototype": { 1899 menuText: "Sposta mappa", 1900 tooltip: "Sposta mappa" 1901 }, 1902 1903 "gxp.plugins.NavigationHistory.prototype": { 1904 previousMenuText: "Zoom alla precedente estensione", 1905 nextMenuText: "Zoom alla successiva estensione", 1906 previousTooltip: "Zoom alla precedente estensione", 1907 nextTooltip: "Zoom alla successiva estensione" 1908 }, 1909 1910 "gxp.plugins.OSMSource.prototype": { 1911 title: "Layer di OpenStreetMap", 1912 mapnikAttribution: "&Copyright; <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> di attribuzione", 1913 osmarenderAttribution: "Dati rilasciati con licenza CC-By-SA da <a href='http://openstreetmap.org/'>OpenStreetMap</a>" 1914 }, 1915 1916 "gxp.plugins.Print.prototype": { 1917 buttonText: "Stampa", 1918 menuText: "Stampa mappa", 1919 tooltip: "Stampa mappa", 1920 previewText: "Stampa Anteprima", 1921 notAllNotPrintableText: "Non tutti i layer possono essere stampati", 1922 nonePrintableText: "Nessuno dei tuoi attuali layer può essere stampato" 1923 }, 1924 1925 "gxp.plugins.MapQuestSource.prototype": { 1926 title: "Layer di MapQuest", 1927 osmAttribution: "Tile a cura di <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 1928 osmTitle: "OpenStreetMap di MapQuest", 1929 naipAttribution: "Tile a cura di <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 1930 naipTitle: "Immagini MapQuest" 1931 }, 1932 1933 "gxp.plugins.QueryForm.prototype": { 1934 queryActionText: "Ricerca", 1935 queryMenuText: "Interroga layer", 1936 queryActionTip: "Interroga il layer selezionato", 1937 queryByLocationText: "Interroga in base all'estensione corrente", 1938 queryByAttributesText: "Interroga in base agli attributi", 1939 queryMsg: "Ricerca in corso...", 1940 cancelButtonText: "Cancella", 1941 noFeaturesTitle: "Nessun risultato", 1942 noFeaturesMessage: "Non è stato trovato alcun risultato." 1943 }, 1944 1945 "gxp.plugins.RemoveLayer.prototype": { 1946 removeMenuText: "Rimuovi layer", 1947 removeActionTip: "Rimuovi layer" 1948 }, 1949 1950 "gxp.plugins.Styler.prototype": { 1951 menuText: "Stili dei layer", 1952 tooltip: "Stili dei layer" 1953 1954 }, 1955 1956 "gxp.plugins.WMSGetFeatureInfo.prototype": { 1957 buttonText: "Identifica", 1958 infoActionTip: "Ottieni Informazioni sulla feature", 1959 popupTitle: "Informazioni feature" 1960 }, 1961 1962 "gxp.plugins.Zoom.prototype": { 1963 zoomMenuText: "Zoom rettangolare", 1964 zoomInMenuText: "Zoom avanti", 1965 zoomOutMenuText: "Zoom indietro", 1966 zoomTooltip: "Zoom da estensione rettangolare", 1967 zoomInTooltip: "Zoom avanti", 1968 zoomOutTooltip: "Zoom indietro" 1969 }, 1970 1971 "gxp.plugins.ZoomToExtent.prototype": { 1972 menuText: "Zoom alla massima estensione", 1973 tooltip: "Zoom alla massima estensione" 1974 }, 1975 1976 "gxp.plugins.ZoomToDataExtent.prototype": { 1977 menuText: "Zoom all'estensione del layer", 1978 tooltip: "Zoom all'estensione del layer" 1979 }, 1980 1981 "gxp.plugins.ZoomToLayerExtent.prototype": { 1982 menuText: "Zoom all'estensione del layer", 1983 tooltip: "Zoom all'estensione del layer" 1984 }, 1985 1986 "gxp.plugins.ZoomToSelectedFeatures.prototype": { 1987 menuText: "Zoom alle feature selezionate", 1988 tooltip: "Zoom alle feature selezionate" 1989 }, 1990 1991 "gxp.FeatureEditPopup.prototype": { 1992 closeMsgTitle: "Vuoi salvare le modifiche alla feature?", 1993 closeMsg: "Questa feature ha modifiche non salvate. Vorresti salvarle?", 1994 deleteMsgTitle: "Vuoi cancellare la feature?", 1995 deleteMsg: "Sei sicuro di voler cancellare questa feature?", 1996 editButtonText: "Modifica", 1997 editButtonTooltip: "Rendi questa feature modificabile", 1998 deleteButtonText: "Elimina", 1999 deleteButtonTooltip: "Elimina questa feature", 2000 cancelButtonText: "Annulla", 2001 cancelButtonTooltip: "Blocca e annulla le modifiche", 2002 saveButtonText: "Salva", 2003 saveButtonTooltip: "Salva le modifiche" 2004 }, 2005 2006 "gxp.FillSymbolizer.prototype": { 2007 fillText: "Riempimento", 2008 colorText: "Colore", 2009 opacityText: "Opacità" 2010 }, 2011 2012 "gxp.FilterBuilder.prototype": { 2013 builderTypeNames: ["qualsiasi", "tutte", "nessuna", "non tutte"], 2014 preComboText: "Corrispondenza", 2015 postComboText: "del seguente:", 2016 addConditionText: "aggiungi condizione", 2017 addGroupText: "aggiungi gruppo", 2018 removeConditionText: "elimina condizione" 2019 }, 2020 2021 "gxp.grid.CapabilitiesGrid.prototype": { 2022 nameHeaderText: "Nome", 2023 titleHeaderText: "Titolo", 2024 queryableHeaderText: "Interrogabile", 2025 layerSelectionLabel: "Visualizza i dati disponibili da:", 2026 layerAdditionLabel: "o aggiungi nuovo server.", 2027 expanderTemplateText: "<p><b>In sintesi:</b> {abstract}</p>" 2028 }, 2029 2030 "gxp.PointSymbolizer.prototype": { 2031 graphicCircleText: "cerchio", 2032 graphicSquareText: "quadrato", 2033 graphicTriangleText: "triangolo", 2034 graphicStarText: "stella", 2035 graphicCrossText: "attraversamento", 2036 graphicXText: "x", 2037 graphicExternalText: "esterno", 2038 urlText: "URL", 2039 opacityText: "opacità", 2040 symbolText: "Simbolo", 2041 sizeText: "Grandezza", 2042 rotationText: "Rotazione" 2043 }, 2044 2045 "gxp.QueryPanel.prototype": { 2046 queryByLocationText: "Interroga in base alla posizione", 2047 currentTextText: "Estensione Currente", 2048 queryByAttributesText: "Interroga in base agli attributi", 2049 layerText: "Layer" 2050 }, 2051 2052 "gxp.RulePanel.prototype": { 2053 scaleSliderTemplate: "{scaleType} Scala 1:{scale}", 2054 labelFeaturesText: "Etichetta Feature", 2055 labelsText: "Etichette", 2056 basicText: "Base", 2057 advancedText: "Avanzate", 2058 limitByScaleText: "Limita in base alla scala", 2059 limitByConditionText: "Limita in base alla condizione", 2060 symbolText: "Simbolo", 2061 nameText: "Nome" 2062 }, 2063 2064 "gxp.ScaleLimitPanel.prototype": { 2065 scaleSliderTemplate: "{scaleType} Scala 1:{scale}", 2066 minScaleLimitText: "Limite scala Min", 2067 maxScaleLimitText: "Limite scala Max" 2068 }, 2069 2070 "gxp.StrokeSymbolizer.prototype": { 2071 solidStrokeName: "continua", 2072 dashStrokeName: "tratteggiata", 2073 dotStrokeName: "puntiforme", 2074 titleText: "Linea", 2075 styleText: "Stile", 2076 colorText: "Colore", 2077 widthText: "Larghezza", 2078 opacityText: "Opacità" 2079 }, 2080 2081 "gxp.StylePropertiesDialog.prototype": { 2082 titleText: "Generale", 2083 nameFieldText: "Nome", 2084 titleFieldText: "Titolo", 2085 abstractFieldText: "In sintesi" 2086 }, 2087 2088 "gxp.TextSymbolizer.prototype": { 2089 labelValuesText: "Valori etichetta", 2090 haloText: "Halo", 2091 sizeText: "Grandezza" 2092 }, 2093 2094 "gxp.WMSLayerPanel.prototype": { 2095 attributionText: "Attribuzione", 2096 aboutText: "Informazioni", 2097 titleText: "Titolo", 2098 nameText: "Nome", 2099 descriptionText: "Descrizione", 2100 displayText: "Visualizzazione", 2101 opacityText: "Opacità", 2102 formatText: "Formato", 2103 transparentText: "Transparente", 2104 cacheText: "Cache", 2105 cacheFieldText: "Usa versione in cache", 2106 stylesText: "Stili disponibili", 2107 infoFormatText: "Formato informazioni", 2108 infoFormatEmptyText: "Seleziona un formato", 2109 displayOptionsText: "Visualizza opzioni", 2110 queryText: "Limitazione con filtri", 2111 scaleText: "Limitazione in base alla scala", 2112 minScaleText: "Scala Min", 2113 maxScaleText: "Scala Max", 2114 switchToFilterBuilderText: "Ritorna al compositore di filtri", 2115 cqlPrefixText: "o ", 2116 cqlText: "usa piuttosto un filtro CQL", 2117 singleTileText: "Tile singolo", 2118 singleTileFieldText: "Usa un singolo tile" 2119 }, 2120 2121 "gxp.EmbedMapDialog.prototype": { 2122 publishMessage: "La vostra mappa è pronta ad essere pubblicata sul Web! Copia semplicemente il seguente HTML per inserire la mappa all'interno del tuo sito web:", 2123 heightLabel: 'Altezza', 2124 widthLabel: 'Larghezza', 2125 mapSizeLabel: 'Grandezza mappa', 2126 miniSizeLabel: 'Minima', 2127 smallSizeLabel: 'Piccola', 2128 premiumSizeLabel: 'Gigante', 2129 largeSizeLabel: 'Larga' 2130 }, 2131 2132 "gxp.WMSStylesDialog.prototype": { 2133 addStyleText: "Aggiungi", 2134 addStyleTip: "Aggiungi un nuovo stile", 2135 chooseStyleText: "Scegli stile", 2136 deleteStyleText: "Elimina", 2137 deleteStyleTip: "Elimina lo stile selezionato", 2138 editStyleText: "Modifica", 2139 editStyleTip: "Modifica lo stile selezionato", 2140 duplicateStyleText: "Duplica", 2141 duplicateStyleTip: "Duplica lo stile selezionato", 2142 addRuleText: "Aggiungi", 2143 addRuleTip: "Aggiungi una nuova regola", 2144 newRuleText: "Nuova Regola", 2145 deleteRuleText: "Elimina", 2146 deleteRuleTip: "Elimina la regola selezionata", 2147 editRuleText: "Modifica", 2148 editRuleTip: "Modifica la regola selezionata", 2149 duplicateRuleText: "Duplica", 2150 duplicateRuleTip: "Duplica la regola selezionata", 2151 cancelText: "Cancella", 2152 saveText: "Salva", 2153 styleWindowTitle: "Stile Utente: {0}", 2154 ruleWindowTitle: "Regola dello stile: {0}", 2155 stylesFieldsetTitle: "Stili", 2156 rulesFieldsetTitle: "Regole" 2157 }, 2158 2159 "gxp.LayerUploadPanel.prototype": { 2160 titleLabel: "Titolo", 2161 titleEmptyText: "Titolo Layer", 2162 abstractLabel: "Descrizione", 2163 abstractEmptyText: "descrizione Layer", 2164 fileLabel: "Dati", 2165 fieldEmptyText: "Consulta l'archivio dati...", 2166 uploadText: "Upload", 2167 uploadFailedText: "Upload fallito", 2168 processingUploadText: "Sto effettuando l'upload...", 2169 waitMsgText: "Sto effettuando l'upload dei tuoi dati...", 2170 invalidFileExtensionText: "L'estensione del file deve essere una tra: ", 2171 optionsText: "Opzioni", 2172 workspaceLabel: "Workspace", 2173 workspaceEmptyText: "Workspace di base", 2174 dataStoreLabel: "Store", 2175 dataStoreEmptyText: "Scegli uno store", 2176 dataStoreNewText: "Crea nuovo store", 2177 crsLabel: "CRS", 2178 crsEmptyText: "ID del Sistema di Riferimento delle Coordinate", 2179 invalidCrsText: "L'identificativo CRS dovrebbe essere un codice EPSG (Es.: EPSG:4326)" 2180 }, 2181 2182 "gxp.NewSourceDialog.prototype": { 2183 title: "Aggiungi nuovo server...", 2184 cancelText: "Cancella", 2185 addServerText: "Aggiungi Server", 2186 invalidURLText: "Inserisci una URL valida di un servizio WMS (Es.: http://example.com/geoserver/wms)", 2187 contactingServerText: "Collegamento al server..." 2188 }, 2189 2190 "gxp.ScaleOverlay.prototype": { 2191 zoomLevelText: "Livello di Zoom" 2192 }, 2193 2194 "gxp.Viewer.prototype": { 2195 saveErrorText: "Problemi nel salvataggio: " 2196 }, 2197 2198 "gxp.FeedSourceDialog.prototype": { 2199 feedTypeText: "Sorgente", 2200 addPicasaText: "Foto Picasa", 2201 addYouTubeText: "Video YouTube", 2202 addRSSText: "Altri Feed GeoRSS", 2203 addFeedText: "Aggiungi alla Mappa", 2204 addTitleText: "Titolo", 2205 keywordText: "Parole chiave", 2206 doneText: "Fatto", 2207 titleText: "Aggiungi Feed", 2208 maxResultsText: "Numero Max risultati" 2209 } 2210 2211}); 2212 2213GeoExt.Lang.add("ca",{"GeoExplorer.prototype":{zoomSliderText:"<div>Grau de detall: {zoom}</div><div>Escala: 1:{scale}</div>",loadConfigErrorText:"Problemes llegint la configuraci\u00f3 desada: <br />",loadConfigErrorDefaultText:"Error del servidor.",xhrTroubleText:"Problemes de comunicaci\u00f3. Estat ",layersText:"Capes",t
2213itleText:"T\u00edtol",bookmarkText:"URL del marcador",permakinkText:"Enlla\u00e7 permanent",appInfoText:"GeoExplorer",aboutText:"Quant a GeoExplorer",mapInfoText:"Informaci\u00f3 del mapa", 2214descriptionText:"Descripci\u00f3",contactText:"Contacte",aboutThisMapText:"Quant a aquest mapa"},"GeoExplorer.Composer.prototype":{mapText:"Mapa",tableText:"Table",queryText:"Query",exportMapText:"Exporta el Mapa",saveMapText:"Desa el Mapa",toolsTitle:"Escolliu els elements que desitgeu incloure a la barra d'eines:",previewText:"Vista pr\u00e8via",backText:"Anterior",nextText:"Seg\u00fcent",loginText:"Login",loginErrorText:"Invalid username or password.",userFieldText:"User",passwordFieldText:"Password", 2215logoutConfirmTitle:"Warning",logoutConfirmMessage:"Logging out will undo any unsaved changes, remove any layers you may have added, and reset the map composition. Do you want to save your composition first?"}}); 2216GeoExt.Lang.add("de",{"GeoExplorer.prototype":{zoomSliderText:"<div>Zoomstufe: {zoom}</div><div>Ma\u00dfstab: 1:{scale}</div>",loadConfigErrorText:"Gespeicherte Konfiguration kann nicht gelesen werden: <br />",loadConfigErrorDefaultText:"Server Fehler.",xhrTroubleText:"Kommunikationsfehler: Status ",layersText:"Layer",titleText:"Titel",zoomLevelText:"Zoomstufe",bookmarkText:"Bookmark URL",permakinkText:"Permalink",appInfoText:"GeoExplorer",aboutText:"\u00dcber GeoExplorer",mapInfoText:"Karteninfo", 2217descriptionText:"Beschreibung",contactText:"Kontakt",aboutThisMapText:"\u00dcber diese Karte"},"GeoExplorer.Composer.prototype":{mapText:"Karte",tableText:"Tabelle",queryText:"Abfrage",exportMapText:"Karte ver\u00f6ffentlichen",saveMapText:"Karte speichern",toolsTitle:"Werkzeuge, die in der Werkzeugleiste zur Verf\u00fcgung stehen sollen:",previewText:"Vorschau",backText:"Zur\u00fcck",nextText:"Weiter",loginText:"Login",loginErrorText:"Ung\u00fcltiger Benutzername oder ung\u00fcltiges Kennwort.", 2218userFieldText:"Benutzer",passwordFieldText:"Kennwort",logoutConfirmTitle:"Warning",logoutConfirmMessage:"Logging out will undo any unsaved changes, remove any layers you may have added, and reset the map composition. Do you want to save your composition first?"}}); 2219GeoExt.Lang.add("en",{"GeoExplorer.prototype":{zoomSliderText:"<div>Zoom Level: {zoom}</div><div>Scale: 1:{scale}</div>",loadConfigErrorText:"Trouble reading saved configuration: <br />",loadConfigErrorDefaultText:"Server Error.",xhrTroubleText:"Communication Trouble: Status ",layersText:"Layers",titleText:"Title",zoomLevelText:"Zoom level",bookmarkText:"Bookmark URL",permakinkText:"Permalink",appInfoText:"GeoExplorer",aboutText:"About GeoExplorer",mapInfoText:"Map info",descriptionText:"Description", 2220contactText:"Contact",aboutThisMapText:"About this map"},"GeoExplorer.Composer.prototype":{mapText:"Map",tableText:"Table",queryText:"Query",exportMapText:"Publish map",saveMapText:"Save map",toolsTitle:"Choose tools to include in the toolbar:",previewText:"Preview",backText:"Back",nextText:"Next",loginText:"Login",loginErrorText:"Invalid username or password.",userFieldText:"User",passwordFieldText:"Password",logoutConfirmTitle:"Warning",logoutConfirmMessage:"Logging out will undo any unsaved changes, remove any layers you may have added, and reset the map composition. Do you want to save your composition first?"}}); 2221GeoExt.Lang.add("es",{"GeoExplorer.prototype":{zoomSliderText:"<div>Nivel de detalle: {zoom}</div><div>Escala: 1:{scale}</div>",loadConfigErrorText:"Problemas leyendo la configuraci\u00f3n guardada: <br />",loadConfigErrorDefaultText:"Error del servidor.",xhrTroubleText:"Problemas de comunicaci\u00f3n: Estado ",layersText:"Capas",titleText:"T\u00edtulo",bookmarkText:"URL del marcador",permakinkText:"Enlace permanente",appInfoText:"GeoExplorer",aboutText:"Acerca de GeoExplorer",mapInfoText:"Informaci\u00f3n del mapa", 2222descriptionText:"Descripci\u00f3n",contactText:"Contacto",aboutThisMapText:"Acerca de este mapa"},"GeoExplorer.Composer.prototype":{mapText:"Mapa",tableText:"Table",queryText:"Query",exportMapText:"Exportar Mapa",saveMapText:"Guardar Mapa",toolsTitle:"Escoja los elementos que desea incluir en la barra de herramientas:",previewText:"Vista previa",backText:"Anterior",nextText:"Siguiente",loginText:"Login",loginErrorText:"Invalid username or password.",userFieldText:"User",passwordFieldText:"Password", 2223logoutConfirmTitle:"Warning",logoutConfirmMessage:"Logging out will undo any unsaved changes, remove any layers you may have added, and reset the map composition. Do you want to save your composition first?"}}); 2224GeoExt.Lang.add("fr",{"GeoExplorer.prototype":{zoomSliderText:"<div> Niveau de zoom: {zoom}</div><div Echelle: 1:{scale}</div>",loadConfigErrorText:"Difficult\u00e9 \u00e0 lire configuration enregistr\u00e9e: <br>",loadConfigErrorDefaultText:"Erreur du serveur.",xhrTroubleText:"Trouble de la communication: \u00e9tat",layersText:"Layers",titleText:"Titre",bookmarkText:"Mettre en favori URL",permakinkText:"Permalink",appInfoText:"GeoExplorer",aboutText:"\u00c0 propos de GeoExplorer",mapInfoText:"Info carte", 2225descriptionText:"Description",contactText:"Contact",aboutThisMapText:"\u00c0 propos de cette carte"},"GeoExplorer.Composer.prototype":{mapText:"Carte",tableText:"Table",queryText:"Query",exportMapText:"Carte Export",saveMapText:"Enregistrez la carte",toolsTitle:"Cho
2225ose tools to include in the toolbar:",previewText:"Preview",backText:"Back",nextText:"Next",loginText:"Login",loginErrorText:"Invalid username or password.",userFieldText:"User",passwordFieldText:"Password",logoutConfirmTitle:"Warning", 2226logoutConfirmMessage:"Logging out will undo any unsaved changes, remove any layers you may have added, and reset the map composition. Do you want to save your composition first?"}}); 2227GeoExt.Lang.add("ca",{"gxp.menu.LayerMenu.prototype":{layerText:"Capa"},"gxp.plugins.AddLayers.prototype":{addActionMenuText:"Afegeix Capes",addActionTip:"Afegeix Capes",addServerText:"Afegeix servidor",addButtonText:"Afegeix Capes",untitledText:"Sense T\u00edtol",addLayerSourceErrorText:"Error obtenint les capabilities del WMS ({msg}).\nSi us plau, comproveu la URL i torneu-ho a intentar.",availableLayersText:"Capes disponibles",expanderTemplateText:"<p><b>Resum:</b> {abstract}</p>",panelTitleText:"T\u00edtol", 2228layerSelectionText:"Veure dades disponibles de:",doneText:"Fet",uploadText:"Puja dades",addFeedActionMenuText:"Add feeds",searchText:"Search for layers"},"gxp.plugins.BingSource.prototype":{title:"Capes Bing",roadTitle:"Bing Carrerer",aerialTitle:"Bing Fotografia A\u00e8ria",labeledAerialTitle:"Bing Fotografia A\u00e8ria amb Etiquetes"},"gxp.plugins.FeatureEditor.prototype":{splitButtonText:"Edit",createFeatureActionText:"Create",editFeatureActionText:"Modify",createFeatureActionTip:"Crea nou element", 2229editFeatureActionTip:"Edita element existent",commitTitle:"Commit message",commitText:"Please enter a commit message for this edit:"},"gxp.plugins.FeatureGrid.prototype":{displayFeatureText:"Mostra al mapa",firstPageTip:"Primera p\u00e0gina",previousPageTip:"P\u00e0gina anterior",zoomPageExtentTip:"Ajusta vista a l'extensi\u00f3 de la p\u00e0gina",nextPageTip:"P\u00e0gina seg\u00fcent",lastPageTip:"P\u00e0gina anterior",totalMsg:"Features {1} to {2} of {0}"},"gxp.plugins.GoogleEarth.prototype":{menuText:"Vista 3D", 2230tooltip:"Vista 3D"},"gxp.plugins.GoogleSource.prototype":{title:"Capes Google",roadmapAbstract:"Mostra carrerer",satelliteAbstract:"Mostra imatges de sat\u00e8l\u00b7lit",hybridAbstract:"Mostra imatges amb noms de carrer",terrainAbstract:"Mostra carrerer amb terreny"},"gxp.plugins.LayerProperties.prototype":{menuText:"Propietats de la capa",toolTip:"Propietats de la capa"},"gxp.plugins.LayerTree.prototype":{shortTitle:"Capes",rootNodeText:"Capes",overlayNodeText:"Capes addicionals",baseNodeText:"Capa base"}, 2231"gxp.plugins.LayerManager.prototype":{baseNodeText:"Capa base"},"gxp.plugins.Legend.prototype":{menuText:"Mostra Llegenda",tooltip:"Mostra Llegenda"},"gxp.plugins.LoadingIndicator.prototype":{loadingMapMessage:"Loading Map..."},"gxp.plugins.MapBoxSource.prototype":{title:"MapBox Layers",blueMarbleTopoBathyJanTitle:"Blue Marble Topography & Bathymetry (January)",blueMarbleTopoBathyJulTitle:"Blue Marble Topography & Bathymetry (July)",blueMarbleTopoJanTitle:"Blue Marble Topography (January)",blueMarbleTopoJulTitle:"Blue Marble Topography (July)", 2232controlRoomTitle:"Control Room",geographyClassTitle:"Geography Class",naturalEarthHypsoTitle:"Natural Earth Hypsometric",naturalEarthHypsoBathyTitle:"Natural Earth Hypsometric & Bathymetry",naturalEarth1Title:"Natural Earth I",naturalEarth2Title:"Natural Earth II",worldDarkTitle:"World Dark",worldLightTitle:"World Light",worldPrintTitle:"World Print"},"gxp.plugins.Measure.prototype":{buttonText:"Mesura",lengthMenuText:"Longitud",areaMenuText:"\u00c0rea",lengthTooltip:"Mesura Longitud",areaTooltip:"Mesura \u00c0rea", 2233measureTooltip:"Mesura"},"gxp.plugins.Navigation.prototype":{menuText:"Despla\u00e7a mapa",tooltip:"Despla\u00e7a mapa"},"gxp.plugins.NavigationHistory.prototype":{previousMenuText:"Vista anterior",nextMenuText:"Vista seg\u00fcent",previousTooltip:"Vista anterior",nextTooltip:"Vista seg\u00fcent"},"gxp.plugins.OSMSource.prototype":{title:"Capes OpenStreetMap",mapnikAttribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",osmarenderAttribution:"Daded CC-By-SA de <a href='http://openstreetmap.org/'>OpenStreetMap</a>"}, 2234"gxp.plugins.Print.prototype":{buttonText:"Imprimeix",menuText:"Imprimeix mapa",tooltip:"Imprimeix mapa",previewText:"Vista pr\u00e8via",notAllNotPrintableText:"No es poden imprimir totes les capes",nonePrintableText:"No es pot imprimir cap de les capes del mapa"},"gxp.plugins.MapQuestSource.prototype":{title:"MapQuest Layers",osmAttribution:"Tessel\u00b7les cortesia de <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 2235osmTitle:"MapQuest OpenStreetMap",naipAttribution:"Tessel\u00b7les cortesia de <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>",naipTitle:"MapQuest Imatge"},"gxp.plugins.QueryForm.prototype":{queryActionText:"Consulta",queryMenuText:"Consulta layer",queryActionTip:"Consulta la capa sel\u00b7leccionad
2235a",queryByLocationText:"Query by current map extent",queryByAttributesText:"Consulta per atributs",queryMsg:"Consultant...", 2236cancelButtonText:"Cancel\u00b7la",noFeaturesTitle:"Sense coincid\u00e8ncies",noFeaturesMessage:"La vostra consulta no ha produ\u00eft resultats."},"gxp.plugins.RemoveLayer.prototype":{removeMenuText:"Elimina Capa",removeActionTip:"Elimina Capa"},"gxp.plugins.Styler.prototype":{menuText:"Edita Estils",tooltip:"Gestiona els estils de les capes"},"gxp.plugins.WMSGetFeatureInfo.prototype":{buttonText:"Identify",infoActionTip:"Consulta elements",popupTitle:"Informaci\u00f3 dels elements"},"gxp.plugins.Zoom.prototype":{zoomMenuText:"Zoom Box", 2237zoomInMenuText:"Apropa",zoomOutMenuText:"Allunya",zoomTooltip:"Zoom by dragging a box",zoomInTooltip:"Apropa",zoomOutTooltip:"Allunya"},"gxp.plugins.ZoomToExtent.prototype":{menuText:"Mostra l'extensi\u00f3 total",tooltip:"Mostra l'extensi\u00f3 total"},"gxp.plugins.ZoomToDataExtent.prototype":{menuText:"Mostra tota la capa",tooltip:"Mostra tota la capa"},"gxp.plugins.ZoomToLayerExtent.prototype":{menuText:"Mostra tota la capa",tooltip:"Mostra tota la capa"},"gxp.plugins.ZoomToSelectedFeatures.prototype":{menuText:"Mostra els elements seleccionats", 2238tooltip:"Mostra els elements seleccionats"},"gxp.FeatureEditPopup.prototype":{closeMsgTitle:"Desitgeu desar els canvis?",closeMsg:"Els canvis en aquest element no s'han desat. Desitja desar-los?",deleteMsgTitle:"Desitgeu esborrar l'element?",deleteMsg:"Esteu segurs de voler esborrar aquest element?",editButtonText:"Edita",editButtonTooltip:"Fes que aquest element sigui editable",deleteButtonText:"Esborra",deleteButtonTooltip:"Esborra aquest element",cancelButtonText:"Cancel\u00b7la",cancelButtonTooltip:"Deixa d'editar, descarta els canvis", 2239saveButtonText:"Desa",saveButtonTooltip:"Desa els canvis"},"gxp.FillSymbolizer.prototype":{fillText:"Farcit",colorText:"Color",opacityText:"Opacitat"},"gxp.FilterBuilder.prototype":{builderTypeNames:["alguna de","totes","cap de","no totes"],preComboText:"Acompleix",postComboText:"les condicions seg\u00fcents:",addConditionText:"afegeix condici\u00f3",addGroupText:"afegeix grup",removeConditionText:"treu condici\u00f3"},"gxp.grid.CapabilitiesGrid.prototype":{nameHeaderText:"Nom",titleHeaderText:"T\u00edtol", 2240queryableHeaderText:"Consultable",layerSelectionLabel:"Llista les capes de:",layerAdditionLabel:"o afegeix un altre servidor.",expanderTemplateText:"<p><b>Resum:</b> {abstract}</p>"},"gxp.PointSymbolizer.prototype":{graphicCircleText:"cercle",graphicSquareText:"quadrat",graphicTriangleText:"triangle",graphicStarText:"estrella",graphicCrossText:"creu",graphicXText:"x",graphicExternalText:"extern",urlText:"URL",opacityText:"opacitat",symbolText:"S\u00edmbol",sizeText:"Mides",rotationText:"Gir"},"gxp.QueryPanel.prototype":{queryByLocationText:"Consulta per lloc", 2241currentTextText:"Vista actual",queryByAttributesText:"Consulta per atributs",layerText:"Capa"},"gxp.RulePanel.prototype":{scaleSliderTemplate:"{scaleType} Escala 1:{scale}",labelFeaturesText:"Etiqueta elements",labelsText:"Etiquetes",basicText:"B\u00e0sic",advancedText:"Avan\u00e7at",limitByScaleText:"Restringeix per escala",limitByConditionText:"Restringeix per condici\u00f3",symbolText:"S\u00edmbol",nameText:"Nom"},"gxp.ScaleLimitPanel.prototype":{scaleSliderTemplate:"{scaleType} Escala 1:{scale}", 2242minScaleLimitText:"Escala m\u00ednima",maxScaleLimitText:"Escala m\u00e0xima"},"gxp.StrokeSymbolizer.prototype":{solidStrokeName:"continu",dashStrokeName:"guions",dotStrokeName:"punts",titleText:"Tra\u00e7",styleText:"Estil",colorText:"Color",widthText:"Amplada",opacityText:"Opacitad"},"gxp.StylePropertiesDialog.prototype":{titleText:"General",nameFieldText:"Nom",titleFieldText:"T\u00edtol",abstractFieldText:"Resum"},"gxp.TextSymbolizer.prototype":{labelValuesText:"Etiquetatge",haloText:"Halo",sizeText:"Mida"}, 2243"gxp.WMSLayerPanel.prototype":{aboutText:"Quant a",titleText:"T\u00edtol",nameText:"Nom",descriptionText:"Descripci\u00f3",displayText:"Mostra",opacityText:"Opacitat",formatText:"Format",transparentText:"Trans
2243parent",cacheText:"Cach\u00e9",cacheFieldText:"Utiliza la versi\u00f3 en cach\u00e9",stylesText:"Estils disponibles",infoFormatText:"Info format",infoFormatEmptyText:"Select a format",displayOptionsText:"Display options",queryText:"Limit with filters",scaleText:"Limit by scale",minScaleText:"Min scale", 2244maxScaleText:"Max scale",switchToFilterBuilderText:"Switch back to filter builder",cqlPrefixText:"or ",cqlText:"use CQL filter instead",singleTileText:"Single tile",singleTileFieldText:"Use a single tile"},"gxp.EmbedMapDialog.prototype":{publishMessage:"Ja podeu incloure el vostre mapa a altres webs! Simplement copieu el seg\u00fcent codi HTML all\u00e0 on desitgeu incrustar-ho:",heightLabel:"Al\u00e7\u00e0ria",widthLabel:"Amplada",mapSizeLabel:"Mida",miniSizeLabel:"M\u00ednima",smallSizeLabel:"Petita", 2245premiumSizeLabel:"Premium",largeSizeLabel:"Gran"},"gxp.WMSStylesDialog.prototype":{addStyleText:"Afegeix",addStyleTip:"Afegeix nou estil",chooseStyleText:"Escull estil",deleteStyleText:"Treu",deleteStyleTip:"Esborra l'estil sel\u00b7leccionat",editStyleText:"Canvia",editStyleTip:"Edita l'estil sel\u00b7leccionat",duplicateStyleText:"Clona",duplicateStyleTip:"Duplica l'estil sel\u00b7leccionat",addRuleText:"Afegeix",addRuleTip:"Afegeix nova regla",newRuleText:"Nova regla",deleteRuleText:"Treu",deleteRuleTip:"Esborra la regla sel\u00b7leccionada", 2246editRuleText:"Edita",editRuleTip:"Edita la regla sel\u00b7leccionada",duplicateRuleText:"Clona",duplicateRuleTip:"Duplica la regla sel\u00b7leccionada",cancelText:"Cancel\u00b7la",saveText:"Desa",styleWindowTitle:"Estil: {0}",ruleWindowTitle:"Regla: {0}",stylesFieldsetTitle:"Estils",rulesFieldsetTitle:"Regles"},"gxp.LayerUploadPanel.prototype":{titleLabel:"T\u00edtol",titleEmptyText:"T\u00edtol de la capa",abstractLabel:"Descripci\u00f3",abstractEmptyText:"Descripci\u00f3 de la capa",fileLabel:"Dades", 2247fieldEmptyText:"Navegueu per les dades...",uploadText:"Puja",uploadFailedText:"Upload failed",processingUploadText:"Processing upload...",waitMsgText:"Pugeu les vostres dades...",invalidFileExtensionText:"L'extensi\u00f3 del fitxer ha de ser alguna d'aquestes: ",optionsText:"Opcions",workspaceLabel:"Espai de treball",workspaceEmptyText:"Espai de treball per defecte",dataStoreLabel:"Magatzem",dataStoreEmptyText:"Create new store",defaultDataStoreEmptyText:"Magatzem de dades per defecte"},"gxp.NewSourceDialog.prototype":{title:"Afegeix Servidor...", 2248cancelText:"Cancel\u00b7la",addServerText:"Afegeix Servidor",invalidURLText:"Enter a valid URL to a WMS endpoint (e.g. http://example.com/geoserver/wms)",contactingServerText:"Connectant amb el Servidor..."},"gxp.ScaleOverlay.prototype":{zoomLevelText:"Escala"},"gxp.Viewer.prototype":{saveErrorText:"Problemes desant: "},"gxp.FeedSourceDialog.prototype":{feedTypeText:"Font",addPicasaText:"Picasa fotos",addYouTubeText:"YouTube Videos",addRSSText:"Feed GeoRSS Un altre",addFeedText:"Afegeix a Mapa",addTitleText:"T\u00edtol", 2249keywordText:"Paraula clau",doneText:"Fet",titleText:"Afegir Feeds",maxResultsText:"Productes Max"}}); 2250GeoExt.Lang.add("de",{"gxp.menu.LayerMenu.prototype":{layerText:"Layer"},"gxp.plugins.AddLayers.prototype":{addActionMenuText:"Layer hinzuf\u00fcgen",addActionTip:"Layer hinzuf\u00fcgen",addServerText:"Server hinzuf\u00fcgen",addButtonText:"Layer hinzuf\u00fcgen",untitledText:"ohne Titel",addLayerSourceErrorText:"Fehler beim Abfragen der WMS Capabilities ({msg}).\nBitte URL pr\u00fcfen und erneut versuchen.",availableLayersText:"verf\u00fcgbare Layer",expanderTemplateText:"<p><b>Kurzbeschreibung:</b> {abstract}</p>", 2251panelTitleText:"Titel",layerSelectionText:"Verf\u00fcgbare Daten anzeigen von:",doneText:"Fertig",uploadText:"Daten hochladen",addFeedActionMenuText:"Add feeds",searchText:"Search for layers"},"gxp.plugins.BingSource.prototype":{title:"Bing Layer",roadTitle:"Bing Strassen",aerialTitle:"Bing Luftbilder",labeledAerialTitle:"Bing Luftbilder mit Beschriftung"},"gxp.plugins.FeatureEditor.prototype":{splitButtonText:"Editieren",createFeatureActionText:"Erzeugen",editFeatureActionText:"Bearbeiten",createFeatureActionTip:"neues Objekt erstellen", 2252editFeatureActionTip:"bestehendes Objekt bearbeiten",commitTitle:"Commit message",commitText:"Please enter a commit message for this edit:"},"gxp.plugins.FeatureGrid.prototype":{displayFeatureText:"auf der Karte darstellen",firstPageTip:"erste Seite",previousPageTip:"vorherige Seite",zoomPageExtentTip:"Zoom zur max. Ausdehnung",nextPageTip:"n\u00e4chste Seite",lastPageTip:"letzte Seite",totalMsg:"{1} bis {2} von {0} Datens\u00e4tzen"},"gxp.plugins.GoogleEarth.prototype":{menuText:"3D Viewer",tooltip:"zum 3D Viewer wechseln"}, 2253"gxp.plugins.GoogleSource.prototype":{title:"Google Layers",roadmapAbstract:"Strassenkarte zeigen",satelliteAbstract:"Luftbilder zeigen",hybridAbstract:"Luftbilder mit Strassennamen zeigen",terrainAbstract:"Strassenkarte mit Gel\u00e4nde zeigen"},"gxp.plugins.LayerProperties.prototype":{menuText:"Layer Eigenschaften",toolTip:"Layer Eigenschaften"},"gxp.plugins.LayerTree.prototype":{shortTitle:"Layer",rootNodeText:"Layer",overlayNodeText:"\u00fcberlagernde Layer",baseNodeText:"Basiskarten"},"gxp.plugins.LayerManager.prototype":{baseNodeText:"Basiskarte"}, 2254"gxp.plugins.Legend.prototype":{menuText:"Legende zeigen",tooltip:"Legende zeigen"},"gxp.plugins.LoadingIndicator.prototype":{loadingMapMessage:"Karte laden..."},"gxp.plugins.MapBoxSource.prototype":{title:"MapBox Layers",blueMarbleTopoB
2254athyJanTitle:"Blue Marble Topography & Bathymetry (January)",blueMarbleTopoBathyJulTitle:"Blue Marble Topography & Bathymetry (July)",blueMarbleTopoJanTitle:"Blue Marble Topography (January)",blueMarbleTopoJulTitle:"Blue Marble Topography (July)",controlRoomTitle:"Control Room", 2255geographyClassTitle:"Geography Class",naturalEarthHypsoTitle:"Natural Earth Hypsometric",naturalEarthHypsoBathyTitle:"Natural Earth Hypsometric & Bathymetry",naturalEarth1Title:"Natural Earth I",naturalEarth2Title:"Natural Earth II",worldDarkTitle:"World Dark",worldLightTitle:"World Light",worldPrintTitle:"World Print"},"gxp.plugins.Measure.prototype":{buttonText:"Messen",lengthMenuText:"L\u00e4nge",areaMenuText:"Fl\u00e4che",lengthTooltip:"L\u00e4nge messen",areaTooltip:"Fl\u00e4che messen",measureTooltip:"Messen"}, 2256"gxp.plugins.Navigation.prototype":{menuText:"Kartenausschnitt verschieben",tooltip:"Kartenausschnitt verschieben"},"gxp.plugins.NavigationHistory.prototype":{previousMenuText:"Kartenausschnitt zur\u00fcck",nextMenuText:"Kartenausschnitt vorw\u00e4rts",previousTooltip:"Kartenausschnitt zur\u00fcck",nextTooltip:"Kartenausschnitt vorw\u00e4rts"},"gxp.plugins.OSMSource.prototype":{title:"OpenStreetMap Layer",mapnikAttribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors", 2257osmarenderAttribution:"Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"},"gxp.plugins.Print.prototype":{buttonText:"Drucken",menuText:"Karte drucken",tooltip:"Karte drucken",previewText:"Druckansicht",notAllNotPrintableText:"Es k\u00f6nnen nicht alle Layer gedruckt werden.",nonePrintableText:"Keiner der aktuellen Kartenlayer kann gedruckt werden."},"gxp.plugins.MapQuestSource.prototype":{title:"MapQuest Layers",osmAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 2258osmTitle:"MapQuest OpenStreetMap",naipAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>",naipTitle:"MapQuest Imagery"},"gxp.plugins.QueryForm.prototype":{queryActionText:"Abfrage",queryMenuText:"Abfrage Layer",queryActionTip:"selektierten Layer abfragen",queryByLocationText:"Abfrage nach aktuellem Kartenauscchnitt",queryByAttributesText:"Attributabfrage",queryMsg:"Abfrage wird ausgef\u00fchrt", 2259cancelButtonText:"Abbrechen",noFeaturesTitle:"keine \u00dcbereinstimmung",noFeaturesMessage:"Ihre Abfrage liefert keine Resultate."},"gxp.plugins.RemoveLayer.prototype":{removeMenuText:"Layer l\u00f6schen",removeActionTip:"Layer l\u00f6schen"},"gxp.plugins.Styler.prototype":{menuText:"Style bearbeiten",tooltip:"Layer Styles verwalten"},"gxp.plugins.WMSGetFeatureInfo.prototype":{buttonText:"Objektinformation",infoActionTip:"Objektinformation abfragen",popupTitle:"Objektinformation"},"gxp.plugins.Zoom.prototype":{zoomMenuText:"Zoom Box", 2260zoomInMenuText:"Vergr\u00f6ssern",zoomOutMenuText:"Verkleinern",zoomTooltip:"Zoom durch Aufziehen einer Box",zoomInTooltip:"Vergr\u00f6ssern",zoomOutTooltip:"Verkleinern"},"gxp.plugins.ZoomToExtent.prototype":{menuText:"Maximale Ausdehnung",tooltip:"Maximale Ausdehnung"},"gxp.plugins.ZoomToDataExtent.prototype":{menuText:"Auf Layer zoomen",tooltip:"Auf Layer zoomen"},"gxp.plugins.ZoomToLayerExtent.prototype":{menuText:"Auf Layer zoomen",tooltip:"Auf Layer zoomen"},"gxp.plugins.ZoomToSelectedFeatures.prototype":{menuText:"Auf selektierte Objekte zoomen", 2261tooltip:"Auf selektierte Objekte zoomen"},"gxp.FeatureEditPopup.prototype":{closeMsgTitle:"\u00c4nderung speichern?",closeMsg:"Ungespeicherte \u00c4nderungen. M\u00f6chten Sie die \u00c4nderungen speichern?",deleteMsgTitle:"Objekt l\u00f6schen?",deleteMsg:"Sind Sie sicher, dass Sie dieses Objekt l\u00f6schen m\u00f6chten?",editButtonText:"Bearbeiten",editButtonTooltip:"Objekt editieren",deleteButtonText:"L\u00f6schen",deleteButtonTooltip:"Objekt l\u00f6schen",cancelButtonText:"Abbrechen",cancelButtonTooltip:"Bearbeitung beenden, \u00c4nderungen verwerfen.", 2262saveButtonText:"Speichern",saveButtonTooltip:"\u00c4nderungen speichern"},"gxp.FillSymbolizer.prototype":{fillText:"F\u00fcllung",colorText:"Farbe",opacityText:"Trans
2262parenz"},"gxp.FilterBuilder.prototype":{builderTypeNames:["beliebige","alle","keine","nicht alle"],preComboText:"Match",postComboText:"der folgenden:",addConditionText:"Bedingung hinzuf\u00fcgen",addGroupText:"Gruppe hinzuf\u00fcgen",removeConditionText:"Bedingung entfernen"},"gxp.grid.CapabilitiesGrid.prototype":{nameHeaderText:"Name", 2263titleHeaderText:"Titel",queryableHeaderText:"abfragbar",layerSelectionLabel:"Verf\u00fcgbare Daten anzeigen von:",layerAdditionLabel:"oder neuen Server hinzuf\u00fcgen.",expanderTemplateText:"<p><b>Kurzbeschreibung:</b> {abstract}</p>"},"gxp.PointSymbolizer.prototype":{graphicCircleText:"Kreis",graphicSquareText:"Rechteck",graphicTriangleText:"Dreieck",graphicStarText:"Stern",graphicCrossText:"Kreuz",graphicXText:"x",graphicExternalText:"extern",urlText:"URL",opacityText:"Transparenz",symbolText:"Symbol", 2264sizeText:"Gr\u00f6sse",rotationText:"Rotation"},"gxp.QueryPanel.prototype":{queryByLocationText:"lagebezogene Abfrage",currentTextText:"aktuelle Ausdehnung",queryByAttributesText:"Attributabfrage",layerText:"Layer"},"gxp.RulePanel.prototype":{scaleSliderTemplate:"{scaleType} Massstab 1:{scale}",labelFeaturesText:"Objekte beschriften",labelsText:"Beschriftung",basicText:"Basic",advancedText:"Erweitert",limitByScaleText:"Massstabsbeschr\u00e4nkung",limitByConditionText:"Einschr\u00e4nkung durch Bedingung", 2265symbolText:"Symbol",nameText:"Name"},"gxp.ScaleLimitPanel.prototype":{scaleSliderTemplate:"{scaleType} Massstab 1:{scale}",minScaleLimitText:"Minimale Massstabsgrenze",maxScaleLimitText:"Maximale Massstabsgrenze"},"gxp.StrokeSymbolizer.prototype":{solidStrokeName:"ausgezogen",dashStrokeName:"gestrichelt",dotStrokeName:"gepunktet",titleText:"Linie",styleText:"Style",colorText:"Farbe",widthText:"Breite",opacityText:"Transparenz"},"gxp.StylePropertiesDialog.prototype":{titleText:"Allgemein",nameFieldText:"Name", 2266titleFieldText:"Titel",abstractFieldText:"Kurzbeschreibung"},"gxp.TextSymbolizer.prototype":{labelValuesText:"Label values",haloText:"Halo",sizeText:"Gr\u00f6sse"},"gxp.WMSLayerPanel.prototype":{aboutText:"\u00dcber",titleText:"Titel",nameText:"Name",descriptionText:"Beschreibung",displayText:"Anzeige",opacityText:"Transparenz",formatText:"Format",transparentText:"transparent",cacheText:"Cache",cacheFieldText:"Version aus dem Cache ben\u00fctzen",stylesText:"Verf\u00fcgbare Styles",infoFormatText:"Info Format", 2267infoFormatEmptyText:"Format ausw\u00e4hlen",displayOptionsText:"Display options",queryText:"Limit with filters",scaleText:"Limit by scale",minScaleText:"Min scale",maxScaleText:"Max scale",switchToFilterBuilderText:"Switch back to filter builder",cqlPrefixText:"or ",cqlText:"use CQL filter instead",singleTileText:"Single tile",singleTileFieldText:"Use a single tile"},"gxp.EmbedMapDialog.prototype":{publishMessage:"Ihre Karte ist f\u00fcr die Publikation im Web bereit. Kopieren Sie einfach den folgenden HTML-Code, um die Karte in Ihre Webseite einzubinden:", 2268heightLabel:"H\u00f6he",widthLabel:"Breite",mapSizeLabel:"Kartengr\u00f6sse",miniSizeLabel:"Mini",smallSizeLabel:"Klein",premiumSizeLabel:"Premium",largeSizeLabel:"Gross"},"gxp.WMSStylesDialog.prototype":{addStyleText:"Hinzuf\u00fcgen",addStyleTip:"neuen Style hinzuf\u00fcgen",chooseStyleText:"Style ausw\u00e4hlen",deleteStyleText:"L\u00f6schen",deleteStyleTip:"selektierten Style l\u00f6schen",editStyleText:"Bearbeiten",editStyleTip:"selektierten Style bearbeiten",duplicateStyleText:"Duplizieren", 2269duplicateStyleTip:"selektierten Style duplizieren",addRuleText:"Hinzuf\u00fcgen",addRuleTip:"neue Regel hinzuf\u00fcgen",newRuleText:"neue Regel",deleteRuleText:"Entfernen",deleteRuleTip:"selektierte Regel l\u00f6schen",editRuleText:"Bearbeiten",editRuleTip:"selektierte Regel bearbeiten",duplicateRuleText:"Duplizieren",duplicateRuleTip:"selektierte Regel duplizieren",cancelText:"Abbrechen",saveText:"Speichern",styleWindowTitle:"User Style: {0}",ruleWindowTitle:"Style Regel: {0}",stylesFieldsetTitle:"Styles", 2270rulesFieldsetTitle:"Regeln"},"gxp.LayerUploadPanel.prototype":{titleLabel:"Titel",titleEmptyText:"Layertitel",abstractLabel:"Beschreibung",abstractEmptyText:"Layerbeschreibung",fileLabel:"Daten",fieldEmptyText:"Datenarchiv durchsuchen...",uploadText:"Hochladen",uploadFailedText:"Hochladen fehlgeschlagen",processingUploadText:"Upload wird bearbeitet",waitMsgText:"Ihre Daten werden hochgeladen...",invalidFileExtensionText:"Dateierweiterung muss eine sein von: ",optionsText:"Optionen",workspaceLabel:"Workspace", 2271workspaceEmptyText:"Standard Workspace",dataStoreLabel:"Store",dataStoreEmptyText:"Neuen Store erzeugen",defaultDataStoreEmptyText:"Default Datastore"},"gxp.NewSourceDialog.prototype":{title:"neuen Server hinzuf\u00fcgen...",cancelText:"Abbrechen",addServerText:"Server hinzuf\u00fcgen",invali
2271dURLText:"F\u00fcgen Sie eine g\u00fcltige URL zu einem WMS ein (z.B. http://example.com/geoserver/wms)",contactingServerText:"Server wird kontaktiert..."},"gxp.ScaleOverlay.prototype":{zoomLevelText:"Zoomstufe"}, 2272"gxp.Viewer.prototype":{saveErrorText:"Beim Speichern ist ein Problem aufgetreten: "},"gxp.FeedSourceDialog.prototype":{feedTypeText:"Source",addPicasaText:"Picasa Fotos",addYouTubeText:"YouTube Videos",addRSSText:"Andere GeoRSS Feed",addFeedText:"zur Karte hinzuf\u00fcgen",addTitleText:"Titel",keywordText:"Keyword",doneText:"Fertig",titleText:"Add-Feeds",maxResultsText:"Max Items"}}); 2273GeoExt.Lang.add("el",{"gxp.menu.LayerMenu.prototype":{layerText:"\u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1"},"gxp.plugins.AddLayers.prototype":{addActionMenuText:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ad\u03c3\u03c4\u03b5 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b5\u03c2",addActionTip:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ad\u03c3\u03c4\u03b5 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b5\u03c2",addServerText:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ad\u03c3\u03c4\u03b5 \u03ad\u03bd\u03b1 \u039d\u03ad\u03bf \u0394\u03b9\u03b1\u03ba\u03bf\u03bc\u03b9\u03c3\u03c4\u03ae", 2274addButtonText:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ad\u03c3\u03c4\u03b5 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b5\u03c2",untitledText:"\u03a7\u03c9\u03c1\u03af\u03c2 \u03c4\u03af\u03c4\u03bb\u03bf",addLayerSourceErrorText:"\u03a3\u03c6\u03ac\u03bb\u03bc\u03b1 \u03c3\u03c4\u03b7\u03bd \u03b1\u03bd\u03ac\u03ba\u03c4\u03b7\u03c3\u03b7 \u03b4\u03c5\u03bd\u03b1\u03c4\u03bf\u03c4\u03ae\u03c4\u03c9\u03bd WMS ({msg}).\n\u03a0\u03b1\u03c1\u03b1\u03ba\u03b1\u03bb\u03ce \u03b5\u03bb\u03ad\u03b3\u03be\u03c4\u03b5 \u03c4\u03bf url \u03ba\u03b1\u03b9 \u03b4\u03bf\u03ba\u03b9\u03bc\u03ac\u03c3\u03c4\u03b5 \u03be\u03b1\u03bd\u03ac.", 2275availableLayersText:"\u0394\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03b5\u03c2 \u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b5\u03c2",expanderTemplateText:"<p><b>\u03a0\u03b5\u03c1\u03af\u03bb\u03b7\u03c8\u03b7:</b> {abstract}</p>",panelTitleText:"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2",layerSelectionText:"\u0394\u03b5\u03af\u03c4\u03b5 \u03b4\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03b1\u03c0\u03cc:",doneText:"\u039f\u03bb\u03bf\u03ba\u03bb\u03b7\u03c1\u03ce\u03b8\u03b7\u03ba\u03b5", 2276uploadText:"\u0391\u03bd\u03b5\u03b2\u03ac\u03c3\u03c4\u03b5 \u0394\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1",addFeedActionMenuText:"Add feeds",searchText:"Search for layers"},"gxp.plugins.BingSource.prototype":{title:"\u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b5\u03c2 Bing",roadTitle:"\u0394\u03c1\u03cc\u03bc\u03bf\u03b9 Bing",aerialTitle:"\u0395\u03bd\u03b1\u03ad\u03c1\u03b9\u03b5\u03c2 Bing",labeledAerialTitle:"\u0395\u03bd\u03b1\u03ad\u03c1\u03b9\u03b5\u03c2 Bing \u03bc\u03b5 \u0395\u03c4\u03b9\u03ba\u03ad\u03c4\u03b5\u03c2"}, 2277"gxp.plugins.FeatureEditor.prototype":{splitButtonText:"Edit",createFeatureActionText:"Create",editFeatureActionText:"Modify",createFeatureActionTip:"\u0394\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03ae\u03c3\u03c4\u03b5 \u03ad\u03bd\u03b1 \u03bd\u03ad\u03bf \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc",editFeatureActionTip:"\u03a4\u03c1\u03bf\u03c0\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03c5\u03c0\u03ac\u03c1\u03c7\u03bf\u03bd \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc", 2278commitTitle:"Commit message",commitText:"Please enter a commit message for this edit:"},"gxp.plugins.FeatureGrid.prototype":{displayFeatureText:"\u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae \u03c3\u03c4\u03bf\u03bd \u03c7\u03ac\u03c1\u03c4\u03b7",firstPageTip:"\u03a0\u03c1\u03ce\u03c4\u03b7 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1",previousPageTip:"\u03a0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1",zoomPageExtentTip:"\u0396\u03bf\u03c5\u03bc \u03c3\u03c4\u03bf \u03b5\u03cd\u03c1\u03bf\u03c2 \u03c4\u03b7\u03c2 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1\u03c2", 2279nextPageTip:"\u0395\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1",nextPageTip:"\u03a4\u03b5\u03bb\u03b5\u03c5\u03c4\u03b1\u03af\u03b1 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1",totalMsg:"Features {1} to {2} of {0}"},"gxp.plugins.GoogleEarth.prototype":{apiKeyPrompt:"\u03a0\u03b1\u03c1\u03b1\u03ba\u03b1\u03bb\u03ce \u03b5\u03b9\u03c3\u03ac\u03b3\u03b5\u03c4\u03b5 \u03c4\u03bf Google API \u03ba\u03bb\u03b5\u03b9\u03b4\u03af \u03b3\u03b9\u03b1 ",menuText:"3D \u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae", 2280tooltip:"\u0391\u03bb\u03bb\u03ac\u03be\u03c4\u03b5 \u03c3\u03b5 3D \u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae"},"gxp.plugins.GoogleSource.prototype":{title:"\u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b5\u03c2 Google",roadmapAbstract:"\u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae \u03bf\u03b4\u03b9\u03ba\u03bf\u03cd \u03c7\u03ac\u03c1\u03c4\u03b7",satelliteAbstract:"\u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03c9\u03bd \u03b1\u03c0\u03cc \u03b4\u03bf\u03c1\u03c5\u03c6\u03cc\u03c1\u03bf", 2281hybridAbstract:"\u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03c9\u03bd \u03bc\u03b5 \u03bf\u03bd\u03cc\u03bc\u03b1\u03c4\u03b1 \u03bf\u03b4\u03ce\u03bd",terrainAbstract:"\u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae \u03bf\u03b4\u03b9\u03ba\u03bf\u03cd \u03c7\u03ac\u03c1\u03c4\u03b7 \u03bc\u03b5 \u03b1\u03bd\u03ac\u03b3\u03bb\u03c5\u03c6\u03bf \u03b5\u03b4\u03ac\u03c6\u03bf\u03c5\u03c2"},"gxp.plugins.LayerProperties.prototype":{menuText:"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 \u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2", 2282toolTip:"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 \u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2"},"gxp.plugins.LayerTree.prototype":{rootNodeText:"\u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b5\u03c2",overlayNodeText:"\u0395\u03c0\u03b9\u03c3\u03c4\u03c1\u03ce\u03bc\u03b1\u03c4\u03b1",baseNodeText:"\u03a5\u03c0\u03cc\u03b2\u03b1\u03b8\u03c1\u03b1"},"gxp.plugins.Legend.prototype":{menuText:"\u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae \u03a5\u03c0\u03bf\u03bc\u03bd\u03ae\u03bc\u03b1\u03c4\u03bf\u03c2", 2283tooltip:"\u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae \u03a5\u03c0\u03bf\u03bc\u03bd\u03ae\u03bc\u03b1\u03c4\u03bf\u03c2"},"gxp.plugins.LoadingIndicator.prototype":{loadingMapMessage:"\u03a6\u03cc\u03c1\u03c4\u03c9\u03c3\u03b7 \u03a7\u03ac\u03c1\u03c4\u03b7..."},"gxp.plugins.MapBoxSource.prototype":{title:"MapBox Layers",blueMarbleTopoB
2283athyJanTitle:"Blue Marble Topography & Bathymetry (January)",blueMarbleTopoBathyJulTitle:"Blue Marble Topography & Bathymetry (July)",blueMarbleTopoJanTitle:"Blue Marble Topography (January)", 2284blueMarbleTopoJulTitle:"Blue Marble Topography (July)",controlRoomTitle:"Control Room",geographyClassTitle:"Geography Class",naturalEarthHypsoTitle:"Natural Earth Hypsometric",naturalEarthHypsoBathyTitle:"Natural Earth Hypsometric & Bathymetry",naturalEarth1Title:"Natural Earth I",naturalEarth2Title:"Natural Earth II",worldDarkTitle:"World Dark",worldLightTitle:"World Light",worldPrintTitle:"World Print"},"gxp.plugins.Measure.prototype":{buttonText:"\u039c\u03ad\u03c4\u03c1\u03bf",lengthMenuText:"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7", 2285areaMenuText:"\u0395\u03bc\u03b2\u03b1\u03b4\u03cc\u03bd",lengthTooltip:"\u03a5\u03c0\u03bf\u03bb\u03bf\u03b3\u03af\u03c3\u03c4\u03b5 \u03b1\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7",areaTooltip:"\u03a5\u03c0\u03bf\u03bb\u03bf\u03b3\u03af\u03c3\u03c4\u03b5 \u03b5\u03bc\u03b2\u03b1\u03b4\u03cc\u03bd",measureTooltip:"\u039c\u03ad\u03c4\u03c1\u03bf"},"gxp.plugins.Navigation.prototype":{menuText:"\u039c\u03b5\u03c4\u03b1\u03ba\u03b9\u03bd\u03ae\u03c3\u03c4\u03b5 \u03a7\u03ac\u03c1\u03c4\u03b7",tooltip:"\u039c\u03b5\u03c4\u03b1\u03ba\u03b9\u03bd\u03ae\u03c3\u03c4\u03b5 \u03a7\u03ac\u03c1\u03c4\u03b7"}, 2286"gxp.plugins.NavigationHistory.prototype":{previousMenuText:"\u0396\u03bf\u03c5\u03bc \u03a3\u03c4\u03bf \u03a0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf \u0395\u03c0\u03af\u03c0\u03b5\u03b4\u03bf",nextMenuText:"\u0396\u03bf\u03c5\u03bc \u03a3\u03c4\u03bf \u0395\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf \u0395\u03c0\u03af\u03c0\u03b5\u03b4\u03bf",previousTooltip:"\u0396\u03bf\u03c5\u03bc \u03a3\u03c4\u03bf \u03a0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf \u0395\u03c0\u03af\u03c0\u03b5\u03b4\u03bf", 2287nextTooltip:"\u0396\u03bf\u03c5\u03bc \u03a3\u03c4\u03bf \u0395\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf \u0395\u03c0\u03af\u03c0\u03b5\u03b4\u03bf"},"gxp.plugins.OSMSource.prototype":{title:"\u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b5\u03c2 OpenStreetMap",mapnikAttribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",osmarenderAttribution:"\u0394\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"}, 2288"gxp.plugins.Print.prototype":{buttonText:"\u0395\u03ba\u03c4\u03cd\u03c0\u03c9\u03c3\u03b7",menuText:"\u0395\u03ba\u03c4\u03cd\u03c0\u03c9\u03c3\u03b7 \u03a7\u03ac\u03c1\u03c4\u03b7",tooltip:"\u0395\u03ba\u03c4\u03cd\u03c0\u03c9\u03c3\u03b7 \u03a7\u03ac\u03c1\u03c4\u03b7",previewText:"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03c3\u03ba\u03cc\u03c0\u03b7\u03c3\u03b7 \u0395\u03ba\u03c4\u03cd\u03c0\u03c9\u03c3\u03b7\u03c2",notAllNotPrintableText:"\u0394\u03b5\u03bd \u039c\u03c0\u03bf\u03c1\u03bf\u03cd\u03bd \u039d\u03b1 \u0395\u03ba\u03c4\u03c5\u03c0\u03c9\u03b8\u03bf\u03cd\u03bd \u038c\u03bb\u03b5\u03c2 \u039f\u03b9 \u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b5\u03c2", 2289nonePrintableText:"\u039a\u03b1\u03bc\u03af\u03b1 \u03b1\u03c0\u03cc \u03c4\u03b9\u03c2 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b5\u03c2 \u03c4\u03bf\u03c5 \u03c4\u03c1\u03ad\u03c7\u03bf\u03bd\u03c4\u03bf\u03c2 \u03c7\u03ac\u03c1\u03c4\u03b7 \u03b4\u03b5\u03bd \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03b5\u03ba\u03c4\u03c5\u03c0\u03c9\u03b8\u03b5\u03af"},"gxp.plugins.MapQuestSource.prototype":{title:"\u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b5\u03c2 MapQuest",osmAttribution:"\u03a0\u03bb\u03b1\u03ba\u03af\u03b4\u03b9\u03b1 \u03a0\u03c1\u03bf\u03c3\u03c6\u03bf\u03c1\u03ac \u03a4\u03c9\u03bd <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 2290osmTitle:"MapQuest OpenStreetMap",naipAttribution:"\u03a0\u03bb\u03b1\u03ba\u03af\u03b4\u03b9\u03b1 \u03a0\u03c1\u03bf\u03c3\u03c6\u03bf\u03c1\u03ac \u03a4\u03c9\u03bd of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>",naipTitle:"\u0395\u03b9\u03ba\u03cc\u03bd\u03b5\u03c2 MapQuest"},"gxp.plugins.QueryForm.prototype":{queryActionText:"\u0395\u03c0\u03b5\u03c1\u03ce\u03c4\u03b7\u03c3\u03b7",queryMenuText:"\u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1 \u03b5\u03c0\u03b5\u03c1\u03ce\u03c4\u03b7\u03c3\u03b7\u03c2", 2291queryActionTip:"\u039a\u03ac\u03bd\u03c4\u03b5 \u03b5\u03c0\u03b5\u03c1\u03ce\u03c4\u03b7\u03c3\u03b7 \u03c3\u03c4\u03b7\u03bd \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03b7 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1",queryByLocationText:"Query by current map extent",queryByAttributesText:"\u0395\u03c0\u03b5\u03c1\u03ce\u03c4\u03b7\u03c3\u03b7 \u03b2\u03ac\u03c3\u03b5\u03b9 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03ce\u03bd",queryMsg:"\u0393\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03b5\u03c0\u03b5\u03c1\u03ce\u03c4\u03b7\u03c3\u03b7...", 2292cancelButtonText:"\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7",noFeaturesTitle:"\u039a\u03b1\u03bd\u03ad\u03bd\u03b1 \u0391\u03c0\u03bf\u03c4\u03ad\u03bb\u03b5\u03c3\u03bc\u03b1",noFeaturesMessage:"\u0397 \u03b5\u03c0\u03b5\u03c1\u03ce\u03c4\u03b7\u03c3\u03b7 \u03c3\u03b1\u03c2 \u03b4\u03b5\u03bd \u03b5\u03c0\u03ad\u03c3\u03c4\u03c1\u03b5\u03c8\u03b5 \u03b1\u03c0\u03bf\u03c4\u03b5\u03bb\u03ad\u03c3\u03bc\u03b1\u03c4\u03b1."},"gxp.plugins.RemoveLayer.prototype":{removeMenuText:"\u039a\u03b1\u03c4\u03ac\u03c1\u03b3\u03b7\u03c3\u03b7 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2", 2293removeActionTip:"\u039a\u03b1\u03c4\u03ac\u03c1\u03b3\u03b7\u03c3\u03b7 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2"},"gxp.plugins.Styler.prototype":{menuText:"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03a3\u03c4\u03c5\u03bb",tooltip:"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c3\u03c4\u03c5\u03bb \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2"},"gxp.plugins.WMSGetFeatureInfo.prototype":{buttonText:"Identify",infoActionTip:"\u03a0\u03ac\u03c1\u03c4\u03b5 \u03a0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2 \u03a7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03bf\u03cd", 2294popupTitle:"\u03a0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2 \u03a7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03bf\u03cd"},"gxp.plugins.Zoom.prototype":{zoomMenuText:"Zoom Box",zoomInMenuText:"\u0396\u03bf\u03c5\u03bc \u039c\u03ad\u03c3\u03b1",zoomOutMenuText:"\u0396\u03bf\u03c5\u03bc \u0388\u03be\u03c9",zoomTooltip:"Zoom by dragging a box",zoomInTooltip:"\u0396\u03bf\u03c5\u03bc \u039c\u03ad\u03c3\u03b1",zoomOutTooltip:"\u0396\u03bf\u03c5\u03bc \u0388\u03be\u03c9"}, 2295"gxp.plugins.ZoomToExtent.prototype":{menuText:"\u0396\u03bf\u03c5\u03bc \u03a3\u03c4\u03bf \u039c\u03ad\u03b3\u03b9\u03c3\u03c4\u03bf \u0395\u03cd\u03c1\u03bf\u03c2",tooltip:"\u0396\u03bf\u03c5\u03bc \u03a3\u03c4\u03bf \u039c\u03ad\u03b3\u03b9\u03c3\u03c4\u03bf \u0395\u03cd\u03c1\u03bf\u03c2"},"gxp.plugins.ZoomToDataExtent.prototype":{menuText:"\u0396\u03bf\u03c5\u03bc \u03c3\u03c4\u03bf \u03b5\u03cd\u03c1\u03bf\u03c2 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2",tooltip:"\u0396\u03bf\u03c5\u03bc \u03c3\u03c4\u03bf \u03b5\u03cd\u03c1\u03bf\u03c2 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2"}, 2296"gxp.plugins.ZoomToLayerExtent.prototype":{menuText:"\u0396\u03bf\u03c5\u03bc \u03c3\u03c4\u03bf \u03b5\u03cd\u03c1\u03bf\u03c2 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2",tooltip:"\u0396\u03bf\u03c5\u03bc \u03c3\u03c4\u03bf \u03b5\u03cd\u03c1\u03bf\u03c2 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2"},"gxp.plugins.ZoomToSelectedFeatures.prototype":{menuText:"\u0396\u03bf\u03c5\u03bc \u03c3\u03c4\u03b1 \u03c3\u03c5\u03b3\u03ba\u03b5\u03ba\u03c1\u03b9\u03bc\u03ad\u03bd\u03b1 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03ac", 2297tooltip:"\u0396\u03bf\u03c5\u03bc \u03c3\u03c4\u03b1 \u03c3\u03c5\u03b3\u03ba\u03b5\u03ba\u03c1\u03b9\u03bc\u03ad\u03bd\u03b1 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03ac"},"gxp.FeatureEditPopup.prototype":{closeMsgTitle:"\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u0391\u03bb\u03bb\u03b1\u03b3\u03ce\u03bd;",closeMsg:"\u0391\u03c5\u03c4\u03cc \u03c4\u03bf \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03ad\u03c7\u03b5\u03b9 \u03c4\u03c1\u03bf\u03c0\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03b9\u03c2 \u03c0\u03bf\u03c5 \u03b4\u03b5\u03bd \u03ad\u03c7\u03bf\u03c5\u03bd \u03b1\u03c0\u03bf\u03b8\u03b7\u03ba\u03b5\u03c5\u03c4\u03b5\u03af. \u0398\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03c6\u03c5\u03bb\u03ac\u03be\u03b5\u03c4\u03b5 \u03c4\u03b9\u03c2 \u03b1\u03bb\u03bb\u03b1\u03b3\u03ad\u03c2 \u03c3\u03b1\u03c2;", 2298deleteMsgTitle:"\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae \u03a7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03bf\u03cd",deleteMsg:"\u0395\u03af\u03c3\u03c4\u03b5 \u03c3\u03af\u03b3\u03bf\u03c5\u03c1\u03bf\u03b9 \u03bf\u03c4\u03b9 \u03b8\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03b4\u03b9\u03b1\u03b3\u03c1\u03ac\u03c8\u03b5\u03c4\u03b5 \u03c4\u03bf \u03c3\u03c5\u03b3\u03ba\u03b5\u03ba\u03c1\u03b9\u03bc\u03ad\u03bd\u03bf \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc", 2299editButtonText:"\u03a4\u03c1\u03bf\u03c0\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7",editButtonTooltip:"\u039a\u03ac\u03bd\u03c4\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03c4\u03c1\u03bf\u03c0\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b9\u03bc\u03bf",deleteButtonText:"\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae",deleteButtonTooltip:"\u0394\u03b9\u03b1\u03b3\u03c1\u03ac\u03c8\u03c4\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc", 2300cancelButtonText:"\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7",cancelButtonTooltip:"\u03a3\u03c4\u03b1\u03bc\u03b1\u03c4\u03ae\u03c3\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c4\u03c1\u03bf\u03c0\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7, \u03b1\u03c0\u03bf\u03c1\u03c1\u03af\u03c0\u03c4\u03bf\u03bd\u03c4\u03b1\u03c2 \u03bf\u03c0\u03bf\u03b9\u03b5\u03c3\u03b4\u03ae\u03c0\u03bf\u03c4\u03b5 \u03b1\u03bb\u03bb\u03b1\u03b3\u03ad\u03c2",saveButtonText:"\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7", 2301saveButtonTooltip:"\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03b1\u03bb\u03bb\u03b1\u03b3\u03ce\u03bd"},"gxp.FillSymbolizer.prototype":{fillText:"\u0393\u03ad\u03bc\u03b9\u03c3\u03bc\u03b1",colorText:"\u03a7\u03c1\u03ce\u03bc\u03b1",opacityText:"\u0391\u03b4\u03b9\u03b1\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1"},"gxp.FilterBuilder.prototype":{builderTypeNames:["\u03bf\u03c0\u03bf\u03b9\u03bf\u03b4\u03ae\u03c0\u03bf\u03c4\u03b5","\u03cc\u03bb\u03b1","\u03ba\u03b1\u03bd\u03ad\u03bd\u03b1", 2302"\u03cc\u03c7\u03b9 \u03cc\u03bb\u03b1"],preComboText:"\u03a4\u03b1\u03cd\u03c4\u03b9\u03c3\u03b7",postComboText:"\u03c4\u03c9\u03bd \u03b1\u03ba\u03cc\u03bb\u03bf\u03c5\u03b8\u03c9\u03bd:",addConditionText:"\u03c0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03c3\u03c5\u03bd\u03b8\u03ae\u03ba\u03b7\u03c2",addGroupText:"\u03c0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03bf\u03bc\u03ac\u03b4\u03b1\u03c2",removeConditionText:"\u03ba\u03b1\u03c4\u03ac\u03c1\u03b3\u03b7\u03c3\u03b7 \u03c3\u03c5\u03bd\u03b8\u03ae\u03ba\u03b7\u03c2"}, 2303"gxp.grid.CapabilitiesGrid.prototype":{nameHeaderText:"\u038c\u03bd\u03bf\u03bc\u03b1",titleHeaderText:"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2",queryableHeaderText:"\u039c\u03c0\u03bf\u03c1\u03bf\u03cd\u03bd \u03bd\u03b1 \u03b3\u03af\u03bd\u03bf\u03c5\u03bd \u03b5\u03c0\u03b5\u03c1\u03c9\u03c4\u03ae\u03c3\u03b5\u03b9\u03c2",layerSelectionLabel:"\u0394\u03b5\u03af\u03c4\u03b5 \u03b4\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03b1\u03c0\u03cc:", 2304layerAdditionLabel:"\u03ae \u03c0\u03c1\u03bf\u03c3\u03b8\u03ad\u03c3\u03c4\u03b5 \u03bd\u03ad\u03bf \u03b4\u03b9\u03b1\u03ba\u03bf\u03bc\u03b9\u03c3\u03c4\u03ae.",expanderTemplateText:"<p><b>\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae:</b> {abstract}</p>"},"gxp.PointSymbolizer.prototype":{graphicCircleText:"\u03ba\u03cd\u03ba\u03bb\u03bf\u03c2",graphicSquareText:"\u03c4\u03b5\u03c4\u03c1\u03ac\u03b3\u03c9\u03bd\u03bf",graphicTriangleText:"\u03c4\u03c1\u03af\u03b3\u03c9\u03bd\u03bf",graphicStarText:"\u03b1\u03c3\u03c4\u03ad\u03c1\u03b9", 2305graphicCrossText:"\u03c3\u03c4\u03b1\u03c5\u03c1\u03cc\u03c2",graphicXText:"\u03c7",graphicExternalText:"\u03b5\u03be\u03c9\u03c4\u03b5\u03c1\u03b9\u03ba\u03cc",urlText:"URL",opacityText:"\u03b1\u03b4\u03b9\u03b1\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1",symbolText:"\u03a3\u03cd\u03bc\u03b2\u03bf\u03bb\u03bf",sizeText:"\u0395\u03cd\u03c1\u03bf\u03c2",rotationText:"\u03a0\u03b5\u03c1\u03b9\u03c3\u03c4\u03c1\u03bf\u03c6\u03ae"},"gxp.QueryPanel.prototype":{queryByLocationText:"\u0395\u03c0\u03b5\u03c1\u03ce\u03c4\u03b7\u03c3\u03b7 \u03b2\u03ac\u03c3\u03b5\u03b9 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c3\u03af\u03b1\u03c2", 2306currentTextText:"\u03a4\u03c1\u03ad\u03c7\u03bf\u03bd \u03b5\u03cd\u03c1\u03bf\u03c2",queryByAttributesText:"\u0395\u03c0\u03b5\u03c1\u03ce\u03c4\u03b7\u03c3\u03b7 \u03b2\u03ac\u03c3\u03b5\u03b9 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03ce\u03bd",layerText:"\u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1"},"gxp.RulePanel.prototype":{scaleSliderTemplate:"{scaleType} \u039a\u03bb\u03af\u03bc\u03b1\u03ba\u03b1 1:{scale}",labelFeaturesText:"\u03a7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03ac \u0395\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2", 2307labelsText:"\u0395\u03c4\u03b9\u03ba\u03ad\u03c4\u03b5\u03c2",basicText:"\u0391\u03c0\u03bb\u03ae",advancedText:"\u03a0\u03c1\u03bf\u03b7\u03b3\u03bc\u03ad\u03bd\u03b7",limitByScaleText:"\u03a0\u03b5\u03c1\u03b9\u03bf\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9 \u03ba\u03bb\u03af\u03bc\u03b1\u03ba\u03b1\u03c2",limitByConditionText:"\u03a0\u03b5\u03c1\u03b9\u03bf\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9 \u03c3\u03c5\u03bd\u03b8\u03ae\u03ba\u03b7\u03c2", 2308symbolText:"\u03a3\u03cd\u03bc\u03b2\u03bf\u03bb\u03bf",nameText:"\u038c\u03bd\u03bf\u03bc\u03b1"},"gxp.ScaleLimitPanel.prototype":{scaleSliderTemplate:"{scaleType} \u039a\u03bb\u03af\u03bc\u03b1\u03ba\u03b1 1:{scale}",minScaleLimitText:"\u038c\u03c1\u03b9\u03bf \u03b5\u03bb\u03ac\u03c7\u03b9\u03c3\u03c4\u03b7\u03c2 \u03ba\u03bb\u03af\u03bc\u03b1\u03ba\u03b1\u03c2",maxScaleLimitText:"\u038c\u03c1\u03b9\u03bf \u03bc\u03ad\u03b3\u03b9\u03c3\u03c4\u03b7\u03c2 \u03ba\u03bb\u03af\u03bc\u03b1\u03ba\u03b1\u03c2"}, 2309"gxp.StrokeSymbolizer.prototype":{solidStrokeName:"\u03c3\u03c5\u03bc\u03c0\u03b1\u03b3\u03ae\u03c2",dashStrokeName:"\u03bc\u03b5 \u03c0\u03b1\u03cd\u03bb\u03b5\u03c2",dotStrokeName:"\u03bc\u03b5 \u03ba\u03bf\u03c5\u03ba\u03af\u03b4\u03b5\u03c2",titleText:"\u03a0\u03ad\u03c1\u03b1\u03c3\u03bc\u03b1",styleText:"\u03a3\u03c4\u03cd\u03bb\u03bf",colorText:"\u03a7\u03c1\u03ce\u03bc\u03b1",widthText:"\u03a0\u03bb\u03ac\u03c4\u03bf\u03c2",opacityText:"\u0391\u03b4\u03b9\u03b1\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1"}, 2310"gxp.StylePropertiesDialog.prototype":{titleText:"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac",
2310nameFieldText:"\u038c\u03bd\u03bf\u03bc\u03b1",titleFieldText:"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2",abstractFieldText:"\u03a0\u03b5\u03c1\u03af\u03bb\u03b7\u03c8\u03b7"},"gxp.TextSymbolizer.prototype":{labelValuesText:"\u03a4\u03b9\u03bc\u03ad\u03c2 \u03b5\u03c4\u03b9\u03ba\u03ad\u03c4\u03b1\u03c2",haloText:"\u03a6\u03c9\u03c4\u03bf\u03c3\u03c4\u03ad\u03c6\u03b1\u03bd\u03bf",sizeText:"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2"}, 2311"gxp.WMSLayerPanel.prototype":{aboutText:"\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5",titleText:"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2",nameText:"\u038c\u03bd\u03bf\u03bc\u03b1",descriptionText:"\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae",displayText:"\u03a0\u03c1\u03bf\u03b2\u03bf\u03bb\u03ae",opacityText:"\u0391\u03b4\u03b9\u03b1\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1",formatText:"\u03a4\u03cd\u03c0\u03bf\u03c2",transparentText:"\u0394\u03b9\u03b1\u03c6\u03b1\u03bd\u03ad\u03c2", 2312cacheText:"Cache",cacheFieldText:"\u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b5 \u03c4\u03b7\u03bd cached \u03ad\u03ba\u03b4\u03bf\u03c3\u03b7",stylesText:"\u0394\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03b5\u03c2 \u03a3\u03c4\u03c5\u03bb",infoFormatText:"Info format",infoFormatEmptyText:"Select a format",displayOptionsText:"Display options",queryText:"Limit with filters",scaleText:"Limit by scale",minScaleText:"Min scale",maxScaleText:"Max scale",switchToFilterBuilderText:"Switch back to filter builder", 2313cqlPrefixText:"or ",cqlText:"use CQL filter instead",singleTileText:"Single tile",singleTileFieldText:"Use a single tile"},"gxp.EmbedMapDialog.prototype":{publishMessage:"\u039f \u03c7\u03ac\u03c1\u03c4\u03b7\u03c2 \u03c3\u03b1\u03c2 \u03b5\u03af\u03bd\u03b1\u03b9 \u03ad\u03c4\u03bf\u03b9\u03bc\u03bf\u03c2 \u03bd\u03b1 \u03b4\u03b7\u03bc\u03bf\u03c3\u03b9\u03b5\u03c5\u03c4\u03b5\u03af \u03c3\u03c4\u03bf \u03b4\u03b9\u03b1\u03b4\u03af\u03ba\u03c4\u03c5\u03bf! \u0391\u03c0\u03bb\u03ac \u03b1\u03bd\u03c4\u03b9\u03b3\u03c1\u03ac\u03c8\u03c4\u03b5 \u03c4\u03bf\u03bd \u03b1\u03ba\u03cc\u03bb\u03bf\u03c5\u03b8\u03bf HTML \u03ba\u03ce\u03b4\u03b9\u03ba\u03b1 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03b5\u03bd\u03c3\u03c9\u03bc\u03b1\u03c4\u03ce\u03c3\u03b5\u03c4\u03b5 \u03c4\u03bf\u03bd \u03c7\u03ac\u03c1\u03c4\u03b7 \u03c3\u03c4\u03b7\u03bd \u03b9\u03c3\u03c4\u03bf\u03c3\u03b5\u03bb\u03af\u03b4\u03b1 \u03c3\u03b1\u03c2:", 2314heightLabel:"\u038e\u03c8\u03bf\u03c2",widthLabel:"\u03a0\u03bb\u03ac\u03c4\u03bf\u03c2",mapSizeLabel:"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u03a7\u03ac\u03c1\u03c4\u03b7",miniSizeLabel:"\u039c\u03b9\u03ba\u03c1\u03bf\u03b3\u03c1\u03b1\u03c6\u03af\u03b1",smallSizeLabel:"\u039c\u03b9\u03ba\u03c1\u03cc",premiumSizeLabel:"\u0395\u03be\u03b1\u03b9\u03c1\u03b5\u03c4\u03b9\u03ba\u03ac \u03c0\u03bf\u03b9\u03bf\u03c4\u03b9\u03ba\u03cc",largeSizeLabel:"\u039c\u03b5\u03b3\u03ac\u03bb\u03bf\u03c2"},"gxp.WMSStylesDialog.prototype":{addStyleText:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7", 2315addStyleTip:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03bd\u03ad\u03bf\u03c5 \u03c3\u03c4\u03c5\u03bb",chooseStyleText:"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03c3\u03c4\u03c5\u03bb",deleteStyleText:"\u0391\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7",deleteStyleTip:"\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae \u03c4\u03bf\u03c5 \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03c5\u03bb",editStyleText:"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1", 2316editStyleTip:"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c4\u03bf\u03c5 \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03c5\u03bb",duplicateStyleText:"\u0394\u03b9\u03c0\u03bb\u03cc\u03c4\u03c5\u03c0\u03bf",duplicateStyleTip:"\u03a6\u03c4\u03b9\u03ac\u03be\u03c4\u03b5 \u03b4\u03b9\u03c0\u03bb\u03cc\u03c4\u03c5\u03c0\u03bf \u03c4\u03bf\u03c5 \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03cd\u03bb",addRuleText:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7", 2317addRuleTip:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03bd\u03ad\u03bf\u03c5 \u03ba\u03b1\u03bd\u03cc\u03bd\u03b1",newRuleText:"\u039d\u03ad\u03bf\u03c2 \u039a\u03b1\u03bd\u03cc\u03bd\u03b1\u03c2",deleteRuleText:"\u0391\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7",deleteRuleTip:"\u0394\u03b9\u03b1\u03b3\u03c1\u03ac\u03c8\u03c4\u03b5 \u03c4\u03bf\u03bd \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf \u03ba\u03b1\u03bd\u03cc\u03bd\u03b1",editRuleText:"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1", 2318editRuleTip:"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03c4\u03b5\u03af\u03c4\u03b5 \u03c4\u03bf\u03bd \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf \u03ba\u03b1\u03bd\u03cc\u03bd\u03b1",duplicateRuleText:"\u0394\u03b9\u03c0\u03bb\u03cc\u03c4\u03c5\u03c0\u03bf",duplicateRuleTip:"\u03a6\u03c4\u03b9\u03ac\u03be\u03c4\u03b5 \u03b4\u03b9\u03c0\u03bb\u03cc\u03c4\u03c5\u03c0\u03bf \u03c4\u03bf\u03c5 \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c5 \u03ba\u03b1\u03bd\u03cc\u03bd\u03b1", 2319cancelText:"\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7",saveText:"\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7",styleWindowTitle:"\u03a3\u03c4\u03c5\u03bb \u03a7\u03c1\u03ae\u03c3\u03c4\u03b7: {0}",ruleWindowTitle:"\u039a\u03b1\u03bd\u03cc\u03bd\u03b5\u03c2 \u03a3\u03c4\u03c5\u03bb: {0}",stylesFieldsetTitle:"\u03a3\u03c4\u03c5\u03bb",rulesFieldsetTitle:"\u039a\u03b1\u03bd\u03cc\u03bd\u03b5\u03c2"},"gxp.LayerUploadPanel.prototype":{titleLabel:"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2", 2320titleEmptyText:"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2 \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2",abstractLabel:"\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae",abstractEmptyText:"\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03b5\u03c0\u03b9\u03c6\u03ac\u03bd\u03b5\u03b9\u03b1\u03c2",fileLabel:"\u0394\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1",fieldEmptyText:"\u0392\u03c1\u03b5\u03af\u03c4\u03b5 \u03c4\u03bf \u03bc\u03bf\u03bd\u03bf\u03c0\u03ac\u03c4\u03b9 \u03b3\u03b9\u03b1 \u03ad\u03bd\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd...", 2321uploadText:"\u0391\u03bd\u03ad\u03b2\u03b1\u03c3\u03bc\u03b1",uploadFailedText:"Upload failed",processingUploadText:"Processing upload...",waitMsgText:"\u03a4\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03c3\u03b1\u03c2 \u03b1\u03bd\u03b5\u03b2\u03b1\u03af\u03bd\u03bf\u03c5\u03bd...",invalidFileExtensionText:"\u039f \u03c4\u03cd\u03c0\u03bf\u03c2 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03ad\u03bd\u03b1\u03c2 \u03b1\u03c0\u03cc \u03c4\u03bf\u03c5\u03c2: ", 2322optionsText:"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2",workspaceLabel:"\u03a7\u03ce\u03c1\u03bf\u03c2 \u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1\u03c2",workspaceEmptyText:"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c2 \u03c7\u03ce\u03c1\u03bf\u03c2 \u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1\u03c2",dataStoreLabel:"\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b7",dataStoreEmptyText:"Create new store",defaultDataStoreEmptyText:"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03b7 \u03b1\u03c0\u03bf\u03b8\u03ae\u03ba\u03b7"}, 2323"gxp.NewSourceWindow.prototype":{title:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u039d\u03ad\u03bf\u03c5 \u0394\u03b9\u03b1\u03ba\u03bf\u03bc\u03b9\u03c3\u03c4\u03ae...",cancelText:"\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7",addServerText:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u0394\u03b9\u03b1\u03ba\u03bf\u03bc\u03b9\u03c3\u03c4\u03ae",invalidURLText:"\u0395\u03af\u03c3\u03b1\u03b3\u03b5\u03c4\u03b5 \u03ad\u03bd\u03b1 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf URL \u03b3\u03b9\u03b1 \u03ad\u03bd\u03b1 WMS endpoint (e.g. http://example.com/geoserver/wms)", 2324contactingServerText:"\u0395\u03c0\u03b9\u03ba\u03bf\u03b9\u03bd\u03c9\u03bd\u03af\u03b1 \u03bc\u03b5 \u0394\u03b9\u03b1\u03ba\u03bf\u03bc\u03b9\u03c3\u03c4\u03ae..."},"gxp.ScaleOverlay.prototype":{zoomLevelText:"\u0395\u03c0\u03af\u03c0\u03b5\u03b4\u03bf \u03b6\u03bf\u03c5\u03bc"},"gxp.Viewer.prototype":{saveErrorText:"Trouble saving: "},"gxp.FeedSourceDialog.prototype":{feedTypeText:"\u03a0\u03b7\u03b3\u03ae",addPicasaText:"\u03a6\u03c9\u03c4\u03bf\u03b3\u03c1\u03b1\u03c6\u03af\u03b5\u03c2 Picasa", 2325addYouTubeText:"YouTube \u03b2\u03af\u03bd\u03c4\u03b5\u03bf",addRSSText:"\u0386\u03bb\u03bb\u03b1 Feed GeoRSS",addFeedText:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03c3\u03c4\u03bf \u03c7\u03ac\u03c1\u03c4\u03b7",addTitleText:"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2",keywordText:"\u039b\u03ad\u03be\u03b7-\u03ba\u03bb\u03b5\u03b9\u03b4\u03af",doneText:"Done",titleText:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03c1\u03bf\u03ae\u03c2",maxResultsText:"Max \u0395\u03af\u03b4\u03b7"}}); 2326GeoExt.Lang.add("en",{"gxp.menu.LayerMenu.prototype":{layerText:"Layer"},"gxp.plugins.AddLayers.prototype":{addActionMenuText:"Add layers",addActionTip:"Add layers",addServerText:"Add a New Server",addButtonText:"Add layers",untitledText:"Untitled",addLayerSourceErrorText:"Error getting WMS capabilities ({msg}).\nPlease check the url and try again.",availableLayersText:"Available Layers",expanderTemplateText:"<p><b>Abstract:</b> {abstract}</p>",panelTitleText:"Title",layerSelectionText:"View available data from:", 2327doneText:"Done",uploadText:"Upload layers",addFeedActionMenuText:"Add feeds",searchText:"Search for layers"},"gxp.plugins.BingSource.prototype":{title:"Bing Layers",roadTitle:"Bing Roads",aerialTitle:"Bing Aerial",labeledAerialTitle:"Bing Aerial With Labels"},"gxp.plugins.FeatureEditor.prototype":{splitButtonText:"Edit",createFeatureActionText:"Create",editFeatureActionText:"Modify",createFeatureActionTip:"Create a new feature",editFeatureActionTip:"Edit existing feature",commitTitle:"Commit message", 2328commitText:"Please enter a commit message for this edit:"},"gxp.plugins.FeatureGrid.prototype":{displayFeatureText:"Display on map",firstPageTip:"First page",previousPageTip:"Previous page",zoomPageExtentTip:"Zoom to page extent",nextPageTip:"Next page",lastPageTip:"Last page",totalMsg:"Features {1} to {2} of {0}"},"gxp.plugins.GoogleEarth.prototype":{menuText:"3D Viewer",tooltip:"Switch to 3D Viewer"},"gxp.plugins.GoogleSource.prototype":{title:"Google Layers",roadmapAbstract:"Show street map",satelliteAbstract:"Show satellite imagery", 2329hybridAbstract:"Show imagery with street names",terrainAbstract:"Show street map with terrain"},"gxp.plugins.LayerProperties.prototype":{menuText:"Layer Properties",toolTip:"Layer Properties"},"gxp.plugins.LayerTree.prototype":{shortTitle:"Layers",rootNodeText:"Layers",overlayNodeText:"Overlays",baseNodeText:"Base Layers"},"gxp.plugins.LayerManager.prototype":{baseNodeText:"Base Maps"},"gxp.plugins.Legend.prototype":{menuText:"Show legend",tooltip:"Show legend"},"gxp.plugins.LoadingIndicator.prototype":{loadingMapMessage:"Loading map..."}, 2330"gxp.plugins.MapBoxSource.prototype":{title:"MapBox Layers",blueMarbleTopoB
2330athyJanTitle:"Blue Marble Topography & Bathymetry (January)",blueMarbleTopoBathyJulTitle:"Blue Marble Topography & Bathymetry (July)",blueMarbleTopoJanTitle:"Blue Marble Topography (January)",blueMarbleTopoJulTitle:"Blue Marble Topography (July)",controlRoomTitle:"Control Room",geographyClassTitle:"Geography Class",naturalEarthHypsoTitle:"Natural Earth Hypsometric",naturalEarthHypsoBathyTitle:"Natural Earth Hypsometric & Bathymetry", 2331naturalEarth1Title:"Natural Earth I",naturalEarth2Title:"Natural Earth II",worldDarkTitle:"World Dark",worldLightTitle:"World Light",worldPrintTitle:"World Print"},"gxp.plugins.Measure.prototype":{buttonText:"Measure",lengthMenuText:"Length",areaMenuText:"Area",lengthTooltip:"Measure length",areaTooltip:"Measure area",measureTooltip:"Measure"},"gxp.plugins.Navigation.prototype":{menuText:"Pan map",tooltip:"Pan map"},"gxp.plugins.NavigationHistory.prototype":{previousMenuText:"Zoom to previous extent", 2332nextMenuText:"Zoom to next extent",previousTooltip:"Zoom to previous extent",nextTooltip:"Zoom to next extent"},"gxp.plugins.OSMSource.prototype":{title:"OpenStreetMap Layers",mapnikAttribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",osmarenderAttribution:"Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"},"gxp.plugins.Print.prototype":{buttonText:"Print",menuText:"Print map",tooltip:"Print map",previewText:"Print Preview",notAllNotPrintableText:"Not All Layers Can Be Printed", 2333nonePrintableText:"None of your current map layers can be printed"},"gxp.plugins.MapQuestSource.prototype":{title:"MapQuest Layers",osmAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>",osmTitle:"MapQuest OpenStreetMap",naipAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 2334naipTitle:"MapQuest Imagery"},"gxp.plugins.QueryForm.prototype":{queryActionText:"Query",queryMenuText:"Query layer",queryActionTip:"Query the selected layer",queryByLocationText:"Query by current map extent",queryByAttributesText:"Query by attributes",queryMsg:"Querying...",cancelButtonText:"Cancel",noFeaturesTitle:"No Match",noFeaturesMessage:"Your query did not return any results."},"gxp.plugins.RemoveLayer.prototype":{removeMenuText:"Remove layer",removeActionTip:"Remove layer"},"gxp.plugins.Styler.prototype":{menuText:"Layer Styles", 2335tooltip:"Layer Styles"},"gxp.plugins.WMSGetFeatureInfo.prototype":{buttonText:"Identify",infoActionTip:"Get Feature Info",popupTitle:"Feature Info"},"gxp.plugins.Zoom.prototype":{zoomMenuText:"Zoom box",zoomInMenuText:"Zoom in",zoomOutMenuText:"Zoom out",zoomTooltip:"Zoom by dragging a box",zoomInTooltip:"Zoom in",zoomOutTooltip:"Zoom out"},"gxp.plugins.ZoomToExtent.prototype":{menuText:"Zoom to max extent",tooltip:"Zoom to max extent"},"gxp.plugins.ZoomToDataExtent.prototype":{menuText:"Zoom to layer extent", 2336tooltip:"Zoom to layer extent"},"gxp.plugins.ZoomToLayerExtent.prototype":{menuText:"Zoom to layer extent",tooltip:"Zoom to layer extent"},"gxp.plugins.ZoomToSelectedFeatures.prototype":{menuText:"Zoom to selected features",tooltip:"Zoom to selected features"},"gxp.FeatureEditPopup.prototype":{closeMsgTitle:"Save Changes?",closeMsg:"This feature has unsaved changes. Would you like to save your changes?",deleteMsgTitle:"Delete Feature?",deleteMsg:"Are you sure you want to delete this feature?",editButtonText:"Edit", 2337editButtonTooltip:"Make this feature editable",deleteButtonText:"Delete",deleteButtonTooltip:"Delete this feature",cancelButtonText:"Cancel",cancelButtonTooltip:"Stop editing, discard changes",saveButtonText:"Save",saveButtonTooltip:"Save changes"},"gxp.FillSymbolizer.prototype":{fillText:"Fill",colorText:"Color",opacityText:"Opacity"},"gxp.FilterBuilder.prototype":{builderTypeNames:["any","all","none","not all"],preComboText:"Match",postComboText:"of the following:",addConditionText:"add condition", 2338addGroupText:"add group",removeConditionText:"remove condition"},"gxp.grid.CapabilitiesGrid.prototype":{nameHeaderText:"Name",titleHeaderText:"Title",queryableHeaderText:"Queryable",layerSelectionLabel:"View available data from:",layerAdditionLabel:"or add a new server.",expanderTemplateText:"<p><b>Abstract:</b> {abstract}</p>"},"gxp.PointSymbolizer.prototype":{graphicCircleText:"circle",graphicSquareText:"square",graphicTriangleText:"triangle",graphicStarText:"star",graphicCrossText:"cross",graphicXText:"x", 2339graphicExternalText:"external",urlText:"URL",opacityText:"opacity",symbolText:"Symbol",sizeText:"Size",rotationText:"Rotation"},"gxp.QueryPanel.prototype":{queryByLocationText:"Query by location",currentTextText:"Current extent",queryByAttributesText:"Query by attributes",layerText:"Layer"},"gxp.RulePanel.prototype":{scaleSliderTemplate:"{scaleType} Scale 1:{scale}",labelFeaturesText:"Label Features",labelsText:"Labels",basicText:"Basic",advancedText:"Advanced",limitByScaleText:"Limit by scale",limitByConditionText:"Limit by condition", 2340symbolText:"Symbol",nameText:"Name"},"gxp.ScaleLimitPanel.prototype":{scaleSliderTemplate:"{scaleType} Scale 1:{scale}",minScaleLimitText:"Min scale limit",maxScaleLimitText:"Max scale limit"},"gxp.StrokeSymbolizer.prototype":{solidStrokeName:"solid",dashStrokeName:"dash",dotStrokeName:"dot",titleText:"Stroke",styleText:"Style",colorText:"Color",widthText:"Width",opacityText:"Opacity"},"gxp.StylePropertiesDialog.prototype":{titleText:"General",nameFieldText:"Name",titleFieldText:"Title",abstractFieldText:"Abstract"}, 2341"gxp.TextSymbolizer.prototype":{labelValuesText:"Label values",haloText:"Halo",sizeText:"Size"},"gxp.WMSLayerPanel.prototype":{aboutText:"About",titleText:"Title",nameText:"Name",descriptionText:"Description",displayText:"Display",opacityText:"Opacity",formatText:"Format",transparentText:"Trans
2341parent",cacheText:"Cache",cacheFieldText:"Use cached version",stylesText:"Available Styles",infoFormatText:"Info format",infoFormatEmptyText:"Select a format",displayOptionsText:"Display options",queryText:"Limit with filters", 2342scaleText:"Limit by scale",minScaleText:"Min scale",maxScaleText:"Max scale",switchToFilterBuilderText:"Switch back to filter builder",cqlPrefixText:"or ",cqlText:"use CQL filter instead",singleTileText:"Single tile",singleTileFieldText:"Use a single tile"},"gxp.EmbedMapDialog.prototype":{publishMessage:"Your map is ready to be published to the web! Simply copy the following HTML to embed the map in your website:",heightLabel:"Height",widthLabel:"Width",mapSizeLabel:"Map Size",miniSizeLabel:"Mini", 2343smallSizeLabel:"Small",premiumSizeLabel:"Premium",largeSizeLabel:"Large"},"gxp.WMSStylesDialog.prototype":{addStyleText:"Add",addStyleTip:"Add a new style",chooseStyleText:"Choose style",deleteStyleText:"Remove",deleteStyleTip:"Delete the selected style",editStyleText:"Edit",editStyleTip:"Edit the selected style",duplicateStyleText:"Duplicate",duplicateStyleTip:"Duplicate the selected style",addRuleText:"Add",addRuleTip:"Add a new rule",newRuleText:"New Rule",deleteRuleText:"Remove",deleteRuleTip:"Delete the selected rule", 2344editRuleText:"Edit",editRuleTip:"Edit the selected rule",duplicateRuleText:"Duplicate",duplicateRuleTip:"Duplicate the selected rule",cancelText:"Cancel",saveText:"Save",styleWindowTitle:"User Style: {0}",ruleWindowTitle:"Style Rule: {0}",stylesFieldsetTitle:"Styles",rulesFieldsetTitle:"Rules"},"gxp.LayerUploadPanel.prototype":{titleLabel:"Title",titleEmptyText:"Layer title",abstractLabel:"Description",abstractEmptyText:"Layer description",fileLabel:"Data",fieldEmptyText:"Browse for data archive...", 2345uploadText:"Upload",uploadFailedText:"Upload failed",processingUploadText:"Processing upload...",waitMsgText:"Uploading your data...",invalidFileExtensionText:"File extension must be one of: ",optionsText:"Options",workspaceLabel:"Workspace",workspaceEmptyText:"Default workspace",dataStoreLabel:"Store",dataStoreEmptyText:"Create new store",defaultDataStoreEmptyText:"Default data store"},"gxp.NewSourceDialog.prototype":{title:"Add new server...",cancelText:"Cancel",addServerText:"Add Server",invalidURLText:"Enter a valid URL to a WMS endpoint (e.g. http://example.com/geoserver/wms)", 2346contactingServerText:"Contacting Server..."},"gxp.ScaleOverlay.prototype":{zoomLevelText:"Zoom level"},"gxp.Viewer.prototype":{saveErrorText:"Trouble saving: "},"gxp.FeedSourceDialog.prototype":{feedTypeText:"Source",addPicasaText:"Picasa Photos",addYouTubeText:"YouTube Videos",addRSSText:"Other GeoRSS Feed",addFeedText:"Add to Map",addTitleText:"Title",keywordText:"Keyword",doneText:"Done",titleText:"Add Feeds",maxResultsText:"Max Items"}}); 2347GeoExt.Lang.add("es",{"gxp.menu.LayerMenu.prototype":{layerText:"Capa"},"gxp.plugins.AddLayers.prototype":{addActionMenuText:"A\u00f1adir Capas",addActionTip:"A\u00f1adir Capas",addServerText:"A\u00f1adir servidor",addButtonText:"A\u00f1adir Capas",untitledText:"Sin T\u00edtulo",addLayerSourceErrorText:"Error obteniendo capabilities de WMS ({msg}).\nPor favor, compruebe la URL y vuelva a intentarlo.",availableLayersText:"Capas disponibles",expanderTemplateText:"<p><b>Resumen:</b> {abstract}</p>", 2348panelTitleText:"T\u00edtulo",layerSelectionText:"Ver datos disponibles de:",doneText:"Hecho",uploadText:"Subir Datos",addFeedActionMenuText:"Add feeds",searchText:"Search for layers"},"gxp.plugins.BingSource.prototype":{title:"Capas Bing",roadTitle:"Bing Carreteras",aerialTitle:"Bing Foto A\u00e9rea",labeledAerialTitle:"Bing H\u00edbrido"},"gxp.plugins.FeatureEditor.prototype":{splitButtonText:"Edit",createFeatureActionText:"Create",editFeatureActionText:"Modify",createFeatureActionTip:"Crear nuevo elemento", 2349editFeatureActionTip:"Editar elemento existente",commitTitle:"Commit message",commitText:"Please enter a commit message for this edit:"},"gxp.plugins.FeatureGrid.prototype":{displayFeatureText:"Mostrar en el mapa",firstPageTip:"Primera p\u00e1gina",previousPageTip:"P\u00e1gina anterior",zoomPageExtentTip:"Zoom a la extensi\u00f3n de la p\u00e1gina",nextPageTip:"P\u00e1gina siguiente",lastPageTip:"\u00daltima p\u00e1gina",totalMsg:"Features {1} to {2} of {0}"},"gxp.plugins.GoogleEarth.prototype":{menuText:"Vista 3D", 2350tooltip:"Vista 3D"},"gxp.plugins.GoogleSource.prototype":{title:"Capas Google",roadmapAbstract:"Mostrar Callejero",satelliteAbstract:"Mostrar im\u00e1genes a\u00e9reas",hybridAbstract:"Mostrar im\u00e1genes con nombres de calle",terrainAbstract:"Mostrar callejero con terreno"},"gxp.plugins.LayerProperties.prototype":{menuText:"Propiedades de la capa",toolTip:"Propiedades de la capa"},"gxp.plugins.LayerTree.prototype":{shortTitle:"Capas",rootNodeText:"Capas",overlayNodeText:"Capas superpuestas",baseNodeText:"Capa base"}, 2351"gxp.plugins.LayerManager.prototype":{baseNodeText:"Capa base"},"gxp.plugins.Legend.prototype":{menuText:"Leyenda",tooltip:"Leyenda"},"gxp.plugins.LoadingIndicator.prototype":{loadingMapMessage:"Loading Map..."},"gxp.plugins.MapBoxSource.prototype":{title:"MapBox Layers",blueMarbleTopoB
2351athyJanTitle:"Blue Marble Topography & Bathymetry (January)",blueMarbleTopoBathyJulTitle:"Blue Marble Topography & Bathymetry (July)",blueMarbleTopoJanTitle:"Blue Marble Topography (January)",blueMarbleTopoJulTitle:"Blue Marble Topography (July)", 2352controlRoomTitle:"Control Room",geographyClassTitle:"Geography Class",naturalEarthHypsoTitle:"Natural Earth Hypsometric",naturalEarthHypsoBathyTitle:"Natural Earth Hypsometric & Bathymetry",naturalEarth1Title:"Natural Earth I",naturalEarth2Title:"Natural Earth II",worldDarkTitle:"World Dark",worldLightTitle:"World Light",worldPrintTitle:"World Print"},"gxp.plugins.Measure.prototype":{buttonText:"Medir",lengthMenuText:"Longitud",areaMenuText:"\u00c1rea",lengthTooltip:"Medir Longitud",areaTooltip:"Medir \u00c1rea", 2353measureTooltip:"Medir"},"gxp.plugins.Navigation.prototype":{menuText:"Desplazar mapa",tooltip:"Desplazar mapa"},"gxp.plugins.NavigationHistory.prototype":{previousMenuText:"Vista anterior",nextMenuText:"Vista siguiente",previousTooltip:"Vista anterior",nextTooltip:"Vista siguiente"},"gxp.plugins.OSMSource.prototype":{title:"Capas OpenStreetMap",mapnikAttribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",osmarenderAttribution:"Datos CC-By-SA de <a href='http://openstreetmap.org/'>OpenStreetMap</a>"}, 2354"gxp.plugins.Print.prototype":{buttonText:"Imprimir",menuText:"Imprimir mapa",tooltip:"Imprimir mapa",previewText:"Vista previa",notAllNotPrintableText:"No se pueden imprimir todas las capas",nonePrintableText:"No se puede imprimir ninguna de las capas del mapa"},"gxp.plugins.MapQuestSource.prototype":{title:"Capas MapQuest",osmAttribution:"Teselas cortes\u00eda de <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 2355osmTitle:"MapQuest OpenStreetMap",naipAttribution:"Teselas cortes\u00eda de <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>",naipTitle:"MapQuest Im\u00e1genes"},"gxp.plugins.QueryForm.prototype":{queryActionText:"Consultar",queryMenuText:"Consultar capa",queryActionTip:"Consultar la capa seleccionada",queryByLocationText:"Query by current map extent",queryByAttributesText:"Consultar por atributos",queryMsg:"Consultando...", 2356cancelButtonText:"Cancelar",noFeaturesTitle:"Sin coincidencias",noFeaturesMessage:"Su consulta no produjo resultados."},"gxp.plugins.RemoveLayer.prototype":{removeMenuText:"Eliminar Capa",removeActionTip:"Eliminar Capa"},"gxp.plugins.Styler.prototype":{menuText:"Editar estilos",tooltip:"Gestionar estilos de capa"},"gxp.plugins.WMSGetFeatureInfo.prototype":{buttonText:"Identify",infoActionTip:"Consultar elementos",popupTitle:"Informaci\u00f3n de elementos"},"gxp.plugins.Zoom.prototype":{zoomMenuText:"Zoom Box", 2357zoomInMenuText:"Acercar",zoomOutMenuText:"Alejar",zoomTooltip:"Zoom by dragging a box",zoomInTooltip:"Acercar",zoomOutTooltip:"Alejar"},"gxp.plugins.ZoomToExtent.prototype":{menuText:"Ver extensi\u00f3n total",tooltip:"Ver extensi\u00f3n total"},"gxp.plugins.ZoomToDataExtent.prototype":{menuText:"Ver toda la capa",tooltip:"Ver toda la capa"},"gxp.plugins.ZoomToLayerExtent.prototype":{menuText:"Ver toda la la capa",tooltip:"Ver toda la capa"},"gxp.plugins.ZoomToSelectedFeatures.prototype":{menuText:"Ver los elementos seleccionados", 2358tooltip:"Ver los elementos seleccionados"},"gxp.FeatureEditPopup.prototype":{closeMsgTitle:"\u00bfDesea guardar los cambios?",closeMsg:"Los cambios en este elemento no se han guardado. \u00bfDesea guardar los cambios?",deleteMsgTitle:"\u00bfDesea borrar el elemento?",deleteMsg:"\u00bfEst\u00e1 seguro de querer borrar este elemento?",editButtonText:"Editar",editButtonTooltip:"Hacer editable este elemento",deleteButtonText:"Borrar",deleteButtonTooltip:"Borrar este elemento",cancelButtonText:"Cancelar", 2359cancelButtonTooltip:"Dejar de editar, descartar cambios",saveButtonText:"Guardar",saveButtonTooltip:"Guardar cambios"},"gxp.FillSymbolizer.prototype":{fillText:"Relleno",colorText:"Color",opacityText:"Opacidad"},"gxp.FilterBuilder.prototype":{builderTypeNames:["cualquiera de","todas","ninguna de","no todas"],preComboText:"Cumplir",postComboText:"las condiciones siguientes:",addConditionText:"a\u00f1
2359adir condici\u00f3n",addGroupText:"a\u00f1adir grupo",removeConditionText:"eliminar condici\u00f3n"}, 2360"gxp.grid.CapabilitiesGrid.prototype":{nameHeaderText:"Nombre",titleHeaderText:"T\u00edtulo",queryableHeaderText:"Consultable",layerSelectionLabel:"Ver datos disponibles de:",layerAdditionLabel:"o a\u00f1adir otro servidor.",expanderTemplateText:"<p><b>Resumen:</b> {abstract}</p>"},"gxp.PointSymbolizer.prototype":{graphicCircleText:"c\u00edrculo",graphicSquareText:"cuadrado",graphicTriangleText:"tri\u00e1ngulo",graphicStarText:"estrella",graphicCrossText:"cruz",graphicXText:"x",graphicExternalText:"externo", 2361urlText:"URL",opacityText:"opacidad",symbolText:"S\u00edmbolo",sizeText:"Tama\u00f1o",rotationText:"Giro"},"gxp.QueryPanel.prototype":{queryByLocationText:"Consultar por localizaci\u00f3n",currentTextText:"Extensi\u00f3n actual",queryByAttributesText:"Consultar por atributo",layerText:"Capa"},"gxp.RulePanel.prototype":{scaleSliderTemplate:"{scaleType} Escala 1:{scale}",labelFeaturesText:"Etiquetado de elementos",labelsText:"Etiquetas",basicText:"B\u00e1sico",advancedText:"Advanzado",limitByScaleText:"Limitar por escala", 2362limitByConditionText:"Limitar por condici\u00f3n",symbolText:"S\u00edmbolo",nameText:"Nombre"},"gxp.ScaleLimitPanel.prototype":{scaleSliderTemplate:"{scaleType} Escala 1:{scale}",minScaleLimitText:"Escala m\u00ednima",maxScaleLimitText:"Escala m\u00e1xima"},"gxp.StrokeSymbolizer.prototype":{solidStrokeName:"continuo",dashStrokeName:"guiones",dotStrokeName:"puntos",titleText:"Trazo",styleText:"Estilo",colorText:"Color",widthText:"Ancho",opacityText:"Opacidad"},"gxp.StylePropertiesDialog.prototype":{titleText:"General", 2363nameFieldText:"Nombre",titleFieldText:"T\u00edtulo",abstractFieldText:"Resumen"},"gxp.TextSymbolizer.prototype":{labelValuesText:"Etiquetado",haloText:"Halo",sizeText:"Tama\u00f1o"},"gxp.WMSLayerPanel.prototype":{aboutText:"Acerca de",titleText:"T\u00edtulo",nameText:"Nombre",descriptionText:"Descripci\u00f3n",displayText:"Mostrar",opacityText:"Opacidad",formatText:"Formato",transparentText:"Trans
2363parente",cacheText:"Cach\u00e9",cacheFieldText:"Usar la versi\u00f3n en cach\u00e9",stylesText:"Estilos disponibles", 2364infoFormatText:"Info format",infoFormatEmptyText:"Select a format",displayOptionsText:"Display options",queryText:"Limit with filters",scaleText:"Limit by scale",minScaleText:"Min scale",maxScaleText:"Max scale",switchToFilterBuilderText:"Switch back to filter builder",cqlPrefixText:"or ",cqlText:"use CQL filter instead",singleTileText:"Single tile",singleTileFieldText:"Use a single tile"},"gxp.EmbedMapDialog.prototype":{publishMessage:"\u00a1Ya puede publicar su mapa en otras webs! Simplemente copie el siguiente c\u00f3digo HTML en el lugar donde desee incrustarlo:", 2365heightLabel:"Alto",widthLabel:"Ancho",mapSizeLabel:"Tama\u00f1o",miniSizeLabel:"M\u00ednimo",smallSizeLabel:"Peque\u00f1o",premiumSizeLabel:"Premium",largeSizeLabel:"Grande"},"gxp.WMSStylesDialog.prototype":{addStyleText:"A\u00f1adir",addStyleTip:"A\u00f1adir un estilo",chooseStyleText:"Escoger estilo",deleteStyleText:"Quitar",deleteStyleTip:"Borrar el estilo seleccionado",editStyleText:"Cambiar",editStyleTip:"Editar el estilo seleccionado",duplicateStyleText:"Clonar",duplicateStyleTip:"Duplicar el estilo seleccionado", 2366addRuleText:"A\u00f1adir",addRuleTip:"A\u00f1adir una regla",newRuleText:"Nueva regla",deleteRuleText:"Quitar",deleteRuleTip:"Borrar la regla seleccionada",editRuleText:"Cambiar",editRuleTip:"Editar la regla seleccionada",duplicateRuleText:"Duplicar",duplicateRuleTip:"Duplicar la regla seleccionada",cancelText:"Cancelar",saveText:"Guardar",styleWindowTitle:"Estilo: {0}",ruleWindowTitle:"Regla: {0}",stylesFieldsetTitle:"Estilos",rulesFieldsetTitle:"Reglas"},"gxp.LayerUploadPanel.prototype":{titleLabel:"T\u00edtulo", 2367titleEmptyText:"T\u00edtulo de la capa",abstractLabel:"Descripci\u00f3n",abstractEmptyText:"Descripci\u00f3n de la capa",fileLabel:"Datos",fieldEmptyText:"Navegue por los datos...",uploadText:"Subir",uploadFailedText:"Upload failed",processingUploadText:"Processing upload...",waitMsgText:"Suba sus datos data...",invalidFileExtensionText:"El fichero debe tener alguna de estas extensiones: ",optionsText:"Opciones",workspaceLabel:"Espacio de trabajo",workspaceEmptyText:"Espacio de trabajo por defecto", 2368dataStoreLabel:"Almac\u00e9n de datos",dataStoreEmptyText:"Create new store",defaultDataStoreEmptyText:"Almac\u00e9n de datos por defecto"},"gxp.NewSourceDialog.prototype":{title:"A\u00f1adir Servidor...",cancelText:"Cancelar",addServerText:"A\u00f1adir Servidor",invalidURLText:"Enter a valid URL to a WMS endpoint (e.g. http://example.com/geoserver/wms)",contactingServerText:"Conectando con el Servidor..."},"gxp.ScaleOverlay.prototype":{zoomLevelText:"Escala"},"gxp.Viewer.prototype":{saveErrorText:"Problemas guardando: "}, 2369"gxp.FeedSourceDialog.prototype":{feedTypeText:"Fuente",addPicasaText:"Picasa fotos",addYouTubeText:"YouTube Videos",addRSSText:"Feed GeoRSS Otro",addFeedText:"Agregar al Mapa",addTitleText:"T\u00edtulo",keywordText:"Palabra clave",doneText:"Hecho",titleText:"Agregar Feeds",maxResultsText:"Productos Max"}}); 2370GeoExt.Lang.add("fr",{"gxp.plugins.AddLayers.prototype":{addActionMenuText:"Ajouter des calques",addActionTip:"Ajouter des calques",addServerText:"Ajouter un nouveau serveur",untitledText:"Sans titre",addLayerSourceErrorText:"Impossible d'obtenir les capacit\u00e9s WMS ({msg}).\nVeuillez v\u00e9rifier l'URL et essayez \u00e0 nouveau.",availableLayersText:"Couches disponibles",doneText:"Termin\u00e9",uploadText:"T\u00e9l\u00e9charger des donn\u00e9es",addFeedActionMenuText:"Add feeds",searchText:"Search for layers"}, 2371"gxp.plugins.BingSource.prototype":{title:"Calques Bing",roadTitle:"Bing routes",aerialTitle:"Bing images a\u00e9riennes",labeledAerialTitle:"Bing images a\u00e9riennes avec \u00e9tiquettes"},"gxp.plugins.FeatureEditor.prototype":{splitButtonText:"Edit",createFeatureActionText:"Create",editFeatureActionText:"Modify",createFeatureActionTip:"Cr\u00e9er un nouvel objet",editFeatureActionTip:"Modifier un objet existant",commitTitle:"Commit message",commitText:"Please enter a commit message for this edit:"}, 2372"gxp.plugins.FeatureGrid.prototype":{displayFeatureText:"Afficher sur la carte",firstPageTip:"Premi\u00e8re page",previousPageTip:"Page pr\u
237200e9c\u00e9dente",zoomPageExtentTip:"Zoom sur la page",nextPageTip:"Page suivante",lastPageTip:"Derni\u00e8re page",totalMsg:"Features {1} to {2} of {0}"},"gxp.plugins.GoogleEarth.prototype":{menuText:"Passer \u00e0 la visionneuse 3D",tooltip:"Passer \u00e0 la visionneuse 3D"},"gxp.plugins.GoogleSource.prototype":{title:"Calques Google",roadmapAbstract:"Carte routi\u00e8re", 2373satelliteAbstract:"Images satellite",hybridAbstract:"Images avec routes",terrainAbstract:"Carte routi\u00e8re avec le terrain"},"gxp.plugins.LayerProperties.prototype":{menuText:"Propri\u00e9t\u00e9s de la couche",toolTip:"Propri\u00e9t\u00e9s de la couche"},"gxp.plugins.LayerTree.prototype":{shortTitle:"Layers",rootNodeText:"Layers",overlayNodeText:"Surimpressions",baseNodeText:"Couches"},"gxp.plugins.LayerManager.prototype":{baseNodeText:"Couche"},"gxp.plugins.Legend.prototype":{menuText:"L\u00e9gende", 2374tooltip:"L\u00e9gende"},"gxp.plugins.Measure.prototype":{buttonText:"Mesure",lengthMenuText:"Longueur",areaMenuText:"Surface",lengthTooltip:"Mesure de longueur",areaTooltip:"Mesure de surface",measureTooltip:"Mesure"},"gxp.plugins.Navigation.prototype":{menuText:"Panner la carte",tooltip:"Panner la carte"},"gxp.plugins.NavigationHistory.prototype":{previousMenuText:"Position pr\u00e9c\u00e9dente",nextMenuText:"Position suivante",previousTooltip:"Position pr\u00e9c\u00e9dente",nextTooltip:"Position suivante"}, 2375"gxp.plugins.LoadingIndicator.prototype":{loadingMapMessage:"Chargement de la carte..."},"gxp.plugins.MapBoxSource.prototype":{title:"MapBox Layers",blueMarbleTopoBathyJanTitle:"Blue Marble Topography & Bathymetry (January)",blueMarbleTopoBathyJulTitle:"Blue Marble Topography & Bathymetry (July)",blueMarbleTopoJanTitle:"Blue Marble Topography (January)",blueMarbleTopoJulTitle:"Blue Marble Topography (July)",controlRoomTitle:"Control Room",geographyClassTitle:"Geography Class",naturalEarthHypsoTitle:"Natural Earth Hypsometric", 2376naturalEarthHypsoBathyTitle:"Natural Earth Hypsometric & Bathymetry",naturalEarth1Title:"Natural Earth I",naturalEarth2Title:"Natural Earth II",worldDarkTitle:"World Dark",worldLightTitle:"World Light",worldPrintTitle:"World Print"},"gxp.plugins.OSMSource.prototype":{title:"Calques OpenStreetMap",mapnikAttribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",osmarenderAttribution:"Donn\u00e9es CC-By-SA par <a href='http://openstreetmap.org/'>OpenStreetMap</a>"}, 2377"gxp.plugins.Print.prototype":{buttonText:"Imprimer",menuText:"Imprimer la carte",tooltip:"Imprimer la carte",previewText:"Aper\u00e7u avant impression",notAllNotPrintableText:"Non, toutes les couches peuvent \u00eatre imprim\u00e9es",nonePrintableText:"Aucune de vos couches ne peut \u00eatre imprim\u00e9e"},"gxp.plugins.MapQuestSource.prototype":{title:"MapQuest Layers",osmAttribution:"Avec la permission de tuiles <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 2378osmTitle:"MapQuest OpenStreetMap",naipAttribution:"Avec la permission de tuiles <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>",naipTitle:"MapQuest Imagery"},"gxp.plugins.QueryForm.prototype":{queryActionText:"Interrogation",queryMenuText:"Couche de requ\u00eates",queryActionTip:"Interroger la couche s\u00e9lectionn\u00e9e",queryByLocationText:"Query by current map extent",queryByAttributesText:"Requ\u00eate par attributs"}, 2379"gxp.plugins.RemoveLayer.prototype":{removeMenuText:"Enlever la couche",removeActionTip:"Enlever la couche"},"gxp.plugins.WMSGetFeatureInfo.prototype":{buttonText:"Identify",infoActionTip:"Get Feature Info",popupTitle:"Info sur l'objet"},"gxp.plugins.Zoom.prototype":{zoomMenuText:"Zoom Box",zoomInMenuText:"Zoom avant",zoomOutMenuText:"Zoom arri\u00e8re",zoomTooltip:"Zoom by dragging a box",zoomInTooltip:"Zoom avant",zoomOutTooltip:"Zoom arri\u00e8re"},"gxp.plugins.ZoomToExtent.prototype":{menuText:"Zoomer sur la carte max", 2380tooltip:"Zoomer sur la carte max"},"gxp.plugins.ZoomToDataExtent.prototype":{menuText:"Zoomer sur la couche",tooltip:"Zoomer sur la couche"},"gxp.plugins.ZoomToLayerExtent.prototype":{menuText:"Zoomer sur la couche",tooltip:"Zoomer sur la couche"},"gxp.plugins.ZoomToSelectedFeatures.prototype":{menuText:"Zoomer sur les objets s\u00e9lectionn\u00e9s",tooltip:"Zoomer sur les objets s\u00e9lectionn\u00e9s"},"gxp.FeatureEditPopup.prototype":{closeMsgTitle:"Enregistrer les modifications ?",closeMsg:"Cet objet a des modifications non enregistr\u00e9es. Voulez-vous enregistrer vos modifications ?", 2381deleteMsgTitle:"Supprimer l'objet ?",deleteMsg:"Etes-vous s\u00fbr de vouloir supprimer cet objet ?",editButtonText:"Modifier",editButtonTooltip:"Modifier cet objet",deleteButtonText:"Supprimer",deleteButtonTooltip:"Supprimer cet objet",cancelButtonText:"Annuler",cancelButtonTooltip:"Arr\u00eater de modifier, annuler les modifications",saveButtonText:"Enregistrer",saveButtonTooltip:"Enregistrer les modifications"},"gxp.FillSymbolizer.prototype":{fillText:"Remplir",colorText:"Couleur",opacityText:"Opacit\u00e9"}, 2382"gxp.FilterBuilder.prototype":{builderTypeNames:["Tout","tous","aucun","pas tout"],preComboText:"Match",postComboText:"de ce qui suit:",addConditionText:"Ajouter la condition",addGroupText:"Ajouter un groupe",removeConditionText:"Supprimer la condition"},"gxp.grid.CapabilitiesGrid.prototype":{nameHeaderText:"Nom",titleHeaderText:"Titre",queryableHeaderText:"Interrogeable",layerSelectionLabel:"Voir les donn\u00e9es disponibles \u00e0 partir de :",layerAdditionLabel:"ou ajouter un nouveau serveur.", 2383expanderTemplateText:"<p><b>R\u00e9sum\u00e9:</b> {abstract}</p>"},"gxp.PointSymbolizer.prototype":{graphicCircleText:"Cercle",graphicSquareText:"Carr\u00e9",graphicTriangleText:"Triangle",graphicStarText:"\u00c9toile",graphicCrossText:"Croix",graphicXText:"x",graphicExternalText:"Externe",urlText:"URL",opacityText:"Opacit\u00e9",symbolText:"Symbole",sizeText:"Taille",rotationText:"Rotation"},"gxp.QueryPanel.prototype":{queryByLocationText:"Interrogation selon le lieu",currentTextText:"Mesure actuelle", 2384queryByAttributesText:"Requ\u00eate par attributs",layerText:"Calque"},"gxp.RulePanel.prototype":{scaleSliderTemplate:"{scaleType} \u00e9chelle 1:{scale}",labelFeaturesText:"Label Caract\u00e9ristiques",advancedText:"Avanc\u00e9",limitByScaleText:"Limiter par l'\u00e9chelle",limitByConditionText:"Limiter par condition",symbolText:"Symbole",nameText:"Nom"},"gxp.ScaleLimitPanel.prototype":{scaleSliderTemplate:"{scaleType} \u00e9chelle 1:{scale}",maxScaleLimitText:"\u00c9chelle maximale"},"gxp.TextSymbolizer.prototype":{labelValuesText:"Label valeurs", 2385haloText:"Halo",sizeText:"Taille"},"gxp.WMSLayerPanel.prototype":{aboutText:"A propos",titleText:"Titre",nameText:"Nom",descriptionText:"Description",displayText:"Affichage",opacityText:"Opacit\u00e9",formatText:"Format",transparentText:"Trans
2385parent",cacheText:"Cache",cacheFieldText:"Utiliser la version mise en cache",stylesText:"Available styles",infoFormatText:"Info format",infoFormatEmptyText:"Choisissez un format",displayOptionsText:"Display options",queryText:"Limit with filters",scaleText:"Limit by scale", 2386minScaleText:"Min scale",maxScaleText:"Max scale",switchToFilterBuilderText:"Switch back to filter builder",cqlPrefixText:"or ",cqlText:"use CQL filter instead",singleTileText:"Single tile",singleTileFieldText:"Use a single tile"},"gxp.EmbedMapDialog.prototype":{publishMessage:"Votre carte est pr\u00eate \u00e0 \u00eatre publi\u00e9e sur le web. Il suffit de copier le code HTML suivant pour int\u00e9grer la carte dans votre site Web :",heightLabel:"Hauteur",widthLabel:"Largeur",mapSizeLabel:"Taille de la carte", 2387miniSizeLabel:"Mini",smallSizeLabel:"Petit",premiumSizeLabel:"Premium",largeSizeLabel:"Large"},"gxp.LayerUploadPanel.prototype":{titleLabel:"Titre",titleEmptyText:"Titre de la couche",abstractLabel:"Description",abstractEmptyText:"Description couche",fileLabel:"Donn\u00e9es",fieldEmptyText:"Parcourir pour ...",uploadText:"Upload",uploadFailedText:"Upload failed",processingUploadText:"Processing upload...",waitMsgText:"Transfert de vos donn\u00e9es ...",invalidFileExtensionText:"L'extension du fichier doit \u00eatre : ", 2388optionsText:"Options",workspaceLabel:"Espace de travail",workspaceEmptyText:"Espace de travail par d\u00e9faut",dataStoreLabel:"Magasin de donn\u00e9es",dataStoreEmptyText:"Create new store",defaultDataStoreEmptyText:"Magasin de donn\u00e9es par d\u00e9faut"},"gxp.NewSourceDialog.prototype":{title:"Ajouter un nouveau serveur...",cancelText:"Annuler",addServerText:"Ajouter un serveur",invalidURLText:"Indiquez l'URL valide d'un serveur WMS (e.g. http://example.com/geoserver/wms)",contactingServerText:"Interrogation du serveur..."}, 2389"gxp.ScaleOverlay.prototype":{zoomLevelText:"Niveau de zoom"},"gxp.Viewer.prototype":{saveErrorText:"Sauver Trouble: "},"gxp.FeedSourceDialog.prototype":{feedTypeText:"Source",addPicasaText:"Picasa Photos",addYouTubeText:"YouTube Vid\u00e9os",addRSSText:"GeoRSS Autre",addFeedText:"Ajouter \u00e0 la carte",addTitleText:"Titre",keywordText:"Mot-cl\u00e9",doneText:"Termin\u00e9",titletext:"Ajouter RSS",maxResultsText:"Articles Max"}}); 2390GeoExt.Lang.add("id",{"gxp.menu.LayerMenu.prototype":{layerText:"Layer"},"gxp.plugins.AddLayers.prototype":{addActionMenuText:"Tambahkan layer",addActionTip:"Tambahkan layer",addServerText:"Tambahkan server baru",addButtonText:"Add layers",untitledText:"Untitled",addLayerSourceErrorText:"Kesalahan mendapatkan kemampuan WMS ({msg}). \nSilakan cek url dan coba lagi.",availableLayersText:"Layer tersedia",expanderTemplateText:"<p><b>Abstract:</b> {abstract}</p>",panelTitleText:"Title",layerSelectionText:"View available data from:", 2391doneText:"Selesai",uploadText:"Unggah data",addFeedActionMenuText:"Add feeds",searchText:"Search for layers"},"gxp.plugins.BingSource.prototype":{title:"Layers Bing",roadTitle:"Jalan Bing",aerialTitle:"Udara Bing",labeledAerialTitle:"Udara Bing dengan label"},"gxp.plugins.FeatureEditor.prototype":{splitButtonText:"Edit",createFeatureActionText:"Create",editFeatureActionText:"Modify",createFeatureActionTip:"Membuat sebuah fitur",editFeatureActionTip:"Edit fitur",commitTitle:"Commit message",commitText:"Please enter a commit message for this edit:"}, 2392"gxp.plugins.FeatureGrid.prototype":{displayFeatureText:"Tampilkan pada peta",firstPageTip:"Halaman pertama",previousPageTip:"Halaman sebelumnya",zoomPageExtentTip:"Zoom sampai batas halaman",nextPageTip:"Halaman berikut",lastPageTip:"Halaman terakhir",totalMsg:"Features {1} to {2} of {0}"},"gxp.plugins.GoogleEarth.prototype":{menuText:"3D Viewer",tooltip:"Switch to 3D Viewer"},"gxp.plugins.GoogleSource.prototype":{title:"Google Layers",roadmapAbstract:"Tampilkan peta jalan",satelliteAbstract:"Tampilkan citra satelit", 2393hybridAbstract:"Tampilkan citra dengan nama jalan",terrainAbstract:"Tampilkan peta jalan dengan peta medan"},"gxp.plugins.LayerProperties.prototype":{menuText:"Properti layer",toolTip:"Properti layer"},"gxp.plugins.LayerTree.prototype":{shortTitle:"Layer-layer",rootNodeText:"Layer-layer",overlayNodeText:"Superimposisi",baseNodeText:"Layer dasar"},"gxp.plugins.LayerManager.prototype":{baseNodeText:"Layer dasar"},"gxp.plugins.Legend.prototype":{menuText:"Tampilkan legend",tooltip:"Tampilkan legend"}, 2394"gxp.plugins.LoadingIndicator.prototype":{loadingMapMessage:"Loading Map..."},"gxp.plugins.MapBoxSource.prototype":{title:"MapBox Layers",blueMarbleTopoB
2394athyJanTitle:"Blue Marble Topography & Bathymetry (January)",blueMarbleTopoBathyJulTitle:"Blue Marble Topography & Bathymetry (July)",blueMarbleTopoJanTitle:"Blue Marble Topography (January)",blueMarbleTopoJulTitle:"Blue Marble Topography (July)",controlRoomTitle:"Control Room",geographyClassTitle:"Geography Class",naturalEarthHypsoTitle:"Natural Earth Hypsometric", 2395naturalEarthHypsoBathyTitle:"Natural Earth Hypsometric & Bathymetry",naturalEarth1Title:"Natural Earth I",naturalEarth2Title:"Natural Earth II",worldDarkTitle:"World Dark",worldLightTitle:"World Light",worldPrintTitle:"World Print"},"gxp.plugins.Measure.prototype":{buttonText:"Pengukuran",lengthMenuText:"Panjang",areaMenuText:"Luas",lengthTooltip:"Pengukuran panjang",areaTooltip:"Pengukuran luas",measureTooltip:"Pengukuran"},"gxp.plugins.Navigation.prototype":{menuText:"Pan peta",tooltip:"Pan peta"}, 2396"gxp.plugins.NavigationHistory.prototype":{previousMenuText:"Zoom ke luas sebelumnya",nextMenuText:"Zoom ke luas setelahnya",previousTooltip:"Zoom ke luas sebelumnya",nextTooltip:"Zoom ke luas setelahnya"},"gxp.plugins.OSMSource.prototype":{title:"OpenStreetMap Layers",mapnikAttribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",osmarenderAttribution:"Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"},"gxp.plugins.Print.prototype":{buttonText:"Cetak", 2397menuText:"Cetak peta",tooltip:"Cetak peta",previewText:"Preview cetak",notAllNotPrintableText:"Tidak semua layer dapat dicetak",nonePrintableText:"Tidak ada peta yang dapat dicetak"},"gxp.plugins.MapQuestSource.prototype":{title:"MapQuest Layers",osmAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>",osmTitle:"MapQuest OpenStreetMap",naipAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 2398naipTitle:"Citra MapQuest"},"gxp.plugins.QueryForm.prototype":{queryActionText:"Query",queryMenuText:"Queryable Layer",queryActionTip:"Query layer yang dipilih",queryByLocationText:"Query by current map extent",queryByAttributesText:"Query atribut",queryMsg:"Querying...",cancelButtonText:"Batal",noFeaturesTitle:"Tidak sesuai",noFeaturesMessage:"Permintaan anda tidak berhasil."},"gxp.plugins.RemoveLayer.prototype":{removeMenuText:"Hapus layer",removeActionTip:"Hapus layer"},"gxp.plugins.Styler.prototype":{menuText:"Edit Styles", 2399tooltip:"Manage layer styles"},"gxp.plugins.WMSGetFeatureInfo.prototype":{buttonText:"Identify",infoActionTip:"Get Feature Info",popupTitle:"Info fitur"},"gxp.plugins.Zoom.prototype":{zoomMenuText:"Zoom Box",zoomInMenuText:"Memperbesar",zoomOutMenuText:"Memperkecil",zoomTooltip:"Zoom by dragging a box",zoomInTooltip:"Memperbesar",zoomOutTooltip:"Memperkecil"},"gxp.plugins.ZoomToExtent.prototype":{menuText:"Pembesaran maksimum",tooltip:"Pembesaran maksimum"},"gxp.plugins.ZoomToDataExtent.prototype":{menuText:"Pembesaran batas layer", 2400tooltip:"Pembesaran batas layer"},"gxp.plugins.ZoomToLayerExtent.prototype":{menuText:"Pembesaran batas layer",tooltip:"Pembesaran batas layer"},"gxp.plugins.ZoomToSelectedFeatures.prototype":{menuText:"Pembesaran pada fitur terpilih",tooltip:"Pembesaran pada fitur terpilih"},"gxp.FeatureEditPopup.prototype":{closeMsgTitle:"Simpan update?",closeMsg:"Fitur belum di simpan. Apakah ingin disimpan?",deleteMsgTitle:"Hapus Fitur?",deleteMsg:"Anda yakin untuk menghapus fitur ini?",editButtonText:"Edit", 2401editButtonTooltip:"Jadikan fitur dapat diedit",deleteButtonText:"Hapus",deleteButtonTooltip:"Hapus fitur ini",cancelButtonText:"Batal",cancelButtonTooltip:"Berhenti mengedit, batalkan perubahan",saveButtonText:"Simpan",saveButtonTooltip:"Simpan Update"},"gxp.FillSymbolizer.prototype":{fillText:"Isikan warna",colorText:"Warna",opacityText:"Kepekatan"},"gxp.FilterBuilder.prototype":{builderTypeNames:["any","all","none","not all"],preComboText:"Sesuai",postComboText:"of the following:",addConditionText:"tambahkan kondisi", 2402addGroupText:"tambahkan grup",removeConditionText:"Hilangkan kondisi"},"gxp.grid.CapabilitiesGrid.prototype":{nameHeaderText:"Nama",titleHeaderText:"Judul",queryableHeaderText:"Queryable",layerSelectionLabel:"Melihat data dari:",layerAdditionLabel:"atau tambahkan sebagai server baru.",expanderTemplateText:"<p><b>Abstract:</b> {abstract}</p>"},"gxp.PointSymbolizer.prototype":{graphicCircleText:"Lingkaran",graphicSquareText:"square",graphicTriangleText:"Seg
2402itiga",graphicStarText:"Bintang",graphicCrossText:"Silang", 2403graphicXText:"x",graphicExternalText:"dari luar",urlText:"URL",opacityText:"Kepekatan",symbolText:"Simbol",sizeText:"Ukuran",rotationText:"Rotasi"},"gxp.QueryPanel.prototype":{queryByLocationText:"Query lokasi",currentTextText:"Sejauh ini",queryByAttributesText:"Query atribut",layerText:"Layer"},"gxp.RulePanel.prototype":{scaleSliderTemplate:"{scaleType} Scale 1:{scale}",labelFeaturesText:"Label Fitur",labelsText:"Labels",basicText:"Basic",advancedText:"Tingkat lanjut",limitByScaleText:"Batasan oleh skala", 2404limitByConditionText:"Batasan oleh kondisi",symbolText:"Simbol",nameText:"Nama"},"gxp.ScaleLimitPanel.prototype":{scaleSliderTemplate:"{scaleType} Scale 1:{scale}",minScaleLimitText:"Min scale limit",maxScaleLimitText:"Batas skala maksimum"},"gxp.StrokeSymbolizer.prototype":{solidStrokeName:"solid",dashStrokeName:"dash",dotStrokeName:"dot",titleText:"Stroke",styleText:"Style",colorText:"Color",widthText:"Width",opacityText:"Opacity"},"gxp.StylePropertiesDialog.prototype":{titleText:"General",nameFieldText:"Name", 2405titleFieldText:"Title",abstractFieldText:"Abstract"},"gxp.TextSymbolizer.prototype":{labelValuesText:"Label nilai",haloText:"Halo",sizeText:"Ukuran"},"gxp.WMSLayerPanel.prototype":{aboutText:"Tentang Program",titleText:"Judul",nameText:"Nama",descriptionText:"Deskripsi",displayText:"Tampilan",opacityText:"Kecerahan",formatText:"Format",transparentText:"Trans
2405parent",cacheText:"Cache",cacheFieldText:"Menggunakan versi cached",stylesText:"Styles tersedia",infoFormatText:"Info format",infoFormatEmptyText:"Select a format", 2406displayOptionsText:"Display options",queryText:"Limit with filters",scaleText:"Limit by scale",minScaleText:"Min scale",maxScaleText:"Max scale",switchToFilterBuilderText:"Switch back to filter builder",cqlPrefixText:"or ",cqlText:"use CQL filter instead",singleTileText:"Single tile",singleTileFieldText:"Use a single tile"},"gxp.EmbedMapDialog.prototype":{publishMessage:"Peta anda siap dipublikasikan melalui web! Cukup salin HTML berikut untuk meletakkan peta dalam situs web Anda:",heightLabel:"Tinggi", 2407widthLabel:"Lebar",mapSizeLabel:"Ukuran peta",miniSizeLabel:"Mini",smallSizeLabel:"Kecil",premiumSizeLabel:"Premium",largeSizeLabel:"Besar"},"gxp.WMSStylesDialog.prototype":{addStyleText:"Tambah",addStyleTip:"Tambah style baru",chooseStyleText:"Choose style",deleteStyleText:"Hilangkan",deleteStyleTip:"Hapus style yang dipilih",editStyleText:"Edit",editStyleTip:"Edit style yang dipilih",duplicateStyleText:"Duplikat",duplicateStyleTip:"Duplikat style yang dipilih",addRuleText:"Tambah",addRuleTip:"Tambah Rule baru", 2408newRuleText:"New Rule",deleteRuleText:"Hilangkan",deleteRuleTip:"Hapus Rule yang dipilih",editRuleText:"Edit",editRuleTip:"Edit ule yang dipilih",duplicateRuleText:"Duplikat",duplicateRuleTip:"Duplikat style yang dipilih",cancelText:"Batal",saveText:"Save",styleWindowTitle:"User Style: {0}",ruleWindowTitle:"Style Rule: {0}",stylesFieldsetTitle:"Styles",rulesFieldsetTitle:"Rules"},"gxp.LayerUploadPanel.prototype":{titleLabel:"Judul",titleEmptyText:"Judul Layer",abstractLabel:"Deskripsi",abstractEmptyText:"Deskripsi Layer", 2409fileLabel:"Data",fieldEmptyText:"Pencarian arsip data...",uploadText:"Pengisian",uploadFailedText:"Upload failed",processingUploadText:"Processing upload...",waitMsgText:"Mengisi Data anda...",invalidFileExtensionText:"Ekstensi file harus salah satu: ",optionsText:"Pilihan",workspaceLabel:"Ruang Kerja",workspaceEmptyText:"Ruang kerja Default",dataStoreLabel:"Penyimpanan",dataStoreEmptyText:"Create new store",defaultDataStoreEmptyText:"Penyimpanan data Default"},"gxp.NewSourceDialog.prototype":{title:"Add New Server...", 2410cancelText:"Cancel",addServerText:"Add Server",invalidURLText:"Enter a valid URL to a WMS endpoint (e.g. http://example.com/geoserver/wms)",contactingServerText:"Contacting Server..."},"gxp.ScaleOverlay.prototype":{zoomLevelText:"Zoom level"},"gxp.Viewer.prototype":{saveErrorText:"Trouble saving: "},"gxp.FeedSourceDialog.prototype":{feedTypeText:"Sumber",addPicasaText:"Picasa Foto",addYouTubeText:"YouTube Video",addRSSText:"GeoRSS Pakan lain",addFeedText:"Tambah ke Peta",addTitleText:"Judul",keywordText:"Kata Kunci", 2411doneText:"Selesai",titleText:"Tambah Blog",maxResultsText:"Produk Max"}}); 2412GeoExt.Lang.add("nl",{"gxp.plugins.AddLayers.prototype":{addActionMenuText:"Voeg kaartlagen toe",addActionTip:"Voeg kaartlagen toe",addServerText:"Voeg service toe",untitledText:"Onbekend",addLayerSourceErrorText:"Probleem bij het ophalen van de Error WMS GetCapabilities ({msg}).\nControleer de URL en probeer opnieuw.",availableLayersText:"Beschikbare kaartlagen",doneText:"Klaar",addFeedActionMenuText:"Add feeds",searchText:"Zoek naar kaartlagen"},"gxp.plugins.BingSource.prototype":{title:"Bing kaartlagen", 2413roadTitle:"Bing wegen",aerialTitle:"Bing luchtfoto's",labeledAerialTitle:"Bing luchtfoto's met labels"},"gxp.plugins.FeatureEditor.prototype":{createFeatureActionTip:"Maak een nieuw object",editFeatureActionTip:"Wijzig een bestand object",commitTitle:"Wijzingsbeschrijving",commitText:"Voor a.u.b. een beschrijving in voor de wijziging:"},"gxp.plugins.FeatureGrid.prototype":{displayFeatureText:"Toon op kaart",firstPageTip:"Eerste pagina",previousPageTip:"Vorige pagina",zoomPageExtentTip:"Zoom naar de uitsnede van de pagina", 2414nextPageTip:"Volgende pagina",lastPageTip:"Laatste pagina",totalMsg:"Features {1} to {2} of {0}"},"gxp.plugins.GoogleEarth.prototype":{menuText:"3D weergave",tooltip:"Bekijk kaart in 3D"},"gxp.plugins.GoogleSource.prototype":{title:"Google Maps kaartlagen",roadmapAbstract:"Toon stratenkaart",satelliteAbstract:"Toon satellietbeeld",hybridAbstract:"Toon rasterbeelden met labels",terrainAbstract:"Toon stratenkaart met terrein"},"gxp.plugins.LayerProperties.prototype":{menuText:"Kaartlaag eigenschappen", 2415toolTip:"Kaartlaag eigenschappen"},"gxp.plugins.LayerTree.prototype":{shortTitle:"Kaartlagen",rootNodeText:"Kaartlagen",overlayNodeText:"Kaart overlays",baseNodeText:"Basis Kaarten"},"gxp.plugins.LayerManager.prototype":{baseNodeText:"Basis Kaart"},"gxp.plugins.Legend.prototype":{menuText:"Toon legenda",tooltip:"Toon legenda"},"gxp.plugins.LoadingIndicator.prototype":{loadingMapMessage:"Laden van de kaart..."},"gxp.plugins.MapBoxSource.prototype":{title:"MapBox Layers",blueMarbleTopoB
2415athyJanTitle:"Blue Marble Topography & Bathymetry (January)", 2416blueMarbleTopoBathyJulTitle:"Blue Marble Topography & Bathymetry (July)",blueMarbleTopoJanTitle:"Blue Marble Topography (January)",blueMarbleTopoJulTitle:"Blue Marble Topography (July)",controlRoomTitle:"Control Room",geographyClassTitle:"Geography Class",naturalEarthHypsoTitle:"Natural Earth Hypsometric",naturalEarthHypsoBathyTitle:"Natural Earth Hypsometric & Bathymetry",naturalEarth1Title:"Natural Earth I",naturalEarth2Title:"Natural Earth II",worldDarkTitle:"World Dark",worldLightTitle:"World Light", 2417worldPrintTitle:"World Print"},"gxp.plugins.Measure.prototype":{splitButtonText:"Edit",createFeatureActionText:"Create",editFeatureActionText:"Modify",buttonText:"Meten",lengthMenuText:"Lengte",areaMenuText:"Oppervlakte",lengthTooltip:"Meet lengte",areaTooltip:"Meet oppervlakte",measureTooltip:"Meten"},"gxp.plugins.Navigation.prototype":{menuText:"Verschuif kaart",tooltip:"Verschuif kaart"},"gxp.plugins.NavigationHistory.prototype":{previousMenuText:"Zoom naar de vorige uitsnede",nextMenuText:"Zoom naar de volgende uitsnede", 2418previousTooltip:"Zoom naar de vorige uitsnede",nextTooltip:"Zoom naar de volgende uitsnede"},"gxp.plugins.OSMSource.prototype":{title:"OpenStreetMap kaartlagen",mapnikAttribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",osmarenderAttribution:"Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"},"gxp.plugins.Print.prototype":{buttonText:"Afdrukken",menuText:"Afdrukken kaart",tooltip:"Afdrukken kaart",previewText:"Voorvertoning",notAllNotPrintableText:"Niet alle lagen kunnen worden afgedrukt", 2419nonePrintableText:"Geen van de huidige lagen kunnen worden afgedrukt"},"gxp.plugins.MapQuestSource.prototype":{title:"MapQuest kaartlagen",osmAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>",osmTitle:"MapQuest OpenStreetMap",naipAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 2420naipTitle:"MapQuest Rasterbeelden"},"gxp.plugins.QueryForm.prototype":{queryActionText:"Bevraag",queryMenuText:"Bevraag kaartlaag",queryActionTip:"Bevraag de geselecteerde kaartlaag",queryByLocationText:"Query by current map extent",queryByAttributesText:"Bevraag middels attributen",queryMsg:"Bevragen...",cancelButtonText:"Annuleren",noFeaturesTitle:"Niks gevonden",noFeaturesMessage:"De bevraging heeft geen resultaten opgeleverd."},"gxp.plugins.RemoveLayer.prototype":{removeMenuText:"Verwijder kaartlaag", 2421removeActionTip:"Verwijder kaartlaag"},"gxp.plugins.WMSGetFeatureInfo.prototype":{buttonText:"Identify",infoActionTip:"Attribuut-informatie",popupTitle:"Attribuut-informatie"},"gxp.plugins.Zoom.prototype":{zoomMenuText:"Zoom Box",zoomInMenuText:"Inzoomen",zoomOutMenuText:"Uitzoomen",zoomTooltip:"Zoom by dragging a box",zoomInTooltip:"Inzoomen",zoomOutTooltip:"Uitzoomen"},"gxp.plugins.ZoomToExtent.prototype":{menuText:"Zoom naar de maximale uitsnede",tooltip:"Zoom naar de maximale uitsnede"},"gxp.plugins.ZoomToDataExtent.prototype":{menuText:"Zoom naar de uitsnede van de kaartlaag", 2422tooltip:"Zoom naar de uitsnede van de kaartlaag"},"gxp.plugins.ZoomToLayerExtent.prototype":{menuText:"Zoom naar de uitsnede van de kaartlaag",tooltip:"Zoom naar de uitsnede van de kaartlaag"},"gxp.plugins.ZoomToSelectedFeatures.prototype":{menuText:"Zoom naar de geselecteerde objecten",tooltip:"Zoom naar de geselecteerde objecten"},"gxp.FeatureEditPopup.prototype":{closeMsgTitle:"Wijzigingen opslaan?",closeMsg:"Het object is gewijzigd. Wilt u de wijzigingen opslaan?",deleteMsgTitle:"Verwijder object?", 2423deleteMsg:"Weet u zeker dat u dit object wilt verwijderen?",editButtonText:"Wijzigen",editButtonTooltip:"Wijzig dit object",deleteButtonText:"Verwijderen",deleteButtonTooltip:"Verwijder dit object",cancelButtonText:"Annuleren",cancelButtonTooltip:"Stop met wijzigen, wijzigingen worden ongedaan gemaakt",saveButtonText:"Opslaan",saveButtonTooltip:"Wijzigingen opslaan"},"gxp.FillSymbolizer.prototype":{fillText:"Opvulling",colorText:"Kleur",opacityText:"Opaciteit"},"gxp.FilterBuilder.prototype":{builderTypeNames:["om het even welk", 2424"alle","geen","niet alle"],preComboText:"Overeenkomst",postComboText:"van de volgende:",addConditionText:"voeg voorwaarde toe",addGroupText:"voeg groep toe",removeConditionText:"verwijder voorwaarde"},"gxp.grid.CapabilitiesGrid.prototype":{nameHeaderText:"Naam",titleHeaderText:"Titel",queryableHeaderText:"Bevraagbaar",layerSelectionLabel:"Bekijk beschikbare data van:",layerAdditionLabel:"of voeg een nieuwe server toe.",expanderTemplateText:"<p><b>Samenvatting:</b> {abstract}</p>"},"gxp.PointSymbolizer.prototype":{graphicCircleText:"cirkel", 2425graphicSquareText:"vierkant",graphicTriangleText:"driehoek",graphicStarText:"ster",graphicCrossText:"kruis",graphicXText:"x",graphicExternalText:"extern",urlText:"URL",opacityText:"opaciteit",symbolText:"Symbool",sizeText:"Grootte",rotationText:"Rotatie"},"gxp.QueryPanel.prototype":{queryByLocationText:"Bevraag middels locatie",currentTextText:"Huidige uitsnede",queryByAttributesText:"Bevraag middels attributen",layerText:"Kaartlaag"},"gxp.RulePanel.prototype":{scaleSliderTemplate:"{scaleType} Schaal 1:{scale}", 2426labelFeaturesText:"Label objecten",advancedText:"Geavanceerd",limitByScaleText:"Beperk middels sc
2426haal",limitByConditionText:"Beperk middels voorwaarde",symbolText:"Symbool",nameText:"Naam"},"gxp.ScaleLimitPanel.prototype":{scaleSliderTemplate:"{scaleType} Schaal 1:{scale}",maxScaleLimitText:"Maximale schaal"},"gxp.TextSymbolizer.prototype":{labelValuesText:"Label waardes",haloText:"Halo",sizeText:"Grootte"},"gxp.WMSLayerPanel.prototype":{aboutText:"Informatie",titleText:"Titel",nameText:"Naam",descriptionText:"Omschrijving", 2427displayText:"Toon",opacityText:"Opaciteit",formatText:"Formaat",transparentText:"Transparant",cacheText:"Cache",cacheFieldText:"Gebruik de versie vanuit de cache",stylesText:"Beschikbare Stijlen",infoFormatText:"Info formaat",infoFormatEmptyText:"Selecteer een formaat",displayOptionsText:"Weergave opties",queryText:"Begrens d.m.v. query",scaleText:"Bregens d.m.v. schaal",minScaleText:"Minimum schaal",maxScaleText:"Maximum schaal",switchToFilterBuilderText:"Terug naar de querybuilder",cqlPrefixText:"of ", 2428cqlText:"gebruik een CQL filter",singleTileText:"Enkele kaarttegel",singleTileFieldText:"Gebruik 1 kaarttegel"},"gxp.EmbedMapDialog.prototype":{publishMessage:"Uw map is klaar voor publicatie! Kopieer de volgende HTML in uw website om de kaart in te voegen:",heightLabel:"Hoogte",widthLabel:"Breedte",mapSizeLabel:"Kaartgrootte",miniSizeLabel:"Mini",smallSizeLabel:"Klein",premiumSizeLabel:"Extra groot",largeSizeLabel:"Groot"},"gxp.WMSStylesDialog.prototype":{addStyleText:"Voeg toe",addStyleTip:"Voeg een nieuwe stijl toe", 2429deleteStyleText:"Verwijder",deleteStyleTip:"Verwijder de geselecteerde stijl",editStyleText:"Wijzig",editStyleTip:"Wijzig de geselecteerde stijl",duplicateStyleText:"Dupliceer",duplicateStyleTip:"Dupliceer de geselecteerde stijl",addRuleText:"Voeg toe",addRuleTip:"Voeg een nieuwe klasse toe",deleteRuleText:"Verwijder",deleteRuleTip:"Verwijder de geselecteerde klasse",editRuleText:"Wijzig",editRuleTip:"Wijzig de geselecteerde klasse",duplicateRuleText:"Dupliceer",duplicateRuleTip:"Dupliceer de geselecteerde klasse", 2430cancelText:"Annuleer",styleWindowTitle:"Kaartstijl: {0}",ruleWindowTitle:"Klasse: {0}",stylesFieldsetTitle:"Kaartstijlen",rulesFieldsetTitle:"Klassen"},"gxp.LayerUploadPanel.prototype":{titleLabel:"Titel",titleEmptyText:"Kaartlaag titel",abstractLabel:"Omschrijving",abstractEmptyText:"Kaartlaag omschrijving",fileLabel:"Data",fieldEmptyText:"Kies data archief...",uploadText:"Upload",uploadFailedText:"Upload failed",processingUploadText:"Processing upload...",waitMsgText:"Bezig met uploaden van de data...", 2431invalidFileExtensionText:"Bestandsextensie is een van: ",optionsText:"Opties",workspaceLabel:"Werkruimte",workspaceEmptyText:"Standaard werkruimte",dataStoreLabel:"Archief",dataStoreEmptyText:"Create new store",defaultDataStoreEmptyText:"Standaard archief"},"gxp.NewSourceDialog.prototype":{title:"Add New Server...",cancelText:"Cancel",addServerText:"Add Server",invalidURLText:"Enter a valid URL to a WMS endpoint (e.g. http://example.com/geoserver/wms)",contactingServerText:"Contacting Server..."}, 2432"gxp.ScaleOverlay.prototype":{zoomLevelText:"Zoom niveau"},"gxp.Viewer.prototype":{saveErrorText:"Problemen bij het opslaan: "},"gxp.FeedSourceDialog.prototype":{feedTypeText:"Bron",addPicasaText:"Picasa Foto's",addYouTubeText:"YouTube video's",addRSSText:"Andere GeoRSS Feed",addFeedText:"Voeg toe aan Map",addTitleText:"Titel",keywordText:"Trefwoord",doneText:"Klaar",titleText:"Voeg Feeds",maxResultsText:"Max Items"}}); 2433GeoExt.Lang.add("pl",{"gxp.menu.LayerMenu.prototype":{layerText:"Warstwa"},"gxp.plugins.AddLayers.prototype":{addMenuText:"Dodaj warstwy",addActionTip:"Dodaj warstwy",addServerText:"Dodaj serwer",addButtonText:"Dodaj warstwy",untitledText:"Bez tytu\u0142u",addLayerSourceErrorText:"B\u0142\u0105d w czasie pobierania parametr\u00f3w serwera WMS ({msg}).\nProsz\u0119 sprawdzi\u0107 adres.",availableLayersText:"Dost\u0119pne warstwy",expanderTemplateText:"<p><b>Opis:</b> {abstract}</p>",panelTitleText:"Tytu\u0142", 2434layerSelectionText:"Poka\u017c dost\u0119pne warstwy z:",doneText:"Gotowe",uploadText:"Wy\u015blij dane",addFeedActionMenuText:"Add feeds",searchText:"Search for layers"},"gxp.plugins.BingSource.prototype":{title:"Bing Maps",roadTitle:"Bing - drogi",aerialTitle:"Bing - ortofoto",labeledAerialTitle:"Bing - ortofoto z etykietami"},"gxp.plugins.FeatureEditor.prototype":{splitButtonText:"Edit",createFeatureActionText:"Create",editFeatureActionText:"Modify",createFeatureActionTip:"Utw\u00f3rz nowy obiekt", 2435editFeatureActionTip:"Edytuj istniej\u0105cy obiekt",commitTitle:"Commit message",commitText:"Please enter a commit message for this edit:"},"gxp.plugins.FeatureGrid.prototype":{displayFeatureText:"Poka\u017c na mapie",firstPageTip:"Pierwsza strona",previousPageTip:"Poprzednia strona",zoomPageExtentTip:"Powi\u0119ksz do zasi\u0119gu strony",nextPageTip:"Nast\u0119pna strona",lastPageTip:"Ostatnia strona",totalMsg:"Features {1} to {2} of {0}"},"gxp.plugins.GoogleEarth.prototype":{menuText:"Przegl\u0105darka 3D",
2436tooltip:"Prze\u0142\u0105cz do widoku 3D"},"gxp.plugins.GoogleSource.prototype":{title:"Google Maps",roadmapAbstract:"Mapa drogowa",satelliteAbstract:"Zdj\u0119cia satelitarne",hybridAbstract:"Zdj\u0119cia satelitarne z etykietami",terrainAbstract:"Mapa terenowa z etykietami"},"gxp.plugins.LayerProperties.prototype":{menuText:"W\u0142a\u015bciwo\u015bci",toolTip:"W\u0142a\u015bciwo\u015bci"},"gxp.plugins.LayerTree.prototype":{shortTitle:"Mapa",rootNodeText:"Mapa",overlayNodeText:"Warstwy",baseNodeText:"Mapa referencyjna"}, 2437"gxp.plugins.LayerManager.prototype":{baseNodeText:"Mapa referencyjna"},"gxp.plugins.Legend.prototype":{menuText:"Legenda mapy",tooltip:"Legenda mapy"},"gxp.plugins.Measure.prototype":{buttonText:"Pomiary",lengthMenuText:"D\u0142ugo\u015b\u0107",areaMenuText:"Powierzchnia",lengthTooltip:"Pomiar odleg\u0142o\u015bci",areaTooltip:"Pomiar powierzchni",measureTooltip:"Pomiary"},"gxp.plugins.Navigation.prototype":{menuText:"Przesu\u0144 map\u0119",tooltip:"Przesu\u0144 map\u0119"},"gxp.plugins.NavigationHistory.prototype":{previousMenuText:"Poprzedni widok", 2438nextMenuText:"Kolejny widok",previousTooltip:"Poprzedni widok",nextTooltip:"Kolejny widok"},"gxp.plugins.OSMSource.prototype":{title:"OpenStreetMap",mapnikAttribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors",osmarenderAttribution:"Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"},"gxp.plugins.Print.prototype":{buttonText:"Drukuj",menuText:"Drukuj",tooltip:"Drukuj",previewText:"Podgl\u0105d wydruku",notAllNotPrintableText:"Nie wszystkie warstwy mog\u0105 by\u0107 wydrukowane", 2439nonePrintableText:"\u017badna z warstw nie mo\u017ce byc wydrukowana"},"gxp.plugins.MapQuestSource.prototype":{title:"MapQuest",osmAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>",osmTitle:"MapQuest OpenStreetMap",naipAttribution:"Tiles Courtesy of <a href='http://open.mapquest.co.uk/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png' border='0'>", 2440naipTitle:"MapQuest Imagery"},"gxp.plugins.QueryForm.prototype":{queryActionText:"Wyszukaj",queryMenuText:"Przeszukaj warstw\u0119",queryActionTip:"Przeszukaj zaznaczon\u0105 warstw\u0119",queryByLocationText:"Query by current map extent",queryByAttributesText:"Przeszukaj po atrybutach",queryMsg:"Przeszukiwanie...",cancelButtonText:"Anuluj",noFeaturesTitle:"Brak danych",noFeaturesMessage:"Przeszukanie nie zwr\u00f3ci\u0142o \u017cadnych danych."},"gxp.plugins.RemoveLayer.prototype":{removeMenuText:"Usu\u0144 warstw\u0119", 2441removeActionTip:"Usu\u0144 warstw\u0119"},"gxp.plugins.Styler.prototype":{menuText:"Eycja styli",tooltip:"Zarz\u0105dzanie stylami warstwy"},"gxp.plugins.WMSGetFeatureInfo.prototype":{buttonText:"Identify",infoActionTip:"Info o obiekcie",popupTitle:"Info o obiekcie"},"gxp.plugins.Zoom.prototype":{zoomMenuText:"Zoom Box",zoomInMenuText:"Powi\u0119ksz",zoomOutMenuText:"Pomniejsz",zoomTooltip:"Zoom by dragging a box",zoomInTooltip:"Powi\u0119ksz",zoomOutTooltip:"Pomniejsz"},"gxp.plugins.ZoomToExtent.prototype":{menuText:"Ca\u0142a mapa", 2442tooltip:"Ca\u0142a mapa"},"gxp.plugins.ZoomToDataExtent.prototype":{menuText:"Powi\u0119ksz do zasi\u0119gu ca\u0142ej warstwy",tooltip:"Powi\u0119ksz do zasi\u0119gu ca\u0142ej warstwy"},"gxp.plugins.ZoomToLayerExtent.prototype":{menuText:"Powi\u0119ksz do zasi\u0119gu ca\u0142ej warstwy",tooltip:"Powi\u0119ksz do zasi\u0119gu ca\u0142ej warstwy"},"gxp.plugins.ZoomToSelectedFeatures.prototype":{menuText:"Powi\u0119ksz do wybranych obiekt\u00f3w",tooltip:"Powi\u0119ksz do wybranych obiekt\u00f3w"}, 2443"gxp.FeatureEditPopup.prototype":{closeMsgTitle:"Zapisa\u0107 zmiany?",closeMsg:"Istniej\u0105 nie zapisane zmiany. Chcesz je zapisa\u0107?",deleteMsgTitle:"Usun\u0105\u0107 obiekt?",deleteMsg:"Jeste\u015b pewien \u017ce chcesz usun\u0105\u0107 ten obiekt?",editButtonText:"Edytuj",editButtonTooltip:"Edytuj ten obiekt",deleteButtonText:"Usu\u0144",deleteButtonTooltip:"Usu\u0144 ten obiekt",cancelButtonText:"Anuluj",cancelButtonTooltip:"Anuluj edycj\u0119 i nie zapisuj zmian",saveButtonText:"Zapisz", 2444saveButtonTooltip:"Zapisz zmiany"},"gxp.FillSymbolizer.prototype":{fillText:"Wype\u0142nienie",colorText:"Kolor",opacityText:"Prze\u015bwit"},"gxp.FilterBuilder.prototype":{builderTypeNames:["dowolny","wszystkie","\u017caden","odwrotno\u015b\u
24440107"],preComboText:"Dopasuj",postComboText:"sposr\u00f3d:",addConditionText:"dodaj warunek",addGroupText:"dodaj grup\u0119",removeConditionText:"usu\u0144 warunek"},"gxp.grid.CapabilitiesGrid.prototype":{nameHeaderText:"Nazwa",titleHeaderText:"Tytu\u0142",queryableHeaderText:"Przeszukiwalna", 2445layerSelectionLabel:"Zobacz dost\u0119pne dane z:",layerAdditionLabel:"lub dodaj serwer.",expanderTemplateText:"<p><b>Opis:</b> {abstract}</p>"},"gxp.PointSymbolizer.prototype":{graphicCircleText:"ko\u0142o",graphicSquareText:"kwadrat",graphicTriangleText:"tr\u00f3jk\u0105t",graphicStarText:"gwiazda",graphicCrossText:"krzy\u017c",graphicXText:"x",graphicExternalText:"inny",urlText:"URL",opacityText:"Prze\u015bwit",symbolText:"Symbol",sizeText:"Rozmiar",rotationText:"Obr\u00f3t"},"gxp.QueryPanel.prototype":{queryByLocationText:"Zapytanie przestrzenne", 2446currentTextText:"Aktualne powi\u0119kszenie",queryByAttributesText:"Zapytanie atrybutowe",layerText:"Warstwa"},"gxp.RulePanel.prototype":{scaleSliderTemplate:"{scaleType} Skala 1:{scale}",labelFeaturesText:"Etykiety obiekt\u00f3w",labelsText:"Etykiety",basicText:"Podstawowa",advancedText:"Zaawansowana",limitByScaleText:"Ograniczenie skalowe",limitByConditionText:"Ograniczenie warunkowe",symbolText:"Symbol",nameText:"Nazwa"},"gxp.ScaleLimitPanel.prototype":{scaleSliderTemplate:"{scaleType} Skala 1:{scale}", 2447minScaleLimitText:"Skala min.",maxScaleLimitText:"Skala max"},"gxp.StrokeSymbolizer.prototype":{solidStrokeName:"ci\u0105g\u0142y",dashStrokeName:"kreskowany",dotStrokeName:"kropkowany",titleText:"Obrys",styleText:"Styl",colorText:"Kolor",widthText:"Grubo\u015b\u0107",opacityText:"Prze\u015bwit"},"gxp.StylePropertiesDialog.prototype":{titleText:"Og\u00f3lny",nameFieldText:"Nazwa",titleFieldText:"Tytu\u0142",abstractFieldText:"Opis"},"gxp.TextSymbolizer.prototype":{labelValuesText:"Warto\u015bci etykiet", 2448haloText:"Efekt Halo",sizeText:"Rozmiar"},"gxp.WMSLayerPanel.prototype":{aboutText:"O",titleText:"Tytu\u0142",nameText:"Nazwa",descriptionText:"Opis",displayText:"Wy\u015bwietlanie",opacityText:"Prze\u015bwit",formatText:"Format",transparentText:"Prze\u017ar.",cacheText:"Cache",cacheFieldText:"U\u017cyj wersji cache",stylesText:"Dost\u0119pne Style",infoFormatText:"Info format",infoFormatEmptyText:"Select a format",displayOptionsText:"Display options",queryText:"Limit with filters",scaleText:"Limit by scale", 2449minScaleText:"Min scale",maxScaleText:"Max scale",switchToFilterBuilderText:"Switch back to filter builder",cqlPrefixText:"or ",cqlText:"use CQL filter instead",singleTileText:"Single tile",singleTileFieldText:"Use a single tile"},"gxp.EmbedMapDialog.prototype":{publishMessage:"Twoja mapa jest gotowa do publikacji! Po prostu wklej poni\u017cszy kod na swojej witrynie:",heightLabel:"Wysoko\u015b\u0107",widthLabel:"Szeroko\u015b\u0107",mapSizeLabel:"Rozmiar mapy",miniSizeLabel:"Mini",smallSizeLabel:"Ma\u0142y", 2450premiumSizeLabel:"\u015aredni",largeSizeLabel:"Du\u017cy"},"gxp.WMSStylesDialog.prototype":{addStyleText:"Dodaj",addStyleTip:"Dodaj nowy styl",chooseStyleText:"Wybierz styl",deleteStyleText:"Usu\u0144",deleteStyleTip:"Usu\u0144 styl",editStyleText:"Edytuj",editStyleTip:"Edytuj wybrany styl",duplicateStyleText:"Stw\u00f3rz kopi\u0119",duplicateStyleTip:"Stw\u00f3rz kopi\u0119 wybranego stylu",addRuleText:"Dodaj",addRuleTip:"Dodaj now\u0105 regu\u0142\u0119",newRuleText:"Nowa regu\u0142a",deleteRuleText:"Usu\u0144", 2451deleteRuleTip:"Usu\u0144 wybran\u0105 regu\u0142\u0119",editRuleText:"Edytuj",editRuleTip:"Edytuj wybran\u0105 regu\u0142\u0119",duplicateRuleText:"Stw\u00f3rz kopi\u0119",duplicateRuleTip:"Skopiuj wybran\u0105 regu\u0142\u0119",cancelText:"Anuluj",saveText:"Zapisz",styleWindowTitle:"Styl u\u017cytkownika: {0}",ruleWindowTitle:"Regu\u0142a stylu: {0}",stylesFieldsetTitle:"Style",rulesFieldsetTitle:"Regu\u0142y"},"gxp.LayerUploadPanel.prototype":{titleLabel:"Tytu\u0142",titleEmptyText:"Tytu\u0142 warstwy", 2452abstractLabel:"Opis",abstractEmptyText:"Opis warstwy",fileLabel:"Dane",fieldEmptyText:"Wska\u017c lokalizacj\u0119 danych...",uploadText:"Prze\u015blij",uploadFailedText:"Upload failed",processingUploadText:"Processing upload...",importText:"Importing upload...",waitMsgText:"Przesy\u0142anie danych...",invalidFileExtensionText:"Typ pliku musi by\u0107 jednym z poni\u017cszych: ",optionsText:"Opcje",w
2452orkspaceLabel:"Obszar roboczy",workspaceEmptyText:"Domy\u015blny obszar roboczy",dataStoreLabel:"Magazyn danych", 2453dataStoreEmptyText:"Create new store",defaultDataStoreEmptyText:"Domy\u015blny magazyn danych"},"gxp.NewSourceDialog.prototype":{title:"Dodaj serwer...",cancelText:"Anuluj",addServerText:"Dodaj serwer",invalidURLText:"Podaj prawid\u0142owy adres URL us\u0142ugi WMS (n.p. http://example.com/geoserver/wms)",contactingServerText:"\u0141\u0105czenie z serwerem..."},"gxp.ScaleOverlay.prototype":{zoomLevelText:"Poziom powi\u0119kszenia"},"gxp.Viewer.prototype":{saveErrorText:"Trouble saving: "},"gxp.FeedSourceDialog.prototype":{feedTypeText:"\u0179r\u00f3d\u0142o", 2454addPicasaText:"Picasa zdj\u0119cia",addYouTubeText:"YouTube Videos",addRSSText:"Inne GeoRSS",addFeedText:"Dodaj do mapy",addTitleText:"Tytu\u0142",keywordText:"S\u0142owo",doneText:"Gotowe",titleText:"Dodaj kana\u0142y",maxResultsText:"Rzeczy Max"}});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.