OpenLayers=new Object();
OpenLayers.singleFile=true;
(function(){
var _18272=(typeof OpenLayers=="object"&&OpenLayers.singleFile);
OpenLayers={_scriptName:(!_18272)?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){
var _18273=this._searchForLibraryLocation(document.getElementsByTagName("head")[0].childNodes);
if(_18273==null){
_18273=this._searchForLibraryLocation(document.getElementsByTagName("script"));
}
return _18273==null?"":_18273;
},_searchForLibraryLocation:function(_18274){
var _18275=null;
var _18276=OpenLayers._scriptName;
for(var i=0;i<_18274.length;i++){
if(_18274[i].tagName=="SCRIPT"){
var src=_18274[i].getAttribute("src");
if(src!=null){
if(src.indexOf("?")>-1){
src=src.substring(0,src.indexOf("?"));
}
if(src){
var index=src.lastIndexOf(_18276);
if((index>-1)&&(index+_18276.length==src.length)){
_18275=src.slice(0,-_18276.length);
break;
}
}
}
}
}
return _18275;
}};
if(!_18272){
var _18277=new Array("OpenLayers/Util.js","OpenLayers/Console.js","OpenLayers/BaseTypes.js","OpenLayers/BaseTypes/Class.js","OpenLayers/BaseTypes/Bounds.js","OpenLayers/BaseTypes/Element.js","OpenLayers/BaseTypes/LonLat.js","OpenLayers/BaseTypes/Pixel.js","OpenLayers/BaseTypes/Size.js","Rico/Corner.js","Rico/Color.js","OpenLayers/Ajax.js","OpenLayers/Events.js","OpenLayers/Map.js","OpenLayers/Layer.js","OpenLayers/Icon.js","OpenLayers/Marker.js","OpenLayers/Marker/Box.js","OpenLayers/Popup.js","OpenLayers/Tile.js","OpenLayers/Tile/Image.js","OpenLayers/Tile/WFS.js","OpenLayers/Layer/Image.js","OpenLayers/Layer/SphericalMercator.js","OpenLayers/Layer/EventPane.js","OpenLayers/Layer/FixedZoomLevels.js","OpenLayers/Layer/Google.js","OpenLayers/Layer/VirtualEarth.js","OpenLayers/Layer/Yahoo.js","OpenLayers/Layer/HTTPRequest.js","OpenLayers/Layer/Grid.js","OpenLayers/Layer/MapServer.js","OpenLayers/Layer/MapServer/Untiled.js","OpenLayers/Layer/KaMap.js","OpenLayers/Layer/MultiMap.js","OpenLayers/Layer/Markers.js","OpenLayers/Layer/Text.js","OpenLayers/Layer/WorldWind.js","OpenLayers/Layer/WMS.js","OpenLayers/Layer/WMS/Untiled.js","OpenLayers/Layer/GeoRSS.js","OpenLayers/Layer/Boxes.js","OpenLayers/Layer/TMS.js","OpenLayers/Layer/TileCache.js","OpenLayers/Popup/Anchored.js","OpenLayers/Popup/AnchoredBubble.js","OpenLayers/Feature.js","OpenLayers/Feature/Vector.js","OpenLayers/Feature/WFS.js","OpenLayers/Handler.js","OpenLayers/Handler/Point.js","OpenLayers/Handler/Path.js","OpenLayers/Handler/Polygon.js","OpenLayers/Handler/Feature.js","OpenLayers/Handler/Drag.js","OpenLayers/Handler/RegularPolygon.js","OpenLayers/Handler/Box.js","OpenLayers/Handler/MouseWheel.js","OpenLayers/Handler/Keyboard.js","OpenLayers/Control.js","OpenLayers/Control/Attribution.js","OpenLayers/Control/ZoomBox.js","OpenLayers/Control/ZoomToMaxExtent.js","OpenLayers/Control/DragPan.js","OpenLayers/Control/Navigation.js","OpenLayers/Control/MouseDefaults.js","OpenLayers/Control/MousePosition.js","OpenLayers/Control/OverviewMap.js","OpenLayers/Control/KeyboardDefaults.js","OpenLayers/Control/PanZoom.js","OpenLayers/Control/PanZoomBar.js","OpenLayers/Control/ArgParser.js","OpenLayers/Control/Permalink.js","OpenLayers/Control/Scale.js","OpenLayers/Control/LayerSwitcher.js","OpenLayers/Control/DrawFeature.js","OpenLayers/Control/DragFeature.js","OpenLayers/Control/ModifyFeature.js","OpenLayers/Control/Panel.js","OpenLayers/Control/SelectFeature.js","OpenLayers/Geometry.js","OpenLayers/Geometry/Rectangle.js","OpenLayers/Geometry/Collection.js","OpenLayers/Geometry/Point.js","OpenLayers/Geometry/MultiPoint.js","OpenLayers/Geometry/Curve.js","OpenLayers/Geometry/LineString.js","OpenLayers/Geometry/LinearRing.js","OpenLayers/Geometry/Polygon.js","OpenLayers/Geometry/MultiLineString.js","OpenLayers/Geometry/MultiPolygon.js","OpenLayers/Geometry/Surface.js","OpenLayers/Renderer.js","OpenLayers/Renderer/Elements.js","OpenLayers/Renderer/SVG.js","OpenLayers/Renderer/VML.js","OpenLayers/Layer/Vector.js","OpenLayers/Layer/GML.js","OpenLayers/Format.js","OpenLayers/Format/XML.js","OpenLayers/Format/GML.js","OpenLayers/Format/KML.js","OpenLayers/Format/GeoRSS.js","OpenLayers/Format/WFS.js","OpenLayers/Format/WKT.js","OpenLayers/Format/JSON.js","OpenLayers/Format/GeoJSON.js","OpenLayers/Layer/WFS.js","OpenLayers/Control/MouseToolbar.js","OpenLayers/Control/NavToolbar.js","OpenLayers/Control/EditingToolbar.js");
var _18278="";
var host=OpenLayers._getScriptLocation()+"lib/";
for(var i=0;i<_18277.length;i++){
if(/MSIE/.test(navigator.userAgent)||/Safari/.test(navigator.userAgent)){
var _18279="";
_18278+=_18279;
}else{
var s=document.createElement("script");
s.src=host+_18277[i];
var h=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;
h.appendChild(s);
}
}
if(_18278){
document.write(_18278);
}
}
})();
OpenLayers.VERSION_NUMBER="$Revision: 1.2 $";
OpenLayers.Util={};
OpenLayers.Util.getElement=function(){
var _18280=[];
for(var i=0;i=5.5)&&(_18299<7));
};
OpenLayers.Util.modifyAlphaImageDiv=function(div,id,px,sz,imgURL,_18300,border,sizing,_18301){
OpenLayers.Util.modifyDOMElement(div,id,px,sz);
var img=div.childNodes[0];
if(!img){
img=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);
div.appendChild(img);
}
if(imgURL){
img.src=imgURL;
}
OpenLayers.Util.modifyDOMElement(img,div.id+"_innerImage",null,sz,"relative",border);
if(_18301){
if(_18301==1){
div.style.opacity=null;
div.style.filter=null;
}else{
div.style.opacity=_18301;
div.style.filter="alpha(opacity="+(_18301*100)+")";
}
}
if(OpenLayers.Util.alphaHack()){
div.style.display="inline-block";
if(sizing==null){
sizing="scale";
}
div.style.filter="progid:DXImageTransform.Microsoft"+".AlphaImageLoader(src='"+img.src+"', "+"sizingMethod='"+sizing+"')";
if(div.style.opacity){
div.style.filter+=" alpha(opacity="+div.style.opacity*100+")";
}
img.style.filter="progid:DXImageTransform.Microsoft"+".Alpha(opacity=0)";
}
};
OpenLayers.Util.createAlphaImageDiv=function(id,px,sz,imgURL,_18302,border,sizing,_18303,_18304){
var div=OpenLayers.Util.createDiv();
var img=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);
div.appendChild(img);
if(_18304){
img.style.display="none";
}
OpenLayers.Util.modifyAlphaImageDiv(div,id,px,sz,imgURL,_18302,border,sizing,_18303);
if(sz){
img.width=sz.w;
img.height=sz.h;
}
return div;
};
OpenLayers.Util.upperCaseObject=function(object){
var _18305={};
for(var key in object){
_18305[key.toUpperCase()]=object[key];
}
return _18305;
};
OpenLayers.Util.applyDefaults=function(to,from){
for(var key in from){
if(to[key]==null){
to[key]=from[key];
}
}
};
OpenLayers.Util.getParameterString=function(params){
paramsArray=[];
for(var key in params){
var value=params[key];
if((value!=null)&&(typeof value!="function")){
var _18306;
if(typeof value=="object"&&value.constructor==Array){
var _18307=[];
for(var _18308=0;_183080)){
if(!index){
index=0;
}
if(result[index].childNodes.length>1){
return result.childNodes[1].nodeValue;
}else{
if(result[index].childNodes.length==1){
return result[index].firstChild.nodeValue;
}
}
}else{
return "";
}
};
OpenLayers.Util.getXmlNodeValue=function(node){
var val=null;
OpenLayers.Util.Try(function(){
val=node.text;
if(!val){
val=node.textContent;
}
if(!val){
val=node.firstChild.nodeValue;
}
},function(){
val=node.textContent;
});
return val;
};
OpenLayers.Util.mouseLeft=function(evt,div){
var target=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;
while(target!=div&&target!=null){
target=target.parentNode;
}
return (target!=div);
};
OpenLayers.Util.rad=function(x){
return x*Math.PI/180;
};
OpenLayers.Util.distVincenty=function(p1,p2){
var a=6378137,b=6356752.3142,f=1/298.257223563;
var L=OpenLayers.Util.rad(p2.lon-p1.lon);
var U1=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p1.lat)));
var U2=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p2.lat)));
var sinU1=Math.sin(U1),cosU1=Math.cos(U1);
var sinU2=Math.sin(U2),cosU2=Math.cos(U2);
var lambda=L,lambdaP=2*Math.PI;
var _18313=20;
while(Math.abs(lambda-lambdaP)>1e-12&&--_18313>0){
var _18314=Math.sin(lambda),cosLambda=Math.cos(lambda);
var _18315=Math.sqrt((cosU2*_18314)*(cosU2*_18314)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));
if(_18315==0){
return 0;
}
var _18316=sinU1*sinU2+cosU1*cosU2*cosLambda;
var sigma=Math.atan2(_18315,_18316);
var alpha=Math.asin(cosU1*cosU2*_18314/_18315);
var _18317=Math.cos(alpha)*Math.cos(alpha);
var _18318=_18316-2*sinU1*sinU2/_18317;
var C=f/16*_18317*(4+f*(4-3*_18317));
lambdaP=lambda;
lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*_18315*(_18318+C*_18316*(-1+2*_18318*_18318)));
}
if(_18313==0){
return NaN;
}
var uSq=_18317*(a*a-b*b)/(b*b);
var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));
var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));
var _18319=B*_18315*(_18318+B/4*(_18316*(-1+2*_18318*_18318)-B/6*_18318*(-3+4*_18315*_18315)*(-3+4*_18318*_18318)));
var s=b*A*(sigma-_18319);
var d=s.toFixed(3)/1000;
return d;
};
OpenLayers.Util.getParameters=function(url){
url=url||window.location.href;
if(url==null){
url=window.location.href;
}
var _18320="";
if(OpenLayers.String.contains(url,"?")){
var start=url.indexOf("?")+1;
var end=OpenLayers.String.contains(url,"#")?url.indexOf("#"):url.length;
_18320=url.substring(start,end);
}
var _18321={};
var pairs=_18320.split(/[&;]/);
for(var i=0;i1)?(1/scale):scale;
return _18323;
};
OpenLayers.Util.getResolutionFromScale=function(scale,units){
if(units==null){
units="degrees";
}
var _18324=OpenLayers.Util.normalizeScale(scale);
var _18325=1/(_18324*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH);
return _18325;
};
OpenLayers.Util.getScaleFromResolution=function(_18326,units){
if(units==null){
units="degrees";
}
var scale=_18326*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH;
return scale;
};
OpenLayers.Util.safeStopPropagation=function(evt){
OpenLayers.Event.stop(evt,true);
};
OpenLayers.Util.pagePosition=function(_18327){
var valueT=0,valueL=0;
var _18328=_18327;
var child=_18327;
while(_18328){
if(_18328==document.body){
if(child&&child.style&&OpenLayers.Element.getStyle(child,"position")=="absolute"){
break;
}
}
valueT+=_18328.offsetTop||0;
valueL+=_18328.offsetLeft||0;
child=_18328;
try{
_18328=_18328.offsetParent;
}
catch(e){
OpenLayers.Console.error("OpenLayers.Util.pagePosition failed: element with id "+_18328.id+" may be misplaced.");
break;
}
}
_18328=_18327;
while(_18328){
valueT-=_18328.scrollTop||0;
valueL-=_18328.scrollLeft||0;
_18328=_18328.parentNode;
}
return [valueL,valueT];
};
OpenLayers.Util.docPosition=function(_18329){
var valueT=0,valueL=0;
var _18330=_18329;
do{
valueT+=_18330.offsetTop||0;
valueL+=_18330.offsetLeft||0;
if(_18330.offsetParent==document.body){
if(OpenLayers.Element.getStyle(_18330,"position")=="absolute"){
break;
}
}
}while(_18330=_18330.offsetParent);
return [valueL,valueT];
};
OpenLayers.Util.isEquivalentUrl=function(url1,url2,_18331){
_18331=_18331||{};
OpenLayers.Util.applyDefaults(_18331,{ignoreCase:true,ignorePort80:true,ignoreHash:true});
urlObj1=OpenLayers.Util.createUrlObject(url1,_18331);
urlObj2=OpenLayers.Util.createUrlObject(url2,_18331);
for(var key in urlObj1){
if(_18331.test){
alert(key+"\n1:"+urlObj1[key]+"\n2:"+urlObj2[key]);
}
var val1=urlObj1[key];
var val2=urlObj2[key];
switch(key){
case "args":
break;
case "host":
case "port":
case "protocol":
if((val1=="")||(val2=="")){
break;
}
default:
if((key!="args")&&(urlObj1[key]!=urlObj2[key])){
return false;
}
break;
}
}
for(var key in urlObj1.args){
if(urlObj1.args[key]!=urlObj2.args[key]){
return false;
}
delete urlObj2.args[key];
}
for(var key in urlObj2.args){
return false;
}
return true;
};
OpenLayers.Util.createUrlObject=function(url,_18332){
_18332=_18332||{};
var _18333={};
if(_18332.ignoreCase){
url=url.toLowerCase();
}
var a=document.createElement("a");
a.href=url;
_18333.host=a.host;
var port=a.port;
if(port.length<=0){
var _18334=_18333.host.length-(port.length);
_18333.host=_18333.host.substring(0,_18334);
}
_18333.protocol=a.protocol;
_18333.port=((port=="80")&&(_18332.ignorePort80))?"":port;
_18333.hash=(_18332.ignoreHash)?"":a.hash;
var _18335=a.search;
if(!_18335){
var qMark=url.indexOf("?");
_18335=(qMark!=-1)?url.substr(qMark):"";
}
_18333.args=OpenLayers.Util.getParameters(_18335);
if(((_18333.protocol=="file:")&&(url.indexOf("file:")!=-1))||((_18333.protocol!="file:")&&(_18333.host!=""))){
_18333.pathname=a.pathname;
var qIndex=_18333.pathname.indexOf("?");
if(qIndex!=-1){
_18333.pathname=_18333.pathname.substring(0,qIndex);
}
}else{
var relStr=OpenLayers.Util.removeTail(url);
var backs=0;
do{
var index=relStr.indexOf("../");
if(index==0){
backs++;
relStr=relStr.substr(3);
}else{
if(index>=0){
var _18336=relStr.substr(0,index-1);
var slash=_18336.indexOf("/");
_18336=(slash!=-1)?_18336.substr(0,slash+1):"";
var _18337=relStr.substr(index+3);
relStr=_18336+_18337;
}
}
}while(index!=-1);
var _18338=document.createElement("a");
var _18339=window.location.href;
if(_18332.ignoreCase){
_18339=_18339.toLowerCase();
}
_18338.href=_18339;
_18333.protocol=_18338.protocol;
var _18340=(_18338.pathname.indexOf("/")!=-1)?"/":"\\";
var dirs=_18338.pathname.split(_18340);
dirs.pop();
while((backs>0)&&(dirs.length>0)){
dirs.pop();
backs--;
}
relStr=dirs.join("/")+"/"+relStr;
_18333.pathname=relStr;
}
if((_18333.protocol=="file:")||(_18333.protocol=="")){
_18333.host="localhost";
}
return _18333;
};
OpenLayers.Util.removeTail=function(url){
var head=null;
var qMark=url.indexOf("?");
var _18341=url.indexOf("#");
if(qMark==-1){
head=(_18341!=-1)?url.substr(0,_18341):url;
}else{
head=(_18341!=-1)?url.substr(0,Math.min(qMark,_18341)):url.substr(0,qMark);
}
return head;
};
OpenLayers.Util.getBrowserName=function(){
var _18342="";
var ua=navigator.userAgent.toLowerCase();
if(ua.indexOf("opera")!=-1){
_18342="opera";
}else{
if(ua.indexOf("msie")!=-1){
_18342="msie";
}else{
if(ua.indexOf("safari")!=-1){
_18342="safari";
}else{
if(ua.indexOf("mozilla")!=-1){
if(ua.indexOf("firefox")!=-1){
_18342="firefox";
}else{
_18342="mozilla";
}
}
}
}
}
return _18342;
};
OpenLayers.Console={log:function(){
},debug:function(){
},info:function(){
},warn:function(){
},error:function(){
},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"};
(function(){
if(window.console){
var _18343=document.getElementsByTagName("script");
for(var i=0;i<_18343.length;++i){
if(_18343[i].src.indexOf("firebug.js")!=-1){
OpenLayers.Util.extend(OpenLayers.Console,console);
break;
}
}
}
})();
OpenLayers.Class=function(){
var Class=function(){
if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){
this.initialize.apply(this,arguments);
}
};
var _18344={};
var parent;
for(var i=0;i_18346.right){
_18347.lon-=_18346.getWidth();
}
}
return _18347;
},CLASS_NAME:"OpenLayers.LonLat"});
OpenLayers.LonLat.fromString=function(str){
var pair=str.split(",");
return new OpenLayers.LonLat(parseFloat(pair[0]),parseFloat(pair[1]));
};
OpenLayers.Size=OpenLayers.Class({w:0,h:0,initialize:function(w,h){
this.w=parseFloat(w);
this.h=parseFloat(h);
},toString:function(){
return ("w="+this.w+",h="+this.h);
},clone:function(){
return new OpenLayers.Size(this.w,this.h);
},equals:function(sz){
var equals=false;
if(sz!=null){
equals=((this.w==sz.w&&this.h==sz.h)||(isNaN(this.w)&&isNaN(this.h)&&isNaN(sz.w)&&isNaN(sz.h)));
}
return equals;
},CLASS_NAME:"OpenLayers.Size"});
OpenLayers.Pixel=OpenLayers.Class({x:0,y:0,initialize:function(x,y){
this.x=parseFloat(x);
this.y=parseFloat(y);
},toString:function(){
return ("x="+this.x+",y="+this.y);
},clone:function(){
return new OpenLayers.Pixel(this.x,this.y);
},equals:function(px){
var equals=false;
if(px!=null){
equals=((this.x==px.x&&this.y==px.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(px.x)&&isNaN(px.y)));
}
return equals;
},add:function(x,y){
if((x==null)||(y==null)){
var msg="You must pass both x and y values to the add function.";
OpenLayers.Console.error(msg);
return null;
}
return new OpenLayers.Pixel(this.x+x,this.y+y);
},offset:function(px){
var newPx=this.clone();
if(px){
newPx=this.add(px.x,px.y);
}
return newPx;
},CLASS_NAME:"OpenLayers.Pixel"});
OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,initialize:function(left,bottom,right,top){
if(left!=null){
this.left=parseFloat(left);
}
if(bottom!=null){
this.bottom=parseFloat(bottom);
}
if(right!=null){
this.right=parseFloat(right);
}
if(top!=null){
this.top=parseFloat(top);
}
},clone:function(){
return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top);
},equals:function(bounds){
var equals=false;
if(bounds!=null){
equals=((this.left==bounds.left)&&(this.right==bounds.right)&&(this.top==bounds.top)&&(this.bottom==bounds.bottom));
}
return equals;
},toString:function(){
return ("left-bottom=("+this.left+","+this.bottom+")"+" right-top=("+this.right+","+this.top+")");
},toArray:function(){
return [this.left,this.bottom,this.right,this.top];
},toBBOX:function(_18348){
if(_18348==null){
_18348=6;
}
var mult=Math.pow(10,_18348);
var bbox=Math.round(this.left*mult)/mult+","+Math.round(this.bottom*mult)/mult+","+Math.round(this.right*mult)/mult+","+Math.round(this.top*mult)/mult;
return bbox;
},getWidth:function(){
return (this.right-this.left);
},getHeight:function(){
return (this.top-this.bottom);
},getSize:function(){
return new OpenLayers.Size(this.getWidth(),this.getHeight());
},getCenterPixel:function(){
return new OpenLayers.Pixel((this.left+this.right)/2,(this.bottom+this.top)/2);
},getCenterLonLat:function(){
return new OpenLayers.LonLat((this.left+this.right)/2,(this.bottom+this.top)/2);
},add:function(x,y){
if((x==null)||(y==null)){
var msg="You must pass both x and y values to the add function.";
OpenLayers.Console.error(msg);
return null;
}
return new OpenLayers.Bounds(this.left+x,this.bottom+y,this.right+x,this.top+y);
},extend:function(object){
var bounds=null;
if(object){
switch(object.CLASS_NAME){
case "OpenLayers.LonLat":
bounds=new OpenLayers.Bounds(object.lon,object.lat,object.lon,object.lat);
break;
case "OpenLayers.Geometry.Point":
bounds=new OpenLayers.Bounds(object.x,object.y,object.x,object.y);
break;
case "OpenLayers.Bounds":
bounds=object;
break;
}
if(bounds){
if((this.left==null)||(bounds.leftthis.right)){
this.right=bounds.right;
}
if((this.top==null)||(bounds.top>this.top)){
this.top=bounds.top;
}
}
}
},containsLonLat:function(ll,_18349){
return this.contains(ll.lon,ll.lat,_18349);
},containsPixel:function(px,_18350){
return this.contains(px.x,px.y,_18350);
},contains:function(x,y,_18351){
if(_18351==null){
_18351=true;
}
var _18352=false;
if(_18351){
_18352=((x>=this.left)&&(x<=this.right)&&(y>=this.bottom)&&(y<=this.top));
}else{
_18352=((x>this.left)&&(xthis.bottom)&&(ythis.bottom)&&(bounds.bottombounds.bottom)&&(this.bottomthis.bottom)&&(bounds.topbounds.bottom)&&(this.topthis.left)&&(bounds.rightbounds.left)&&(this.rightthis.left)&&(bounds.leftbounds.left)&&(this.left=this.left)&&(bounds.left<=this.right);
inTop=(bounds.top>=this.bottom)&&(bounds.top<=this.top);
_18358=(bounds.right>=this.left)&&(bounds.right<=this.right);
_18359=(bounds.bottom>=this.bottom)&&(bounds.bottom<=this.top);
}else{
inLeft=(bounds.left>this.left)&&(bounds.leftthis.bottom)&&(bounds.topthis.left)&&(bounds.rightthis.bottom)&&(bounds.bottom=_18361.right&&_18365.right>_18361.right){
_18365=_18365.add(-_18361.getWidth(),0);
}
}
return _18365;
},CLASS_NAME:"OpenLayers.Bounds"});
OpenLayers.Bounds.fromString=function(str){
var bounds=str.split(",");
return OpenLayers.Bounds.fromArray(bounds);
};
OpenLayers.Bounds.fromArray=function(bbox){
return new OpenLayers.Bounds(parseFloat(bbox[0]),parseFloat(bbox[1]),parseFloat(bbox[2]),parseFloat(bbox[3]));
};
OpenLayers.Bounds.fromSize=function(size){
return new OpenLayers.Bounds(0,size.h,size.w,0);
};
OpenLayers.Bounds.oppositeQuadrant=function(_18366){
var opp="";
opp+=(_18366.charAt(0)=="t")?"b":"t";
opp+=(_18366.charAt(1)=="l")?"r":"l";
return opp;
};
OpenLayers.Element={visible:function(_18367){
return OpenLayers.Util.getElement(_18367).style.display!="none";
},toggle:function(){
for(var i=0;i0){
fig=parseFloat(num.toPrecision(sig));
}else{
fig=0;
}
return fig;
}};
if(!Number.prototype.limitSigDigs){
Number.prototype.limitSigDigs=function(sig){
return OpenLayers.Number.limitSigDigs(this,sig);
};
}
OpenLayers.Function={bind:function(func,object){
var args=Array.prototype.slice.apply(arguments,[2]);
return function(){
var _18383=args.concat(Array.prototype.slice.apply(arguments,[0]));
return func.apply(object,_18383);
};
},bindAsEventListener:function(func,object){
function $A(_18384){
if(!_18384){
return [];
}
if(_18384.toArray){
return _18384.toArray();
}else{
var _18385=[];
for(var i=0,length=_18384.length;i=0;i--){
var entry=_18399[i];
var args=new Array(entry.element,entry.name,entry.observer,entry.useCapture);
var _18400=OpenLayers.Event.stopObserving.apply(this,args);
}
}
},stopObserving:function(_18401,name,_18402,_18403){
_18403=_18403||false;
var _18404=OpenLayers.Util.getElement(_18401);
var _18405=_18404._eventCacheID;
if(name=="keypress"){
if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_18404.detachEvent){
name="keydown";
}
}
var _18406=false;
var _18407=OpenLayers.Event.observers[_18405];
if(_18407){
var i=0;
while(!_18406&&i<_18407.length){
var _18408=_18407[i];
if((_18408.name==name)&&(_18408.observer==_18402)&&(_18408.useCapture==_18403)){
_18407.splice(i,1);
if(_18407.length==0){
delete OpenLayers.Event.observers[_18405];
}
_18406=true;
break;
}
i++;
}
}
if(_18404.removeEventListener){
_18404.removeEventListener(name,_18402,_18403);
}else{
if(_18404&&_18404.detachEvent){
_18404.detachEvent("on"+name,_18402);
}
}
return _18406;
},unloadCache:function(){
if(OpenLayers.Event.observers){
for(var _18409 in OpenLayers.Event.observers){
var _18410=OpenLayers.Event.observers[_18409];
OpenLayers.Event._removeElementObservers.apply(this,[_18410]);
}
OpenLayers.Event.observers=false;
}
},CLASS_NAME:"OpenLayers.Event"};
OpenLayers.Event.observe(window,"unload",OpenLayers.Event.unloadCache,false);
OpenLayers.Events=OpenLayers.Class({BROWSER_EVENTS:["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","resize","focus","blur"],listeners:null,object:null,element:null,eventTypes:null,eventHandler:null,fallThrough:null,initialize:function(object,_18411,_18412,_18413){
this.object=object;
this.element=_18411;
this.eventTypes=_18412;
this.fallThrough=_18413;
this.listeners={};
this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);
if(this.eventTypes!=null){
for(var i=0;i0)){
for(var i=0;i<_18420.length;i++){
var _18421=_18420[i];
var _18422;
if(_18421.obj!=null){
_18422=_18421.func.call(_18421.obj,evt);
}else{
_18422=_18421.func(evt);
}
if((_18422!=null)&&(_18422==false)){
break;
}
}
if(!this.fallThrough){
OpenLayers.Event.stop(evt,true);
}
}
},handleBrowserEvent:function(evt){
evt.xy=this.getMousePosition(evt);
this.triggerEvent(evt.type,evt);
},getMousePosition:function(evt){
if(!this.element.offsets){
this.element.offsets=OpenLayers.Util.pagePosition(this.element);
this.element.offsets[0]+=(document.documentElement.scrollLeft||document.body.scrollLeft);
this.element.offsets[1]+=(document.documentElement.scrollTop||document.body.scrollTop);
}
return new OpenLayers.Pixel((evt.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))-this.element.offsets[0]-(document.documentElement.clientLeft||0),(evt.clientY+(document.documentElement.scrollTop||document.body.scrollTop))-this.element.offsets[1]-(document.documentElement.clientTop||0));
},CLASS_NAME:"OpenLayers.Events"});
OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Popup:750,Control:1000},EVENT_TYPES:["addlayer","removelayer","changelayer","movestart","move","moveend","zoomend","popupopen","popupclose","addmarker","removemarker","clearmarkers","mouseover","mouseout","mousemove","dragstart","drag","dragend","changebaselayer"],id:null,events:null,div:null,size:null,viewPortDiv:null,layerContainerOrigin:null,layerContainerDiv:null,layers:null,controls:null,popups:null,baseLayer:null,center:null,zoom:0,viewRequestID:0,tileSize:null,projection:"EPSG:4326",units:"degrees",resolutions:null,maxResolution:1.40625,minResolution:null,maxScale:null,minScale:null,maxExtent:null,minExtent:null,restrictedExtent:null,numZoomLevels:16,theme:null,fallThrough:false,initialize:function(div,_18423){
this.setOptions(_18423);
this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");
this.div=OpenLayers.Util.getElement(div);
var id=this.div.id+"_OpenLayers_ViewPort";
this.viewPortDiv=OpenLayers.Util.createDiv(id,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.popupDiv=OpenLayers.Util.createDiv(div.id+"_OpenLayers_PopupDiv",null,null,null,"absolute",null);
this.popupDiv.style.zIndex=this.Z_INDEX_BASE["Control"]+100;
this.popupDiv.className="olMapPopup";
id=this.div.id+"_OpenLayers_Container";
this.layerContainerDiv=OpenLayers.Util.createDiv(id);
this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE["Popup"]-1;
this.viewPortDiv.appendChild(this.layerContainerDiv);
this.viewPortDiv.appendChild(this.popupDiv);
this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES,this.fallThrough);
this.updateSize();
this.events.register("movestart",this,this.updateSize);
if(OpenLayers.String.contains(navigator.appName,"Microsoft")){
this.events.register("resize",this,this.updateSize);
}else{
OpenLayers.Event.observe(window,"resize",OpenLayers.Function.bind(this.updateSize,this));
}
if(this.theme){
var _18424=true;
var nodes=document.getElementsByTagName("link");
for(var i=0;i=0;--i){
this.layers[i].destroy(false);
}
this.layers=null;
}
if(this.controls!=null){
for(var i=this.controls.length-1;i>=0;--i){
this.controls[i].destroy();
}
this.controls=null;
}
if(this.viewPortDiv){
this.div.removeChild(this.viewPortDiv);
}
this.viewPortDiv=null;
this.events.destroy();
this.events=null;
},setOptions:function(_18426){
this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT);
this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90);
this.theme=OpenLayers._getScriptLocation()+"theme/default/style.css";
OpenLayers.Util.extend(this,_18426);
},getTileSize:function(){
return this.tileSize;
},getLayer:function(id){
var _18427=null;
for(var i=0;ithis.layers.length){
idx=this.layers.length;
}
}
if(base!=idx){
this.layers.splice(base,1);
this.layers.splice(idx,0,layer);
for(var i=0;ithis.restrictedExtent.getWidth()){
lonlat=new OpenLayers.LonLat(_18448.lon,lonlat.lat);
}else{
if(extent.leftthis.restrictedExtent.right){
lonlat=lonlat.add(this.restrictedExtent.right-extent.right,0);
}
}
}
if(extent.getHeight()>this.restrictedExtent.getHeight()){
lonlat=new OpenLayers.LonLat(lonlat.lon,_18448.lat);
}else{
if(extent.bottomthis.restrictedExtent.top){
lonlat=lonlat.add(0,this.restrictedExtent.top-extent.top);
}
}
}
}
}
var _18449=_18446||((this.isValidZoomLevel(zoom))&&(zoom!=this.getZoom()));
var _18450=(this.isValidLonLat(lonlat))&&(!lonlat.equals(this.center));
if(_18449||_18450||!_18445){
if(!_18445){
this.events.triggerEvent("movestart");
}
if(_18450){
if((!_18449)&&(this.center)){
this.centerLayerContainer(lonlat);
}
this.center=lonlat.clone();
}
if((_18449)||(this.layerContainerOrigin==null)){
this.layerContainerOrigin=this.center.clone();
this.layerContainerDiv.style.left="0px";
this.layerContainerDiv.style.top="0px";
}
if(_18449){
this.zoom=zoom;
this.viewRequestID++;
}
var bounds=this.getExtent();
this.baseLayer.moveTo(bounds,_18449,_18445);
bounds=this.baseLayer.getExtent();
for(var i=0;i=0)&&(_184540){
text=text.substring(index);
}
var _18494=OpenLayers.Util.Try(function(){
var xmldom=new ActiveXObject("Microsoft.XMLDOM");
xmldom.loadXML(text);
return xmldom;
},function(){
return new DOMParser().parseFromString(text,"text/xml");
},function(){
var req=new XMLHttpRequest();
req.open("GET","data:"+"text/xml"+";charset=utf-8,"+encodeURIComponent(text),false);
if(req.overrideMimeType){
req.overrideMimeType("text/xml");
}
req.send(null);
return req.responseXML;
});
return _18494;
};
OpenLayers.Ajax={emptyFunction:function(){
},getTransport:function(){
return OpenLayers.Util.Try(function(){
return new ActiveXObject("Msxml2.XMLHTTP");
},function(){
return new ActiveXObject("Microsoft.XMLHTTP");
},function(){
return new XMLHttpRequest();
})||false;
},activeRequestCount:0};
OpenLayers.Ajax.Responders={responders:[],register:function(_18495){
for(var i=0;i=200&&this.transport.status<300);
},responseIsFailure:function(){
return !this.responseIsSuccess();
}};
OpenLayers.Ajax.Request=OpenLayers.Class(OpenLayers.Ajax.Base,{initialize:function(url,_18501){
this.transport=OpenLayers.Ajax.getTransport();
this.setOptions(_18501);
this.request(url);
},request:function(url){
var _18502=this.options.parameters||"";
if(_18502.length>0){
_18502+="&_=";
}
try{
this.url=url;
if(this.options.method=="get"&&_18502.length>0){
this.url+=(this.url.match(/\?/)?"&":"?")+_18502;
}
OpenLayers.Ajax.Responders.dispatch("onCreate",this,this.transport);
this.transport.open(this.options.method,this.url,this.options.asynchronous);
if(this.options.asynchronous){
this.transport.onreadystatechange=OpenLayers.Function.bind(this.onStateChange,this);
setTimeout(OpenLayers.Function.bind((function(){
this.respondToReadyState(1);
}),this),10);
}
this.setRequestHeaders();
var body=this.options.postBody?this.options.postBody:_18502;
this.transport.send(this.options.method=="post"?body:null);
if(!this.options.asynchronous&&this.transport.overrideMimeType){
this.onStateChange();
}
}
catch(e){
this.dispatchException(e);
}
},setRequestHeaders:function(){
var _18503=["X-Requested-With","XMLHttpRequest","X-Prototype-Version","OpenLayers"];
if(this.options.method=="post"&&!this.options.postBody){
_18503.push("Content-type","application/x-www-form-urlencoded");
if(this.transport.overrideMimeType){
_18503.push("Connection","close");
}
}
if(this.options.requestHeaders){
_18503.push.apply(_18503,this.options.requestHeaders);
}
for(var i=0;i<_18503.length;i+=2){
this.transport.setRequestHeader(_18503[i],_18503[i+1]);
}
},onStateChange:function(){
var _18504=this.transport.readyState;
if(_18504!=1){
this.respondToReadyState(this.transport.readyState);
}
},header:function(name){
try{
return this.transport.getResponseHeader(name);
}
catch(e){
}
},evalJSON:function(){
try{
return eval(this.header("X-JSON"));
}
catch(e){
}
},evalResponse:function(){
try{
return eval(this.transport.responseText);
}
catch(e){
this.dispatchException(e);
}
},respondToReadyState:function(_18505){
var event=OpenLayers.Ajax.Request.Events[_18505];
var _18506=this.transport,json=this.evalJSON();
if(event=="Complete"){
try{
var _18507=this.responseIsSuccess()?"Success":"Failure";
(this.options["on"+this.transport.status]||this.options["on"+_18507]||OpenLayers.Ajax.emptyFunction)(_18506,json,this);
}
catch(e){
this.dispatchException(e);
}
var _18508=this.header("Content-type")||"";
if(_18508.match(/^text\/javascript/i)){
this.evalResponse();
}
}
try{
(this.options["on"+event]||OpenLayers.Ajax.emptyFunction)(_18506,json,this);
OpenLayers.Ajax.Responders.dispatch("on"+event,this,_18506,json,this);
}
catch(e){
this.dispatchException(e);
}
if(event=="Complete"){
this.transport.onreadystatechange=OpenLayers.Ajax.emptyFunction;
}
},dispatchException:function(_18509){
if(this.options.onException){
this.options.onException(this,_18509);
}else{
throw _18509;
}
OpenLayers.Ajax.Responders.dispatch("onException",this,_18509);
}});
OpenLayers.Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
OpenLayers.Ajax.getElementsByTagNameNS=function(_18510,nsuri,_18511,_18512){
var elem=null;
if(_18510.getElementsByTagNameNS){
elem=_18510.getElementsByTagNameNS(nsuri,_18512);
}else{
elem=_18510.getElementsByTagName(_18511+":"+_18512);
}
return elem;
};
OpenLayers.Ajax.serializeXMLToString=function(xmldom){
var _18513=new XMLSerializer();
data=_18513.serializeToString(xmldom);
return data;
};
OpenLayers.Format=OpenLayers.Class({initialize:function(_18514){
OpenLayers.Util.extend(this,_18514);
},read:function(data){
alert("Read not implemented.");
},write:function(object){
alert("Write not implemented.");
},CLASS_NAME:"OpenLayers.Format"});
OpenLayers.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,anchor:null,initialize:function(id,lonlat,size,_18515,anchor,_18516){
var _18517=new Array(id,lonlat,size,_18515,_18516);
OpenLayers.Popup.prototype.initialize.apply(this,_18517);
this.anchor=(anchor!=null)?anchor:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)};
},draw:function(px){
if(px==null){
if((this.lonlat!=null)&&(this.map!=null)){
px=this.map.getLayerPxFromLonLat(this.lonlat);
}
}
this.relativePosition=this.calculateRelativePosition(px);
return OpenLayers.Popup.prototype.draw.apply(this,arguments);
},calculateRelativePosition:function(px){
var lonlat=this.map.getLonLatFromLayerPx(px);
var extent=this.map.getExtent();
var _18518=extent.determineQuadrant(lonlat);
return OpenLayers.Bounds.oppositeQuadrant(_18518);
},moveTo:function(px){
this.relativePosition=this.calculateRelativePosition(px);
var newPx=this.calculateNewPx(px);
var _18519=new Array(newPx);
OpenLayers.Popup.prototype.moveTo.apply(this,_18519);
},setSize:function(size){
OpenLayers.Popup.prototype.setSize.apply(this,arguments);
if((this.lonlat)&&(this.map)){
var px=this.map.getLayerPxFromLonLat(this.lonlat);
this.moveTo(px);
}
},calculateNewPx:function(px){
var newPx=px.offset(this.anchor.offset);
var top=(this.relativePosition.charAt(0)=="t");
newPx.y+=(top)?-this.size.h:this.anchor.size.h;
var left=(this.relativePosition.charAt(1)=="l");
newPx.x+=(left)?-this.size.w:this.anchor.size.w;
return newPx;
},CLASS_NAME:"OpenLayers.Popup.Anchored"});
OpenLayers.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(id,lonlat,size,_18520,anchor,_18521){
OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);
},draw:function(px){
OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments);
this.setContentHTML();
this.setBackgroundColor();
this.setOpacity();
return this.div;
},moveTo:function(px){
OpenLayers.Popup.Anchored.prototype.moveTo.apply(this,arguments);
this.setRicoCorners(!this.rounded);
this.rounded=true;
},setSize:function(size){
OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);
if(this.contentDiv!=null){
var _18522=this.size.clone();
_18522.h-=(2*OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);
_18522.h-=(2*this.padding);
this.contentDiv.style.height=_18522.h+"px";
this.contentDiv.style.width=_18522.w+"px";
if(this.map){
this.setRicoCorners(!this.rounded);
this.rounded=true;
}
}
},setBackgroundColor:function(color){
if(color!=undefined){
this.backgroundColor=color;
}
if(this.div!=null){
if(this.contentDiv!=null){
this.div.style.background="transparent";
OpenLayers.Rico.Corner.changeColor(this.contentDiv,this.backgroundColor);
}
}
},setOpacity:function(_18523){
if(_18523!=undefined){
this.opacity=_18523;
}
if(this.div!=null){
if(this.contentDiv!=null){
OpenLayers.Rico.Corner.changeOpacity(this.contentDiv,this.opacity);
}
}
},setBorder:function(border){
this.border=0;
},setRicoCorners:function(_18524){
var _18525=this.getCornersToRound(this.relativePosition);
var _18526={corners:_18525,color:this.backgroundColor,bgColor:"transparent",blend:false};
if(_18524){
OpenLayers.Rico.Corner.round(this.div,_18526);
}else{
OpenLayers.Rico.Corner.reRound(this.groupDiv,_18526);
this.setBackgroundColor();
this.setOpacity();
}
},getCornersToRound:function(){
var _18527=["tl","tr","bl","br"];
var corner=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);
OpenLayers.Util.removeItem(_18527,corner);
return _18527.join(" ");
},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});
OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;
OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:OpenLayers.Popup.AnchoredBubble,popup:null,initialize:function(layer,lonlat,data){
this.layer=layer;
this.lonlat=lonlat;
this.data=(data!=null)?data:{};
this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");
},destroy:function(){
if((this.layer!=null)&&(this.layer.map!=null)){
if(this.popup!=null){
this.layer.map.removePopup(this.popup);
}
}
this.layer=null;
this.id=null;
this.lonlat=null;
this.data=null;
if(this.marker!=null){
this.destroyMarker(this.marker);
this.marker=null;
}
if(this.popup!=null){
this.destroyPopup(this.popup);
this.popup=null;
}
},onScreen:function(){
var _18528=false;
if((this.layer!=null)&&(this.layer.map!=null)){
var _18529=this.layer.map.getExtent();
_18528=_18529.containsLonLat(this.lonlat);
}
return _18528;
},createMarker:function(){
if(this.lonlat!=null){
this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);
}
return this.marker;
},destroyMarker:function(){
this.marker.destroy();
},createPopup:function(_18530){
if(this.lonlat!=null){
var id=this.id+"_popup";
var anchor=(this.marker)?this.marker.icon:null;
this.popup=new this.popupClass(id,this.lonlat,this.data.popupSize,this.data.popupContentHTML,anchor,_18530);
if(this.data.overflow!=null){
this.popup.contentDiv.style.overflow=this.data.overflow;
}
this.popup.feature=this;
}
return this.popup;
},destroyPopup:function(){
this.popup.feature=null;
this.popup.destroy();
},CLASS_NAME:"OpenLayers.Feature"});
OpenLayers.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"};
OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,state:null,style:null,initialize:function(_18531,_18532,style){
OpenLayers.Feature.prototype.initialize.apply(this,[null,null,_18532]);
this.lonlat=null;
this.geometry=_18531;
this.state=null;
this.attributes={};
if(_18532){
this.attributes=OpenLayers.Util.extend(this.attributes,_18532);
}
this.style=style?style:null;
},destroy:function(){
if(this.layer){
this.layer.removeFeatures(this);
this.layer=null;
}
this.geometry=null;
OpenLayers.Feature.prototype.destroy.apply(this,arguments);
},clone:function(){
return new OpenLayers.Feature.Vector(this.geometry.clone(),this.attributes,this.style);
},onScreen:function(){
return null;
},createMarker:function(){
return null;
},destroyMarker:function(){
},createPopup:function(){
return null;
},atPoint:function(lonlat,_18533,_18534){
var _18535=false;
if(this.geometry){
_18535=this.geometry.atPoint(lonlat,_18533,_18534);
}
return _18535;
},destroyPopup:function(){
},toState:function(state){
if(state==OpenLayers.State.UPDATE){
switch(this.state){
case OpenLayers.State.UNKNOWN:
case OpenLayers.State.DELETE:
this.state=state;
break;
case OpenLayers.State.UPDATE:
case OpenLayers.State.INSERT:
break;
}
}else{
if(state==OpenLayers.State.INSERT){
switch(this.state){
case OpenLayers.State.UNKNOWN:
break;
default:
this.state=state;
break;
}
}else{
if(state==OpenLayers.State.DELETE){
switch(this.state){
case OpenLayers.State.INSERT:
break;
case OpenLayers.State.DELETE:
break;
case OpenLayers.State.UNKNOWN:
case OpenLayers.State.UPDATE:
this.state=state;
break;
}
}else{
if(state==OpenLayers.State.UNKNOWN){
this.state=state;
}
}
}
}
},CLASS_NAME:"OpenLayers.Feature.Vector"});
OpenLayers.Feature.Vector.style={"default":{fillColor:"#ee9900",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted"},"select":{fillColor:"blue",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer"},"temporary":{fillColor:"yellow",fillOpacity:0.2,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"yellow",strokeOpacity:1,strokeLinecap:"round",strokeWidth:4,hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted"}};
OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(_18536){
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,[_18536]);
},read:function(wkt){
var _18537,type,str;
var _18538=this.regExes.typeStr.exec(wkt);
if(_18538){
type=_18538[1].toLowerCase();
str=_18538[2];
if(this.parse[type]){
_18537=this.parse[type].apply(this,[str]);
}
}
return _18537;
},write:function(_18539){
var _18540,geometry,type,data,isCollection;
if(_18539.constructor==Array){
_18540=_18539;
isCollection=true;
}else{
_18540=[_18539];
isCollection=false;
}
var pieces=[];
if(isCollection){
pieces.push("GEOMETRYCOLLECTION(");
}
for(var i=0;i<_18540.length;++i){
if(isCollection&&i>0){
pieces.push(",");
}
geometry=_18540[i].geometry;
type=geometry.CLASS_NAME.split(".")[2].toLowerCase();
if(!this.extract[type]){
return null;
}
data=this.extract[type].apply(this,[geometry]);
pieces.push(type.toUpperCase()+"("+data+")");
}
if(isCollection){
pieces.push(")");
}
return pieces.join("");
},extract:{"point":function(point){
return point.x+" "+point.y;
},"multipoint":function(_18541){
var array=[];
for(var i=0;i<_18541.components.length;++i){
array.push(this.extract.point.apply(this,[_18541.components[i]]));
}
return array.join(",");
},"linestring":function(_18542){
var array=[];
for(var i=0;i<_18542.components.length;++i){
array.push(this.extract.point.apply(this,[_18542.components[i]]));
}
return array.join(",");
},"multilinestring":function(_18543){
var array=[];
for(var i=0;i<_18543.components.length;++i){
array.push("("+this.extract.linestring.apply(this,[_18543.components[i]])+")");
}
return array.join(",");
},"polygon":function(_18544){
var array=[];
for(var i=0;i<_18544.components.length;++i){
array.push("("+this.extract.linestring.apply(this,[_18544.components[i]])+")");
}
return array.join(",");
},"multipolygon":function(_18545){
var array=[];
for(var i=0;i<_18545.components.length;++i){
array.push("("+this.extract.polygon.apply(this,[_18545.components[i]])+")");
}
return array.join(",");
}},parse:{"point":function(str){
var coords=OpenLayers.String.trim(str).split(this.regExes.spaces);
return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(coords[0],coords[1]));
},"multipoint":function(str){
var points=OpenLayers.String.trim(str).split(",");
var _18546=[];
for(var i=0;i0){
this.setBounds(this.components[0].getBounds());
for(var i=1;i-1)){
if(index!=null&&(index0)){
area+=Math.abs(this.components[0].getArea());
for(var i=1;i1)){
for(var i=1;i2)){
OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);
}
},CLASS_NAME:"OpenLayers.Geometry.LineString"});
OpenLayers.Geometry.MultiLineString=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LineString"],initialize:function(_18576){
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);
},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});
OpenLayers.Layer=OpenLayers.Class({id:null,name:null,div:null,EVENT_TYPES:["loadstart","loadend","loadcancel","visibilitychanged"],events:null,map:null,isBaseLayer:false,alpha:false,displayInLayerSwitcher:true,visibility:true,attribution:null,inRange:false,imageSize:null,imageOffset:null,options:null,gutter:0,projection:null,units:null,scales:null,resolutions:null,maxExtent:null,minExtent:null,maxResolution:null,minResolution:null,numZoomLevels:null,minScale:null,maxScale:null,displayOutsideMaxExtent:false,wrapDateLine:false,initialize:function(name,_18577){
this.addOptions(_18577);
this.name=name;
if(this.id==null){
this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");
this.div=OpenLayers.Util.createDiv();
this.div.style.width="100%";
this.div.style.height="100%";
this.div.id=this.id;
this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES);
}
if(this.wrapDateLine){
this.displayOutsideMaxExtent=true;
}
},destroy:function(_18578){
if(_18578==null){
_18578=true;
}
if(this.map!=null){
this.map.removeLayer(this,_18578);
}
this.map=null;
this.name=null;
this.div=null;
this.options=null;
if(this.events){
this.events.destroy();
}
this.events=null;
},clone:function(obj){
if(obj==null){
obj=new OpenLayers.Layer(this.name,this.options);
}
OpenLayers.Util.applyDefaults(obj,this);
obj.map=null;
return obj;
},setName:function(_18579){
if(_18579!=this.name){
this.name=_18579;
if(this.map!=null){
this.map.events.triggerEvent("changelayer");
}
}
},addOptions:function(_18580){
if(this.options==null){
this.options={};
}
OpenLayers.Util.extend(this.options,_18580);
OpenLayers.Util.extend(this,_18580);
},onMapResize:function(){
},redraw:function(){
var _18581=false;
if(this.map){
this.inRange=this.calculateInRange();
var extent=this.getExtent();
if(extent&&this.inRange&&this.visibility){
this.moveTo(extent,true,false);
_18581=true;
}
}
return _18581;
},moveTo:function(bounds,_18582,_18583){
var _18584=this.visibility;
if(!this.isBaseLayer){
_18584=_18584&&this.inRange;
}
this.display(_18584);
},setMap:function(map){
if(this.map==null){
this.map=map;
this.maxExtent=this.maxExtent||this.map.maxExtent;
this.projection=this.projection||this.map.projection;
this.units=this.units||this.map.units;
this.initResolutions();
if(!this.isBaseLayer){
this.inRange=this.calculateInRange();
var show=((this.visibility)&&(this.inRange));
this.div.style.display=show?"":"none";
}
this.setTileSize();
}
},removeMap:function(map){
},getImageSize:function(){
return (this.imageSize||this.tileSize);
},setTileSize:function(size){
var _18585=(size)?size:((this.tileSize)?this.tileSize:this.map.getTileSize());
this.tileSize=_18585;
if(this.gutter){
this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);
this.imageSize=new OpenLayers.Size(_18585.w+(2*this.gutter),_18585.h+(2*this.gutter));
}
},getVisibility:function(){
return this.visibility;
},setVisibility:function(_18586){
if(_18586!=this.visibility){
this.visibility=_18586;
this.display(_18586);
this.redraw();
if(this.map!=null){
this.map.events.triggerEvent("changelayer");
}
this.events.triggerEvent("visibilitychanged");
}
},display:function(_18587){
if(_18587!=(this.div.style.display!="none")){
this.div.style.display=(_18587)?"block":"none";
}
},calculateInRange:function(){
var _18588=false;
if(this.map){
var _18589=this.map.getResolution();
_18588=((_18589>=this.minResolution)&&(_18589<=this.maxResolution));
}
return _18588;
},setIsBaseLayer:function(_18590){
if(_18590!=this.isBaseLayer){
this.isBaseLayer=_18590;
if(this.map!=null){
this.map.events.triggerEvent("changelayer");
}
}
},initResolutions:function(){
var props=new Array("projection","units","scales","resolutions","maxScale","minScale","maxResolution","minResolution","minExtent","maxExtent","numZoomLevels","maxZoomLevel");
var _18591={};
for(var i=0;i_18600){
break;
}
_18600=diff;
}else{
if(this.resolutions[i]<_18598){
break;
}
}
}
return Math.max(0,i-1);
},getLonLatFromViewPortPx:function(_18601){
var lonlat=null;
if(_18601!=null){
var size=this.map.getSize();
var center=this.map.getCenter();
if(center){
var res=this.map.getResolution();
var _18602=_18601.x-(size.w/2);
var _18603=_18601.y-(size.h/2);
lonlat=new OpenLayers.LonLat(center.lon+_18602*res,center.lat-_18603*res);
if(this.wrapDateLine){
lonlat=lonlat.wrapDateLine(this.maxExtent);
}
}
}
return lonlat;
},getViewPortPxFromLonLat:function(lonlat){
var px=null;
if(lonlat!=null){
var _18604=this.map.getResolution();
var extent=this.map.getExtent();
px=new OpenLayers.Pixel(Math.round(1/_18604*(lonlat.lon-extent.left)),Math.round(1/_18604*(extent.top-lonlat.lat)));
}
return px;
},setOpacity:function(_18605){
if(_18605!=this.opacity){
this.opacity=_18605;
for(var i=0;i=bounds.bottom-_18635*this.buffer)||rowidx<_18631);
this.removeExcessTiles(rowidx,colidx);
this.spiralTileLoad();
},spiralTileLoad:function(){
var _18648=[];
var _18649=["right","down","left","up"];
var iRow=0;
var iCell=-1;
var _18650=OpenLayers.Util.indexOf(_18649,"right");
var _18651=0;
while(_18651<_18649.length){
var _18652=iRow;
var _18653=iCell;
switch(_18649[_18650]){
case "right":
_18653++;
break;
case "down":
_18652++;
break;
case "left":
_18653--;
break;
case "up":
_18652--;
break;
}
var tile=null;
if((_18652=0)&&(_18653=0)){
tile=this.grid[_18652][_18653];
}
if((tile!=null)&&(!tile.queued)){
_18648.unshift(tile);
tile.queued=true;
_18651=0;
iRow=_18652;
iCell=_18653;
}else{
_18650=(_18650+1)%4;
_18651++;
}
}
for(var i=0;i<_18648.length;i++){
var tile=_18648[i];
tile.draw();
tile.queued=false;
}
},addTile:function(bounds,_18654){
},addTileMonitoringHooks:function(tile){
tile.onLoadStart=function(){
if(this.numLoadingTiles==0){
this.events.triggerEvent("loadstart");
}
this.numLoadingTiles++;
};
tile.events.register("loadstart",this,tile.onLoadStart);
tile.onLoadEnd=function(){
this.numLoadingTiles--;
this.events.triggerEvent("tileloaded");
if(this.numLoadingTiles==0){
this.events.triggerEvent("loadend");
}
};
tile.events.register("loadend",this,tile.onLoadEnd);
},removeTileMonitoringHooks:function(tile){
tile.events.unregister("loadstart",this,tile.onLoadStart);
tile.events.unregister("loadend",this,tile.onLoadEnd);
},moveGriddedTiles:function(bounds){
var buffer=this.buffer||1;
while(true){
var _18655=this.grid[0][0].position;
var _18656=this.map.getViewPortPxFromLayerPx(_18655);
if(_18656.x>-this.tileSize.w*(buffer-1)){
this.shiftColumn(true);
}else{
if(_18656.x<-this.tileSize.w*buffer){
this.shiftColumn(false);
}else{
if(_18656.y>-this.tileSize.h*(buffer-1)){
this.shiftRow(true);
}else{
if(_18656.y<-this.tileSize.h*buffer){
this.shiftRow(false);
}else{
break;
}
}
}
}
}
if(this.buffer==0){
for(var r=0,rl=this.grid.length;rrows){
var row=this.grid.pop();
for(var i=0,l=row.length;i_18670){
for(var i=0,l=this.grid.length;i_18688.lon){
if(_18686.lon<0){
_18686.lon=-180-(_18686.lon+180);
}else{
_18688.lon=180+_18688.lon+180;
}
}
bounds=new OpenLayers.Bounds(_18686.lon,_18688.lat,_18688.lon,_18686.lat);
return bounds;
},CLASS_NAME:"OpenLayers.Tile"});
OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,initialize:function(layer,_18689,bounds,url,size){
OpenLayers.Tile.prototype.initialize.apply(this,arguments);
this.url=url;
this.frame=document.createElement("div");
this.frame.style.overflow="hidden";
this.frame.style.position="absolute";
},destroy:function(){
if(this.imgDiv!=null){
OpenLayers.Event.stopObservingElement(this.imgDiv.id);
if(this.imgDiv.parentNode==this.frame){
this.frame.removeChild(this.imgDiv);
this.imgDiv.map=null;
}
}
this.imgDiv=null;
if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){
this.layer.div.removeChild(this.frame);
}
this.frame=null;
OpenLayers.Tile.prototype.destroy.apply(this,arguments);
},draw:function(){
if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){
this.bounds=this.getBoundsFromBaseLayer(this.position);
}
if(!OpenLayers.Tile.prototype.draw.apply(this,arguments)){
return false;
}
if(this.isLoading){
this.events.triggerEvent("reload");
}else{
this.isLoading=true;
this.events.triggerEvent("loadstart");
}
if(this.imgDiv==null){
this.initImgDiv();
}
this.imgDiv.viewRequestID=this.layer.map.viewRequestID;
this.url=this.layer.getURL(this.bounds);
OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);
var _18690=this.layer.getImageSize();
if(this.layer.alpha){
OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,_18690,this.url);
}else{
this.imgDiv.src=this.url;
OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,_18690);
}
this.drawn=true;
return true;
},clear:function(){
OpenLayers.Tile.prototype.clear.apply(this,arguments);
if(this.imgDiv){
this.imgDiv.style.display="none";
if(OpenLayers.Tile.Image.useBlankTile){
this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif";
}
}
},initImgDiv:function(){
var offset=this.layer.imageOffset;
var size=this.layer.getImageSize();
if(this.layer.alpha){
this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,offset,size,null,"relative",null,null,null,true);
}else{
this.imgDiv=OpenLayers.Util.createImage(null,offset,size,null,"relative",null,null,true);
}
this.imgDiv.className="olTileImage";
this.frame.appendChild(this.imgDiv);
this.layer.div.appendChild(this.frame);
if(this.layer.opacity!=null){
OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity);
}
this.imgDiv.map=this.layer.map;
var onload=function(){
if(this.isLoading){
this.isLoading=false;
this.events.triggerEvent("loadend");
}
};
OpenLayers.Event.observe(this.imgDiv,"load",OpenLayers.Function.bind(onload,this));
},checkImgURL:function(){
if(this.layer){
var loaded=this.layer.alpha?this.imgDiv.firstChild.src:this.imgDiv.src;
if(!OpenLayers.Util.isEquivalentUrl(loaded,this.url)){
this.imgDiv.style.display="none";
}
}
},CLASS_NAME:"OpenLayers.Tile.Image"});
OpenLayers.Tile.Image.useBlankTile=(navigator.userAgent.indexOf("Opera")!=-1||navigator.userAgent.indexOf("AppleWebKit")!=-1);
OpenLayers.Layer.WMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{service:"WMS",version:"1.1.1",request:"GetMap",styles:"",exceptions:"application/vnd.ogc.se_inimage",format:"image/jpeg"},reproject:false,isBaseLayer:true,encodeBBOX:false,initialize:function(name,url,params,_18691){
var _18692=[];
params=OpenLayers.Util.upperCaseObject(params);
_18692.push(name,url,params,_18691);
OpenLayers.Layer.Grid.prototype.initialize.apply(this,_18692);
OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));
if(this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){
if((_18691==null)||(!_18691.isBaseLayer)){
this.isBaseLayer=false;
}
if(this.params.FORMAT=="image/jpeg"){
this.params.FORMAT=OpenLayers.Util.alphaHack()?"image/gif":"image/png";
}
}
},destroy:function(){
OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);
},clone:function(obj){
if(obj==null){
obj=new OpenLayers.Layer.WMS(this.name,this.url,this.params,this.options);
}
obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);
return obj;
},getURL:function(bounds){
bounds=this.adjustBounds(bounds);
var _18693=this.getImageSize();
return this.getFullRequestString({BBOX:this.encodeBBOX?bounds.toBBOX():bounds.toArray(),WIDTH:_18693.w,HEIGHT:_18693.h});
},addTile:function(bounds,_18694){
return new OpenLayers.Tile.Image(this,_18694,bounds,null,this.tileSize);
},mergeNewParams:function(_18695){
var _18696=OpenLayers.Util.upperCaseObject(_18695);
var _18697=[_18696];
OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,_18697);
},getFullRequestString:function(_18698){
var _18699=this.map.getProjection();
this.params.SRS=(_18699=="none")?null:_18699;
return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);
},CLASS_NAME:"OpenLayers.Layer.WMS"});
OpenLayers.Renderer=OpenLayers.Class({container:null,extent:null,size:null,resolution:null,map:null,initialize:function(_18700){
this.container=OpenLayers.Util.getElement(_18700);
},destroy:function(){
this.container=null;
this.extent=null;
this.size=null;
this.resolution=null;
this.map=null;
},supported:function(){
return false;
},setExtent:function(extent){
this.extent=extent.clone();
this.resolution=null;
},setSize:function(size){
this.size=size.clone();
this.resolution=null;
},getResolution:function(){
this.resolution=this.resolution||this.map.getResolution();
return this.resolution;
},drawFeature:function(_18701,style){
if(style==null){
style=_18701.style;
}
this.drawGeometry(_18701.geometry,style,_18701.id);
},drawGeometry:function(_18702,style,_18703){
},clear:function(){
},getFeatureIdFromEvent:function(evt){
},eraseFeatures:function(_18704){
if(!(_18704 instanceof Array)){
_18704=[_18704];
}
for(var i=0;i<_18704.length;++i){
this.eraseGeometry(_18704[i].geometry);
}
},eraseGeometry:function(_18705){
},CLASS_NAME:"OpenLayers.Renderer"});
OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:false,isFixed:false,isVector:true,features:null,selectedFeatures:null,reportError:true,style:null,renderers:["SVG","VML"],renderer:null,geometryType:null,drawn:false,initialize:function(name,_18706){
var _18707=OpenLayers.Feature.Vector.style["default"];
this.style=OpenLayers.Util.extend({},_18707);
OpenLayers.Layer.prototype.initialize.apply(this,arguments);
if(!this.renderer||!this.renderer.supported()){
this.assignRenderer();
}
if(!this.renderer||!this.renderer.supported()){
this.renderer=null;
this.displayError();
}
this.features=[];
this.selectedFeatures=[];
},destroy:function(){
OpenLayers.Layer.prototype.destroy.apply(this,arguments);
this.destroyFeatures();
this.features=null;
this.selectedFeatures=null;
if(this.renderer){
this.renderer.destroy();
}
this.renderer=null;
this.geometryType=null;
this.drawn=null;
},assignRenderer:function(){
for(var i=0;i=0;i--){
var _18717=_18716[i];
this.features=OpenLayers.Util.removeItem(this.features,_18717);
if(_18717.geometry){
this.renderer.eraseGeometry(_18717.geometry);
}
if(OpenLayers.Util.indexOf(this.selectedFeatures,_18717)!=-1){
OpenLayers.Util.removeItem(this.selectedFeatures,_18717);
}
}
},destroyFeatures:function(){
this.selectedFeatures=[];
for(var i=this.features.length-1;i>=0;i--){
this.features[i].destroy();
}
},drawFeature:function(_18718,style){
if(style==null){
if(_18718.style){
style=_18718.style;
}else{
style=this.style;
}
}
this.renderer.drawFeature(_18718,style);
},eraseFeatures:function(_18719){
this.renderer.eraseFeatures(_18719);
},getFeatureFromEvent:function(evt){
if(!this.renderer){
OpenLayers.Console.error("getFeatureFromEvent called on layer with no renderer. This usually means you destroyed a layer, but not some handler which is associated with it.");
return null;
}
var _18720=this.renderer.getFeatureIdFromEvent(evt);
return this.getFeatureById(_18720);
},getFeatureById:function(_18721){
var _18722=null;
for(var i=0;i0){
this.removeMarker(this.markers[0]);
}
}
},drawMarker:function(marker){
var px=this.map.getLayerPxFromLonLat(marker.lonlat);
if(px==null){
marker.display(false);
}else{
var _18728=marker.draw(px);
if(!marker.drawn){
this.div.appendChild(_18728);
marker.drawn=true;
}
}
},getDataExtent:function(){
var _18729=null;
if(this.markers&&(this.markers.length>0)){
var _18729=new OpenLayers.Bounds();
for(var i=0;i0){
this.root.removeChild(this.root.firstChild);
}
}
},getNodeType:function(_18731){
},drawGeometry:function(_18732,style,_18733){
var _18734=_18732.CLASS_NAME;
if((_18734=="OpenLayers.Geometry.Collection")||(_18734=="OpenLayers.Geometry.MultiPoint")||(_18734=="OpenLayers.Geometry.MultiLineString")||(_18734=="OpenLayers.Geometry.MultiPolygon")){
for(var i=0;i<_18732.components.length;i++){
this.drawGeometry(_18732.components[i],style,_18733);
}
return;
}
var _18735=this.getNodeType(_18732);
var node=this.nodeFactory(_18732.id,_18735,_18732);
node._featureId=_18733;
node._geometryClass=_18732.CLASS_NAME;
node._style=style;
this.root.appendChild(node);
this.drawGeometryNode(node,_18732);
},drawGeometryNode:function(node,_18736,style){
style=style||node._style;
var _18737={"isFilled":true,"isStroked":true};
switch(_18736.CLASS_NAME){
case "OpenLayers.Geometry.Point":
this.drawPoint(node,_18736);
break;
case "OpenLayers.Geometry.LineString":
_18737.isFilled=false;
this.drawLineString(node,_18736);
break;
case "OpenLayers.Geometry.LinearRing":
this.drawLinearRing(node,_18736);
break;
case "OpenLayers.Geometry.Polygon":
this.drawPolygon(node,_18736);
break;
case "OpenLayers.Geometry.Surface":
this.drawSurface(node,_18736);
break;
case "OpenLayers.Geometry.Rectangle":
this.drawRectangle(node,_18736);
break;
default:
break;
}
node._style=style;
node._options=_18737;
this.setStyle(node,style,_18737,_18736);
},drawPoint:function(node,_18738){
},drawLineString:function(node,_18739){
},drawLinearRing:function(node,_18740){
},drawPolygon:function(node,_18741){
},drawRectangle:function(node,_18742){
},drawCircle:function(node,_18743){
},drawCurve:function(node,_18744){
},drawSurface:function(node,_18745){
},getFeatureIdFromEvent:function(evt){
var node=evt.target||evt.srcElement;
return node._featureId;
},eraseGeometry:function(_18746){
if((_18746.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(_18746.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(_18746.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")){
for(var i=0;i<_18746.components.length;i++){
this.eraseGeometry(_18746.components[i]);
}
}else{
var _18747=OpenLayers.Util.getElement(_18746.id);
if(_18747&&_18747.parentNode){
if(_18747.geometry){
_18747.geometry.destroy();
_18747.geometry=null;
}
_18747.parentNode.removeChild(_18747);
}
}
},nodeFactory:function(id,type,_18748){
var node=OpenLayers.Util.getElement(id);
if(node){
if(!this.nodeTypeCompare(node,type)){
node.parentNode.removeChild(node);
node=this.nodeFactory(id,type,_18748);
}
}else{
node=this.createNode(type,id);
}
return node;
},CLASS_NAME:"OpenLayers.Renderer.Elements"});
OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",maxPixel:15000,localResolution:null,initialize:function(_18749){
if(!this.supported()){
return;
}
OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);
},destroy:function(){
OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments);
},supported:function(){
var _18750="http://www.w3.org/TR/SVG11/feature#";
return (document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(_18750+"SVG","1.1")||document.implementation.hasFeature(_18750+"BasicStructure","1.1")));
},setExtent:function(extent){
OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);
var _18751=this.getResolution();
if(!this.localResolution||_18751!=this.localResolution){
this.left=-extent.left/_18751;
this.top=extent.top/_18751;
}
var left=0;
var top=0;
if(this.localResolution&&_18751==this.localResolution){
left=(this.left)-(-extent.left/_18751);
top=(this.top)-(extent.top/_18751);
}
this.localResolution=_18751;
var _18752=left+" "+top+" "+extent.getWidth()/_18751+" "+extent.getHeight()/_18751;
this.rendererRoot.setAttributeNS(null,"viewBox",_18752);
},setSize:function(size){
OpenLayers.Renderer.prototype.setSize.apply(this,arguments);
this.rendererRoot.setAttributeNS(null,"width",this.size.w);
this.rendererRoot.setAttributeNS(null,"height",this.size.h);
},getNodeType:function(_18753){
var _18754=null;
switch(_18753.CLASS_NAME){
case "OpenLayers.Geometry.Point":
_18754="circle";
break;
case "OpenLayers.Geometry.Rectangle":
_18754="rect";
break;
case "OpenLayers.Geometry.LineString":
_18754="polyline";
break;
case "OpenLayers.Geometry.LinearRing":
_18754="polygon";
break;
case "OpenLayers.Geometry.Polygon":
case "OpenLayers.Geometry.Curve":
case "OpenLayers.Geometry.Surface":
_18754="path";
break;
default:
break;
}
return _18754;
},setStyle:function(node,style,_18755){
style=style||node._style;
_18755=_18755||node._options;
if(node._geometryClass=="OpenLayers.Geometry.Point"){
if(style.externalGraphic){
var id=node.getAttributeNS(null,"id");
var x=parseFloat(node.getAttributeNS(null,"cx"));
var y=parseFloat(node.getAttributeNS(null,"cy"));
var _18756=node._featureId;
var _18757=node._geometryClass;
var _style=node._style;
this.root.removeChild(node);
var node=this.createNode("image",id);
node._featureId=_18756;
node._geometryClass=_18757;
node._style=_style;
this.root.appendChild(node);
if(style.graphicWidth&&style.graphicHeight){
node.setAttributeNS(null,"preserveAspectRatio","none");
}
var width=style.graphicWidth||style.graphicHeight;
var height=style.graphicHeight||style.graphicWidth;
width=width?width:style.pointRadius*2;
height=height?height:style.pointRadius*2;
var _18758=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);
var _18759=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);
var _18760=style.graphicOpacity||style.fillOpacity;
node.setAttributeNS(null,"x",(x+_18758).toFixed());
node.setAttributeNS(null,"y",(-y+_18759).toFixed());
node.setAttributeNS(null,"width",width);
node.setAttributeNS(null,"height",height);
node.setAttributeNS("http://www.w3.org/1999/xlink","href",style.externalGraphic);
node.setAttributeNS(null,"transform","scale(1,-1)");
node.setAttributeNS(null,"style","opacity: "+_18760);
}else{
node.setAttributeNS(null,"r",style.pointRadius);
}
}
if(_18755.isFilled){
node.setAttributeNS(null,"fill",style.fillColor);
node.setAttributeNS(null,"fill-opacity",style.fillOpacity);
}else{
node.setAttributeNS(null,"fill","none");
}
if(_18755.isStroked){
node.setAttributeNS(null,"stroke",style.strokeColor);
node.setAttributeNS(null,"stroke-opacity",style.strokeOpacity);
node.setAttributeNS(null,"stroke-width",style.strokeWidth);
node.setAttributeNS(null,"stroke-linecap",style.strokeLinecap);
}else{
node.setAttributeNS(null,"stroke","none");
}
if(style.pointerEvents){
node.setAttributeNS(null,"pointer-events",style.pointerEvents);
}
if(style.cursor){
node.setAttributeNS(null,"cursor",style.cursor);
}
},createNode:function(type,id){
var node=document.createElementNS(this.xmlns,type);
if(id){
node.setAttributeNS(null,"id",id);
}
return node;
},nodeTypeCompare:function(node,type){
return (type==node.nodeName);
},createRenderRoot:function(){
var id=this.container.id+"_svgRoot";
var _18761=this.nodeFactory(id,"svg");
return _18761;
},createRoot:function(){
var id=this.container.id+"_root";
var root=this.nodeFactory(id,"g");
root.setAttributeNS(null,"transform","scale(1, -1)");
return root;
},drawPoint:function(node,_18762){
this.drawCircle(node,_18762,1);
},drawCircle:function(node,_18763,radius){
var _18764=this.getResolution();
var x=(_18763.x/_18764+this.left);
var y=(_18763.y/_18764-this.top);
var draw=true;
if(x<-this.maxPixel||x>this.maxPixel){
draw=false;
}
if(y<-this.maxPixel||y>this.maxPixel){
draw=false;
}
if(draw){
node.setAttributeNS(null,"cx",x);
node.setAttributeNS(null,"cy",y);
node.setAttributeNS(null,"r",radius);
}else{
this.root.removeChild(node);
}
},drawLineString:function(node,_18765){
node.setAttributeNS(null,"points",this.getComponentsString(_18765.components));
},drawLinearRing:function(node,_18766){
node.setAttributeNS(null,"points",this.getComponentsString(_18766.components));
},drawPolygon:function(node,_18767){
var d="";
var draw=true;
for(var j=0;j<_18767.components.length;j++){
var _18768=_18767.components[j];
d+=" M";
for(var i=0;i<_18768.components.length;i++){
var _18769=this.getShortString(_18768.components[i]);
if(_18769){
d+=" "+_18769;
}else{
draw=false;
}
}
}
d+=" z";
if(draw){
node.setAttributeNS(null,"d",d);
node.setAttributeNS(null,"fill-rule","evenodd");
}else{
node.setAttributeNS(null,"d","");
}
},drawRectangle:function(node,_18770){
var x=(_18770.x/resolution+this.left);
var y=(_18770.y/resolution-this.top);
var draw=true;
if(x<-this.maxPixel||x>this.maxPixel){
draw=false;
}
if(y<-this.maxPixel||y>this.maxPixel){
draw=false;
}
if(draw){
node.setAttributeNS(null,"x",x);
node.setAttributeNS(null,"y",y);
node.setAttributeNS(null,"width",_18770.width);
node.setAttributeNS(null,"height",_18770.height);
}else{
node.setAttributeNS(null,"x","");
node.setAttributeNS(null,"y","");
node.setAttributeNS(null,"width",0);
node.setAttributeNS(null,"height",0);
}
},drawCurve:function(node,_18771){
var d=null;
var draw=true;
for(var i=0;i<_18771.components.length;i++){
if((i%3)==0&&(i/3)==0){
var _18772=this.getShortString(_18771.components[i]);
if(!_18772){
draw=false;
}
d="M "+_18772;
}else{
if((i%3)==1){
var _18772=this.getShortString(_18771.components[i]);
if(!_18772){
draw=false;
}
d+=" C "+_18772;
}else{
var _18772=this.getShortString(_18771.components[i]);
if(!_18772){
draw=false;
}
d+=" "+_18772;
}
}
}
if(draw){
node.setAttributeNS(null,"d",d);
}else{
node.setAttributeNS(null,"d","");
}
},drawSurface:function(node,_18773){
var d=null;
var draw=true;
for(var i=0;i<_18773.components.length;i++){
if((i%3)==0&&(i/3)==0){
var _18774=this.getShortString(_18773.components[i]);
if(!_18774){
draw=false;
}
d="M "+_18774;
}else{
if((i%3)==1){
var _18774=this.getShortString(_18773.components[i]);
if(!_18774){
draw=false;
}
d+=" C "+_18774;
}else{
var _18774=this.getShortString(_18773.components[i]);
if(!_18774){
draw=false;
}
d+=" "+_18774;
}
}
}
d+=" Z";
if(draw){
node.setAttributeNS(null,"d",d);
}else{
node.setAttributeNS(null,"d","");
}
},getComponentsString:function(_18775){
var _18776=[];
for(var i=0;i<_18775.length;i++){
var _18777=this.getShortString(_18775[i]);
if(_18777){
_18776.push(_18777);
}
}
return _18776.join(",");
},getShortString:function(point){
var _18778=this.getResolution();
var x=(point.x/_18778+this.left);
var y=(point.y/_18778-this.top);
if(x<-this.maxPixel||x>this.maxPixel){
return false;
}
if(y<-this.maxPixel||y>this.maxPixel){
return false;
}
var string=x+","+y;
return string;
},CLASS_NAME:"OpenLayers.Renderer.SVG"});
OpenLayers.Renderer.VML=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"urn:schemas-microsoft-com:vml",initialize:function(_18779){
if(!this.supported()){
return;
}
try{
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
var style=document.createStyleSheet();
style.addRule("v\\:*","behavior: url(#default#VML); "+"position: relative; display: inline-block;");
}
catch(e){
}
OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);
},destroy:function(){
OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments);
},supported:function(){
var _18780=document.namespaces;
return _18780;
},setExtent:function(extent){
OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);
var _18781=this.getResolution();
if(EMS.Util.isIE8()){
this.extent=extent;
var org="0 0";
}else{
var org=extent.left/_18781+" "+extent.top/_18781;
}
this.root.setAttribute("coordorigin",org);
var size=extent.getWidth()/_18781+" "+-extent.getHeight()/_18781;
this.root.setAttribute("coordsize",size);
},setSize:function(size){
OpenLayers.Renderer.prototype.setSize.apply(this,arguments);
this.rendererRoot.style.width=this.size.w;
this.rendererRoot.style.height=this.size.h;
this.root.style.width="100%";
this.root.style.height="100%";
},getNodeType:function(_18782){
var _18783=null;
switch(_18782.CLASS_NAME){
case "OpenLayers.Geometry.Point":
_18783="v:oval";
break;
case "OpenLayers.Geometry.Rectangle":
_18783="v:rect";
break;
case "OpenLayers.Geometry.LineString":
case "OpenLayers.Geometry.LinearRing":
case "OpenLayers.Geometry.Polygon":
case "OpenLayers.Geometry.Curve":
case "OpenLayers.Geometry.Surface":
_18783="v:shape";
break;
default:
break;
}
return _18783;
},setStyle:function(node,style,_18784,_18785){
style=style||node._style;
_18784=_18784||node._options;
if(node._geometryClass=="OpenLayers.Geometry.Point"){
if(style.externalGraphic){
var id=node.id;
var _18786=node._featureId;
var _18787=node._geometryClass;
var _style=node._style;
this.root.removeChild(node);
var node=this.createNode("v:rect",id);
var fill=this.createNode("v:fill",id+"_image");
node.appendChild(fill);
node._featureId=_18786;
node._geometryClass=_18787;
node._style=_style;
this.root.appendChild(node);
fill.src=style.externalGraphic;
fill.type="frame";
node.style.flip="y";
if(!(style.graphicWidth&&style.graphicHeight)){
fill.aspect="atmost";
}
var width=style.graphicWidth||style.graphicHeight;
var height=style.graphicHeight||style.graphicWidth;
width=width?width:style.pointRadius*2;
height=height?height:style.pointRadius*2;
var _18788=this.getResolution();
var _18789=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);
var _18790=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);
node.style.left=((_18785.x/_18788)+_18789).toFixed();
node.style.top=((_18785.y/_18788)-(_18790+height)).toFixed();
node.style.width=width;
node.style.height=height;
style.fillColor="none";
style.strokeColor="none";
}else{
this.drawCircle(node,_18785,style.pointRadius);
}
}
var _18791=(_18784.isFilled)?style.fillColor:"none";
node.setAttribute("fillcolor",_18791);
var fills=node.getElementsByTagName("fill");
var fill=(fills.length==0)?null:fills[0];
if(!_18784.isFilled){
if(fill){
node.removeChild(fill);
}
}else{
if(!fill){
fill=this.createNode("v:fill",node.id+"_fill");
node.appendChild(fill);
}
if(node._geometryClass=="OpenLayers.Geometry.Point"&&style.externalGraphic&&style.graphicOpacity){
fill.setAttribute("opacity",style.graphicOpacity);
}else{
if(style.fillOpacity){
fill.setAttribute("opacity",style.fillOpacity);
}
}
}
var _18792=(_18784.isStroked)?style.strokeColor:"none";
node.setAttribute("strokecolor",_18792);
node.setAttribute("strokeweight",style.strokeWidth);
var _18793=node.getElementsByTagName("stroke");
var stroke=(_18793.length==0)?null:_18793[0];
if(!_18784.isStroked){
if(stroke){
node.removeChild(stroke);
}
}else{
if(!stroke){
stroke=this.createNode("v:stroke",node.id+"_stroke");
node.appendChild(stroke);
}
stroke.setAttribute("opacity",style.strokeOpacity);
stroke.setAttribute("endcap",!style.strokeLinecap||style.strokeLinecap=="butt"?"flat":style.strokeLinecap);
}
if(style.cursor){
node.style.cursor=style.cursor;
}
},setNodeDimension:function(node,_18794){
var bbox=_18794.getBounds();
if(bbox){
var _18795=this.getResolution();
var _18796=new OpenLayers.Bounds((bbox.left/_18795).toFixed(),(bbox.bottom/_18795).toFixed(),(bbox.right/_18795).toFixed(),(bbox.top/_18795).toFixed());
if(EMS.Util.isIE8()){
node.style.left=0;
node.style.top=0;
}else{
node.style.left=_18796.left;
node.style.top=_18796.top;
}
node.style.width=_18796.getWidth();
node.style.height=_18796.getHeight();
if(EMS.Util.isIE8()){
node.coordorigin="0 0";
}else{
node.coordorigin=_18796.left+" "+_18796.top;
}
node.coordsize=_18796.getWidth()+" "+_18796.getHeight();
}
},createNode:function(type,id){
var node=document.createElement(type);
if(id){
node.setAttribute("id",id);
}
return node;
},nodeTypeCompare:function(node,type){
var _18797=type;
var _18798=_18797.indexOf(":");
if(_18798!=-1){
_18797=_18797.substr(_18798+1);
}
var _18799=node.nodeName;
_18798=_18799.indexOf(":");
if(_18798!=-1){
_18799=_18799.substr(_18798+1);
}
return (_18797==_18799);
},createRenderRoot:function(){
var id=this.container.id+"_vmlRoot";
var _18800=this.nodeFactory(id,"div");
return _18800;
},createRoot:function(){
var id=this.container.id+"_root";
var root=this.nodeFactory(id,"v:group");
return root;
},drawPoint:function(node,_18801){
this.drawCircle(node,_18801,1);
},drawCircle:function(node,_18802,radius){
if(!isNaN(_18802.x)&&!isNaN(_18802.y)){
var _18803=this.getResolution();
node.style.left=(_18802.x/_18803).toFixed()-radius;
node.style.top=(_18802.y/_18803).toFixed()-radius;
var _18804=radius*2;
node.style.width=_18804;
node.style.height=_18804;
}
},drawLineString:function(node,_18805){
this.drawLine(node,_18805,false);
},drawLinearRing:function(node,_18806){
this.drawLine(node,_18806,true);
},drawLine:function(node,_18807,_18808){
this.setNodeDimension(node,_18807);
var _18809=this.getResolution();
var path="m";
for(var i=0;i<_18807.components.length;i++){
if(EMS.Util.isIE8()){
var x=((_18807.components[i].x/_18809)-this.extent.left/_18809);
var y=((_18807.components[i].y/_18809)-this.extent.top/_18809);
}else{
var x=(_18807.components[i].x/_18809);
var y=(_18807.components[i].y/_18809);
}
path+=" "+x.toFixed()+","+y.toFixed()+" l ";
}
if(_18808){
path+=" x";
}
path+=" e";
node.path=path;
},drawPolygon:function(node,_18810){
this.setNodeDimension(node,_18810);
var _18811=this.getResolution();
var path="";
for(var j=0;j<_18810.components.length;j++){
var _18812=_18810.components[j];
path+="m";
for(var i=0;i<_18812.components.length;i++){
var x=_18812.components[i].x/_18811;
var y=_18812.components[i].y/_18811;
path+=" "+x.toFixed()+","+y.toFixed();
if(i==0){
path+=" l";
}
}
path+=" x ";
}
path+="e";
node.path=path;
},drawRectangle:function(node,_18813){
var _18814=this.getResolution();
node.style.left=_18813.x/_18814;
node.style.top=_18813.y/_18814;
node.style.width=_18813.width/_18814;
node.style.height=_18813.height/_18814;
},drawCurve:function(node,_18815){
this.setNodeDimension(node,_18815);
var _18816=this.getResolution();
var path="";
for(var i=0;i<_18815.components.length;i++){
var x=_18815.components[i].x/_18816;
var y=_18815.components[i].y/_18816;
if((i%3)==0&&(i/3)==0){
path+="m";
}else{
if((i%3)==1){
path+=" c";
}
}
path+=" "+x+","+y;
}
path+=" x e";
node.path=path;
},drawSurface:function(node,_18817){
this.setNodeDimension(node,_18817);
var _18818=this.getResolution();
var path="";
for(var i=0;i<_18817.components.length;i++){
var x=_18817.components[i].x/_18818;
var y=_18817.components[i].y/_18818;
if((i%3)==0&&(i/3)==0){
path+="m";
}else{
if((i%3)==1){
path+=" c";
}
}
path+=" "+x+","+y;
}
path+=" x e";
node.path=path;
},CLASS_NAME:"OpenLayers.Renderer.VML"});
OpenLayers.Control=OpenLayers.Class({id:null,map:null,div:null,type:null,displayClass:"",active:null,handler:null,initialize:function(_18819){
this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");
OpenLayers.Util.extend(this,_18819);
this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");
},destroy:function(){
if(this.handler){
this.handler.destroy();
}
this.map=null;
},setMap:function(map){
this.map=map;
if(this.handler){
this.handler.setMap(map);
}
},draw:function(px){
if(this.div==null){
this.div=OpenLayers.Util.createDiv();
this.div.id=this.id;
this.div.className=this.displayClass;
}
if(px!=null){
this.position=px.clone();
}
this.moveTo(this.position);
return this.div;
},moveTo:function(px){
if((px!=null)&&(this.div!=null)){
this.div.style.left=px.x+"px";
this.div.style.top=px.y+"px";
}
},activate:function(){
if(this.active){
return false;
}
if(this.handler){
this.handler.activate();
}
this.active=true;
return true;
},deactivate:function(){
if(this.active){
if(this.handler){
this.handler.deactivate();
}
this.active=false;
return true;
}
return false;
},CLASS_NAME:"OpenLayers.Control"});
OpenLayers.Control.TYPE_BUTTON=1;
OpenLayers.Control.TYPE_TOGGLE=2;
OpenLayers.Control.TYPE_TOOL=3;
OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:false,evt:null,initialize:function(_18820,_18821,_18822){
OpenLayers.Util.extend(this,_18822);
this.control=_18820;
this.callbacks=_18821;
if(_18820.map){
this.setMap(_18820.map);
}
OpenLayers.Util.extend(this,_18822);
this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");
},setMap:function(map){
this.map=map;
},checkModifiers:function(evt){
if(this.keyMask==null){
return true;
}
var _18823=(evt.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(evt.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(evt.altKey?OpenLayers.Handler.MOD_ALT:0);
return (_18823==this.keyMask);
},activate:function(){
if(this.active){
return false;
}
var events=OpenLayers.Events.prototype.BROWSER_EVENTS;
for(var i=0;i0){
this.map.setCenter(this.map.getLonLatFromPixel(evt.xy),this.map.getZoom()-1);
}
},zoomBoxEnd:function(evt){
if(this.mouseDragStart!=null){
if(Math.abs(this.mouseDragStart.x-evt.xy.x)>5||Math.abs(this.mouseDragStart.y-evt.xy.y)>5){
var start=this.map.getLonLatFromViewPortPx(this.mouseDragStart);
var end=this.map.getLonLatFromViewPortPx(evt.xy);
var top=Math.max(start.lat,end.lat);
var bottom=Math.min(start.lat,end.lat);
var left=Math.min(start.lon,end.lon);
var right=Math.max(start.lon,end.lon);
var bounds=new OpenLayers.Bounds(left,bottom,right,top);
this.map.zoomToExtent(bounds);
}else{
var end=this.map.getLonLatFromViewPortPx(evt.xy);
this.map.setCenter(new OpenLayers.LonLat((end.lon),(end.lat)),this.map.getZoom()+1);
}
this.removeZoomBox();
}
},removeZoomBox:function(){
this.map.viewPortDiv.removeChild(this.zoomBox);
this.zoomBox=null;
},onWheelEvent:function(e){
var inMap=false;
var elem=OpenLayers.Event.element(e);
while(elem!=null){
if(this.map&&elem==this.map.div){
inMap=true;
break;
}
elem=elem.parentNode;
}
if(inMap){
var delta=0;
if(!e){
e=window.event;
}
if(e.wheelDelta){
delta=e.wheelDelta/120;
if(window.opera){
delta=-delta;
}
}else{
if(e.detail){
delta=-e.detail/3;
}
}
if(delta){
e.xy=this.mousePosition;
if(delta<0){
this.defaultWheelDown(e);
}else{
this.defaultWheelUp(e);
}
}
OpenLayers.Event.stop(e);
}
},CLASS_NAME:"OpenLayers.Control.MouseDefaults"});
OpenLayers.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:false,dragging:false,last:null,start:null,oldOnselectstart:null,initialize:function(_18831,_18832,_18833){
OpenLayers.Handler.prototype.initialize.apply(this,arguments);
},down:function(evt){
},move:function(evt){
},up:function(evt){
},out:function(evt){
},mousedown:function(evt){
var _18834=true;
this.dragging=false;
if(this.checkModifiers(evt)&&OpenLayers.Event.isLeftClick(evt)){
this.started=true;
this.start=evt.xy;
this.last=evt.xy;
this.map.div.style.cursor="move";
this.down(evt);
this.callback("down",[evt.xy]);
OpenLayers.Event.stop(evt);
if(!this.oldOnselectstart){
this.oldOnselectstart=document.onselectstart;
document.onselectstart=function(){
return false;
};
}
_18834=false;
}else{
this.started=false;
this.start=null;
this.last=null;
}
return _18834;
},mousemove:function(evt){
if(this.started){
if(evt.xy.x!=this.last.x||evt.xy.y!=this.last.y){
this.dragging=true;
this.move(evt);
this.callback("move",[evt.xy]);
if(!this.oldOnselectstart){
this.oldOnselectstart=document.onselectstart;
document.onselectstart=function(){
return false;
};
}
this.last=evt.xy;
}
}
return true;
},mouseup:function(evt){
if(this.started){
this.started=false;
this.dragging=false;
this.map.div.style.cursor="";
this.up(evt);
this.callback("up",[evt.xy]);
this.callback("done",[evt.xy]);
document.onselectstart=this.oldOnselectstart;
}
return true;
},mouseout:function(evt){
if(this.started&&OpenLayers.Util.mouseLeft(evt,this.map.div)){
this.started=false;
this.dragging=false;
this.map.div.style.cursor="";
this.out(evt);
this.callback("out",[]);
if(document.onselectstart){
document.onselectstart=this.oldOnselectstart;
}
this.callback("done",[evt.xy]);
}
return true;
},click:function(evt){
return (this.start==this.last);
},activate:function(){
var _18835=false;
if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){
this.dragging=false;
_18835=true;
}
return _18835;
},deactivate:function(){
var _18836=false;
if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){
this.started=false;
this.dragging=false;
this.start=null;
this.last=null;
_18836=true;
}
return _18836;
},CLASS_NAME:"OpenLayers.Handler.Drag"});
OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,initialize:function(_18837,_18838,_18839){
OpenLayers.Handler.prototype.initialize.apply(this,arguments);
var _18838={"down":this.startBox,"move":this.moveBox,"out":this.removeBox,"up":this.endBox};
this.dragHandler=new OpenLayers.Handler.Drag(this,_18838,{keyMask:this.keyMask});
},setMap:function(map){
OpenLayers.Handler.prototype.setMap.apply(this,arguments);
if(this.dragHandler){
this.dragHandler.setMap(map);
}
},startBox:function(xy){
this.zoomBox=OpenLayers.Util.createDiv("zoomBox",this.dragHandler.start,null,null,"absolute","2px solid red");
this.zoomBox.style.backgroundColor="white";
this.zoomBox.style.filter="alpha(opacity=50)";
this.zoomBox.style.opacity="0.50";
this.zoomBox.style.fontSize="1px";
this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;
this.map.viewPortDiv.appendChild(this.zoomBox);
this.map.div.style.cursor="crosshair";
},moveBox:function(xy){
var deltaX=Math.abs(this.dragHandler.start.x-xy.x);
var deltaY=Math.abs(this.dragHandler.start.y-xy.y);
this.zoomBox.style.width=Math.max(1,deltaX)+"px";
this.zoomBox.style.height=Math.max(1,deltaY)+"px";
if(xy.x5||Math.abs(this.dragHandler.start.y-end.y)>5){
var start=this.dragHandler.start;
var top=Math.min(start.y,end.y);
var bottom=Math.max(start.y,end.y);
var left=Math.min(start.x,end.x);
var right=Math.max(start.x,end.x);
result=new OpenLayers.Bounds(left,bottom,right,top);
}else{
result=this.dragHandler.start.clone();
}
this.removeBox();
this.map.div.style.cursor="";
this.callback("done",[result]);
},removeBox:function(){
this.map.viewPortDiv.removeChild(this.zoomBox);
this.zoomBox=null;
},activate:function(){
if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){
this.dragHandler.activate();
return true;
}else{
return false;
}
},deactivate:function(){
if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){
this.dragHandler.deactivate();
return true;
}else{
return false;
}
},CLASS_NAME:"OpenLayers.Handler.Box"});
OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,draw:function(){
this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask});
},zoomBox:function(_18840){
if(_18840 instanceof OpenLayers.Bounds){
var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(_18840.left,_18840.bottom));
var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(_18840.right,_18840.top));
var bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);
this.map.zoomToExtent(bounds);
}else{
this.map.setCenter(this.map.getLonLatFromPixel(_18840),this.map.getZoom()+1);
}
},CLASS_NAME:"OpenLayers.Control.ZoomBox"});
OpenLayers.Control.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,buttons:null,position:null,initialize:function(_18841){
this.position=new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,OpenLayers.Control.PanZoom.Y);
OpenLayers.Control.prototype.initialize.apply(this,arguments);
},destroy:function(){
OpenLayers.Control.prototype.destroy.apply(this,arguments);
while(this.buttons.length){
var btn=this.buttons.shift();
btn.map=null;
OpenLayers.Event.stopObservingElement(btn);
}
this.buttons=null;
this.position=null;
},draw:function(px){
OpenLayers.Control.prototype.draw.apply(this,arguments);
px=this.position;
this.buttons=[];
var sz=new OpenLayers.Size(18,18);
var _18842=new OpenLayers.Pixel(px.x+sz.w/2,px.y);
this._addButton("panup","north-mini.png",_18842,sz);
px.y=_18842.y+sz.h;
this._addButton("panleft","west-mini.png",px,sz);
this._addButton("panright","east-mini.png",px.add(sz.w,0),sz);
this._addButton("pandown","south-mini.png",_18842.add(0,sz.h*2),sz);
this._addButton("zoomin","zoom-plus-mini.png",_18842.add(0,sz.h*3+5),sz);
this._addButton("zoomworld","zoom-world-mini.png",_18842.add(0,sz.h*4+5),sz);
this._addButton("zoomout","zoom-minus-mini.png",_18842.add(0,sz.h*5+5),sz);
return this.div;
},_addButton:function(id,img,xy,sz){
var _18843=OpenLayers.Util.getImagesLocation()+img;
var btn=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_PanZoom_"+id,xy,sz,_18843,"absolute");
this.div.appendChild(btn);
OpenLayers.Event.observe(btn,"mousedown",OpenLayers.Function.bindAsEventListener(this.buttonDown,btn));
OpenLayers.Event.observe(btn,"dblclick",OpenLayers.Function.bindAsEventListener(this.doubleClick,btn));
OpenLayers.Event.observe(btn,"click",OpenLayers.Function.bindAsEventListener(this.doubleClick,btn));
btn.action=id;
btn.map=this.map;
btn.slideFactor=this.slideFactor;
this.buttons.push(btn);
return btn;
},doubleClick:function(evt){
OpenLayers.Event.stop(evt);
return false;
},buttonDown:function(evt){
if(!OpenLayers.Event.isLeftClick(evt)){
return;
}
switch(this.action){
case "panup":
this.map.pan(0,-50);
break;
case "pandown":
this.map.pan(0,50);
break;
case "panleft":
this.map.pan(-50,0);
break;
case "panright":
this.map.pan(50,0);
break;
case "zoomin":
this.map.zoomIn();
break;
case "zoomout":
this.map.zoomOut();
break;
case "zoomworld":
this.map.zoomToMaxExtent();
break;
}
OpenLayers.Event.stop(evt);
},CLASS_NAME:"OpenLayers.Control.PanZoom"});
OpenLayers.Control.PanZoom.X=4;
OpenLayers.Control.PanZoom.Y=4;
OpenLayers.Control.MousePosition=OpenLayers.Class(OpenLayers.Control,{element:null,prefix:"",separator:", ",suffix:"",numdigits:5,granularity:10,lastXy:null,initialize:function(_18844){
OpenLayers.Control.prototype.initialize.apply(this,arguments);
},destroy:function(){
if(this.map){
this.map.events.unregister("mousemove",this,this.redraw);
}
OpenLayers.Control.prototype.destroy.apply(this,arguments);
},draw:function(){
OpenLayers.Control.prototype.draw.apply(this,arguments);
if(!this.element){
this.div.left="";
this.div.top="";
this.div.className=this.displayClass;
this.element=this.div;
}
this.redraw();
return this.div;
},redraw:function(evt){
var lonLat;
if(evt==null){
lonLat=new OpenLayers.LonLat(0,0);
}else{
if(this.lastXy==null||Math.abs(evt.xy.x-this.lastXy.x)>this.granularity||Math.abs(evt.xy.y-this.lastXy.y)>this.granularity){
this.lastXy=evt.xy;
return;
}
lonLat=this.map.getLonLatFromPixel(evt.xy);
this.lastXy=evt.xy;
}
var digits=parseInt(this.numdigits);
var _18845=this.prefix+lonLat.lon.toFixed(digits)+this.separator+lonLat.lat.toFixed(digits)+this.suffix;
if(_18845!=this.element.innerHTML){
this.element.innerHTML=_18845;
}
},setMap:function(){
OpenLayers.Control.prototype.setMap.apply(this,arguments);
this.map.events.register("mousemove",this,this.redraw);
},CLASS_NAME:"OpenLayers.Control.MousePosition"});
OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{geometryTypes:null,layerIndex:null,feature:null,initialize:function(_18846,layer,_18847,_18848){
OpenLayers.Handler.prototype.initialize.apply(this,[_18846,_18847,_18848]);
this.layer=layer;
},click:function(evt){
var _18849=this.select("click",evt);
return !_18849;
},mousedown:function(evt){
var _18850=this.select("down",evt);
return !_18850;
},mousemove:function(evt){
this.select("move",evt);
return true;
},mouseup:function(evt){
var _18851=this.select("up",evt);
return !_18851;
},dblclick:function(evt){
var _18852=this.select("dblclick",evt);
return !_18852;
},select:function(type,evt){
var _18853=this.layer.getFeatureFromEvent(evt);
var _18854=false;
if(_18853){
if(this.geometryTypes==null||(OpenLayers.Util.indexOf(this.geometryTypes,_18853.geometry.CLASS_NAME)>-1)){
if(!this.feature){
this.callback("over",[_18853]);
}else{
if(this.feature!=_18853){
this.callback("out",[this.feature]);
this.callback("over",[_18853]);
}
}
this.feature=_18853;
this.callback(type,[_18853]);
_18854=true;
}else{
if(this.feature&&(this.feature!=_18853)){
this.callback("out",[this.feature]);
this.feature=null;
}
_18854=false;
}
}else{
if(this.feature){
this.callback("out",[this.feature]);
this.feature=null;
}
_18854=false;
}
return _18854;
},activate:function(){
if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){
this.layerIndex=this.layer.div.style.zIndex;
this.layer.div.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;
return true;
}else{
return false;
}
},deactivate:function(){
if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){
if(this.layer&&this.layer.div){
this.layer.div.style.zIndex=this.layerIndex;
}
return true;
}else{
return false;
}
},CLASS_NAME:"OpenLayers.Handler.Feature"});
OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(_18855,pixel){
},onDrag:function(_18856,pixel){
},onComplete:function(_18857,pixel){
},layer:null,feature:null,dragHandler:null,dragCallbacks:{},featureHandler:null,featureCallbacks:{},lastPixel:null,initialize:function(layer,_18858){
OpenLayers.Control.prototype.initialize.apply(this,[_18858]);
this.layer=layer;
this.dragCallbacks=OpenLayers.Util.extend({down:this.downFeature,move:this.moveFeature,up:this.upFeature,out:this.cancel,done:this.doneDragging},this.dragCallbacks);
this.dragHandler=new OpenLayers.Handler.Drag(this,this.dragCallbacks);
this.featureCallbacks=OpenLayers.Util.extend({over:this.overFeature,out:this.outFeature},this.featureCallbacks);
var _18859={geometryTypes:this.geometryTypes};
this.featureHandler=new OpenLayers.Handler.Feature(this,this.layer,this.featureCallbacks,_18859);
},destroy:function(){
this.layer=null;
this.dragHandler.destroy();
this.featureHandler.destroy();
OpenLayers.Control.prototype.destroy.apply(this,[]);
},activate:function(){
return (this.featureHandler.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments));
},deactivate:function(){
this.dragHandler.deactivate();
this.featureHandler.deactivate();
this.feature=null;
this.dragging=false;
this.lastPixel=null;
return OpenLayers.Control.prototype.deactivate.apply(this,arguments);
},overFeature:function(_18860){
if(!this.dragHandler.dragging){
this.feature=_18860;
this.dragHandler.activate();
this.over=true;
this.map.div.style.cursor="move";
}else{
if(this.feature.id==_18860.id){
this.over=true;
}else{
this.over=false;
}
}
},downFeature:function(pixel){
this.lastPixel=pixel;
this.onStart(this.feature,pixel);
},moveFeature:function(pixel){
var res=this.map.getResolution();
this.feature.geometry.move(res*(pixel.x-this.lastPixel.x),res*(this.lastPixel.y-pixel.y));
this.layer.drawFeature(this.feature);
this.lastPixel=pixel;
this.onDrag(this.feature,pixel);
},upFeature:function(pixel){
if(!this.over){
this.dragHandler.deactivate();
this.feature=null;
this.map.div.style.cursor="default";
}
},doneDragging:function(pixel){
this.onComplete(this.feature,pixel);
},outFeature:function(_18861){
if(!this.dragHandler.dragging){
this.over=false;
this.dragHandler.deactivate();
this.map.div.style.cursor="default";
this.feature=null;
}else{
if(this.feature.id==_18861.id){
this.over=false;
}
}
},cancel:function(){
this.dragHandler.deactivate();
this.over=false;
},setMap:function(map){
this.dragHandler.setMap(map);
this.featureHandler.setMap(map);
OpenLayers.Control.prototype.setMap.apply(this,arguments);
},CLASS_NAME:"OpenLayers.Control.DragFeature"});