Commit 89c3a37fef239ccb51517ce0322889889557b553
1 parent
920363da
Exists in
master
and in
7 other branches
--no commit message
Showing
395 changed files
with
0 additions
and
49804 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 395 files displayed.
pacotes/openlayers/OpenLayers.js
| ... | ... | @@ -1,1050 +0,0 @@ |
| 1 | -/* | |
| 2 | - | |
| 3 | - OpenLayers.js -- OpenLayers Map Viewer Library | |
| 4 | - | |
| 5 | - Copyright 2005-2007 MetaCarta, Inc., released under the BSD license. | |
| 6 | - Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt | |
| 7 | - for the full text of the license. | |
| 8 | - | |
| 9 | - Includes compressed code under the following licenses: | |
| 10 | - | |
| 11 | - (For uncompressed versions of the code used please see the | |
| 12 | - OpenLayers SVN repository: <http://openlayers.org/>) | |
| 13 | - | |
| 14 | -*/ | |
| 15 | - | |
| 16 | -/* Contains portions of Prototype.js: | |
| 17 | - * | |
| 18 | - * Prototype JavaScript framework, version 1.4.0 | |
| 19 | - * (c) 2005 Sam Stephenson <sam@conio.net> | |
| 20 | - * | |
| 21 | - * Prototype is freely distributable under the terms of an MIT-style license. | |
| 22 | - * For details, see the Prototype web site: http://prototype.conio.net/ | |
| 23 | - * | |
| 24 | -/*--------------------------------------------------------------------------*/ | |
| 25 | - | |
| 26 | -/** | |
| 27 | -* | |
| 28 | -* Contains portions of Rico <http://openrico.org/> | |
| 29 | -* | |
| 30 | -* Copyright 2005 Sabre Airline Solutions | |
| 31 | -* | |
| 32 | -* Licensed under the Apache License, Version 2.0 (the "License"); you | |
| 33 | -* may not use this file except in compliance with the License. You | |
| 34 | -* may obtain a copy of the License at | |
| 35 | -* | |
| 36 | -* http://www.apache.org/licenses/LICENSE-2.0 | |
| 37 | -* | |
| 38 | -* Unless required by applicable law or agreed to in writing, software | |
| 39 | -* distributed under the License is distributed on an "AS IS" BASIS, | |
| 40 | -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | |
| 41 | -* implied. See the License for the specific language governing | |
| 42 | -* permissions and limitations under the License. | |
| 43 | -* | |
| 44 | -**/ | |
| 45 | - | |
| 46 | -OpenLayers={singleFile:true};(function(){var singleFile=(typeof OpenLayers=="object"&&OpenLayers.singleFile);OpenLayers={_scriptName:(!singleFile)?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){var scriptLocation="";var scriptName=OpenLayers._scriptName;var scripts=document.getElementsByTagName('script');for(var i=0;i<scripts.length;i++){var src=scripts[i].getAttribute('src');if(src){var index=src.lastIndexOf(scriptName);if((index>-1)&&(index+scriptName.length==src.length)){scriptLocation=src.slice(0,-scriptName.length);break;}}} | |
| 47 | -return scriptLocation;}};if(!singleFile){var jsfiles=new Array("OpenLayers/Util.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","OpenLayers/Console.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 allScriptTags="";var host=OpenLayers._getScriptLocation()+"lib/";for(var i=0;i<jsfiles.length;i++){if(/MSIE/.test(navigator.userAgent)||/Safari/.test(navigator.userAgent)){var currentScriptTag="<script src='"+host+jsfiles[i]+"'></script>";allScriptTags+=currentScriptTag;}else{var s=document.createElement("script");s.src=host+jsfiles[i];var h=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;h.appendChild(s);}} | |
| 48 | -if(allScriptTags)document.write(allScriptTags);}})();OpenLayers.VERSION_NUMBER="$Revision: 4899 $";OpenLayers.String={startsWith:function(str,sub){return(str.indexOf(sub)==0);},contains:function(str,sub){return(str.indexOf(sub)!=-1);},trim:function(str){return str.replace(/^\s*(.*?)\s*$/,"$1");},camelize:function(str){var oStringList=str.split('-');var camelizedString=oStringList[0];for(var i=1;i<oStringList.length;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1);} | |
| 49 | -return camelizedString;}};if(!String.prototype.startsWith){String.prototype.startsWith=function(sStart){OpenLayers.Console.warn("This method has been deprecated and will be removed in 3.0. "+"Please use OpenLayers.String.startsWith instead");return OpenLayers.String.startsWith(this,sStart);};} | |
| 50 | -if(!String.prototype.contains){String.prototype.contains=function(str){OpenLayers.Console.warn("This method has been deprecated and will be removed in 3.0. "+"Please use OpenLayers.String.contains instead");return OpenLayers.String.contains(this,str);};} | |
| 51 | -if(!String.prototype.trim){String.prototype.trim=function(){OpenLayers.Console.warn("This method has been deprecated and will be removed in 3.0. "+"Please use OpenLayers.String.trim instead");return OpenLayers.String.trim(this);};} | |
| 52 | -if(!String.prototype.camelize){String.prototype.camelize=function(){OpenLayers.Console.warn("This method has been deprecated and will be removed in 3.0. "+"Please use OpenLayers.String.camelize instead");return OpenLayers.String.camelize(this);};} | |
| 53 | -OpenLayers.Number={limitSigDigs:function(num,sig){var fig;if(sig>0){fig=parseFloat(num.toPrecision(sig));}else{fig=0;} | |
| 54 | -return fig;}};if(!Number.prototype.limitSigDigs){Number.prototype.limitSigDigs=function(sig){OpenLayers.Console.warn("This method has been deprecated and will be removed in 3.0. "+"Please use OpenLayers.Number.limitSigDigs instead");return OpenLayers.Number.limitSigDigs(this,sig);};} | |
| 55 | -OpenLayers.Function={bind:function(func,object){var args=Array.prototype.slice.apply(arguments,[2]);return function(){var newArgs=args.concat(Array.prototype.slice.apply(arguments,[0]));return func.apply(object,newArgs);};},bindAsEventListener:function(func,object){return function(event){return func.call(object,event||window.event);};}};if(!Function.prototype.bind){Function.prototype.bind=function(){OpenLayers.Console.warn("This method has been deprecated and will be removed in 3.0. "+"Please use OpenLayers.Function.bind instead");Array.prototype.unshift.apply(arguments,[this]);return OpenLayers.Function.bind.apply(null,arguments);};} | |
| 56 | -if(!Function.prototype.bindAsEventListener){Function.prototype.bindAsEventListener=function(object){OpenLayers.Console.warn("This method has been deprecated and will be removed in 3.0. "+"Please use OpenLayers.Function.bindAsEventListener instead");return OpenLayers.Function.bindAsEventListener(this,object);};} | |
| 57 | -OpenLayers.Class=function(){var Class=function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments);}} | |
| 58 | -var extended={};var parent;for(var i=0;i<arguments.length;++i){if(typeof arguments[i]=="function"){parent=arguments[i].prototype;}else{parent=arguments[i];} | |
| 59 | -OpenLayers.Util.extend(extended,parent);} | |
| 60 | -Class.prototype=extended;return Class;} | |
| 61 | -OpenLayers.Class.isPrototype=function(){};OpenLayers.Class.create=function(){return function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype) | |
| 62 | -this.initialize.apply(this,arguments);}} | |
| 63 | -OpenLayers.Class.inherit=function(){var superClass=arguments[0];var proto=new superClass(OpenLayers.Class.isPrototype);for(var i=1;i<arguments.length;i++){if(typeof arguments[i]=="function"){var mixin=arguments[i];arguments[i]=new mixin(OpenLayers.Class.isPrototype);} | |
| 64 | -OpenLayers.Util.extend(proto,arguments[i]);} | |
| 65 | -return proto;} | |
| 66 | -OpenLayers.Util={};OpenLayers.Util.getElement=function(){var elements=[];for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element=='string'){element=document.getElementById(element);} | |
| 67 | -if(arguments.length==1){return element;} | |
| 68 | -elements.push(element);} | |
| 69 | -return elements;};if($==null){var $=OpenLayers.Util.getElement;} | |
| 70 | -OpenLayers.Util.extend=function(destination,source){if(destination&&source){for(var property in source){destination[property]=source[property];} | |
| 71 | -if(source.hasOwnProperty&&source.hasOwnProperty('toString')){destination.toString=source.toString;}} | |
| 72 | -return destination;};OpenLayers.Util.removeItem=function(array,item){for(var i=0;i<array.length;i++){if(array[i]==item){array.splice(i,1);}} | |
| 73 | -return array;};OpenLayers.Util.clearArray=function(array){var msg="OpenLayers.Util.clearArray() is Deprecated."+" Please use 'array.length = 0' instead.";OpenLayers.Console.warn(msg);array.length=0;};OpenLayers.Util.indexOf=function(array,obj){for(var i=0;i<array.length;i++){if(array[i]==obj)return i;} | |
| 74 | -return-1;};OpenLayers.Util.modifyDOMElement=function(element,id,px,sz,position,border,overflow,opacity){if(id){element.id=id;} | |
| 75 | -if(px){element.style.left=px.x+"px";element.style.top=px.y+"px";} | |
| 76 | -if(sz){element.style.width=sz.w+"px";element.style.height=sz.h+"px";} | |
| 77 | -if(position){element.style.position=position;} | |
| 78 | -if(border){element.style.border=border;} | |
| 79 | -if(overflow){element.style.overflow=overflow;} | |
| 80 | -if(opacity){element.style.opacity=opacity;element.style.filter='alpha(opacity='+(opacity*100)+')';}};OpenLayers.Util.createDiv=function(id,px,sz,imgURL,position,border,overflow,opacity){var dom=document.createElement('div');if(imgURL){dom.style.backgroundImage='url('+imgURL+')';} | |
| 81 | -if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");} | |
| 82 | -if(!position){position="absolute";} | |
| 83 | -OpenLayers.Util.modifyDOMElement(dom,id,px,sz,position,border,overflow,opacity);return dom;};OpenLayers.Util.createImage=function(id,px,sz,imgURL,position,border,opacity,delayDisplay){var image=document.createElement("img");if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");} | |
| 84 | -if(!position){position="relative";} | |
| 85 | -OpenLayers.Util.modifyDOMElement(image,id,px,sz,position,border,null,opacity);if(delayDisplay){image.style.display="none";OpenLayers.Event.observe(image,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,image));OpenLayers.Event.observe(image,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,image));} | |
| 86 | -image.style.alt=id;image.galleryImg="no";if(imgURL){image.src=imgURL;} | |
| 87 | -return image;};OpenLayers.Util.setOpacity=function(element,opacity){OpenLayers.Util.modifyDOMElement(element,null,null,null,null,null,null,opacity);} | |
| 88 | -OpenLayers.Util.onImageLoad=function(){if(!this.viewRequestID||(this.map&&this.viewRequestID==this.map.viewRequestID)){this.style.backgroundColor=null;this.style.display="";}};OpenLayers.Util.onImageLoadErrorColor="pink";OpenLayers.IMAGE_RELOAD_ATTEMPTS=0;OpenLayers.Util.onImageLoadError=function(){this._attempts=(this._attempts)?(this._attempts+1):1;if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){this.src=this.src;}else{this.style.backgroundColor=OpenLayers.Util.onImageLoadErrorColor;} | |
| 89 | -this.style.display="";};OpenLayers.Util.alphaHack=function(){var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);var filter=false;try{filter=document.body.filters;}catch(e){} | |
| 90 | -return(filter&&(version>=5.5)&&(version<7));} | |
| 91 | -OpenLayers.Util.modifyAlphaImageDiv=function(div,id,px,sz,imgURL,position,border,sizing,opacity){OpenLayers.Util.modifyDOMElement(div,id,px,sz);var img=div.childNodes[0];if(imgURL){img.src=imgURL;} | |
| 92 | -OpenLayers.Util.modifyDOMElement(img,div.id+"_innerImage",null,sz,"relative",border);if(opacity){div.style.opacity=opacity;div.style.filter='alpha(opacity='+(opacity*100)+')';} | |
| 93 | -if(OpenLayers.Util.alphaHack()){div.style.display="inline-block";if(sizing==null){sizing="scale";} | |
| 94 | -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+")";} | |
| 95 | -img.style.filter="progid:DXImageTransform.Microsoft"+".Alpha(opacity=0)";}};OpenLayers.Util.createAlphaImageDiv=function(id,px,sz,imgURL,position,border,sizing,opacity,delayDisplay){var div=OpenLayers.Util.createDiv();var img=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);div.appendChild(img);if(delayDisplay){img.style.display="none";OpenLayers.Event.observe(img,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,div));OpenLayers.Event.observe(img,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,div));} | |
| 96 | -OpenLayers.Util.modifyAlphaImageDiv(div,id,px,sz,imgURL,position,border,sizing,opacity);return div;};OpenLayers.Util.upperCaseObject=function(object){var uObject={};for(var key in object){uObject[key.toUpperCase()]=object[key];} | |
| 97 | -return uObject;};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 encodedValue;if(typeof value=='object'&&value.constructor==Array){var encodedItemArray=[];for(var itemIndex=0;itemIndex<value.length;itemIndex++){encodedItemArray.push(encodeURIComponent(value[itemIndex]));} | |
| 98 | -encodedValue=encodedItemArray.join(",");} | |
| 99 | -else{encodedValue=encodeURIComponent(value);} | |
| 100 | -paramsArray.push(encodeURIComponent(key)+"="+encodedValue);}} | |
| 101 | -return paramsArray.join("&");};OpenLayers.ImgPath='';OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||(OpenLayers._getScriptLocation()+"img/");};OpenLayers.Util.Try=function(){var returnValue=null;for(var i=0;i<arguments.length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}} | |
| 102 | -return returnValue;} | |
| 103 | -OpenLayers.Util.getNodes=function(p,tagName){var nodes=OpenLayers.Util.Try(function(){return OpenLayers.Util._getNodes(p.documentElement.childNodes,tagName);},function(){return OpenLayers.Util._getNodes(p.childNodes,tagName);});return nodes;};OpenLayers.Util._getNodes=function(nodes,tagName){var retArray=[];for(var i=0;i<nodes.length;i++){if(nodes[i].nodeName==tagName){retArray.push(nodes[i]);}} | |
| 104 | -return retArray;};OpenLayers.Util.getTagText=function(parent,item,index){var result=OpenLayers.Util.getNodes(parent,item);if(result&&(result.length>0)) | |
| 105 | -{if(!index){index=0;} | |
| 106 | -if(result[index].childNodes.length>1){return result.childNodes[1].nodeValue;} | |
| 107 | -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) | |
| 108 | -val=node.textContent;if(!val) | |
| 109 | -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;} | |
| 110 | -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 iterLimit=20;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){var sinLambda=Math.sin(lambda),cosLambda=Math.cos(lambda);var sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+ | |
| 111 | -(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma==0)return 0;var cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;var sigma=Math.atan2(sinSigma,cosSigma);var alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);var cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);var cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));} | |
| 112 | -if(iterLimit==0)return NaN | |
| 113 | -var uSq=cosSqAlpha*(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 deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)- | |
| 114 | -B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));var s=b*A*(sigma-deltaSigma);var d=s.toFixed(3)/1000;return d;};OpenLayers.Util.getParameters=function(url){url=url||window.location.href | |
| 115 | -if(url==null){url=window.location.href;} | |
| 116 | -var paramsString="";if(OpenLayers.String.contains(url,'?')){var start=url.indexOf('?')+1;var end=OpenLayers.String.contains(url,"#")?url.indexOf('#'):url.length;paramsString=url.substring(start,end);} | |
| 117 | -var parameters={};var pairs=paramsString.split(/[&;]/);for(var i=0;i<pairs.length;++i){var keyValue=pairs[i].split('=');if(keyValue[0]){var key=decodeURIComponent(keyValue[0]);var value=keyValue[1]||'';value=value.split(",");for(var j=0;j<value.length;j++){value[j]=decodeURIComponent(value[j]);} | |
| 118 | -if(value.length==1){value=value[0];} | |
| 119 | -parameters[key]=value;}} | |
| 120 | -return parameters;};OpenLayers.Util.getArgs=function(url){var err="The getArgs() function is deprecated and will be removed "+"with the 3.0 version of OpenLayers. Please instead use "+"OpenLayers.Util.getParameters().";OpenLayers.Console.warn(err);return OpenLayers.Util.getParameters(url);};OpenLayers.Util.lastSeqID=0;OpenLayers.Util.createUniqueID=function(prefix){if(prefix==null){prefix="id_";} | |
| 121 | -OpenLayers.Util.lastSeqID+=1;return prefix+OpenLayers.Util.lastSeqID;};OpenLayers.INCHES_PER_UNIT={'inches':1.0,'ft':12.0,'mi':63360.0,'m':39.3701,'km':39370.1,'dd':4374754};OpenLayers.INCHES_PER_UNIT["in"]=OpenLayers.INCHES_PER_UNIT.inches;OpenLayers.INCHES_PER_UNIT["degrees"]=OpenLayers.INCHES_PER_UNIT.dd;OpenLayers.DOTS_PER_INCH=72;OpenLayers.Util.normalizeScale=function(scale){var normScale=(scale>1.0)?(1.0/scale):scale;return normScale;};OpenLayers.Util.getResolutionFromScale=function(scale,units){if(units==null){units="degrees";} | |
| 122 | -var normScale=OpenLayers.Util.normalizeScale(scale);var resolution=1/(normScale*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH);return resolution;};OpenLayers.Util.getScaleFromResolution=function(resolution,units){if(units==null){units="degrees";} | |
| 123 | -var scale=resolution*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(forElement){var valueT=0,valueL=0;var element=forElement;var child=forElement;while(element){if(element==document.body){if(child&&child.style&&OpenLayers.Element.getStyle(child,'position')=='absolute'){break;}} | |
| 124 | -valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;child=element;try{element=element.offsetParent;}catch(e){OpenLayers.Console.error("OpenLayers.Util.pagePosition failed: element with id "+ | |
| 125 | -element.id+" may be misplaced.");break;}} | |
| 126 | -element=forElement;while(element){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;element=element.parentNode;} | |
| 127 | -return[valueL,valueT];};OpenLayers.Util.isEquivalentUrl=function(url1,url2,options){options=options||{};OpenLayers.Util.applyDefaults(options,{ignoreCase:true,ignorePort80:true,ignoreHash:true});urlObj1=OpenLayers.Util.createUrlObject(url1,options);urlObj2=OpenLayers.Util.createUrlObject(url2,options);for(var key in urlObj1){if(options.test){alert(key+"\n1:"+urlObj1[key]+"\n2:"+urlObj2[key]);} | |
| 128 | -var val1=urlObj1[key];var val2=urlObj2[key];switch(key){case"args":break;case"host":case"port":case"protocol":if((val1=="")||(val2=="")){break;} | |
| 129 | -default:if((key!="args")&&(urlObj1[key]!=urlObj2[key])){return false;} | |
| 130 | -break;}} | |
| 131 | -for(var key in urlObj1.args){if(urlObj1.args[key]!=urlObj2.args[key]){return false;} | |
| 132 | -delete urlObj2.args[key];} | |
| 133 | -for(var key in urlObj2.args){return false;} | |
| 134 | -return true;};OpenLayers.Util.createUrlObject=function(url,options){options=options||{};var urlObject={};if(options.ignoreCase){url=url.toLowerCase();} | |
| 135 | -var a=document.createElement('a');a.href=url;urlObject.host=a.host;var port=a.port;if(port.length<=0){var newHostLength=urlObject.host.length-(port.length);urlObject.host=urlObject.host.substring(0,newHostLength);} | |
| 136 | -urlObject.protocol=a.protocol;urlObject.port=((port=="80")&&(options.ignorePort80))?"":port;urlObject.hash=(options.ignoreHash)?"":a.hash;var queryString=a.search;if(!queryString){var qMark=url.indexOf("?");queryString=(qMark!=-1)?url.substr(qMark):"";} | |
| 137 | -urlObject.args=OpenLayers.Util.getParameters(queryString);if(((urlObject.protocol=="file:")&&(url.indexOf("file:")!=-1))||((urlObject.protocol!="file:")&&(urlObject.host!=""))){urlObject.pathname=a.pathname;var qIndex=urlObject.pathname.indexOf("?");if(qIndex!=-1){urlObject.pathname=urlObject.pathname.substring(0,qIndex);}}else{var relStr=OpenLayers.Util.removeTail(url);var backs=0;do{var index=relStr.indexOf("../");if(index==0){backs++ | |
| 138 | -relStr=relStr.substr(3);}else if(index>=0){var prevChunk=relStr.substr(0,index-1);var slash=prevChunk.indexOf("/");prevChunk=(slash!=-1)?prevChunk.substr(0,slash+1):"";var postChunk=relStr.substr(index+3);relStr=prevChunk+postChunk;}}while(index!=-1) | |
| 139 | -var windowAnchor=document.createElement("a");var windowUrl=window.location.href;if(options.ignoreCase){windowUrl=windowUrl.toLowerCase();} | |
| 140 | -windowAnchor.href=windowUrl;urlObject.protocol=windowAnchor.protocol;var splitter=(windowAnchor.pathname.indexOf("/")!=-1)?"/":"\\";var dirs=windowAnchor.pathname.split(splitter);dirs.pop();while((backs>0)&&(dirs.length>0)){dirs.pop();backs--;} | |
| 141 | -relStr=dirs.join("/")+"/"+relStr;urlObject.pathname=relStr;} | |
| 142 | -if((urlObject.protocol=="file:")||(urlObject.protocol=="")){urlObject.host="localhost";} | |
| 143 | -return urlObject;};OpenLayers.Util.removeTail=function(url){var head=null;var qMark=url.indexOf("?");var hashMark=url.indexOf("#");if(qMark==-1){head=(hashMark!=-1)?url.substr(0,hashMark):url;}else{head=(hashMark!=-1)?url.substr(0,Math.min(qMark,hashMark)):url.substr(0,qMark);} | |
| 144 | -return head;};OpenLayers.Util.getBrowserName=function(){var browserName="";var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("opera")!=-1){browserName="opera";}else if(ua.indexOf("msie")!=-1){browserName="msie";}else if(ua.indexOf("safari")!=-1){browserName="safari";}else if(ua.indexOf("mozilla")!=-1){if(ua.indexOf("firefox")!=-1){browserName="firefox";}else{browserName="mozilla";}} | |
| 145 | -return browserName;};OpenLayers.Rico=new Object();OpenLayers.Rico.Corner={round:function(e,options){e=OpenLayers.Util.getElement(e);this._setOptions(options);var color=this.options.color;if(this.options.color=="fromElement") | |
| 146 | -color=this._background(e);var bgColor=this.options.bgColor;if(this.options.bgColor=="fromParent") | |
| 147 | -bgColor=this._background(e.offsetParent);this._roundCornersImpl(e,color,bgColor);},changeColor:function(theDiv,newColor){theDiv.style.backgroundColor=newColor;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx<spanElements.length;currIdx++){spanElements[currIdx].style.backgroundColor=newColor;}},changeOpacity:function(theDiv,newOpacity){var mozillaOpacity=newOpacity;var ieOpacity='alpha(opacity='+newOpacity*100+')';theDiv.style.opacity=mozillaOpacity;theDiv.style.filter=ieOpacity;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx<spanElements.length;currIdx++){spanElements[currIdx].style.opacity=mozillaOpacity;spanElements[currIdx].style.filter=ieOpacity;}},reRound:function(theDiv,options){var topRico=theDiv.parentNode.childNodes[0];var bottomRico=theDiv.parentNode.childNodes[2];theDiv.parentNode.removeChild(topRico);theDiv.parentNode.removeChild(bottomRico);this.round(theDiv.parentNode,options);},_roundCornersImpl:function(e,color,bgColor){if(this.options.border) | |
| 148 | -this._renderBorder(e,bgColor);if(this._isTopRounded()) | |
| 149 | -this._roundTopCorners(e,color,bgColor);if(this._isBottomRounded()) | |
| 150 | -this._roundBottomCorners(e,color,bgColor);},_renderBorder:function(el,bgColor){var borderValue="1px solid "+this._borderColor(bgColor);var borderL="border-left: "+borderValue;var borderR="border-right: "+borderValue;var style="style='"+borderL+";"+borderR+"'";el.innerHTML="<div "+style+">"+el.innerHTML+"</div>"},_roundTopCorners:function(el,color,bgColor){var corner=this._createCorner(bgColor);for(var i=0;i<this.options.numSlices;i++) | |
| 151 | -corner.appendChild(this._createCornerSlice(color,bgColor,i,"top"));el.style.paddingTop=0;el.insertBefore(corner,el.firstChild);},_roundBottomCorners:function(el,color,bgColor){var corner=this._createCorner(bgColor);for(var i=(this.options.numSlices-1);i>=0;i--) | |
| 152 | -corner.appendChild(this._createCornerSlice(color,bgColor,i,"bottom"));el.style.paddingBottom=0;el.appendChild(corner);},_createCorner:function(bgColor){var corner=document.createElement("div");corner.style.backgroundColor=(this._isTransparent()?"transparent":bgColor);return corner;},_createCornerSlice:function(color,bgColor,n,position){var slice=document.createElement("span");var inStyle=slice.style;inStyle.backgroundColor=color;inStyle.display="block";inStyle.height="1px";inStyle.overflow="hidden";inStyle.fontSize="1px";var borderColor=this._borderColor(color,bgColor);if(this.options.border&&n==0){inStyle.borderTopStyle="solid";inStyle.borderTopWidth="1px";inStyle.borderLeftWidth="0px";inStyle.borderRightWidth="0px";inStyle.borderBottomWidth="0px";inStyle.height="0px";inStyle.borderColor=borderColor;} | |
| 153 | -else if(borderColor){inStyle.borderColor=borderColor;inStyle.borderStyle="solid";inStyle.borderWidth="0px 1px";} | |
| 154 | -if(!this.options.compact&&(n==(this.options.numSlices-1))) | |
| 155 | -inStyle.height="2px";this._setMargin(slice,n,position);this._setBorder(slice,n,position);return slice;},_setOptions:function(options){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false} | |
| 156 | -OpenLayers.Util.extend(this.options,options||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent()) | |
| 157 | -this.options.blend=false;},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top")) | |
| 158 | -return"";if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0) | |
| 159 | -return"";if(this.options.corners.indexOf("tl")>=0) | |
| 160 | -return"left";else if(this.options.corners.indexOf("tr")>=0) | |
| 161 | -return"right";return"";},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom")) | |
| 162 | -return"";if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0) | |
| 163 | -return"";if(this.options.corners.indexOf("bl")>=0) | |
| 164 | -return"left";else if(this.options.corners.indexOf("br")>=0) | |
| 165 | -return"right";return"";},_borderColor:function(color,bgColor){if(color=="transparent") | |
| 166 | -return bgColor;else if(this.options.border) | |
| 167 | -return this.options.border;else if(this.options.blend) | |
| 168 | -return this._blend(bgColor,color);else | |
| 169 | -return"";},_setMargin:function(el,n,corners){var marginSize=this._marginSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.marginLeft=marginSize+"px";el.style.marginRight="0px";} | |
| 170 | -else if(whichSide=="right"){el.style.marginRight=marginSize+"px";el.style.marginLeft="0px";} | |
| 171 | -else{el.style.marginLeft=marginSize+"px";el.style.marginRight=marginSize+"px";}},_setBorder:function(el,n,corners){var borderSize=this._borderSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth="0px";} | |
| 172 | -else if(whichSide=="right"){el.style.borderRightWidth=borderSize+"px";el.style.borderLeftWidth="0px";} | |
| 173 | -else{el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";} | |
| 174 | -if(this.options.border!=false) | |
| 175 | -el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";},_marginSize:function(n){if(this._isTransparent()) | |
| 176 | -return 0;var marginSizes=[5,3,2,1];var blendedMarginSizes=[3,2,1,0];var compactMarginSizes=[2,1];var smBlendedMarginSizes=[1,0];if(this.options.compact&&this.options.blend) | |
| 177 | -return smBlendedMarginSizes[n];else if(this.options.compact) | |
| 178 | -return compactMarginSizes[n];else if(this.options.blend) | |
| 179 | -return blendedMarginSizes[n];else | |
| 180 | -return marginSizes[n];},_borderSize:function(n){var transparentBorderSizes=[5,3,2,1];var blendedBorderSizes=[2,1,1,1];var compactBorderSizes=[1,0];var actualBorderSizes=[0,2,0,0];if(this.options.compact&&(this.options.blend||this._isTransparent())) | |
| 181 | -return 1;else if(this.options.compact) | |
| 182 | -return compactBorderSizes[n];else if(this.options.blend) | |
| 183 | -return blendedBorderSizes[n];else if(this.options.border) | |
| 184 | -return actualBorderSizes[n];else if(this._isTransparent()) | |
| 185 | -return transparentBorderSizes[n];return 0;},_hasString:function(str){for(var i=1;i<arguments.length;i++)if(str.indexOf(arguments[i])>=0)return true;return false;},_blend:function(c1,c2){var cc1=OpenLayers.Rico.Color.createFromHex(c1);cc1.blend(OpenLayers.Rico.Color.createFromHex(c2));return cc1;},_background:function(el){try{return OpenLayers.Rico.Color.createColorFromBackground(el).asHex();}catch(err){return"#ffffff";}},_isTransparent:function(){return this.options.color=="transparent";},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr");},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br");},_hasSingleTextChild:function(el){return el.childNodes.length==1&&el.childNodes[0].nodeType==3;}} | |
| 186 | -OpenLayers.ProxyHost="";OpenLayers.nullHandler=function(request){alert("Unhandled request return "+request.statusText);};OpenLayers.loadURL=function(uri,params,caller,onComplete,onFailure){if(OpenLayers.ProxyHost&&OpenLayers.String.startsWith(uri,"http")){uri=OpenLayers.ProxyHost+escape(uri);} | |
| 187 | -var success=(onComplete)?OpenLayers.Function.bind(onComplete,caller):OpenLayers.nullHandler;var failure=(onFailure)?OpenLayers.Function.bind(onFailure,caller):OpenLayers.nullHandler;new OpenLayers.Ajax.Request(uri,{method:'get',parameters:params,onComplete:success,onFailure:failure});};OpenLayers.parseXMLString=function(text){var index=text.indexOf('<');if(index>0){text=text.substring(index);} | |
| 188 | -var ajaxResponse=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");} | |
| 189 | -req.send(null);return req.responseXML;});return ajaxResponse;};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(responderToAdd){for(var i=0;i<this.responders.length;i++) | |
| 190 | -if(responderToAdd==this.responders[i]) | |
| 191 | -return;this.responders.push(responderToAdd);},dispatch:function(callback,request,transport,json){var responder;for(var i=0;i<this.responders.length;i++){responder=this.responders[i];if(responder[callback]&&typeof responder[callback]=='function'){try{responder[callback].apply(responder,[request,transport,json]);}catch(e){}}}}};OpenLayers.Ajax.Responders.register({onCreate:function(){OpenLayers.Ajax.activeRequestCount++;},onComplete:function(){OpenLayers.Ajax.activeRequestCount--;}});OpenLayers.Ajax.Base=function(){};OpenLayers.Ajax.Base.prototype={setOptions:function(options){this.options={'method':'post','asynchronous':true,'parameters':''};OpenLayers.Util.extend(this.options,options||{});},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300);},responseIsFailure:function(){return!this.responseIsSuccess();}};OpenLayers.Ajax.Request=OpenLayers.Class(OpenLayers.Ajax.Base,{initialize:function(url,options){this.transport=OpenLayers.Ajax.getTransport();this.setOptions(options);this.request(url);},request:function(url){var parameters=this.options.parameters||'';if(parameters.length>0)parameters+='&_=';try{this.url=url;if(this.options.method=='get'&¶meters.length>0){this.url+=(this.url.match(/\?/)?'&':'?')+parameters;} | |
| 192 | -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);} | |
| 193 | -this.setRequestHeaders();var body=this.options.postBody?this.options.postBody:parameters;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 requestHeaders=['X-Requested-With','XMLHttpRequest','X-Prototype-Version','OpenLayers'];if(this.options.method=='post'&&!this.options.postBody){requestHeaders.push('Content-type','application/x-www-form-urlencoded');if(this.transport.overrideMimeType){requestHeaders.push('Connection','close');}} | |
| 194 | -if(this.options.requestHeaders){requestHeaders.push.apply(requestHeaders,this.options.requestHeaders);} | |
| 195 | -for(var i=0;i<requestHeaders.length;i+=2){this.transport.setRequestHeader(requestHeaders[i],requestHeaders[i+1]);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState!=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(readyState){var event=OpenLayers.Ajax.Request.Events[readyState];var transport=this.transport,json=this.evalJSON();if(event=='Complete'){try{var responseSuccess=this.responseIsSuccess()?'Success':'Failure';(this.options['on'+this.transport.status]||this.options['on'+responseSuccess]||OpenLayers.Ajax.emptyFunction)(transport,json);}catch(e){this.dispatchException(e);} | |
| 196 | -var contentType=this.header('Content-type')||'';if(contentType.match(/^text\/javascript/i)){this.evalResponse();}} | |
| 197 | -try{(this.options['on'+event]||OpenLayers.Ajax.emptyFunction)(transport,json);OpenLayers.Ajax.Responders.dispatch('on'+event,this,transport,json);}catch(e){this.dispatchException(e);} | |
| 198 | -if(event=='Complete'){this.transport.onreadystatechange=OpenLayers.Ajax.emptyFunction;}},dispatchException:function(exception){if(this.options.onException){this.options.onException(this,exception);}else{throw exception;} | |
| 199 | -OpenLayers.Ajax.Responders.dispatch('onException',this,exception);}});OpenLayers.Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];OpenLayers.Ajax.getElementsByTagNameNS=function(parentnode,nsuri,nsprefix,tagname){var elem=null;if(parentnode.getElementsByTagNameNS){elem=parentnode.getElementsByTagNameNS(nsuri,tagname);}else{elem=parentnode.getElementsByTagName(nsprefix+':'+tagname);} | |
| 200 | -return elem;};OpenLayers.Ajax.serializeXMLToString=function(xmldom){var serializer=new XMLSerializer();data=serializer.serializeToString(xmldom);return data;} | |
| 201 | -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);} | |
| 202 | -if(bottom!=null){this.bottom=parseFloat(bottom);} | |
| 203 | -if(right!=null){this.right=parseFloat(right);} | |
| 204 | -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));} | |
| 205 | -return equals;},toString:function(){return("left-bottom=("+this.left+","+this.bottom+")" | |
| 206 | -+" right-top=("+this.right+","+this.top+")");},toArray:function(){return[this.left,this.bottom,this.right,this.top];},toBBOX:function(decimal){if(decimal==null){decimal=6;} | |
| 207 | -var mult=Math.pow(10,decimal);var bbox=Math.round(this.left*mult)/mult+","+ | |
| 208 | -Math.round(this.bottom*mult)/mult+","+ | |
| 209 | -Math.round(this.right*mult)/mult+","+ | |
| 210 | -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;} | |
| 211 | -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;} | |
| 212 | -if(bounds){if((this.left==null)||(bounds.left<this.left)){this.left=bounds.left;} | |
| 213 | -if((this.bottom==null)||(bounds.bottom<this.bottom)){this.bottom=bounds.bottom;} | |
| 214 | -if((this.right==null)||(bounds.right>this.right)){this.right=bounds.right;} | |
| 215 | -if((this.top==null)||(bounds.top>this.top)){this.top=bounds.top;}}}},containsLonLat:function(ll,inclusive){return this.contains(ll.lon,ll.lat,inclusive);},containsPixel:function(px,inclusive){return this.contains(px.x,px.y,inclusive);},contains:function(x,y,inclusive){if(inclusive==null){inclusive=true;} | |
| 216 | -var contains=false;if(inclusive){contains=((x>=this.left)&&(x<=this.right)&&(y>=this.bottom)&&(y<=this.top));}else{contains=((x>this.left)&&(x<this.right)&&(y>this.bottom)&&(y<this.top));} | |
| 217 | -return contains;},intersectsBounds:function(bounds,inclusive){if(inclusive==null){inclusive=true;} | |
| 218 | -var inBottom=(bounds.bottom==this.bottom&&bounds.top==this.top)?true:(((bounds.bottom>this.bottom)&&(bounds.bottom<this.top))||((this.bottom>bounds.bottom)&&(this.bottom<bounds.top)));var inTop=(bounds.bottom==this.bottom&&bounds.top==this.top)?true:(((bounds.top>this.bottom)&&(bounds.top<this.top))||((this.top>bounds.bottom)&&(this.top<bounds.top)));var inRight=(bounds.right==this.right&&bounds.left==this.left)?true:(((bounds.right>this.left)&&(bounds.right<this.right))||((this.right>bounds.left)&&(this.right<bounds.right)));var inLeft=(bounds.right==this.right&&bounds.left==this.left)?true:(((bounds.left>this.left)&&(bounds.left<this.right))||((this.left>bounds.left)&&(this.left<bounds.right)));return(this.containsBounds(bounds,true,inclusive)||bounds.containsBounds(this,true,inclusive)||((inTop||inBottom)&&(inLeft||inRight)));},containsBounds:function(bounds,partial,inclusive){if(partial==null){partial=false;} | |
| 219 | -if(inclusive==null){inclusive=true;} | |
| 220 | -var inLeft;var inTop;var inRight;var inBottom;if(inclusive){inLeft=(bounds.left>=this.left)&&(bounds.left<=this.right);inTop=(bounds.top>=this.bottom)&&(bounds.top<=this.top);inRight=(bounds.right>=this.left)&&(bounds.right<=this.right);inBottom=(bounds.bottom>=this.bottom)&&(bounds.bottom<=this.top);}else{inLeft=(bounds.left>this.left)&&(bounds.left<this.right);inTop=(bounds.top>this.bottom)&&(bounds.top<this.top);inRight=(bounds.right>this.left)&&(bounds.right<this.right);inBottom=(bounds.bottom>this.bottom)&&(bounds.bottom<this.top);} | |
| 221 | -return(partial)?(inTop||inBottom)&&(inLeft||inRight):(inTop&&inLeft&&inBottom&&inRight);},determineQuadrant:function(lonlat){var quadrant="";var center=this.getCenterLonLat();quadrant+=(lonlat.lat<center.lat)?"b":"t";quadrant+=(lonlat.lon<center.lon)?"l":"r";return quadrant;},wrapDateLine:function(maxExtent,options){options=options||{};var leftTolerance=options.leftTolerance||0;var rightTolerance=options.rightTolerance||0;var newBounds=this.clone();if(maxExtent){while(newBounds.left<maxExtent.left&&(newBounds.right-rightTolerance)<=maxExtent.left){newBounds=newBounds.add(maxExtent.getWidth(),0);} | |
| 222 | -while((newBounds.left+leftTolerance)>=maxExtent.right&&newBounds.right>maxExtent.right){newBounds=newBounds.add(-maxExtent.getWidth(),0);}} | |
| 223 | -return newBounds;},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(quadrant){var opp="";opp+=(quadrant.charAt(0)=='t')?'b':'t';opp+=(quadrant.charAt(1)=='l')?'r':'l';return opp;};OpenLayers.Element={visible:function(element){return OpenLayers.Util.getElement(element).style.display!='none';},toggle:function(){for(var i=0;i<arguments.length;i++){var element=OpenLayers.Util.getElement(arguments[i]);var display=OpenLayers.Element.visible(element)?'hide':'show';OpenLayers.Element[display](element);}},hide:function(){for(var i=0;i<arguments.length;i++){var element=OpenLayers.Util.getElement(arguments[i]);element.style.display='none';}},show:function(){for(var i=0;i<arguments.length;i++){var element=OpenLayers.Util.getElement(arguments[i]);element.style.display='';}},remove:function(element){element=OpenLayers.Util.getElement(element);element.parentNode.removeChild(element);},getHeight:function(element){element=OpenLayers.Util.getElement(element);return element.offsetHeight;},getDimensions:function(element){element=OpenLayers.Util.getElement(element);if(OpenLayers.Element.getStyle(element,'display')!='none'){return{width:element.offsetWidth,height:element.offsetHeight};} | |
| 224 | -var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;els.visibility='hidden';els.position='absolute';els.display='';var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display='none';els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};},getStyle:function(element,style){element=OpenLayers.Util.getElement(element);var value=element.style[OpenLayers.String.camelize(style)];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css.getPropertyValue(style):null;}else if(element.currentStyle){value=element.currentStyle[OpenLayers.String.camelize(style)];}} | |
| 225 | -var positions=['left','top','right','bottom'];if(window.opera&&(OpenLayers.Util.indexOf(positions,style)!=-1)&&(OpenLayers.Element.getStyle(element,'position')=='static')){value='auto';} | |
| 226 | -return value=='auto'?null:value;}};OpenLayers.LonLat=OpenLayers.Class({lon:0.0,lat:0.0,initialize:function(lon,lat){this.lon=parseFloat(lon);this.lat=parseFloat(lat);},toString:function(){return("lon="+this.lon+",lat="+this.lat);},toShortString:function(){return(this.lon+", "+this.lat);},clone:function(){return new OpenLayers.LonLat(this.lon,this.lat);},add:function(lon,lat){if((lon==null)||(lat==null)){var msg="You must pass both lon and lat values "+"to the add function.";OpenLayers.Console.error(msg);return null;} | |
| 227 | -return new OpenLayers.LonLat(this.lon+lon,this.lat+lat);},equals:function(ll){var equals=false;if(ll!=null){equals=((this.lon==ll.lon&&this.lat==ll.lat)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(ll.lon)&&isNaN(ll.lat)));} | |
| 228 | -return equals;},wrapDateLine:function(maxExtent){var newLonLat=this.clone();if(maxExtent){while(newLonLat.lon<maxExtent.left){newLonLat.lon+=maxExtent.getWidth();} | |
| 229 | -while(newLonLat.lon>maxExtent.right){newLonLat.lon-=maxExtent.getWidth();}} | |
| 230 | -return newLonLat;},CLASS_NAME:"OpenLayers.LonLat"});OpenLayers.LonLat.fromString=function(str){var pair=str.split(",");return new OpenLayers.LonLat(parseFloat(pair[0]),parseFloat(pair[1]));};OpenLayers.Pixel=OpenLayers.Class({x:0.0,y:0.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)));} | |
| 231 | -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;} | |
| 232 | -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);} | |
| 233 | -return newPx;},CLASS_NAME:"OpenLayers.Pixel"});OpenLayers.Size=OpenLayers.Class({w:0.0,h:0.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)));} | |
| 234 | -return equals;},CLASS_NAME:"OpenLayers.Size"});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 scripts=document.getElementsByTagName("script");for(var i=0;i<scripts.length;++i){if(scripts[i].src.indexOf("firebug.js")!=-1){OpenLayers.Util.extend(OpenLayers.Console,console);break;}}}})();OpenLayers.Control=OpenLayers.Class({id:null,map:null,div:null,type:null,displayClass:"",active:null,handler:null,initialize:function(options){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,options);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){if(this.handler){this.handler.destroy();} | |
| 235 | -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;} | |
| 236 | -if(px!=null){this.position=px.clone();} | |
| 237 | -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;} | |
| 238 | -if(this.handler){this.handler.activate();} | |
| 239 | -this.active=true;return true;},deactivate:function(){if(this.active){if(this.handler){this.handler.deactivate();} | |
| 240 | -this.active=false;return true;} | |
| 241 | -return false;},CLASS_NAME:"OpenLayers.Control"});OpenLayers.Control.TYPE_BUTTON=1;OpenLayers.Control.TYPE_TOGGLE=2;OpenLayers.Control.TYPE_TOOL=3;OpenLayers.Icon=OpenLayers.Class({url:null,size:null,offset:null,calculateOffset:null,imageDiv:null,px:null,initialize:function(url,size,offset,calculateOffset){this.url=url;this.size=(size)?size:new OpenLayers.Size(20,20);this.offset=offset?offset:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=calculateOffset;var id=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(id);},destroy:function(){OpenLayers.Event.stopObservingElement(this.imageDiv.firstChild);this.imageDiv.innerHTML="";this.imageDiv=null;},clone:function(){return new OpenLayers.Icon(this.url,this.size,this.offset,this.calculateOffset);},setSize:function(size){if(size!=null){this.size=size;} | |
| 242 | -this.draw();},draw:function(px){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,this.size,this.url,"absolute");this.moveTo(px);return this.imageDiv;},setOpacity:function(opacity){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,null,null,null,null,null,opacity);},moveTo:function(px){if(px!=null){this.px=px;} | |
| 243 | -if(this.imageDiv!=null){if(this.px==null){this.display(false);}else{if(this.calculateOffset){this.offset=this.calculateOffset(this.size);} | |
| 244 | -var offsetPx=this.px.offset(this.offset);OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,offsetPx);}}},display:function(display){this.imageDiv.style.display=(display)?"":"none";},CLASS_NAME:"OpenLayers.Icon"});OpenLayers.Popup=OpenLayers.Class({events:null,id:"",lonlat:null,div:null,size:null,contentHTML:"",backgroundColor:"",opacity:"",border:"",contentDiv:null,groupDiv:null,padding:5,map:null,initialize:function(id,lonlat,size,contentHTML,closeBox){if(id==null){id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");} | |
| 245 | -this.id=id;this.lonlat=lonlat;this.size=(size!=null)?size:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT);if(contentHTML!=null){this.contentHTML=contentHTML;} | |
| 246 | -this.backgroundColor=OpenLayers.Popup.COLOR;this.opacity=OpenLayers.Popup.OPACITY;this.border=OpenLayers.Popup.BORDER;this.div=OpenLayers.Util.createDiv(this.id,null,null,null,null,null,"hidden");this.div.className='olPopup';this.groupDiv=OpenLayers.Util.createDiv(null,null,null,null,"relative",null,"hidden");var id=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(id,null,this.size.clone(),null,"relative",null,"hidden");this.contentDiv.className='olPopupContent';this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);if(closeBox){var closeSize=new OpenLayers.Size(17,17);var img=OpenLayers.Util.getImagesLocation()+"close.gif";var closeImg=OpenLayers.Util.createAlphaImageDiv(this.id+"_close",null,closeSize,img);closeImg.style.right=this.padding+"px";closeImg.style.top=this.padding+"px";this.groupDiv.appendChild(closeImg);var closePopup=function(e){this.hide();OpenLayers.Event.stop(e);} | |
| 247 | -OpenLayers.Event.observe(closeImg,"click",OpenLayers.Function.bindAsEventListener(closePopup,this));} | |
| 248 | -this.registerEvents();},destroy:function(){if(this.map!=null){this.map.removePopup(this);this.map=null;} | |
| 249 | -this.events.destroy();this.events=null;this.div=null;},draw:function(px){if(px==null){if((this.lonlat!=null)&&(this.map!=null)){px=this.map.getLayerPxFromLonLat(this.lonlat);}} | |
| 250 | -this.setSize();this.setBackgroundColor();this.setOpacity();this.setBorder();this.setContentHTML();this.moveTo(px);return this.div;},updatePosition:function(){if((this.lonlat)&&(this.map)){var px=this.map.getLayerPxFromLonLat(this.lonlat);if(px){this.moveTo(px);}}},moveTo:function(px){if((px!=null)&&(this.div!=null)){this.div.style.left=px.x+"px";this.div.style.top=px.y+"px";}},visible:function(){return OpenLayers.Element.visible(this.div);},toggle:function(){OpenLayers.Element.toggle(this.div);},show:function(){OpenLayers.Element.show(this.div);},hide:function(){OpenLayers.Element.hide(this.div);},setSize:function(size){if(size!=undefined){this.size=size;} | |
| 251 | -if(this.div!=null){this.div.style.width=this.size.w+"px";this.div.style.height=this.size.h+"px";} | |
| 252 | -if(this.contentDiv!=null){this.contentDiv.style.width=this.size.w+"px";this.contentDiv.style.height=this.size.h+"px";}},setBackgroundColor:function(color){if(color!=undefined){this.backgroundColor=color;} | |
| 253 | -if(this.div!=null){this.div.style.backgroundColor=this.backgroundColor;}},setOpacity:function(opacity){if(opacity!=undefined){this.opacity=opacity;} | |
| 254 | -if(this.div!=null){this.div.style.opacity=this.opacity;this.div.style.filter='alpha(opacity='+this.opacity*100+')';}},setBorder:function(border){if(border!=undefined){this.border=border;} | |
| 255 | -if(this.div!=null){this.div.style.border=this.border;}},setContentHTML:function(contentHTML){if(contentHTML!=null){this.contentHTML=contentHTML;} | |
| 256 | -if(this.contentDiv!=null){this.contentDiv.innerHTML=this.contentHTML;}},registerEvents:function(){this.events=new OpenLayers.Events(this,this.div,null,true);this.events.register("mousedown",this,this.onmousedown);this.events.register("mousemove",this,this.onmousemove);this.events.register("mouseup",this,this.onmouseup);this.events.register("click",this,this.onclick);this.events.register("mouseout",this,this.onmouseout);this.events.register("dblclick",this,this.ondblclick);},onmousedown:function(evt){this.mousedown=true;OpenLayers.Event.stop(evt,true);},onmousemove:function(evt){if(this.mousedown){OpenLayers.Event.stop(evt,true);}},onmouseup:function(evt){if(this.mousedown){this.mousedown=false;OpenLayers.Event.stop(evt,true);}},onclick:function(evt){OpenLayers.Event.stop(evt,true);},onmouseout:function(evt){this.mousedown=false;},ondblclick:function(evt){OpenLayers.Event.stop(evt,true);},CLASS_NAME:"OpenLayers.Popup"});OpenLayers.Popup.WIDTH=200;OpenLayers.Popup.HEIGHT=200;OpenLayers.Popup.COLOR="white";OpenLayers.Popup.OPACITY=1;OpenLayers.Popup.BORDER="0px";OpenLayers.Renderer=OpenLayers.Class({container:null,extent:null,size:null,resolution:null,map:null,initialize:function(containerID){this.container=OpenLayers.Util.getElement(containerID);},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(feature,style){if(style==null){style=feature.style;} | |
| 257 | -this.drawGeometry(feature.geometry,style,feature.id);},drawGeometry:function(geometry,style,featureId){},clear:function(){},getFeatureIdFromEvent:function(evt){},eraseFeatures:function(features){if(!(features instanceof Array)){features=[features];} | |
| 258 | -for(var i=0;i<features.length;++i){this.eraseGeometry(features[i].geometry);}},eraseGeometry:function(geometry){},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.Rico.Color=OpenLayers.Class({initialize:function(red,green,blue){this.rgb={r:red,g:green,b:blue};},setRed:function(r){this.rgb.r=r;},setGreen:function(g){this.rgb.g=g;},setBlue:function(b){this.rgb.b=b;},setHue:function(h){var hsb=this.asHSB();hsb.h=h;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},setSaturation:function(s){var hsb=this.asHSB();hsb.s=s;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},setBrightness:function(b){var hsb=this.asHSB();hsb.b=b;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},darken:function(percent){var hsb=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,Math.max(hsb.b-percent,0));},brighten:function(percent){var hsb=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,Math.min(hsb.b+percent,1));},blend:function(other){this.rgb.r=Math.floor((this.rgb.r+other.rgb.r)/2);this.rgb.g=Math.floor((this.rgb.g+other.rgb.g)/2);this.rgb.b=Math.floor((this.rgb.b+other.rgb.b)/2);},isBright:function(){var hsb=this.asHSB();return this.asHSB().b>0.5;},isDark:function(){return!this.isBright();},asRGB:function(){return"rgb("+this.rgb.r+","+this.rgb.g+","+this.rgb.b+")";},asHex:function(){return"#"+this.rgb.r.toColorPart()+this.rgb.g.toColorPart()+this.rgb.b.toColorPart();},asHSB:function(){return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r,this.rgb.g,this.rgb.b);},toString:function(){return this.asHex();}});OpenLayers.Rico.Color.createFromHex=function(hexCode){if(hexCode.length==4){var shortHexCode=hexCode;var hexCode='#';for(var i=1;i<4;i++)hexCode+=(shortHexCode.charAt(i)+ | |
| 259 | -shortHexCode.charAt(i));} | |
| 260 | -if(hexCode.indexOf('#')==0) | |
| 261 | -hexCode=hexCode.substring(1);var red=hexCode.substring(0,2);var green=hexCode.substring(2,4);var blue=hexCode.substring(4,6);return new OpenLayers.Rico.Color(parseInt(red,16),parseInt(green,16),parseInt(blue,16));} | |
| 262 | -OpenLayers.Rico.Color.createColorFromBackground=function(elem){var actualColor=RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(elem),"backgroundColor","background-color");if(actualColor=="transparent"&&elem.parentNode) | |
| 263 | -return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode);if(actualColor==null) | |
| 264 | -return new OpenLayers.Rico.Color(255,255,255);if(actualColor.indexOf("rgb(")==0){var colors=actualColor.substring(4,actualColor.length-1);var colorArray=colors.split(",");return new OpenLayers.Rico.Color(parseInt(colorArray[0]),parseInt(colorArray[1]),parseInt(colorArray[2]));} | |
| 265 | -else if(actualColor.indexOf("#")==0){return OpenLayers.Rico.Color.createFromHex(actualColor);} | |
| 266 | -else | |
| 267 | -return new OpenLayers.Rico.Color(255,255,255);} | |
| 268 | -OpenLayers.Rico.Color.HSBtoRGB=function(hue,saturation,brightness){var red=0;var green=0;var blue=0;if(saturation==0){red=parseInt(brightness*255.0+0.5);green=red;blue=red;} | |
| 269 | -else{var h=(hue-Math.floor(hue))*6.0;var f=h-Math.floor(h);var p=brightness*(1.0-saturation);var q=brightness*(1.0-saturation*f);var t=brightness*(1.0-(saturation*(1.0-f)));switch(parseInt(h)){case 0:red=(brightness*255.0+0.5);green=(t*255.0+0.5);blue=(p*255.0+0.5);break;case 1:red=(q*255.0+0.5);green=(brightness*255.0+0.5);blue=(p*255.0+0.5);break;case 2:red=(p*255.0+0.5);green=(brightness*255.0+0.5);blue=(t*255.0+0.5);break;case 3:red=(p*255.0+0.5);green=(q*255.0+0.5);blue=(brightness*255.0+0.5);break;case 4:red=(t*255.0+0.5);green=(p*255.0+0.5);blue=(brightness*255.0+0.5);break;case 5:red=(brightness*255.0+0.5);green=(p*255.0+0.5);blue=(q*255.0+0.5);break;}} | |
| 270 | -return{r:parseInt(red),g:parseInt(green),b:parseInt(blue)};} | |
| 271 | -OpenLayers.Rico.Color.RGBtoHSB=function(r,g,b){var hue;var saturation;var brightness;var cmax=(r>g)?r:g;if(b>cmax) | |
| 272 | -cmax=b;var cmin=(r<g)?r:g;if(b<cmin) | |
| 273 | -cmin=b;brightness=cmax/255.0;if(cmax!=0) | |
| 274 | -saturation=(cmax-cmin)/cmax;else | |
| 275 | -saturation=0;if(saturation==0) | |
| 276 | -hue=0;else{var redc=(cmax-r)/(cmax-cmin);var greenc=(cmax-g)/(cmax-cmin);var bluec=(cmax-b)/(cmax-cmin);if(r==cmax) | |
| 277 | -hue=bluec-greenc;else if(g==cmax) | |
| 278 | -hue=2.0+redc-bluec;else | |
| 279 | -hue=4.0+greenc-redc;hue=hue/6.0;if(hue<0) | |
| 280 | -hue=hue+1.0;} | |
| 281 | -return{h:hue,s:saturation,b:brightness};} | |
| 282 | -OpenLayers.Control.ArgParser=OpenLayers.Class(OpenLayers.Control,{center:null,zoom:null,layers:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var i=0;i<this.map.controls.length;i++){var control=this.map.controls[i];if((control!=this)&&(control.CLASS_NAME=="OpenLayers.Control.ArgParser")){break;}} | |
| 283 | -if(i==this.map.controls.length){var args=OpenLayers.Util.getParameters();if(args.lat&&args.lon){this.center=new OpenLayers.LonLat(parseFloat(args.lon),parseFloat(args.lat));if(args.zoom){this.zoom=parseInt(args.zoom);} | |
| 284 | -this.map.events.register('changebaselayer',this,this.setCenter);this.setCenter();} | |
| 285 | -if(args.layers){this.layers=args.layers;this.map.events.register('addlayer',this,this.configureLayers);this.configureLayers();}}},setCenter:function(){if(this.map.baseLayer){this.map.events.unregister('changebaselayer',this,this.setCenter);this.map.setCenter(this.center,this.zoom);}},configureLayers:function(){if(this.layers.length==this.map.layers.length){this.map.events.unregister('addlayer',this,this.configureLayers);for(var i=0;i<this.layers.length;i++){var layer=this.map.layers[i];var c=this.layers.charAt(i);if(c=="B"){this.map.setBaseLayer(layer);}else if((c=="T")||(c=="F")){layer.setVisibility(c=="T");}}}},CLASS_NAME:"OpenLayers.Control.ArgParser"});OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){this.map.events.unregister("removelayer",this,this.updateAttribution);this.map.events.unregister("addlayer",this,this.updateAttribution);this.map.events.unregister("changelayer",this,this.updateAttribution);this.map.events.unregister("changebaselayer",this,this.updateAttribution);OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.map.events.register('changebaselayer',this,this.updateAttribution);this.map.events.register('changelayer',this,this.updateAttribution);this.map.events.register('addlayer',this,this.updateAttribution);this.map.events.register('removelayer',this,this.updateAttribution);this.updateAttribution();return this.div;},updateAttribution:function(){var attributions=[];if(this.map&&this.map.layers){for(var i=0;i<this.map.layers.length;i++){var layer=this.map.layers[i];if(layer.attribution&&layer.getVisibility()){attributions.push(layer.attribution);}} | |
| 286 | -this.div.innerHTML=attributions.join(this.separator);}},CLASS_NAME:"OpenLayers.Control.Attribution"});OpenLayers.Control.LayerSwitcher=OpenLayers.Class(OpenLayers.Control,{activeColor:"darkblue",layerStates:null,layersDiv:null,baseLayersDiv:null,baseLayers:null,dataLbl:null,dataLayersDiv:null,dataLayers:null,minimizeDiv:null,maximizeDiv:null,ascending:true,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.layerStates=[];},destroy:function(){OpenLayers.Event.stopObservingElement(this.div);OpenLayers.Event.stopObservingElement(this.minimizeDiv);OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.clearLayersArray("base");this.clearLayersArray("data");this.map.events.unregister("addlayer",this,this.redraw);this.map.events.unregister("changelayer",this,this.redraw);this.map.events.unregister("removelayer",this,this.redraw);this.map.events.unregister("changebaselayer",this,this.redraw);OpenLayers.Control.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.register("addlayer",this,this.redraw);this.map.events.register("changelayer",this,this.redraw);this.map.events.register("removelayer",this,this.redraw);this.map.events.register("changebaselayer",this,this.redraw);},draw:function(){OpenLayers.Control.prototype.draw.apply(this);this.loadContents();if(!this.outsideViewport){this.minimizeControl();} | |
| 287 | -this.redraw();return this.div;},clearLayersArray:function(layersType){var layers=this[layersType+"Layers"];if(layers){for(var i=0;i<layers.length;i++){var layer=layers[i];OpenLayers.Event.stopObservingElement(layer.inputElem);OpenLayers.Event.stopObservingElement(layer.labelSpan);}} | |
| 288 | -this[layersType+"LayersDiv"].innerHTML="";this[layersType+"Layers"]=[];},checkRedraw:function(){var redraw=false;if(!this.layerStates.length||(this.map.layers.length!=this.layerStates.length)){redraw=true;}else{for(var i=0;i<this.layerStates.length;i++){var layerState=this.layerStates[i];var layer=this.map.layers[i];if((layerState.name!=layer.name)||(layerState.inRange!=layer.inRange)||(layerState.id!=layer.id)||(layerState.visibility!=layer.visibility)){redraw=true;break;}}} | |
| 289 | -return redraw;},redraw:function(){if(!this.checkRedraw()){return this.div;} | |
| 290 | -this.clearLayersArray("base");this.clearLayersArray("data");var containsOverlays=false;var containsBaseLayers=false;this.layerStates=new Array(this.map.layers.length);for(var i=0;i<this.map.layers.length;i++){var layer=this.map.layers[i];this.layerStates[i]={'name':layer.name,'visibility':layer.visibility,'inRange':layer.inRange,'id':layer.id};} | |
| 291 | -var layers=this.map.layers.slice();if(!this.ascending){layers.reverse();} | |
| 292 | -for(var i=0;i<layers.length;i++){var layer=layers[i];var baseLayer=layer.isBaseLayer;if(layer.displayInLayerSwitcher){if(baseLayer){containsBaseLayers=true;}else{containsOverlays=true;} | |
| 293 | -var checked=(baseLayer)?(layer==this.map.baseLayer):layer.getVisibility();var inputElem=document.createElement("input");inputElem.id="input_"+layer.name;inputElem.name=(baseLayer)?"baseLayers":layer.name;inputElem.type=(baseLayer)?"radio":"checkbox";inputElem.value=layer.name;inputElem.checked=checked;inputElem.defaultChecked=checked;if(!baseLayer&&!layer.inRange){inputElem.disabled=true;} | |
| 294 | -var context={'inputElem':inputElem,'layer':layer,'layerSwitcher':this} | |
| 295 | -OpenLayers.Event.observe(inputElem,"mouseup",OpenLayers.Function.bindAsEventListener(this.onInputClick,context));var labelSpan=document.createElement("span");if(!baseLayer&&!layer.inRange){labelSpan.style.color="gray";} | |
| 296 | -labelSpan.innerHTML=layer.name;labelSpan.style.verticalAlign=(baseLayer)?"bottom":"baseline";OpenLayers.Event.observe(labelSpan,"click",OpenLayers.Function.bindAsEventListener(this.onInputClick,context));var br=document.createElement("br");var groupArray=(baseLayer)?this.baseLayers:this.dataLayers;groupArray.push({'layer':layer,'inputElem':inputElem,'labelSpan':labelSpan});var groupDiv=(baseLayer)?this.baseLayersDiv:this.dataLayersDiv;groupDiv.appendChild(inputElem);groupDiv.appendChild(labelSpan);groupDiv.appendChild(br);}} | |
| 297 | -this.dataLbl.style.display=(containsOverlays)?"":"none";this.baseLbl.style.display=(containsBaseLayers)?"":"none";return this.div;},onInputClick:function(e){if(!this.inputElem.disabled){if(this.inputElem.type=="radio"){this.inputElem.checked=true;this.layer.map.setBaseLayer(this.layer);}else{this.inputElem.checked=!this.inputElem.checked;this.layerSwitcher.updateMap();}} | |
| 298 | -OpenLayers.Event.stop(e);},onLayerClick:function(e){this.updateMap();},updateMap:function(){for(var i=0;i<this.baseLayers.length;i++){var layerEntry=this.baseLayers[i];if(layerEntry.inputElem.checked){this.map.setBaseLayer(layerEntry.layer,false);}} | |
| 299 | -for(var i=0;i<this.dataLayers.length;i++){var layerEntry=this.dataLayers[i];layerEntry.layer.setVisibility(layerEntry.inputElem.checked);}},maximizeControl:function(e){this.div.style.width="20em";this.div.style.height="";this.showControls(false);if(e!=null){OpenLayers.Event.stop(e);}},minimizeControl:function(e){this.div.style.width="0px";this.div.style.height="0px";this.showControls(true);if(e!=null){OpenLayers.Event.stop(e);}},showControls:function(minimize){this.maximizeDiv.style.display=minimize?"":"none";this.minimizeDiv.style.display=minimize?"none":"";this.layersDiv.style.display=minimize?"none":"";},loadContents:function(){this.div.style.position="absolute";this.div.style.top="25px";this.div.style.right="0px";this.div.style.left="";this.div.style.fontFamily="sans-serif";this.div.style.fontWeight="bold";this.div.style.marginTop="3px";this.div.style.marginLeft="3px";this.div.style.marginBottom="3px";this.div.style.fontSize="smaller";this.div.style.color="white";this.div.style.backgroundColor="transparent";OpenLayers.Event.observe(this.div,"mouseup",OpenLayers.Function.bindAsEventListener(this.mouseUp,this));OpenLayers.Event.observe(this.div,"click",this.ignoreEvent);OpenLayers.Event.observe(this.div,"mousedown",OpenLayers.Function.bindAsEventListener(this.mouseDown,this));OpenLayers.Event.observe(this.div,"dblclick",this.ignoreEvent);this.layersDiv=document.createElement("div");this.layersDiv.id="layersDiv";this.layersDiv.style.paddingTop="5px";this.layersDiv.style.paddingLeft="10px";this.layersDiv.style.paddingBottom="5px";this.layersDiv.style.paddingRight="75px";this.layersDiv.style.backgroundColor=this.activeColor;this.layersDiv.style.width="100%";this.layersDiv.style.height="100%";this.baseLbl=document.createElement("div");this.baseLbl.innerHTML="<u>Base Layer</u>";this.baseLbl.style.marginTop="3px";this.baseLbl.style.marginLeft="3px";this.baseLbl.style.marginBottom="3px";this.baseLayersDiv=document.createElement("div");this.baseLayersDiv.style.paddingLeft="10px";this.dataLbl=document.createElement("div");this.dataLbl.innerHTML="<u>Overlays</u>";this.dataLbl.style.marginTop="3px";this.dataLbl.style.marginLeft="3px";this.dataLbl.style.marginBottom="3px";this.dataLayersDiv=document.createElement("div");this.dataLayersDiv.style.paddingLeft="10px";if(this.ascending){this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);}else{this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);} | |
| 300 | -this.div.appendChild(this.layersDiv);OpenLayers.Rico.Corner.round(this.div,{corners:"tl bl",bgColor:"transparent",color:this.activeColor,blend:false});OpenLayers.Rico.Corner.changeOpacity(this.layersDiv,0.75);var imgLocation=OpenLayers.Util.getImagesLocation();var sz=new OpenLayers.Size(18,18);var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MaximizeDiv",null,sz,img,"absolute");this.maximizeDiv.style.top="5px";this.maximizeDiv.style.right="0px";this.maximizeDiv.style.left="";this.maximizeDiv.style.display="none";OpenLayers.Event.observe(this.maximizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var img=imgLocation+'layer-switcher-minimize.png';var sz=new OpenLayers.Size(18,18);this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MinimizeDiv",null,sz,img,"absolute");this.minimizeDiv.style.top="5px";this.minimizeDiv.style.right="0px";this.minimizeDiv.style.left="";this.minimizeDiv.style.display="none";OpenLayers.Event.observe(this.minimizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv);},ignoreEvent:function(evt){OpenLayers.Event.stop(evt);},mouseDown:function(evt){this.isMouseDown=true;this.ignoreEvent(evt);},mouseUp:function(evt){if(this.isMouseDown){this.isMouseDown=false;this.ignoreEvent(evt);}},CLASS_NAME:"OpenLayers.Control.LayerSwitcher"});OpenLayers.Control.MouseDefaults=OpenLayers.Class(OpenLayers.Control,{performedDrag:false,wheelObserver:null,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.handler){this.handler.destroy();} | |
| 301 | -this.handler=null;this.map.events.unregister("click",this,this.defaultClick);this.map.events.unregister("dblclick",this,this.defaultDblClick);this.map.events.unregister("mousedown",this,this.defaultMouseDown);this.map.events.unregister("mouseup",this,this.defaultMouseUp);this.map.events.unregister("mousemove",this,this.defaultMouseMove);this.map.events.unregister("mouseout",this,this.defaultMouseOut);OpenLayers.Event.stopObserving(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.stopObserving(window,"mousewheel",this.wheelObserver);OpenLayers.Event.stopObserving(document,"mousewheel",this.wheelObserver);this.wheelObserver=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){this.map.events.register("click",this,this.defaultClick);this.map.events.register("dblclick",this,this.defaultDblClick);this.map.events.register("mousedown",this,this.defaultMouseDown);this.map.events.register("mouseup",this,this.defaultMouseUp);this.map.events.register("mousemove",this,this.defaultMouseMove);this.map.events.register("mouseout",this,this.defaultMouseOut);this.registerWheelEvents();},registerWheelEvents:function(){this.wheelObserver=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this);OpenLayers.Event.observe(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.observe(window,"mousewheel",this.wheelObserver);OpenLayers.Event.observe(document,"mousewheel",this.wheelObserver);},defaultClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;var notAfterDrag=!this.performedDrag;this.performedDrag=false;return notAfterDrag;},defaultDblClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},defaultMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.mouseDragStart=evt.xy.clone();this.performedDrag=false;if(evt.shiftKey){this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv('zoomBox',this.mouseDragStart,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);} | |
| 302 | -document.onselectstart=function(){return false;} | |
| 303 | -OpenLayers.Event.stop(evt);},defaultMouseMove:function(evt){this.mousePosition=evt.xy.clone();if(this.mouseDragStart!=null){if(this.zoomBox){var deltaX=Math.abs(this.mouseDragStart.x-evt.xy.x);var deltaY=Math.abs(this.mouseDragStart.y-evt.xy.y);this.zoomBox.style.width=Math.max(1,deltaX)+"px";this.zoomBox.style.height=Math.max(1,deltaY)+"px";if(evt.xy.x<this.mouseDragStart.x){this.zoomBox.style.left=evt.xy.x+"px";} | |
| 304 | -if(evt.xy.y<this.mouseDragStart.y){this.zoomBox.style.top=evt.xy.y+"px";}}else{var deltaX=this.mouseDragStart.x-evt.xy.x;var deltaY=this.mouseDragStart.y-evt.xy.y;var size=this.map.getSize();var newXY=new OpenLayers.Pixel(size.w/2+deltaX,size.h/2+deltaY);var newCenter=this.map.getLonLatFromViewPortPx(newXY);this.map.setCenter(newCenter,null,true);this.mouseDragStart=evt.xy.clone();this.map.div.style.cursor="move";} | |
| 305 | -this.performedDrag=true;}},defaultMouseUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.zoomBox){this.zoomBoxEnd(evt);}else{if(this.performedDrag){this.map.setCenter(this.map.center);}} | |
| 306 | -document.onselectstart=null;this.mouseDragStart=null;this.map.div.style.cursor="";},defaultMouseOut:function(evt){if(this.mouseDragStart!=null&&OpenLayers.Util.mouseLeft(evt,this.map.div)){if(this.zoomBox){this.removeZoomBox();} | |
| 307 | -this.mouseDragStart=null;}},defaultWheelUp:function(evt){if(this.map.getZoom()<=this.map.getNumZoomLevels()){this.map.setCenter(this.map.getLonLatFromPixel(evt.xy),this.map.getZoom()+1);}},defaultWheelDown:function(evt){if(this.map.getZoom()>0){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);} | |
| 308 | -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;} | |
| 309 | -elem=elem.parentNode;} | |
| 310 | -if(inMap){var delta=0;if(!e){e=window.event;} | |
| 311 | -if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera){delta=-delta;}}else if(e.detail){delta=-e.detail/3;} | |
| 312 | -if(delta){e.xy=this.mousePosition;if(delta<0){this.defaultWheelDown(e);}else{this.defaultWheelUp(e);}} | |
| 313 | -OpenLayers.Event.stop(e);}},CLASS_NAME:"OpenLayers.Control.MouseDefaults"});OpenLayers.Control.MousePosition=OpenLayers.Class(OpenLayers.Control,{element:null,prefix:'',separator:', ',suffix:'',numdigits:5,granularity:10,lastXy:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.map){this.map.events.unregister('mousemove',this,this.redraw);} | |
| 314 | -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;} | |
| 315 | -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) | |
| 316 | -{this.lastXy=evt.xy;return;} | |
| 317 | -lonLat=this.map.getLonLatFromPixel(evt.xy);this.lastXy=evt.xy;} | |
| 318 | -var digits=parseInt(this.numdigits);var newHtml=this.prefix+ | |
| 319 | -lonLat.lon.toFixed(digits)+ | |
| 320 | -this.separator+ | |
| 321 | -lonLat.lat.toFixed(digits)+ | |
| 322 | -this.suffix;if(newHtml!=this.element.innerHTML){this.element.innerHTML=newHtml;}},setMap:function(){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.register('mousemove',this,this.redraw);},CLASS_NAME:"OpenLayers.Control.MousePosition"});OpenLayers.Control.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,buttons:null,position:null,initialize:function(options){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);} | |
| 323 | -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 centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);this._addButton("panup","north-mini.png",centered,sz);px.y=centered.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",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);this._addButton("zoomworld","zoom-world-mini.png",centered.add(0,sz.h*4+5),sz);this._addButton("zoomout","zoom-minus-mini.png",centered.add(0,sz.h*5+5),sz);return this.div;},_addButton:function(id,img,xy,sz){var imgLocation=OpenLayers.Util.getImagesLocation()+img;var btn=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_PanZoom_"+id,xy,sz,imgLocation,"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;} | |
| 324 | -OpenLayers.Event.stop(evt);},CLASS_NAME:"OpenLayers.Control.PanZoom"});OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;OpenLayers.Control.Panel=OpenLayers.Class(OpenLayers.Control,{controls:null,defaultControl:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.controls=[];},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var i=this.controls.length-1;i>=0;i--){OpenLayers.Event.stopObservingElement(this.controls[i].panel_div);this.controls[i].panel_div=null;}},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){for(var i=0;i<this.controls.length;i++){if(this.controls[i]==this.defaultControl){this.controls[i].activate();}} | |
| 325 | -this.redraw();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){for(var i=0;i<this.controls.length;i++){this.controls[i].deactivate();} | |
| 326 | -this.redraw();return true;}else{return false;}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);for(var i=0;i<this.controls.length;i++){this.map.addControl(this.controls[i]);this.controls[i].deactivate();} | |
| 327 | -this.activate();return this.div;},redraw:function(){this.div.innerHTML="";if(this.active){for(var i=0;i<this.controls.length;i++){var element=this.controls[i].panel_div;if(this.controls[i].active){element.className=this.controls[i].displayClass+"ItemActive";}else{element.className=this.controls[i].displayClass+"ItemInactive";} | |
| 328 | -this.div.appendChild(element);}}},activateControl:function(control){if(!this.active){return false;} | |
| 329 | -if(control.type==OpenLayers.Control.TYPE_BUTTON){control.trigger();return;} | |
| 330 | -if(control.type==OpenLayers.Control.TYPE_TOGGLE){if(control.active){control.deactivate();}else{control.activate();} | |
| 331 | -return;} | |
| 332 | -for(var i=0;i<this.controls.length;i++){if(this.controls[i]==control){control.activate();}else{if(this.controls[i].type!=OpenLayers.Control.TYPE_TOGGLE){this.controls[i].deactivate();}}} | |
| 333 | -this.redraw();},addControls:function(controls){if(!(controls instanceof Array)){controls=[controls];} | |
| 334 | -this.controls=this.controls.concat(controls);for(var i=0;i<controls.length;i++){var element=document.createElement("div");var textNode=document.createTextNode(" ");controls[i].panel_div=element;OpenLayers.Event.observe(controls[i].panel_div,"click",OpenLayers.Function.bind(this.onClick,this,controls[i]));OpenLayers.Event.observe(controls[i].panel_div,"mousedown",OpenLayers.Function.bindAsEventListener(OpenLayers.Event.stop));} | |
| 335 | -if(this.map){for(var i=0;i<controls.length;i++){this.map.addControl(controls[i]);controls[i].deactivate();} | |
| 336 | -this.redraw();}},onClick:function(ctrl,evt){OpenLayers.Event.stop(evt?evt:window.event);this.activateControl(ctrl);},CLASS_NAME:"OpenLayers.Control.Panel"});OpenLayers.Control.Permalink=OpenLayers.Class(OpenLayers.Control,{element:null,base:'',initialize:function(element,base,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.element=OpenLayers.Util.getElement(element);this.base=base||document.location.href;},destroy:function(){if(this.element.parentNode==this.div){this.div.removeChild(this.element);} | |
| 337 | -this.element=null;this.map.events.unregister('moveend',this,this.updateLink);OpenLayers.Control.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var i=0;i<this.map.controls.length;i++){var control=this.map.controls[i];if(control.CLASS_NAME=="OpenLayers.Control.ArgParser"){break;}} | |
| 338 | -if(i==this.map.controls.length){this.map.addControl(new OpenLayers.Control.ArgParser());}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.className=this.displayClass;this.element=document.createElement("a");this.element.style.fontSize="smaller";this.element.innerHTML="Permalink";this.element.href="";this.div.appendChild(this.element);} | |
| 339 | -this.map.events.register('moveend',this,this.updateLink);this.map.events.register('changelayer',this,this.updateLink);this.map.events.register('changebaselayer',this,this.updateLink);return this.div;},updateLink:function(){var center=this.map.getCenter();if(!center){return;} | |
| 340 | -var params=OpenLayers.Util.getParameters(this.base);params.zoom=this.map.getZoom();params.lat=Math.round(center.lat*100000)/100000;params.lon=Math.round(center.lon*100000)/100000;params.layers='';for(var i=0;i<this.map.layers.length;i++){var layer=this.map.layers[i];if(layer.isBaseLayer){params.layers+=(layer==this.map.baseLayer)?"B":"0";}else{params.layers+=(layer.getVisibility())?"T":"F";}} | |
| 341 | -var href=this.base;if(href.indexOf('?')!=-1){href=href.substring(0,href.indexOf('?'));} | |
| 342 | -href+='?'+OpenLayers.Util.getParameterString(params);this.element.href=href;},CLASS_NAME:"OpenLayers.Control.Permalink"});OpenLayers.Control.Scale=OpenLayers.Class(OpenLayers.Control,{element:null,initialize:function(element,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.element=OpenLayers.Util.getElement(element);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.element=document.createElement("div");this.div.className=this.displayClass;this.element.style.fontSize="smaller";this.div.appendChild(this.element);} | |
| 343 | -this.map.events.register('moveend',this,this.updateScale);this.updateScale();return this.div;},updateScale:function(){var scale=this.map.getScale();if(!scale)return;if(scale>=9500&&scale<=950000){scale=Math.round(scale/1000)+"K";}else if(scale>=950000){scale=Math.round(scale/1000000)+"M";}else{scale=Math.round(scale);} | |
| 344 | -this.element.innerHTML="Scale = 1 : "+scale;},CLASS_NAME:"OpenLayers.Control.Scale"});OpenLayers.Control.ZoomToMaxExtent=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){if(this.map){this.map.zoomToMaxExtent();}},CLASS_NAME:"OpenLayers.Control.ZoomToMaxExtent"});OpenLayers.Event={observers:false,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(event){return event.target||event.srcElement;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},stop:function(event,allowDefault){if(!allowDefault){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}} | |
| 345 | -if(event.stopPropagation){event.stopPropagation();}else{event.cancelBubble=true;}},findElement:function(event,tagName){var element=OpenLayers.Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase()))) | |
| 346 | -element=element.parentNode;return element;},observe:function(elementParam,name,observer,useCapture){var element=OpenLayers.Util.getElement(elementParam);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent)){name='keydown';} | |
| 347 | -if(!this.observers){this.observers={};} | |
| 348 | -if(!element._eventCacheID){var idPrefix="eventCacheID_";if(element.id){idPrefix=element.id+"_"+idPrefix;} | |
| 349 | -element._eventCacheID=OpenLayers.Util.createUniqueID(idPrefix);} | |
| 350 | -var cacheID=element._eventCacheID;if(!this.observers[cacheID]){this.observers[cacheID]=[];} | |
| 351 | -this.observers[cacheID].push({'element':element,'name':name,'observer':observer,'useCapture':useCapture});if(element.addEventListener){element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){element.attachEvent('on'+name,observer);}},stopObservingElement:function(elementParam){var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[cacheID]);},_removeElementObservers:function(elementObservers){if(elementObservers){for(var i=elementObservers.length-1;i>=0;i--){var entry=elementObservers[i];var args=new Array(entry.element,entry.name,entry.observer,entry.useCapture);var removed=OpenLayers.Event.stopObserving.apply(this,args);}}},stopObserving:function(elementParam,name,observer,useCapture){useCapture=useCapture||false;var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;if(name=='keypress'){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent){name='keydown';}} | |
| 352 | -var foundEntry=false;var elementObservers=OpenLayers.Event.observers[cacheID];if(elementObservers){var i=0;while(!foundEntry&&i<elementObservers.length){var cacheEntry=elementObservers[i];if((cacheEntry.name==name)&&(cacheEntry.observer==observer)&&(cacheEntry.useCapture==useCapture)){elementObservers.splice(i,1);if(elementObservers.length==0){delete OpenLayers.Event.observers[cacheID];} | |
| 353 | -foundEntry=true;break;} | |
| 354 | -i++;}} | |
| 355 | -if(element.removeEventListener){element.removeEventListener(name,observer,useCapture);}else if(element&&element.detachEvent){element.detachEvent('on'+name,observer);} | |
| 356 | -return foundEntry;},unloadCache:function(){if(OpenLayers.Event.observers){for(var cacheID in OpenLayers.Event.observers){var elementObservers=OpenLayers.Event.observers[cacheID];OpenLayers.Event._removeElementObservers.apply(this,[elementObservers]);} | |
| 357 | -OpenLayers.Event.observers=false;}},CLASS_NAME:"OpenLayers.Event"};OpenLayers.Event.observe(window,'unload',OpenLayers.Event.unloadCache,false);if(window.Event){OpenLayers.Util.applyDefaults(window.Event,OpenLayers.Event);}else{var Event=OpenLayers.Event;} | |
| 358 | -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,element,eventTypes,fallThrough){this.object=object;this.element=element;this.eventTypes=eventTypes;this.fallThrough=fallThrough;this.listeners={};this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);if(this.eventTypes!=null){for(var i=0;i<this.eventTypes.length;i++){this.addEventType(this.eventTypes[i]);}} | |
| 359 | -if(this.element!=null){this.attachToElement(element);}},destroy:function(){if(this.element){OpenLayers.Event.stopObservingElement(this.element);} | |
| 360 | -this.element=null;this.listeners=null;this.object=null;this.eventTypes=null;this.fallThrough=null;this.eventHandler=null;},addEventType:function(eventName){if(!this.listeners[eventName]){this.listeners[eventName]=[];}},attachToElement:function(element){for(var i=0;i<this.BROWSER_EVENTS.length;i++){var eventType=this.BROWSER_EVENTS[i];this.addEventType(eventType);OpenLayers.Event.observe(element,eventType,this.eventHandler);} | |
| 361 | -OpenLayers.Event.observe(element,"dragstart",OpenLayers.Event.stop);},register:function(type,obj,func){if(func!=null){if(obj==null){obj=this.object;} | |
| 362 | -var listeners=this.listeners[type];if(listeners!=null){listeners.push({obj:obj,func:func});}}},registerPriority:function(type,obj,func){if(func!=null){if(obj==null){obj=this.object;} | |
| 363 | -var listeners=this.listeners[type];if(listeners!=null){listeners.unshift({obj:obj,func:func});}}},unregister:function(type,obj,func){if(obj==null){obj=this.object;} | |
| 364 | -var listeners=this.listeners[type];if(listeners!=null){for(var i=0;i<listeners.length;i++){if(listeners[i].obj==obj&&listeners[i].func==func){listeners.splice(i,1);break;}}}},remove:function(type){if(this.listeners[type]!=null){this.listeners[type]=[];}},triggerEvent:function(type,evt){if(evt==null){evt={};} | |
| 365 | -evt.object=this.object;evt.element=this.element;var listeners=(this.listeners[type])?this.listeners[type].slice():null;if((listeners!=null)&&(listeners.length>0)){for(var i=0;i<listeners.length;i++){var callback=listeners[i];var continueChain;if(callback.obj!=null){continueChain=callback.func.call(callback.obj,evt);}else{continueChain=callback.func(evt);} | |
| 366 | -if((continueChain!=null)&&(continueChain==false)){break;}} | |
| 367 | -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);} | |
| 368 | -return new OpenLayers.Pixel((evt.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))-this.element.offsets[0] | |
| 369 | --(document.documentElement.clientLeft||0),(evt.clientY+(document.documentElement.scrollTop||document.body.scrollTop))-this.element.offsets[1] | |
| 370 | --(document.documentElement.clientTop||0));},CLASS_NAME:"OpenLayers.Events"});OpenLayers.Format=OpenLayers.Class({initialize:function(options){OpenLayers.Util.extend(this,options);},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,contentHTML,anchor,closeBox){var newArguments=new Array(id,lonlat,size,contentHTML,closeBox);OpenLayers.Popup.prototype.initialize.apply(this,newArguments);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);}} | |
| 371 | -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 quadrant=extent.determineQuadrant(lonlat);return OpenLayers.Bounds.oppositeQuadrant(quadrant);},moveTo:function(px){this.relativePosition=this.calculateRelativePosition(px);var newPx=this.calculateNewPx(px);var newArguments=new Array(newPx);OpenLayers.Popup.prototype.moveTo.apply(this,newArguments);},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.Renderer.Elements=OpenLayers.Class(OpenLayers.Renderer,{rendererRoot:null,root:null,xmlns:null,initialize:function(containerID){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot();this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);},destroy:function(){this.clear();this.rendererRoot=null;this.root=null;this.xmlns=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments);},clear:function(){if(this.root){while(this.root.childNodes.length>0){this.root.removeChild(this.root.firstChild);}}},getNodeType:function(geometry){},drawGeometry:function(geometry,style,featureId){var className=geometry.CLASS_NAME;if((className=="OpenLayers.Geometry.Collection")||(className=="OpenLayers.Geometry.MultiPoint")||(className=="OpenLayers.Geometry.MultiLineString")||(className=="OpenLayers.Geometry.MultiPolygon")){for(var i=0;i<geometry.components.length;i++){this.drawGeometry(geometry.components[i],style,featureId);} | |
| 372 | -return;};var nodeType=this.getNodeType(geometry);var node=this.nodeFactory(geometry.id,nodeType,geometry);node._featureId=featureId;node._geometryClass=geometry.CLASS_NAME;node._style=style;this.root.appendChild(node);this.drawGeometryNode(node,geometry);},drawGeometryNode:function(node,geometry,style){style=style||node._style;var options={'isFilled':true,'isStroked':true};switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":this.drawPoint(node,geometry);break;case"OpenLayers.Geometry.LineString":options.isFilled=false;this.drawLineString(node,geometry);break;case"OpenLayers.Geometry.LinearRing":this.drawLinearRing(node,geometry);break;case"OpenLayers.Geometry.Polygon":this.drawPolygon(node,geometry);break;case"OpenLayers.Geometry.Surface":this.drawSurface(node,geometry);break;case"OpenLayers.Geometry.Rectangle":this.drawRectangle(node,geometry);break;default:break;} | |
| 373 | -node._style=style;node._options=options;this.setStyle(node,style,options,geometry);},drawPoint:function(node,geometry){},drawLineString:function(node,geometry){},drawLinearRing:function(node,geometry){},drawPolygon:function(node,geometry){},drawRectangle:function(node,geometry){},drawCircle:function(node,geometry){},drawCurve:function(node,geometry){},drawSurface:function(node,geometry){},getFeatureIdFromEvent:function(evt){var node=evt.target||evt.srcElement;return node._featureId;},eraseGeometry:function(geometry){if((geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")){for(var i=0;i<geometry.components.length;i++){this.eraseGeometry(geometry.components[i]);}}else{var element=OpenLayers.Util.getElement(geometry.id);if(element&&element.parentNode){if(element.geometry){element.geometry.destroy();element.geometry=null;} | |
| 374 | -element.parentNode.removeChild(element);}}},nodeFactory:function(id,type,geometry){var node=OpenLayers.Util.getElement(id);if(node){if(!this.nodeTypeCompare(node,type)){node.parentNode.removeChild(node);node=this.nodeFactory(id,type,geometry);}}else{node=this.createNode(type,id);} | |
| 375 | -return node;},CLASS_NAME:"OpenLayers.Renderer.Elements"});OpenLayers.Tile=OpenLayers.Class({EVENT_TYPES:["loadstart","loadend","reload"],events:null,id:null,layer:null,url:null,bounds:null,size:null,position:null,drawn:false,isLoading:false,initialize:function(layer,position,bounds,url,size){this.layer=layer;this.position=position;this.bounds=bounds;this.url=url;this.size=size;this.id=OpenLayers.Util.createUniqueID("Tile_");this.events=new OpenLayers.Events(this,null,this.EVENT_TYPES);},destroy:function(){this.layer=null;this.bounds=null;this.size=null;this.position=null;this.events.destroy();this.events=null;},draw:function(){this.clear();var maxExtent=this.layer.maxExtent;var withinMaxExtent=(maxExtent&&this.bounds.intersectsBounds(maxExtent,false));var mapExtent=this.layer.map.getExtent();var withinMapExtent=(mapExtent&&this.bounds.intersectsBounds(mapExtent,false));return((withinMaxExtent||this.layer.displayOutsideMaxExtent)&&(withinMapExtent||(this.layer.buffer!=0)));},moveTo:function(bounds,position,redraw){if(redraw==null){redraw=true;} | |
| 376 | -this.clear();this.bounds=bounds.clone();this.position=position.clone();if(redraw){this.draw();}},clear:function(){this.drawn=false;},getBoundsFromBaseLayer:function(position){OpenLayers.Console.warn("You are using the 'reproject' option "+"on the "+this.layer.name+" layer. This option is deprecated: "+"its use was designed to support displaying data over commercial "+"basemaps, but that functionality should now be achieved by using "+"Spherical Mercator support. More information is available from "+"http://trac.openlayers.org/wiki/SphericalMercator.");var topLeft=this.layer.map.getLonLatFromLayerPx(position);var bottomRightPx=position.clone();bottomRightPx.x+=this.size.w;bottomRightPx.y+=this.size.h;var bottomRight=this.layer.map.getLonLatFromLayerPx(bottomRightPx);if(topLeft.lon>bottomRight.lon){if(topLeft.lon<0){topLeft.lon=-180-(topLeft.lon+180);}else{bottomRight.lon=180+bottomRight.lon+180;}} | |
| 377 | -bounds=new OpenLayers.Bounds(topLeft.lon,bottomRight.lat,bottomRight.lon,topLeft.lat);return bounds;},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Control.MouseToolbar=OpenLayers.Class(OpenLayers.Control.MouseDefaults,{mode:null,buttons:null,direction:"vertical",buttonClicked:null,initialize:function(position,direction){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.position=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,OpenLayers.Control.MouseToolbar.Y);if(position){this.position=position;} | |
| 378 | -if(direction){this.direction=direction;} | |
| 379 | -this.measureDivs=[];},destroy:function(){for(var btnId in this.buttons){var btn=this.buttons[btnId];btn.map=null;btn.events.destroy();} | |
| 380 | -OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);OpenLayers.Control.MouseDefaults.prototype.draw.apply(this,arguments);this.buttons={};var sz=new OpenLayers.Size(28,28);var centered=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0);this._addButton("zoombox","drag-rectangle-off.png","drag-rectangle-on.png",centered,sz,"Shift->Drag to zoom to area");centered=centered.add((this.direction=="vertical"?0:sz.w),(this.direction=="vertical"?sz.h:0));this._addButton("pan","panning-hand-off.png","panning-hand-on.png",centered,sz,"Drag the map to pan.");centered=centered.add((this.direction=="vertical"?0:sz.w),(this.direction=="vertical"?sz.h:0));this.switchModeTo("pan");return this.div;},_addButton:function(id,img,activeImg,xy,sz,title){var imgLocation=OpenLayers.Util.getImagesLocation()+img;var activeImgLocation=OpenLayers.Util.getImagesLocation()+activeImg;var btn=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MouseToolbar_"+id,xy,sz,imgLocation,"absolute");this.div.appendChild(btn);btn.imgLocation=imgLocation;btn.activeImgLocation=activeImgLocation;btn.events=new OpenLayers.Events(this,btn,null,true);btn.events.register("mousedown",this,this.buttonDown);btn.events.register("mouseup",this,this.buttonUp);btn.events.register("dblclick",this,OpenLayers.Event.stop);btn.action=id;btn.title=title;btn.alt=title;btn.map=this.map;this.buttons[id]=btn;return btn;},buttonDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.buttonClicked=evt.element.action;OpenLayers.Event.stop(evt);},buttonUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.buttonClicked!=null){if(this.buttonClicked==evt.element.action){this.switchModeTo(evt.element.action);} | |
| 381 | -OpenLayers.Event.stop(evt);this.buttonClicked=null;}},defaultDblClick:function(evt){this.switchModeTo("pan");this.performedDrag=false;var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},defaultMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.mouseDragStart=evt.xy.clone();this.performedDrag=false;this.startViaKeyboard=false;if(evt.shiftKey&&this.mode!="zoombox"){this.switchModeTo("zoombox");this.startViaKeyboard=true;}else if(evt.altKey&&this.mode!="measure"){this.switchModeTo("measure");}else if(!this.mode){this.switchModeTo("pan");} | |
| 382 | -switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv('zoomBox',this.mouseDragStart,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.performedDrag=true;break;case"measure":var distance="";if(this.measureStart){measureEnd=this.map.getLonLatFromViewPortPx(this.mouseDragStart);distance=OpenLayers.Util.distVincenty(this.measureStart,measureEnd);distance=Math.round(distance*100)/100;distance=distance+"km";this.measureStartBox=this.measureBox;} | |
| 383 | -this.measureStart=this.map.getLonLatFromViewPortPx(this.mouseDragStart);;this.measureBox=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),-2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBox.style.width="4px";this.measureBox.style.height="4px";this.measureBox.style.fontSize="1px";this.measureBox.style.backgroundColor="red";this.measureBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBox);if(distance){this.measureBoxDistance=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBoxDistance.innerHTML=distance;this.measureBoxDistance.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBoxDistance);this.measureDivs.push(this.measureBoxDistance);} | |
| 384 | -this.measureBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBox);this.measureDivs.push(this.measureBox);break;default:this.map.div.style.cursor="move";break;} | |
| 385 | -document.onselectstart=function(){return false;} | |
| 386 | -OpenLayers.Event.stop(evt);},switchModeTo:function(mode){if(mode!=this.mode){if(this.mode&&this.buttons[this.mode]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode],null,null,null,this.buttons[this.mode].imgLocation);} | |
| 387 | -if(this.mode=="measure"&&mode!="measure"){for(var i=0;i<this.measureDivs.length;i++){if(this.measureDivs[i]){this.map.layerContainerDiv.removeChild(this.measureDivs[i]);}} | |
| 388 | -this.measureDivs=[];this.measureStart=null;} | |
| 389 | -this.mode=mode;if(this.buttons[mode]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[mode],null,null,null,this.buttons[mode].activeImgLocation);} | |
| 390 | -switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";break;default:this.map.div.style.cursor="";break;}}},leaveMode:function(){this.switchModeTo("pan");},defaultMouseMove:function(evt){if(this.mouseDragStart!=null){switch(this.mode){case"zoombox":var deltaX=Math.abs(this.mouseDragStart.x-evt.xy.x);var deltaY=Math.abs(this.mouseDragStart.y-evt.xy.y);this.zoomBox.style.width=Math.max(1,deltaX)+"px";this.zoomBox.style.height=Math.max(1,deltaY)+"px";if(evt.xy.x<this.mouseDragStart.x){this.zoomBox.style.left=evt.xy.x+"px";} | |
| 391 | -if(evt.xy.y<this.mouseDragStart.y){this.zoomBox.style.top=evt.xy.y+"px";} | |
| 392 | -break;default:var deltaX=this.mouseDragStart.x-evt.xy.x;var deltaY=this.mouseDragStart.y-evt.xy.y;var size=this.map.getSize();var newXY=new OpenLayers.Pixel(size.w/2+deltaX,size.h/2+deltaY);var newCenter=this.map.getLonLatFromViewPortPx(newXY);this.map.setCenter(newCenter,null,true);this.mouseDragStart=evt.xy.clone();} | |
| 393 | -this.performedDrag=true;}},defaultMouseUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;switch(this.mode){case"zoombox":this.zoomBoxEnd(evt);if(this.startViaKeyboard)this.leaveMode();break;case"pan":if(this.performedDrag){this.map.setCenter(this.map.center);}} | |
| 394 | -document.onselectstart=null;this.mouseDragStart=null;this.map.div.style.cursor="default";},defaultMouseOut:function(evt){if(this.mouseDragStart!=null&&OpenLayers.Util.mouseLeft(evt,this.map.div)){if(this.zoomBox){this.removeZoomBox();if(this.startViaKeyboard)this.leaveMode();} | |
| 395 | -this.mouseDragStart=null;this.map.div.style.cursor="default";}},defaultClick:function(evt){if(this.performedDrag){this.performedDrag=false;return false;}}});OpenLayers.Control.MouseToolbar.X=6;OpenLayers.Control.MouseToolbar.Y=300;OpenLayers.Control.OverviewMap=OpenLayers.Class(OpenLayers.Control,{id:"OverviewMap",element:null,ovmap:null,size:new OpenLayers.Size(180,90),layers:null,minRatio:8,maxRatio:32,mapOptions:null,initialize:function(options){this.layers=[];OpenLayers.Control.prototype.initialize.apply(this,[options]);},destroy:function(){if(!this.mapDiv){return;} | |
| 396 | -this.mapDiv.removeChild(this.extentRectangle);this.extentRectangle=null;this.rectEvents.destroy();this.rectEvents=null;this.ovmap.destroy();this.ovmap=null;this.element.removeChild(this.mapDiv);this.mapDiv=null;this.mapDivEvents.destroy();this.mapDivEvents=null;this.div.removeChild(this.element);this.element=null;this.elementEvents.destroy();this.elementEvents=null;if(this.maximizeDiv){OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.div.removeChild(this.maximizeDiv);this.maximizeDiv=null;} | |
| 397 | -if(this.minimizeDiv){OpenLayers.Event.stopObservingElement(this.minimizeDiv);this.div.removeChild(this.minimizeDiv);this.minimizeDiv=null;} | |
| 398 | -this.map.events.unregister('moveend',this,this.update);this.map.events.unregister("changebaselayer",this,this.baseLayerDraw);OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!(this.layers.length>0)){if(this.map.baseLayer){var layer=this.map.baseLayer.clone();this.layers=[layer];}else{this.map.events.register("changebaselayer",this,this.baseLayerDraw);return this.div;}} | |
| 399 | -this.element=document.createElement('div');this.element.className=this.displayClass+'Element';this.element.style.display='none';this.mapDiv=document.createElement('div');this.mapDiv.style.width=this.size.w+'px';this.mapDiv.style.height=this.size.h+'px';this.mapDiv.style.position='relative';this.mapDiv.style.overflow='hidden';this.mapDiv.id=OpenLayers.Util.createUniqueID('overviewMap');this.extentRectangle=document.createElement('div');this.extentRectangle.style.position='absolute';this.extentRectangle.style.zIndex=1000;this.extentRectangle.style.overflow='hidden';this.extentRectangle.style.backgroundImage='url('+ | |
| 400 | -OpenLayers.Util.getImagesLocation()+'blank.gif)';this.extentRectangle.className=this.displayClass+'ExtentRectangle';this.mapDiv.appendChild(this.extentRectangle);this.element.appendChild(this.mapDiv);this.div.appendChild(this.element);this.map.events.register('moveend',this,this.update);this.elementEvents=new OpenLayers.Events(this,this.element);this.elementEvents.register('mousedown',this,function(e){OpenLayers.Event.stop(e);});this.elementEvents.register('click',this,function(e){OpenLayers.Event.stop(e);});this.elementEvents.register('dblclick',this,function(e){OpenLayers.Event.stop(e);});this.rectEvents=new OpenLayers.Events(this,this.extentRectangle,null,true);this.rectEvents.register('mouseout',this,this.rectMouseOut);this.rectEvents.register('mousedown',this,this.rectMouseDown);this.rectEvents.register('mousemove',this,this.rectMouseMove);this.rectEvents.register('mouseup',this,this.rectMouseUp);this.rectEvents.register('click',this,function(e){OpenLayers.Event.stop(e);});this.rectEvents.register('dblclick',this,this.rectDblClick);this.mapDivEvents=new OpenLayers.Events(this,this.mapDiv);this.mapDivEvents.register('click',this,this.mapDivClick);if(!this.outsideViewport){this.div.className=this.displayClass+'Container';var imgLocation=OpenLayers.Util.getImagesLocation();var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv(this.displayClass+'MaximizeButton',null,new OpenLayers.Size(18,18),img,'absolute');this.maximizeDiv.style.display='none';this.maximizeDiv.className=this.displayClass+'MaximizeButton';OpenLayers.Event.observe(this.maximizeDiv,'click',OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var img=imgLocation+'layer-switcher-minimize.png';this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv('OpenLayers_Control_minimizeDiv',null,new OpenLayers.Size(18,18),img,'absolute');this.minimizeDiv.style.display='none';this.minimizeDiv.className=this.displayClass+'MinimizeButton';OpenLayers.Event.observe(this.minimizeDiv,'click',OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv);var eventsToStop=['dblclick','mousedown'];for(var i=0;i<eventsToStop.length;i++){OpenLayers.Event.observe(this.maximizeDiv,eventsToStop[i],OpenLayers.Event.stop);OpenLayers.Event.observe(this.minimizeDiv,eventsToStop[i],OpenLayers.Event.stop);} | |
| 401 | -this.minimizeControl();}else{this.element.style.display='';} | |
| 402 | -if(this.map.getExtent()){this.update();} | |
| 403 | -return this.div;},baseLayerDraw:function(){this.draw();this.map.events.unregister("changebaselayer",this,this.baseLayerDraw);},rectMouseOut:function(evt){if(this.rectDragStart!=null){if(this.performedRectDrag){this.rectMouseMove(evt);var rectPxBounds=this.getRectPxBounds();if((rectPxBounds.top<=0)||(rectPxBounds.left<=0)||(rectPxBounds.bottom>=this.size.h-this.hComp)||(rectPxBounds.right>=this.size.w-this.wComp)){this.updateMapToRect();}else{return;}} | |
| 404 | -document.onselectstart=null;this.rectDragStart=null;}},rectMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.rectDragStart=evt.xy.clone();this.performedRectDrag=false;OpenLayers.Event.stop(evt);},rectMouseMove:function(evt){if(this.rectDragStart!=null){var deltaX=this.rectDragStart.x-evt.xy.x;var deltaY=this.rectDragStart.y-evt.xy.y;var rectPxBounds=this.getRectPxBounds();var rectTop=rectPxBounds.top;var rectLeft=rectPxBounds.left;var rectHeight=Math.abs(rectPxBounds.getHeight());var rectWidth=rectPxBounds.getWidth();var newTop=Math.max(0,(rectTop-deltaY));newTop=Math.min(newTop,this.ovmap.size.h-this.hComp-rectHeight);var newLeft=Math.max(0,(rectLeft-deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-this.wComp-rectWidth);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+rectHeight,newLeft+rectWidth,newTop));this.rectDragStart=evt.xy.clone();this.performedRectDrag=true;OpenLayers.Event.stop(evt);}},rectMouseUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.performedRectDrag){this.updateMapToRect();OpenLayers.Event.stop(evt);} | |
| 405 | -document.onselectstart=null;this.rectDragStart=null;},rectDblClick:function(evt){this.performedRectDrag=false;OpenLayers.Event.stop(evt);this.updateOverview();},mapDivClick:function(evt){var pxBounds=this.getRectPxBounds();var pxCenter=pxBounds.getCenterPixel();var deltaX=evt.xy.x-pxCenter.x;var deltaY=evt.xy.y-pxCenter.y;var top=pxBounds.top;var left=pxBounds.left;var height=Math.abs(pxBounds.getHeight());var width=pxBounds.getWidth();var newTop=Math.max(0,(top+deltaY));newTop=Math.min(newTop,this.ovmap.size.h-height);var newLeft=Math.max(0,(left+deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-width);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+height,newLeft+width,newTop));this.updateMapToRect();OpenLayers.Event.stop(evt);},maximizeControl:function(e){this.element.style.display='';this.showToggle(false);if(e!=null){OpenLayers.Event.stop(e);}},minimizeControl:function(e){this.element.style.display='none';this.showToggle(true);if(e!=null){OpenLayers.Event.stop(e);}},showToggle:function(minimize){this.maximizeDiv.style.display=minimize?'':'none';this.minimizeDiv.style.display=minimize?'none':'';},update:function(){if(this.ovmap==null){this.createMap();} | |
| 406 | -if(!this.isSuitableOverview()){this.updateOverview();} | |
| 407 | -this.updateRectToMap();},isSuitableOverview:function(){var mapExtent=this.map.getExtent();var maxExtent=this.map.maxExtent;var testExtent=new OpenLayers.Bounds(Math.max(mapExtent.left,maxExtent.left),Math.max(mapExtent.bottom,maxExtent.bottom),Math.min(mapExtent.right,maxExtent.right),Math.min(mapExtent.top,maxExtent.top));var resRatio=this.ovmap.getResolution()/this.map.getResolution();return((resRatio>this.minRatio)&&(resRatio<=this.maxRatio)&&(this.ovmap.getExtent().containsBounds(testExtent)));},updateOverview:function(){var mapRes=this.map.getResolution();var targetRes=this.ovmap.getResolution();var resRatio=targetRes/mapRes;if(resRatio>this.maxRatio){targetRes=this.minRatio*mapRes;}else if(resRatio<=this.minRatio){targetRes=this.maxRatio*mapRes;} | |
| 408 | -this.ovmap.setCenter(this.map.center,this.ovmap.getZoomForResolution(targetRes));this.updateRectToMap();},createMap:function(){var options=OpenLayers.Util.extend({controls:[],maxResolution:'auto'},this.mapOptions);this.ovmap=new OpenLayers.Map(this.mapDiv,options);this.ovmap.addLayers(this.layers);this.ovmap.zoomToMaxExtent();this.wComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-left-width'))+ | |
| 409 | -parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-right-width'));this.wComp=(this.wComp)?this.wComp:2;this.hComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-top-width'))+ | |
| 410 | -parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-bottom-width'));this.hComp=(this.hComp)?this.hComp:2;},updateRectToMap:function(){if(this.map.units!='degrees'){if(this.ovmap.getProjection()&&(this.map.getProjection()!=this.ovmap.getProjection())){alert('The overview map only works when it is in the same projection as the main map');}} | |
| 411 | -var pxBounds=this.getRectBoundsFromMapBounds(this.map.getExtent());if(pxBounds){this.setRectPxBounds(pxBounds);}},updateMapToRect:function(){var pxBounds=this.getRectPxBounds();var lonLatBounds=this.getMapBoundsFromRectBounds(pxBounds);this.map.setCenter(lonLatBounds.getCenterLonLat(),this.map.zoom);},getRectPxBounds:function(){var top=parseInt(this.extentRectangle.style.top);var left=parseInt(this.extentRectangle.style.left);var height=parseInt(this.extentRectangle.style.height);var width=parseInt(this.extentRectangle.style.width);return new OpenLayers.Bounds(left,top+height,left+width,top);},setRectPxBounds:function(pxBounds){var top=Math.max(pxBounds.top,0);var left=Math.max(pxBounds.left,0);var bottom=Math.min(pxBounds.top+Math.abs(pxBounds.getHeight()),this.ovmap.size.h-this.hComp);var right=Math.min(pxBounds.left+pxBounds.getWidth(),this.ovmap.size.w-this.wComp);this.extentRectangle.style.top=parseInt(top)+'px';this.extentRectangle.style.left=parseInt(left)+'px';this.extentRectangle.style.height=parseInt(Math.max(bottom-top,0))+'px';this.extentRectangle.style.width=parseInt(Math.max(right-left,0))+'px';},getRectBoundsFromMapBounds:function(lonLatBounds){var leftBottomLonLat=new OpenLayers.LonLat(lonLatBounds.left,lonLatBounds.bottom);var rightTopLonLat=new OpenLayers.LonLat(lonLatBounds.right,lonLatBounds.top);var leftBottomPx=this.getOverviewPxFromLonLat(leftBottomLonLat);var rightTopPx=this.getOverviewPxFromLonLat(rightTopLonLat);var bounds=null;if(leftBottomPx&&rightTopPx){bounds=new OpenLayers.Bounds(leftBottomPx.x,leftBottomPx.y,rightTopPx.x,rightTopPx.y);} | |
| 412 | -return bounds;},getMapBoundsFromRectBounds:function(pxBounds){var leftBottomPx=new OpenLayers.Pixel(pxBounds.left,pxBounds.bottom);var rightTopPx=new OpenLayers.Pixel(pxBounds.right,pxBounds.top);var leftBottomLonLat=this.getLonLatFromOverviewPx(leftBottomPx);var rightTopLonLat=this.getLonLatFromOverviewPx(rightTopPx);return new OpenLayers.Bounds(leftBottomLonLat.lon,leftBottomLonLat.lat,rightTopLonLat.lon,rightTopLonLat.lat);},getLonLatFromOverviewPx:function(overviewMapPx){var size=this.ovmap.size;var res=this.ovmap.getResolution();var center=this.ovmap.getExtent().getCenterLonLat();var delta_x=overviewMapPx.x-(size.w/2);var delta_y=overviewMapPx.y-(size.h/2);return new OpenLayers.LonLat(center.lon+delta_x*res,center.lat-delta_y*res);},getOverviewPxFromLonLat:function(lonlat){var res=this.ovmap.getResolution();var extent=this.ovmap.getExtent();var px=null;if(extent){px=new OpenLayers.Pixel(Math.round(1/res*(lonlat.lon-extent.left)),Math.round(1/res*(extent.top-lonlat.lat)));} | |
| 413 | -return px;},CLASS_NAME:'OpenLayers.Control.OverviewMap'});OpenLayers.Control.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoomBarDiv:null,divEvents:null,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments);},destroy:function(){this.div.removeChild(this.slider);this.slider=null;this.sliderEvents.destroy();this.sliderEvents=null;this.div.removeChild(this.zoombarDiv);this.zoomBarDiv=null;this.divEvents.destroy();this.divEvents=null;this.map.events.unregister("zoomend",this,this.moveZoomBar);this.map.events.unregister("changebaselayer",this,this.redraw) | |
| 414 | -OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.redraw);},redraw:function(){if(this.div!=null){this.div.innerHTML="";} | |
| 415 | -this.draw();},draw:function(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position.clone();this.buttons=[];var sz=new OpenLayers.Size(18,18);var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);this._addButton("panup","north-mini.png",centered,sz);px.y=centered.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",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);centered=this._addZoomBar(centered.add(0,sz.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",centered,sz);return this.div;},_addZoomBar:function(centered){var imgLocation=OpenLayers.Util.getImagesLocation();var id="OpenLayers_Control_PanZoomBar_Slider"+this.map.id;var zoomsToEnd=this.map.getNumZoomLevels()-1-this.map.getZoom();var slider=OpenLayers.Util.createAlphaImageDiv(id,centered.add(-1,zoomsToEnd*this.zoomStopHeight),new OpenLayers.Size(20,9),imgLocation+"slider.png","absolute");this.slider=slider;this.sliderEvents=new OpenLayers.Events(this,slider,null,true);this.sliderEvents.register("mousedown",this,this.zoomBarDown);this.sliderEvents.register("mousemove",this,this.zoomBarDrag);this.sliderEvents.register("mouseup",this,this.zoomBarUp);this.sliderEvents.register("dblclick",this,this.doubleClick);this.sliderEvents.register("click",this,this.doubleClick);sz=new OpenLayers.Size();sz.h=this.zoomStopHeight*this.map.getNumZoomLevels();sz.w=this.zoomStopWidth;var div=null | |
| 416 | -if(OpenLayers.Util.alphaHack()){var id="OpenLayers_Control_PanZoomBar"+this.map.id;div=OpenLayers.Util.createAlphaImageDiv(id,centered,new OpenLayers.Size(sz.w,this.zoomStopHeight),imgLocation+"zoombar.png","absolute",null,"crop");div.style.height=sz.h;}else{div=OpenLayers.Util.createDiv('OpenLayers_Control_PanZoomBar_Zoombar'+this.map.id,centered,sz,imgLocation+"zoombar.png");} | |
| 417 | -this.zoombarDiv=div;this.divEvents=new OpenLayers.Events(this,div,null,true);this.divEvents.register("mousedown",this,this.divClick);this.divEvents.register("mousemove",this,this.passEventToSlider);this.divEvents.register("dblclick",this,this.doubleClick);this.divEvents.register("click",this,this.doubleClick);this.div.appendChild(div);this.startTop=parseInt(div.style.top);this.div.appendChild(slider);this.map.events.register("zoomend",this,this.moveZoomBar);centered=centered.add(0,this.zoomStopHeight*this.map.getNumZoomLevels());return centered;},passEventToSlider:function(evt){this.sliderEvents.handleBrowserEvent(evt);},divClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;var y=evt.xy.y;var top=OpenLayers.Util.pagePosition(evt.object)[1];var levels=Math.floor((y-top)/this.zoomStopHeight);this.map.zoomTo((this.map.getNumZoomLevels()-1)-levels);OpenLayers.Event.stop(evt);},zoomBarDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.map.events.register("mousemove",this,this.passEventToSlider);this.map.events.register("mouseup",this,this.passEventToSlider);this.mouseDragStart=evt.xy.clone();this.zoomStart=evt.xy.clone();this.div.style.cursor="move";this.zoombarDiv.offsets=null;OpenLayers.Event.stop(evt);},zoomBarDrag:function(evt){if(this.mouseDragStart!=null){var deltaY=this.mouseDragStart.y-evt.xy.y | |
| 418 | -var offsets=OpenLayers.Util.pagePosition(this.zoombarDiv);if((evt.clientY-offsets[1])>0&&(evt.clientY-offsets[1])<parseInt(this.zoombarDiv.style.height)-2){var newTop=parseInt(this.slider.style.top)-deltaY;this.slider.style.top=newTop+"px";} | |
| 419 | -this.mouseDragStart=evt.xy.clone();OpenLayers.Event.stop(evt);}},zoomBarUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.zoomStart){this.div.style.cursor="";this.map.events.unregister("mouseup",this,this.passEventToSlider);this.map.events.unregister("mousemove",this,this.passEventToSlider);var deltaY=this.zoomStart.y-evt.xy.y | |
| 420 | -this.map.zoomTo(this.map.zoom+Math.round(deltaY/this.zoomStopHeight));this.moveZoomBar();this.mouseDragStart=null;OpenLayers.Event.stop(evt);}},moveZoomBar:function(){var newTop=((this.map.getNumZoomLevels()-1)-this.map.getZoom())*this.zoomStopHeight+this.startTop+1;this.slider.style.top=newTop+"px";},CLASS_NAME:"OpenLayers.Control.PanZoomBar"});OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:" ",space:" ",newline:"\n",level:0,pretty:false,initialize:function(options){OpenLayers.Format.prototype.initialize.apply(this,[options]);},read:function(json,filter){try{if(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(json)){var object=eval('('+json+')');if(typeof filter==='function'){function walk(k,v){if(v&&typeof v==='object'){for(var i in v){if(v.hasOwnProperty(i)){v[i]=walk(i,v[i]);}}} | |
| 421 | -return filter(k,v);} | |
| 422 | -object=walk('',object);} | |
| 423 | -return object;}}catch(e){} | |
| 424 | -return null;},write:function(value,pretty){this.pretty=!!pretty;var json=null;var type=typeof value;if(this.serialize[type]){json=this.serialize[type].apply(this,[value]);} | |
| 425 | -return json;},writeIndent:function(){var pieces=[];if(this.pretty){for(var i=0;i<this.level;++i){pieces.push(this.indent);}} | |
| 426 | -return pieces.join('');},writeNewline:function(){return(this.pretty)?this.newline:'';},writeSpace:function(){return(this.pretty)?this.space:'';},serialize:{'object':function(object){if(object==null){return"null";} | |
| 427 | -if(object.constructor==Date){return this.serialize.date.apply(this,[object]);} | |
| 428 | -if(object.constructor==Array){return this.serialize.array.apply(this,[object]);} | |
| 429 | -var pieces=['{'];this.level+=1;var key,keyJSON,valueJSON;var addComma=false;for(key in object){if(object.hasOwnProperty(key)){keyJSON=OpenLayers.Format.JSON.prototype.write.apply(this,[key,this.pretty]);valueJSON=OpenLayers.Format.JSON.prototype.write.apply(this,[object[key],this.pretty]);if(keyJSON!=null&&valueJSON!=null){if(addComma){pieces.push(',');} | |
| 430 | -pieces.push(this.writeNewline(),this.writeIndent(),keyJSON,':',this.writeSpace(),valueJSON);addComma=true;}}} | |
| 431 | -this.level-=1;pieces.push(this.writeNewline(),this.writeIndent(),'}');return pieces.join('');},'array':function(array){var json;var pieces=['['];this.level+=1;for(var i=0;i<array.length;++i){json=OpenLayers.Format.JSON.prototype.write.apply(this,[array[i],this.pretty]);if(json!=null){if(i>0){pieces.push(',');} | |
| 432 | -pieces.push(this.writeNewline(),this.writeIndent(),json);}} | |
| 433 | -this.level-=1;pieces.push(this.writeNewline(),this.writeIndent(),']');return pieces.join('');},'string':function(string){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};if(/["\\\x00-\x1f]/.test(string)){return'"'+string.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;} | |
| 434 | -c=b.charCodeAt();return'\\u00'+ | |
| 435 | -Math.floor(c/16).toString(16)+ | |
| 436 | -(c%16).toString(16);})+'"';} | |
| 437 | -return'"'+string+'"';},'number':function(number){return isFinite(number)?String(number):"null";},'boolean':function(bool){return String(bool);},'date':function(date){function format(number){return(number<10)?'0'+number:number;} | |
| 438 | -return'"'+date.getFullYear()+'-'+ | |
| 439 | -format(date.getMonth()+1)+'-'+ | |
| 440 | -format(date.getDate())+'T'+ | |
| 441 | -format(date.getHours())+':'+ | |
| 442 | -format(date.getMinutes())+':'+ | |
| 443 | -format(date.getSeconds())+'"';}},CLASS_NAME:"OpenLayers.Format.JSON"});OpenLayers.Format.XML=OpenLayers.Class(OpenLayers.Format,{xmldom:null,initialize:function(options){if(window.ActiveXObject){this.xmldom=new ActiveXObject("Microsoft.XMLDOM");} | |
| 444 | -OpenLayers.Format.prototype.initialize.apply(this,[options]);},read:function(text){var index=text.indexOf('<');if(index>0){text=text.substring(index);} | |
| 445 | -var node=OpenLayers.Util.Try(OpenLayers.Function.bind((function(){var xmldom;if(window.ActiveXObject&&!this.xmldom){xmldom=new ActiveXObject("Microsoft.XMLDOM");}else{xmldom=this.xmldom;} | |
| 446 | -xmldom.loadXML(text);return xmldom;}),this),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");} | |
| 447 | -req.send(null);return req.responseXML;});return node;},write:function(node){var data;if(this.xmldom){data=node.xml;}else{var serializer=new XMLSerializer();data=serializer.serializeToString(node);} | |
| 448 | -return data;},createElementNS:function(uri,name){var element;if(this.xmldom){element=this.xmldom.createNode(1,name,uri);}else{element=document.createElementNS(uri,name);} | |
| 449 | -return element;},createTextNode:function(text){var node;if(this.xmldom){node=this.xmldom.createTextNode(text);}else{node=document.createTextNode(text);} | |
| 450 | -return node;},getElementsByTagNameNS:function(node,uri,name){var elements=[];if(node.getElementsByTagNameNS){elements=node.getElementsByTagNameNS(uri,name);}else{var allNodes=node.getElementsByTagName("*");var potentialNode,fullName;for(var i=0;i<allNodes.length;++i){potentialNode=allNodes[i];fullName=(potentialNode.prefix)?(potentialNode.prefix+":"+name):name;if((name=="*")||(fullName==potentialNode.nodeName)){if((uri=="*")||(uri==potentialNode.namespaceURI)){elements.push(potentialNode);}}}} | |
| 451 | -return elements;},getAttributeNodeNS:function(node,uri,name){var attributeNode=null;if(node.getAttributeNodeNS){attributeNode=node.getAttributeNodeNS(uri,name);}else{var attributes=node.attributes;var potentialNode,fullName;for(var i=0;i<attributes.length;++i){potentialNode=attributes[i];if(potentialNode.namespaceURI==uri){fullName=(potentialNode.prefix)?(potentialNode.prefix+":"+name):name;if(fullName==potentialNode.nodeName){attributeNode=potentialNode;break;}}}} | |
| 452 | -return attributeNode;},getAttributeNS:function(node,uri,name){var attributeValue="";if(node.getAttributeNS){attributeValue=node.getAttributeNS(uri,name);}else{var attributeNode=this.getAttributeNodeNS(node,uri,name);if(attributeNode){attributeValue=attributeNode.nodeValue;}} | |
| 453 | -return attributeValue;},getChildValue:function(node,def){var value;try{value=node.firstChild.nodeValue;}catch(e){value=(def!=undefined)?def:"";} | |
| 454 | -return value;},concatChildValues:function(node,def){var value="";var child=node.firstChild;var childValue;while(child){childValue=child.nodeValue;if(childValue){value+=childValue;} | |
| 455 | -child=child.nextSibling;} | |
| 456 | -if(value==""&&def!=undefined){value=def;} | |
| 457 | -return value;},hasAttributeNS:function(node,uri,name){var found=false;if(node.hasAttributeNS){found=node.hasAttributeNS(uri,name);}else{found=!!this.getAttributeNodeNS(node,uri,name);} | |
| 458 | -return found;},CLASS_NAME:"OpenLayers.Format.XML"});OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:false,evt:null,initialize:function(control,callbacks,options){OpenLayers.Util.extend(this,options);this.control=control;this.callbacks=callbacks;if(control.map){this.setMap(control.map);} | |
| 459 | -OpenLayers.Util.extend(this,options);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},setMap:function(map){this.map=map;},checkModifiers:function(evt){if(this.keyMask==null){return true;} | |
| 460 | -var keyModifiers=(evt.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(evt.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(evt.altKey?OpenLayers.Handler.MOD_ALT:0);return(keyModifiers==this.keyMask);},activate:function(){if(this.active){return false;} | |
| 461 | -var events=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var i=0;i<events.length;i++){if(this[events[i]]){this.register(events[i],this[events[i]]);}} | |
| 462 | -this.active=true;return true;},deactivate:function(){if(!this.active){return false;} | |
| 463 | -var events=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var i=0;i<events.length;i++){if(this[events[i]]){this.unregister(events[i],this[events[i]]);}} | |
| 464 | -this.active=false;return true;},callback:function(name,args){if(this.callbacks[name]){this.callbacks[name].apply(this.control,args);}},register:function(name,method){this.map.events.registerPriority(name,this,method);this.map.events.registerPriority(name,this,this.setEvent);},unregister:function(name,method){this.map.events.unregister(name,this,method);this.map.events.unregister(name,this,this.setEvent);},setEvent:function(evt){this.evt=evt;return true;},destroy:function(){this.deactivate();this.control=this.map=null;},CLASS_NAME:"OpenLayers.Handler"});OpenLayers.Handler.MOD_NONE=0;OpenLayers.Handler.MOD_SHIFT=1;OpenLayers.Handler.MOD_CTRL=2;OpenLayers.Handler.MOD_ALT=4;OpenLayers.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,options){this.setOptions(options);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);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.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));} | |
| 465 | -if(this.theme){var addNode=true;var nodes=document.getElementsByTagName('link');for(var i=0;i<nodes.length;++i){if(OpenLayers.Util.isEquivalentUrl(nodes.item(i).href,this.theme)){addNode=false;break;}} | |
| 466 | -if(addNode){var cssNode=document.createElement('link');cssNode.setAttribute('rel','stylesheet');cssNode.setAttribute('type','text/css');cssNode.setAttribute('href',this.theme);document.getElementsByTagName('head')[0].appendChild(cssNode);}} | |
| 467 | -this.layers=[];if(this.controls==null){if(OpenLayers.Control!=null){this.controls=[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoom(),new OpenLayers.Control.ArgParser(),new OpenLayers.Control.Attribution()];}else{this.controls=[];}} | |
| 468 | -for(var i=0;i<this.controls.length;i++){this.addControlToMap(this.controls[i]);} | |
| 469 | -this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,'unload',this.unloadDestroy);},unloadDestroy:null,destroy:function(){if(!this.unloadDestroy){return false;} | |
| 470 | -OpenLayers.Event.stopObserving(window,'unload',this.unloadDestroy);this.unloadDestroy=null;if(this.layers!=null){for(var i=this.layers.length-1;i>=0;--i){this.layers[i].destroy(false);} | |
| 471 | -this.layers=null;} | |
| 472 | -if(this.controls!=null){for(var i=this.controls.length-1;i>=0;--i){this.controls[i].destroy();} | |
| 473 | -this.controls=null;} | |
| 474 | -if(this.viewPortDiv){this.div.removeChild(this.viewPortDiv);} | |
| 475 | -this.viewPortDiv=null;this.events.destroy();this.events=null;},setOptions:function(options){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,options);},getTileSize:function(){return this.tileSize;},getLayer:function(id){var foundLayer=null;for(var i=0;i<this.layers.length;i++){var layer=this.layers[i];if(layer.id==id){foundLayer=layer;}} | |
| 476 | -return foundLayer;},setLayerZIndex:function(layer,zIdx){layer.setZIndex(this.Z_INDEX_BASE[layer.isBaseLayer?'BaseLayer':'Overlay'] | |
| 477 | -+zIdx*5);},addLayer:function(layer){for(var i=0;i<this.layers.length;i++){if(this.layers[i]==layer){var msg="You tried to add the layer: "+layer.name+" to the map, but it has already been added";OpenLayers.Console.warn(msg);return false;}} | |
| 478 | -layer.div.style.overflow="";this.setLayerZIndex(layer,this.layers.length);if(layer.isFixed){this.viewPortDiv.appendChild(layer.div);}else{this.layerContainerDiv.appendChild(layer.div);} | |
| 479 | -this.layers.push(layer);layer.setMap(this);if(layer.isBaseLayer){if(this.baseLayer==null){this.setBaseLayer(layer);}else{layer.setVisibility(false);}}else{layer.redraw();} | |
| 480 | -this.events.triggerEvent("addlayer");},addLayers:function(layers){for(var i=0;i<layers.length;i++){this.addLayer(layers[i]);}},removeLayer:function(layer,setNewBaseLayer){if(setNewBaseLayer==null){setNewBaseLayer=true;} | |
| 481 | -if(layer.isFixed){this.viewPortDiv.removeChild(layer.div);}else{this.layerContainerDiv.removeChild(layer.div);} | |
| 482 | -OpenLayers.Util.removeItem(this.layers,layer);layer.removeMap(this);layer.map=null;if(setNewBaseLayer&&(this.baseLayer==layer)){this.baseLayer=null;for(i=0;i<this.layers.length;i++){var iLayer=this.layers[i];if(iLayer.isBaseLayer){this.setBaseLayer(iLayer);break;}}} | |
| 483 | -this.events.triggerEvent("removelayer");},getNumLayers:function(){return this.layers.length;},getLayerIndex:function(layer){return OpenLayers.Util.indexOf(this.layers,layer);},setLayerIndex:function(layer,idx){var base=this.getLayerIndex(layer);if(idx<0){idx=0;}else if(idx>this.layers.length){idx=this.layers.length;} | |
| 484 | -if(base!=idx){this.layers.splice(base,1);this.layers.splice(idx,0,layer);for(var i=0;i<this.layers.length;i++){this.setLayerZIndex(this.layers[i],i);} | |
| 485 | -this.events.triggerEvent("changelayer");}},raiseLayer:function(layer,delta){var idx=this.getLayerIndex(layer)+delta;this.setLayerIndex(layer,idx);},setBaseLayer:function(newBaseLayer){var oldExtent=null;if(this.baseLayer){oldExtent=this.baseLayer.getExtent();} | |
| 486 | -if(newBaseLayer!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,newBaseLayer)!=-1){if(this.baseLayer!=null){this.baseLayer.setVisibility(false);} | |
| 487 | -this.baseLayer=newBaseLayer;this.viewRequestID++;this.baseLayer.visibility=true;var center=this.getCenter();if(center!=null){if(oldExtent==null){this.setCenter(center,this.getZoom(),false,true);}else{this.setCenter(oldExtent.getCenterLonLat(),this.getZoomForExtent(oldExtent,true),false,true);}} | |
| 488 | -this.events.triggerEvent("changebaselayer");}}},addControl:function(control,px){this.controls.push(control);this.addControlToMap(control,px);},addControlToMap:function(control,px){control.outsideViewport=(control.div!=null);control.setMap(this);var div=control.draw(px);if(div){if(!control.outsideViewport){div.style.zIndex=this.Z_INDEX_BASE['Control']+ | |
| 489 | -this.controls.length;this.viewPortDiv.appendChild(div);}}},getControl:function(id){var returnControl=null;for(var i=0;i<this.controls.length;i++){var control=this.controls[i];if(control.id==id){returnControl=control;break;}} | |
| 490 | -return returnControl;},removeControl:function(control){if((control)&&(control==this.getControl(control.id))){if(!control.outsideViewport){this.viewPortDiv.removeChild(control.div)} | |
| 491 | -OpenLayers.Util.removeItem(this.controls,control);}},addPopup:function(popup,exclusive){if(exclusive){for(var i=0;i<this.popups.length;i++){this.removePopup(this.popups[i]);}} | |
| 492 | -popup.map=this;this.popups.push(popup);var popupDiv=popup.draw();if(popupDiv){popupDiv.style.zIndex=this.Z_INDEX_BASE['Popup']+ | |
| 493 | -this.popups.length;this.layerContainerDiv.appendChild(popupDiv);}},removePopup:function(popup){OpenLayers.Util.removeItem(this.popups,popup);if(popup.div){try{this.layerContainerDiv.removeChild(popup.div);} | |
| 494 | -catch(e){}} | |
| 495 | -popup.map=null;},getSize:function(){var size=null;if(this.size!=null){size=this.size.clone();} | |
| 496 | -return size;},updateSize:function(){this.events.element.offsets=null;var newSize=this.getCurrentSize();var oldSize=this.getSize();if(oldSize==null) | |
| 497 | -this.size=oldSize=newSize;if(!newSize.equals(oldSize)){this.size=newSize;for(var i=0;i<this.layers.length;i++){this.layers[i].onMapResize();} | |
| 498 | -if(this.baseLayer!=null){var center=new OpenLayers.Pixel(newSize.w/2,newSize.h/2);var centerLL=this.getLonLatFromViewPortPx(center);var zoom=this.getZoom();this.zoom=null;this.setCenter(this.getCenter(),zoom);}}},getCurrentSize:function(){var size=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(size.w==0&&size.h==0||isNaN(size.w)&&isNaN(size.h)){var dim=OpenLayers.Element.getDimensions(this.div);size.w=dim.width;size.h=dim.height;} | |
| 499 | -if(size.w==0&&size.h==0||isNaN(size.w)&&isNaN(size.h)){size.w=parseInt(this.div.style.width);size.h=parseInt(this.div.style.height);} | |
| 500 | -return size;},calculateBounds:function(center,resolution){var extent=null;if(center==null){center=this.getCenter();} | |
| 501 | -if(resolution==null){resolution=this.getResolution();} | |
| 502 | -if((center!=null)&&(resolution!=null)){var size=this.getSize();var w_deg=size.w*resolution;var h_deg=size.h*resolution;extent=new OpenLayers.Bounds(center.lon-w_deg/2,center.lat-h_deg/2,center.lon+w_deg/2,center.lat+h_deg/2);} | |
| 503 | -return extent;},getCenter:function(){return this.center;},getZoom:function(){return this.zoom;},pan:function(dx,dy){var centerPx=this.getViewPortPxFromLonLat(this.getCenter());var newCenterPx=centerPx.add(dx,dy);if(!newCenterPx.equals(centerPx)){var newCenterLonLat=this.getLonLatFromViewPortPx(newCenterPx);this.setCenter(newCenterLonLat);}},setCenter:function(lonlat,zoom,dragging,forceZoomChange){if(!this.center&&!this.isValidLonLat(lonlat)){lonlat=this.maxExtent.getCenterLonLat();} | |
| 504 | -if(this.restrictedExtent!=null){if(lonlat==null){lonlat=this.getCenter();} | |
| 505 | -if(zoom==null){zoom=this.getZoom();} | |
| 506 | -var resolution=null;if(this.baseLayer!=null){resolution=this.baseLayer.resolutions[zoom];} | |
| 507 | -var extent=this.calculateBounds(lonlat,resolution);if(!this.restrictedExtent.containsBounds(extent)){var maxCenter=this.restrictedExtent.getCenterLonLat();if(extent.getWidth()>this.restrictedExtent.getWidth()){lonlat=new OpenLayers.LonLat(maxCenter.lon,lonlat.lat);}else if(extent.left<this.restrictedExtent.left){lonlat=lonlat.add(this.restrictedExtent.left- | |
| 508 | -extent.left,0);}else if(extent.right>this.restrictedExtent.right){lonlat=lonlat.add(this.restrictedExtent.right- | |
| 509 | -extent.right,0);} | |
| 510 | -if(extent.getHeight()>this.restrictedExtent.getHeight()){lonlat=new OpenLayers.LonLat(lonlat.lon,maxCenter.lat);}else if(extent.bottom<this.restrictedExtent.bottom){lonlat=lonlat.add(0,this.restrictedExtent.bottom- | |
| 511 | -extent.bottom);} | |
| 512 | -else if(extent.top>this.restrictedExtent.top){lonlat=lonlat.add(0,this.restrictedExtent.top- | |
| 513 | -extent.top);}}} | |
| 514 | -var zoomChanged=forceZoomChange||((this.isValidZoomLevel(zoom))&&(zoom!=this.getZoom()));var centerChanged=(this.isValidLonLat(lonlat))&&(!lonlat.equals(this.center));if(zoomChanged||centerChanged||!dragging){if(!dragging){this.events.triggerEvent("movestart");} | |
| 515 | -if(centerChanged){if((!zoomChanged)&&(this.center)){this.centerLayerContainer(lonlat);} | |
| 516 | -this.center=lonlat.clone();} | |
| 517 | -if((zoomChanged)||(this.layerContainerOrigin==null)){this.layerContainerOrigin=this.center.clone();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px";} | |
| 518 | -if(zoomChanged){this.zoom=zoom;this.viewRequestID++;} | |
| 519 | -var bounds=this.getExtent();this.baseLayer.moveTo(bounds,zoomChanged,dragging);bounds=this.baseLayer.getExtent();for(var i=0;i<this.layers.length;i++){var layer=this.layers[i];if(!layer.isBaseLayer){var moveLayer;var inRange=layer.calculateInRange();if(layer.inRange!=inRange){layer.inRange=inRange;moveLayer=true;this.events.triggerEvent("changelayer");}else{moveLayer=(layer.visibility&&layer.inRange);} | |
| 520 | -if(moveLayer){layer.moveTo(bounds,zoomChanged,dragging);}}} | |
| 521 | -if(zoomChanged){for(var i=0;i<this.popups.length;i++){this.popups[i].updatePosition();}} | |
| 522 | -this.events.triggerEvent("move");if(zoomChanged){this.events.triggerEvent("zoomend");}} | |
| 523 | -if(!dragging){this.events.triggerEvent("moveend");}},centerLayerContainer:function(lonlat){var originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){this.layerContainerDiv.style.left=(originPx.x-newPx.x)+"px";this.layerContainerDiv.style.top=(originPx.y-newPx.y)+"px";}},isValidZoomLevel:function(zoomLevel){return((zoomLevel!=null)&&(zoomLevel>=0)&&(zoomLevel<this.getNumZoomLevels()));},isValidLonLat:function(lonlat){var valid=false;if(lonlat!=null){var maxExtent=this.getMaxExtent();valid=maxExtent.containsLonLat(lonlat);} | |
| 524 | -return valid;},getProjection:function(){var projection=null;if(this.baseLayer!=null){projection=this.baseLayer.projection;} | |
| 525 | -return projection;},getMaxResolution:function(){var maxResolution=null;if(this.baseLayer!=null){maxResolution=this.baseLayer.maxResolution;} | |
| 526 | -return maxResolution;},getMaxExtent:function(){var maxExtent=null;if(this.baseLayer!=null){maxExtent=this.baseLayer.maxExtent;} | |
| 527 | -return maxExtent;},getNumZoomLevels:function(){var numZoomLevels=null;if(this.baseLayer!=null){numZoomLevels=this.baseLayer.numZoomLevels;} | |
| 528 | -return numZoomLevels;},getExtent:function(){var extent=null;if(this.baseLayer!=null){extent=this.baseLayer.getExtent();} | |
| 529 | -return extent;},getResolution:function(){var resolution=null;if(this.baseLayer!=null){resolution=this.baseLayer.getResolution();} | |
| 530 | -return resolution;},getScale:function(){var scale=null;if(this.baseLayer!=null){var res=this.getResolution();var units=this.baseLayer.units;scale=OpenLayers.Util.getScaleFromResolution(res,units);} | |
| 531 | -return scale;},getZoomForExtent:function(bounds,closest){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForExtent(bounds,closest);} | |
| 532 | -return zoom;},getZoomForResolution:function(resolution,closest){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForResolution(resolution,closest);} | |
| 533 | -return zoom;},zoomTo:function(zoom){if(this.isValidZoomLevel(zoom)){this.setCenter(null,zoom);}},zoomIn:function(){this.zoomTo(this.getZoom()+1);},zoomOut:function(){this.zoomTo(this.getZoom()-1);},zoomToExtent:function(bounds){var center=bounds.getCenterLonLat();if(this.baseLayer.wrapDateLine){var maxExtent=this.getMaxExtent();bounds=bounds.clone();while(bounds.right<bounds.left){bounds.right+=maxExtent.getWidth();} | |
| 534 | -center=bounds.getCenterLonLat().wrapDateLine(maxExtent);} | |
| 535 | -this.setCenter(center,this.getZoomForExtent(bounds));},zoomToMaxExtent:function(){this.zoomToExtent(this.getMaxExtent());},zoomToScale:function(scale){var res=OpenLayers.Util.getResolutionFromScale(scale,this.baseLayer.units);var size=this.getSize();var w_deg=size.w*res;var h_deg=size.h*res;var center=this.getCenter();var extent=new OpenLayers.Bounds(center.lon-w_deg/2,center.lat-h_deg/2,center.lon+w_deg/2,center.lat+h_deg/2);this.zoomToExtent(extent);},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if(this.baseLayer!=null){lonlat=this.baseLayer.getLonLatFromViewPortPx(viewPortPx);} | |
| 536 | -return lonlat;},getViewPortPxFromLonLat:function(lonlat){var px=null;if(this.baseLayer!=null){px=this.baseLayer.getViewPortPxFromLonLat(lonlat);} | |
| 537 | -return px;},getLonLatFromPixel:function(px){return this.getLonLatFromViewPortPx(px);},getPixelFromLonLat:function(lonlat){return this.getViewPortPxFromLonLat(lonlat);},getViewPortPxFromLayerPx:function(layerPx){var viewPortPx=null;if(layerPx!=null){var dX=parseInt(this.layerContainerDiv.style.left);var dY=parseInt(this.layerContainerDiv.style.top);viewPortPx=layerPx.add(dX,dY);} | |
| 538 | -return viewPortPx;},getLayerPxFromViewPortPx:function(viewPortPx){var layerPx=null;if(viewPortPx!=null){var dX=-parseInt(this.layerContainerDiv.style.left);var dY=-parseInt(this.layerContainerDiv.style.top);layerPx=viewPortPx.add(dX,dY);if(isNaN(layerPx.x)||isNaN(layerPx.y)){layerPx=null;}} | |
| 539 | -return layerPx;},getLonLatFromLayerPx:function(px){px=this.getViewPortPxFromLayerPx(px);return this.getLonLatFromViewPortPx(px);},getLayerPxFromLonLat:function(lonlat){var px=this.getViewPortPxFromLonLat(lonlat);return this.getLayerPxFromViewPortPx(px);},CLASS_NAME:"OpenLayers.Map"});OpenLayers.Map.TILE_WIDTH=256;OpenLayers.Map.TILE_HEIGHT=256;OpenLayers.Marker=OpenLayers.Class({icon:null,lonlat:null,events:null,map:null,initialize:function(lonlat,icon){this.lonlat=lonlat;var newIcon=(icon)?icon:OpenLayers.Marker.defaultIcon();if(this.icon==null){this.icon=newIcon;}else{this.icon.url=newIcon.url;this.icon.size=newIcon.size;this.icon.offset=newIcon.offset;this.icon.calculateOffset=newIcon.calculateOffset;} | |
| 540 | -this.events=new OpenLayers.Events(this,this.icon.imageDiv,null);},destroy:function(){this.map=null;this.events.destroy();this.events=null;if(this.icon!=null){this.icon.destroy();this.icon=null;}},draw:function(px){return this.icon.draw(px);},moveTo:function(px){if((px!=null)&&(this.icon!=null)){this.icon.moveTo(px);} | |
| 541 | -this.lonlat=this.map.getLonLatFromLayerPx(px);},onScreen:function(){var onScreen=false;if(this.map){var screenBounds=this.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);} | |
| 542 | -return onScreen;},inflate:function(inflate){if(this.icon){var newSize=new OpenLayers.Size(this.icon.size.w*inflate,this.icon.size.h*inflate);this.icon.setSize(newSize);}},setOpacity:function(opacity){this.icon.setOpacity(opacity);},display:function(display){this.icon.display(display);},CLASS_NAME:"OpenLayers.Marker"});OpenLayers.Marker.defaultIcon=function(){var url=OpenLayers.Util.getImagesLocation()+"marker.png";var size=new OpenLayers.Size(21,25);var calculateOffset=function(size){return new OpenLayers.Pixel(-(size.w/2),-size.h);};return new OpenLayers.Icon(url,size,null,calculateOffset);};OpenLayers.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(id,lonlat,size,contentHTML,anchor,closeBox){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 contentSize=this.size.clone();contentSize.h-=(2*OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);contentSize.h-=(2*this.padding);this.contentDiv.style.height=contentSize.h+"px";this.contentDiv.style.width=contentSize.w+"px";if(this.map){this.setRicoCorners(!this.rounded);this.rounded=true;}}},setBackgroundColor:function(color){if(color!=undefined){this.backgroundColor=color;} | |
| 543 | -if(this.div!=null){if(this.contentDiv!=null){this.div.style.background="transparent";OpenLayers.Rico.Corner.changeColor(this.contentDiv,this.backgroundColor);}}},setOpacity:function(opacity){if(opacity!=undefined){this.opacity=opacity;} | |
| 544 | -if(this.div!=null){if(this.contentDiv!=null){OpenLayers.Rico.Corner.changeOpacity(this.contentDiv,this.opacity);}}},setBorder:function(border){this.border=0;},setRicoCorners:function(firstTime){var corners=this.getCornersToRound(this.relativePosition);var options={corners:corners,color:this.backgroundColor,bgColor:"transparent",blend:false};if(firstTime){OpenLayers.Rico.Corner.round(this.div,options);}else{OpenLayers.Rico.Corner.reRound(this.groupDiv,options);this.setBackgroundColor();this.setOpacity();}},getCornersToRound:function(){var corners=['tl','tr','bl','br'];var corner=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(corners,corner);return corners.join(" ");},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",maxPixel:15000,localResolution:null,initialize:function(containerID){if(!this.supported()){return;} | |
| 545 | -OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments);},supported:function(){var svgFeature="http://www.w3.org/TR/SVG11/feature#SVG";var supported=(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(svgFeature,"1.1")));return supported;},setExtent:function(extent){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();if(!this.localResolution||resolution!=this.localResolution){this.left=-extent.left/resolution;this.top=extent.top/resolution;} | |
| 546 | -var left=0;var top=0;if(this.localResolution&&resolution==this.localResolution){left=(this.left)-(-extent.left/resolution);top=(this.top)-(extent.top/resolution);} | |
| 547 | -this.localResolution=resolution;var extentString=left+" "+top+" "+ | |
| 548 | -extent.getWidth()/resolution+" "+extent.getHeight()/resolution;this.rendererRoot.setAttributeNS(null,"viewBox",extentString);},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(geometry){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":nodeType="circle";break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;} | |
| 549 | -return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||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 _featureId=node._featureId;var _geometryClass=node._geometryClass;var _style=node._style;this.root.removeChild(node);var node=this.createNode("image",id);node._featureId=_featureId;node._geometryClass=_geometryClass;node._style=_style;this.root.appendChild(node);if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");} | |
| 550 | -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 xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(x+xOffset).toFixed());node.setAttributeNS(null,"y",(-y+yOffset).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: "+opacity);}else{node.setAttributeNS(null,"r",style.pointRadius);}} | |
| 551 | -if(options.isFilled){node.setAttributeNS(null,"fill",style.fillColor);node.setAttributeNS(null,"fill-opacity",style.fillOpacity);}else{node.setAttributeNS(null,"fill","none");} | |
| 552 | -if(options.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");} | |
| 553 | -if(style.pointerEvents){node.setAttributeNS(null,"pointer-events",style.pointerEvents);} | |
| 554 | -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);} | |
| 555 | -return node;},nodeTypeCompare:function(node,type){return(type==node.nodeName);},createRenderRoot:function(){var id=this.container.id+"_svgRoot";var rendererRoot=this.nodeFactory(id,"svg");return rendererRoot;},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,geometry){this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){var resolution=this.getResolution();var x=(geometry.x/resolution+this.left);var y=(geometry.y/resolution-this.top);var draw=true;if(x<-this.maxPixel||x>this.maxPixel){draw=false;} | |
| 556 | -if(y<-this.maxPixel||y>this.maxPixel){draw=false;} | |
| 557 | -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,geometry){node.setAttributeNS(null,"points",this.getComponentsString(geometry.components));},drawLinearRing:function(node,geometry){node.setAttributeNS(null,"points",this.getComponentsString(geometry.components));},drawPolygon:function(node,geometry){var d="";var draw=true;for(var j=0;j<geometry.components.length;j++){var linearRing=geometry.components[j];d+=" M";for(var i=0;i<linearRing.components.length;i++){var component=this.getShortString(linearRing.components[i]) | |
| 558 | -if(component){d+=" "+component;}else{draw=false;}}} | |
| 559 | -d+=" z";if(draw){node.setAttributeNS(null,"d",d);node.setAttributeNS(null,"fill-rule","evenodd");}else{node.setAttributeNS(null,"d","");}},drawRectangle:function(node,geometry){var x=(geometry.x/resolution+this.left);var y=(geometry.y/resolution-this.top);var draw=true;if(x<-this.maxPixel||x>this.maxPixel){draw=false;} | |
| 560 | -if(y<-this.maxPixel||y>this.maxPixel){draw=false;} | |
| 561 | -if(draw){node.setAttributeNS(null,"x",x);node.setAttributeNS(null,"y",y);node.setAttributeNS(null,"width",geometry.width);node.setAttributeNS(null,"height",geometry.height);}else{node.setAttributeNS(null,"x","");node.setAttributeNS(null,"y","");node.setAttributeNS(null,"width",0);node.setAttributeNS(null,"height",0);}},drawCurve:function(node,geometry){var d=null;var draw=true;for(var i=0;i<geometry.components.length;i++){if((i%3)==0&&(i/3)==0){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 562 | -d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 563 | -d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 564 | -d+=" "+component;}} | |
| 565 | -if(draw){node.setAttributeNS(null,"d",d);}else{node.setAttributeNS(null,"d","");}},drawSurface:function(node,geometry){var d=null;var draw=true;for(var i=0;i<geometry.components.length;i++){if((i%3)==0&&(i/3)==0){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 566 | -d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 567 | -d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 568 | -d+=" "+component;}} | |
| 569 | -d+=" Z";if(draw){node.setAttributeNS(null,"d",d);}else{node.setAttributeNS(null,"d","");}},getComponentsString:function(components){var strings=[];for(var i=0;i<components.length;i++){var component=this.getShortString(components[i]);if(component){strings.push(component);}} | |
| 570 | -return strings.join(",");},getShortString:function(point){var resolution=this.getResolution();var x=(point.x/resolution+this.left);var y=(point.y/resolution-this.top);if(x<-this.maxPixel||x>this.maxPixel){return false;} | |
| 571 | -if(y<-this.maxPixel||y>this.maxPixel){return false;} | |
| 572 | -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(containerID){if(!this.supported()){return;} | |
| 573 | -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;");OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments);},supported:function(){var supported=document.namespaces;return supported;},setExtent:function(extent){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();var org=extent.left/resolution+" "+ | |
| 574 | -extent.top/resolution;this.root.setAttribute("coordorigin",org);var size=extent.getWidth()/resolution+" "+ | |
| 575 | --extent.getHeight()/resolution;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(geometry){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":nodeType="v:oval";break;case"OpenLayers.Geometry.Rectangle":nodeType="v:rect";break;case"OpenLayers.Geometry.LineString":case"OpenLayers.Geometry.LinearRing":case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="v:shape";break;default:break;} | |
| 576 | -return nodeType;},setStyle:function(node,style,options,geometry){style=style||node._style;options=options||node._options;if(node._geometryClass=="OpenLayers.Geometry.Point"){if(style.externalGraphic){var id=node.id;var _featureId=node._featureId;var _geometryClass=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=_featureId;node._geometryClass=_geometryClass;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";} | |
| 577 | -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 resolution=this.getResolution();var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);node.style.left=((geometry.x/resolution)+xOffset).toFixed();node.style.top=((geometry.y/resolution)-(yOffset+height)).toFixed();node.style.width=width;node.style.height=height;style.fillColor="none";style.strokeColor="none";}else{this.drawCircle(node,geometry,style.pointRadius);}} | |
| 578 | -var fillColor=(options.isFilled)?style.fillColor:"none";node.setAttribute("fillcolor",fillColor);var fills=node.getElementsByTagName("fill");var fill=(fills.length==0)?null:fills[0];if(!options.isFilled){if(fill){node.removeChild(fill);}}else{if(!fill){fill=this.createNode('v:fill',node.id+"_fill");node.appendChild(fill);} | |
| 579 | -if(node._geometryClass=="OpenLayers.Geometry.Point"&&style.externalGraphic&&style.graphicOpacity){fill.setAttribute("opacity",style.graphicOpacity);}else if(style.fillOpacity){fill.setAttribute("opacity",style.fillOpacity);}} | |
| 580 | -var strokeColor=(options.isStroked)?style.strokeColor:"none";node.setAttribute("strokecolor",strokeColor);node.setAttribute("strokeweight",style.strokeWidth);var strokes=node.getElementsByTagName("stroke");var stroke=(strokes.length==0)?null:strokes[0];if(!options.isStroked){if(stroke){node.removeChild(stroke);}}else{if(!stroke){stroke=this.createNode('v:stroke',node.id+"_stroke");node.appendChild(stroke);} | |
| 581 | -stroke.setAttribute("opacity",style.strokeOpacity);stroke.setAttribute("endcap",!style.strokeLinecap||style.strokeLinecap=='butt'?'flat':style.strokeLinecap);} | |
| 582 | -if(style.cursor){node.style.cursor=style.cursor;}},setNodeDimension:function(node,geometry){var bbox=geometry.getBounds();if(bbox){var resolution=this.getResolution();var scaledBox=new OpenLayers.Bounds((bbox.left/resolution).toFixed(),(bbox.bottom/resolution).toFixed(),(bbox.right/resolution).toFixed(),(bbox.top/resolution).toFixed());node.style.left=scaledBox.left;node.style.top=scaledBox.top;node.style.width=scaledBox.getWidth();node.style.height=scaledBox.getHeight();node.coordorigin=scaledBox.left+" "+scaledBox.top;node.coordsize=scaledBox.getWidth()+" "+scaledBox.getHeight();}},createNode:function(type,id){var node=document.createElement(type);if(id){node.setAttribute('id',id);} | |
| 583 | -return node;},nodeTypeCompare:function(node,type){var subType=type;var splitIndex=subType.indexOf(":");if(splitIndex!=-1){subType=subType.substr(splitIndex+1);} | |
| 584 | -var nodeName=node.nodeName;splitIndex=nodeName.indexOf(":");if(splitIndex!=-1){nodeName=nodeName.substr(splitIndex+1);} | |
| 585 | -return(subType==nodeName);},createRenderRoot:function(){var id=this.container.id+"_vmlRoot";var rendererRoot=this.nodeFactory(id,"div");return rendererRoot;},createRoot:function(){var id=this.container.id+"_root";var root=this.nodeFactory(id,"v:group");return root;},drawPoint:function(node,geometry){this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){if(!isNaN(geometry.x)&&!isNaN(geometry.y)){var resolution=this.getResolution();node.style.left=(geometry.x/resolution).toFixed()-radius;node.style.top=(geometry.y/resolution).toFixed()-radius;var diameter=radius*2;node.style.width=diameter;node.style.height=diameter;}},drawLineString:function(node,geometry){this.drawLine(node,geometry,false);},drawLinearRing:function(node,geometry){this.drawLine(node,geometry,true);},drawLine:function(node,geometry,closeLine){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path="m";for(var i=0;i<geometry.components.length;i++){var x=(geometry.components[i].x/resolution);var y=(geometry.components[i].y/resolution);path+=" "+x.toFixed()+","+y.toFixed()+" l ";} | |
| 586 | -if(closeLine){path+=" x";} | |
| 587 | -path+=" e";node.path=path;},drawPolygon:function(node,geometry){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path="";for(var j=0;j<geometry.components.length;j++){var linearRing=geometry.components[j];path+="m";for(var i=0;i<linearRing.components.length;i++){var x=linearRing.components[i].x/resolution;var y=linearRing.components[i].y/resolution;path+=" "+x.toFixed()+","+y.toFixed();if(i==0){path+=" l";}} | |
| 588 | -path+=" x ";} | |
| 589 | -path+="e";node.path=path;},drawRectangle:function(node,geometry){var resolution=this.getResolution();node.style.left=geometry.x/resolution;node.style.top=geometry.y/resolution;node.style.width=geometry.width/resolution;node.style.height=geometry.height/resolution;},drawCurve:function(node,geometry){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path="";for(var i=0;i<geometry.components.length;i++){var x=geometry.components[i].x/resolution;var y=geometry.components[i].y/resolution;if((i%3)==0&&(i/3)==0){path+="m"}else if((i%3)==1){path+=" c"} | |
| 590 | -path+=" "+x+","+y;} | |
| 591 | -path+=" x e";node.path=path;},drawSurface:function(node,geometry){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path="";for(var i=0;i<geometry.components.length;i++){var x=geometry.components[i].x/resolution;var y=geometry.components[i].y/resolution;if((i%3)==0&&(i/3)==0){path+="m";}else if((i%3)==1){path+=" c";} | |
| 592 | -path+=" "+x+","+y;} | |
| 593 | -path+=" x e";node.path=path;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,initialize:function(layer,position,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;}} | |
| 594 | -this.imgDiv=null;if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){this.layer.div.removeChild(this.frame);} | |
| 595 | -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);} | |
| 596 | -if(!OpenLayers.Tile.prototype.draw.apply(this,arguments)){return false;} | |
| 597 | -if(this.isLoading){this.events.triggerEvent("reload");}else{this.isLoading=true;this.events.triggerEvent("loadstart");} | |
| 598 | -if(this.imgDiv==null){this.initImgDiv();} | |
| 599 | -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 imageSize=this.layer.getImageSize();if(this.layer.alpha){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,imageSize,this.url);}else{this.imgDiv.src=this.url;OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,imageSize);} | |
| 600 | -this.drawn=true;return true;},clear:function(){OpenLayers.Tile.prototype.clear.apply(this,arguments);if(this.imgDiv){this.imgDiv.style.display="none";}},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);} | |
| 601 | -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);} | |
| 602 | -this.imgDiv.map=this.layer.map;var onload=function(){if(this.isLoading){this.isLoading=false;this.events.triggerEvent("loadend");}} | |
| 603 | -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.WFS=OpenLayers.Class(OpenLayers.Tile,{features:null,url:null,initialize:function(layer,position,bounds,url,size){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=url;this.features=[];},destroy:function(){OpenLayers.Tile.prototype.destroy.apply(this,arguments);this.destroyAllFeatures();this.features=null;this.url=null;},clear:function(){OpenLayers.Tile.prototype.clear.apply(this,arguments);this.destroyAllFeatures();},draw:function(){if(OpenLayers.Tile.prototype.draw.apply(this,arguments)){if(this.isLoading){this.events.triggerEvent("reload");}else{this.isLoading=true;this.events.triggerEvent("loadstart");} | |
| 604 | -this.loadFeaturesForRegion(this.requestSuccess);}},loadFeaturesForRegion:function(success,failure){OpenLayers.loadURL(this.url,null,this,success);},requestSuccess:function(request){if(this.features){var doc=request.responseXML;if(!doc||request.fileType!="XML"){doc=OpenLayers.parseXMLString(request.responseText);} | |
| 605 | -if(this.layer.vectorMode){var gml=new OpenLayers.Format.GML({'extractAttributes':this.layer.options.extractAttributes});this.layer.addFeatures(gml.read(doc));}else{var resultFeatures=OpenLayers.Ajax.getElementsByTagNameNS(doc,"http://www.opengis.net/gml","gml","featureMember");this.addResults(resultFeatures);}} | |
| 606 | -if(this.events){this.events.triggerEvent("loadend");}},addResults:function(results){for(var i=0;i<results.length;i++){var feature=new this.layer.featureClass(this.layer,results[i]);this.features.push(feature);}},destroyAllFeatures:function(){while(this.features.length>0){var feature=this.features.shift();feature.destroy();}},CLASS_NAME:"OpenLayers.Tile.WFS"});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);}} | |
| 607 | -this.layer=null;this.id=null;this.lonlat=null;this.data=null;if(this.marker!=null){this.destroyMarker(this.marker);this.marker=null;} | |
| 608 | -if(this.popup!=null){this.destroyPopup(this.popup);this.popup=null;}},onScreen:function(){var onScreen=false;if((this.layer!=null)&&(this.layer.map!=null)){var screenBounds=this.layer.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);} | |
| 609 | -return onScreen;},createMarker:function(){if(this.lonlat!=null){this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);} | |
| 610 | -return this.marker;},destroyMarker:function(){this.marker.destroy();},createPopup:function(closeBox){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,closeBox);if(this.data.overflow!=null){this.popup.contentDiv.style.overflow=this.data.overflow;} | |
| 611 | -this.popup.feature=this;} | |
| 612 | -return this.popup;},destroyPopup:function(){this.popup.feature=null;this.popup.destroy()},CLASS_NAME:"OpenLayers.Feature"});OpenLayers.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:false,dragging:false,last:null,start:null,oldOnselectstart:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);},down:function(evt){},move:function(evt){},up:function(evt){},out:function(evt){},mousedown:function(evt){var propagate=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;}} | |
| 613 | -propagate=false;}else{this.started=false;this.start=null;this.last=null;} | |
| 614 | -return propagate;},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;}} | |
| 615 | -this.last=evt.xy;}} | |
| 616 | -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;} | |
| 617 | -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;} | |
| 618 | -this.callback("done",[evt.xy])} | |
| 619 | -return true;},click:function(evt){return(this.start==this.last);},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;activated=true;} | |
| 620 | -return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false;this.dragging=false;this.start=null;this.last=null;deactivated=true;} | |
| 621 | -return deactivated;},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{geometryTypes:null,layerIndex:null,feature:null,initialize:function(control,layer,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,[control,callbacks,options]);this.layer=layer;},click:function(evt){var selected=this.select('click',evt);return!selected;},mousedown:function(evt){var selected=this.select('down',evt);return!selected;},mousemove:function(evt){this.select('move',evt);return true;},mouseup:function(evt){var selected=this.select('up',evt);return!selected;},dblclick:function(evt){var selected=this.select('dblclick',evt);return!selected;},select:function(type,evt){var feature=this.layer.getFeatureFromEvent(evt);var selected=false;if(feature){if(this.geometryTypes==null||(OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)>-1)){if(!this.feature){this.callback('over',[feature]);}else if(this.feature!=feature){this.callback('out',[this.feature]);this.callback('over',[feature]);} | |
| 622 | -this.feature=feature;this.callback(type,[feature]);selected=true;}else{if(this.feature&&(this.feature!=feature)){this.callback('out',[this.feature]);this.feature=null;} | |
| 623 | -selected=false;}}else{if(this.feature){this.callback('out',[this.feature]);this.feature=null;} | |
| 624 | -selected=false;} | |
| 625 | -return selected;},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;} | |
| 626 | -return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.Feature"});OpenLayers.Handler.Keyboard=OpenLayers.Class(OpenLayers.Handler,{KEY_EVENTS:["keydown","keypress","keyup"],eventListener:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.eventListener=OpenLayers.Function.bindAsEventListener(this.handleKeyEvent,this);},destroy:function(){this.deactivate();this.eventListener=null;OpenLayers.Handler.prototype.destroy.apply(this,arguments);},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){for(var i=0;i<this.KEY_EVENTS.length;i++){OpenLayers.Event.observe(window,this.KEY_EVENTS[i],this.eventListener);} | |
| 627 | -return true;}else{return false;}},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var i=0;i<this.KEY_EVENTS.length;i++){OpenLayers.Event.stopObserving(window,this.KEY_EVENTS[i],this.eventListener);} | |
| 628 | -deactivated=true;} | |
| 629 | -return deactivated;},handleKeyEvent:function(evt){if(this.checkModifiers(evt)){this.callback(evt.type,[evt.charCode||evt.keyCode]);}},CLASS_NAME:"OpenLayers.Handler.Keyboard"});OpenLayers.Handler.MouseWheel=OpenLayers.Class(OpenLayers.Handler,{wheelListener:null,mousePosition:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.wheelListener=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this);},destroy:function(){OpenLayers.Handler.prototype.destroy.apply(this,arguments);this.wheelListener=null;},onWheelEvent:function(e){if(!this.checkModifiers(e))return;var inMap=false;var elem=OpenLayers.Event.element(e);while(elem!=null){if(this.map&&elem==this.map.div){inMap=true;break;} | |
| 630 | -elem=elem.parentNode;} | |
| 631 | -if(inMap){var delta=0;if(!e){e=window.event;} | |
| 632 | -if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera){delta=-delta;}}else if(e.detail){delta=-e.detail/3;} | |
| 633 | -if(delta){if(this.mousePosition){e.xy=this.mousePosition;} | |
| 634 | -if(!e.xy){e.xy=this.map.getPixelFromLonLat(this.map.getCenter());} | |
| 635 | -if(delta<0){this.callback("down",[e,delta]);}else{this.callback("up",[e,delta]);}} | |
| 636 | -OpenLayers.Event.stop(e);}},mousemove:function(evt){this.mousePosition=evt.xy;},activate:function(evt){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.observe(window,"mousewheel",wheelListener);OpenLayers.Event.observe(document,"mousewheel",wheelListener);return true;}else{return false;}},deactivate:function(evt){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.stopObserving(window,"mousewheel",wheelListener);OpenLayers.Event.stopObserving(document,"mousewheel",wheelListener);return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});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,options){this.addOptions(options);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);} | |
| 637 | -if(this.wrapDateLine){this.displayOutsideMaxExtent=true;}},destroy:function(setNewBaseLayer){if(setNewBaseLayer==null){setNewBaseLayer=true;} | |
| 638 | -if(this.map!=null){this.map.removeLayer(this,setNewBaseLayer);} | |
| 639 | -this.map=null;this.name=null;this.div=null;this.options=null;if(this.events){this.events.destroy();} | |
| 640 | -this.events=null;},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer(this.name,this.options);} | |
| 641 | -OpenLayers.Util.applyDefaults(obj,this);obj.map=null;return obj;},setName:function(newName){if(newName!=this.name){this.name=newName;if(this.map!=null){this.map.events.triggerEvent("changelayer");}}},addOptions:function(newOptions){if(this.options==null){this.options={};} | |
| 642 | -OpenLayers.Util.extend(this.options,newOptions);OpenLayers.Util.extend(this,newOptions);},onMapResize:function(){},redraw:function(){var redrawn=false;if(this.map){this.inRange=this.calculateInRange();var extent=this.getExtent();if(extent&&this.inRange&&this.visibility){this.moveTo(extent,true,false);redrawn=true;}} | |
| 643 | -return redrawn;},moveTo:function(bounds,zoomChanged,dragging){var display=this.visibility;if(!this.isBaseLayer){display=display&&this.inRange;} | |
| 644 | -this.display(display);},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";} | |
| 645 | -this.setTileSize();}},removeMap:function(map){},getImageSize:function(){return(this.imageSize||this.tileSize);},setTileSize:function(size){var tileSize=(size)?size:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=tileSize;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(tileSize.w+(2*this.gutter),tileSize.h+(2*this.gutter));}},getVisibility:function(){return this.visibility;},setVisibility:function(visibility){if(visibility!=this.visibility){this.visibility=visibility;this.display(visibility);this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer");} | |
| 646 | -this.events.triggerEvent("visibilitychanged");}},display:function(display){if(display!=(this.div.style.display!="none")){this.div.style.display=(display)?"block":"none";}},calculateInRange:function(){var inRange=false;if(this.map){var resolution=this.map.getResolution();inRange=((resolution>=this.minResolution)&&(resolution<=this.maxResolution));} | |
| 647 | -return inRange;},setIsBaseLayer:function(isBaseLayer){if(isBaseLayer!=this.isBaseLayer){this.isBaseLayer=isBaseLayer;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 confProps={};for(var i=0;i<props.length;i++){var property=props[i];confProps[property]=this.options[property]||this.map[property];} | |
| 648 | -if((!confProps.numZoomLevels)&&(confProps.maxZoomLevel)){confProps.numZoomLevels=confProps.maxZoomLevel+1;} | |
| 649 | -if((confProps.scales!=null)||(confProps.resolutions!=null)){if(confProps.scales!=null){confProps.resolutions=[];for(var i=0;i<confProps.scales.length;i++){var scale=confProps.scales[i];confProps.resolutions[i]=OpenLayers.Util.getResolutionFromScale(scale,confProps.units);}} | |
| 650 | -confProps.numZoomLevels=confProps.resolutions.length;}else{confProps.resolutions=[];if(confProps.minScale){confProps.maxResolution=OpenLayers.Util.getResolutionFromScale(confProps.minScale,confProps.units);}else if(confProps.maxResolution=="auto"){var viewSize=this.map.getSize();var wRes=confProps.maxExtent.getWidth()/viewSize.w;var hRes=confProps.maxExtent.getHeight()/viewSize.h;confProps.maxResolution=Math.max(wRes,hRes);} | |
| 651 | -if(confProps.maxScale!=null){confProps.minResolution=OpenLayers.Util.getResolutionFromScale(confProps.maxScale);}else if((confProps.minResolution=="auto")&&(confProps.minExtent!=null)){var viewSize=this.map.getSize();var wRes=confProps.minExtent.getWidth()/viewSize.w;var hRes=confProps.minExtent.getHeight()/viewSize.h;confProps.minResolution=Math.max(wRes,hRes);} | |
| 652 | -if(confProps.minResolution!=null){var ratio=confProps.maxResolution/confProps.minResolution;confProps.numZoomLevels=Math.floor(Math.log(ratio)/Math.log(2))+1;} | |
| 653 | -for(var i=0;i<confProps.numZoomLevels;i++){var res=confProps.maxResolution/Math.pow(2,i) | |
| 654 | -confProps.resolutions.push(res);}} | |
| 655 | -confProps.resolutions.sort(function(a,b){return(b-a);});this.resolutions=confProps.resolutions;this.maxResolution=confProps.resolutions[0];var lastIndex=confProps.resolutions.length-1;this.minResolution=confProps.resolutions[lastIndex];this.scales=[];for(var i=0;i<confProps.resolutions.length;i++){this.scales[i]=OpenLayers.Util.getScaleFromResolution(confProps.resolutions[i],confProps.units);} | |
| 656 | -this.minScale=this.scales[0];this.maxScale=this.scales[this.scales.length-1];this.numZoomLevels=confProps.numZoomLevels;},getResolution:function(){var zoom=this.map.getZoom();return this.resolutions[zoom];},getExtent:function(){return this.map.calculateBounds();},getZoomForExtent:function(extent,closest){var viewSize=this.map.getSize();var idealResolution=Math.max(extent.getWidth()/viewSize.w,extent.getHeight()/viewSize.h);return this.getZoomForResolution(idealResolution,closest);},getDataExtent:function(){},getZoomForResolution:function(resolution,closest){var diff;var minDiff=Number.POSITIVE_INFINITY;for(var i=0;i<this.resolutions.length;i++){if(closest){diff=Math.abs(this.resolutions[i]-resolution);if(diff>minDiff){break;} | |
| 657 | -minDiff=diff;}else{if(this.resolutions[i]<resolution){break;}}} | |
| 658 | -return Math.max(0,i-1);},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if(viewPortPx!=null){var size=this.map.getSize();var center=this.map.getCenter();if(center){var res=this.map.getResolution();var delta_x=viewPortPx.x-(size.w/2);var delta_y=viewPortPx.y-(size.h/2);lonlat=new OpenLayers.LonLat(center.lon+delta_x*res,center.lat-delta_y*res);if(this.wrapDateLine){lonlat=lonlat.wrapDateLine(this.maxExtent);}}} | |
| 659 | -return lonlat;},getViewPortPxFromLonLat:function(lonlat){var px=null;if(lonlat!=null){var resolution=this.map.getResolution();var extent=this.map.getExtent();px=new OpenLayers.Pixel(Math.round(1/resolution*(lonlat.lon-extent.left)),Math.round(1/resolution*(extent.top-lonlat.lat)));} | |
| 660 | -return px;},setOpacity:function(opacity){if(opacity!=this.opacity){this.opacity=opacity;for(var i=0;i<this.div.childNodes.length;++i){var element=this.div.childNodes[i].firstChild;OpenLayers.Util.modifyDOMElement(element,null,null,null,null,null,null,opacity);}}},setZIndex:function(zIndex){this.div.style.zIndex=zIndex;},adjustBounds:function(bounds){if(this.gutter){var mapGutter=this.gutter*this.map.getResolution();bounds=new OpenLayers.Bounds(bounds.left-mapGutter,bounds.bottom-mapGutter,bounds.right+mapGutter,bounds.top+mapGutter);} | |
| 661 | -if(this.wrapDateLine){var wrappingOptions={'rightTolerance':this.getResolution()};bounds=bounds.wrapDateLine(this.maxExtent,wrappingOptions);} | |
| 662 | -return bounds;},CLASS_NAME:"OpenLayers.Layer"});OpenLayers.Marker.Box=OpenLayers.Class(OpenLayers.Marker,{bounds:null,div:null,initialize:function(bounds,borderColor,borderWidth){this.bounds=bounds;this.div=OpenLayers.Util.createDiv();this.div.style.overflow='hidden';this.events=new OpenLayers.Events(this,this.div,null);this.setBorder(borderColor,borderWidth);},destroy:function(){this.bounds=null;this.div=null;OpenLayers.Marker.prototype.destroy.apply(this,arguments);},setBorder:function(color,width){if(!color){color="red";} | |
| 663 | -if(!width){width=2;} | |
| 664 | -this.div.style.border=width+"px solid "+color;},draw:function(px,sz){OpenLayers.Util.modifyDOMElement(this.div,null,px,sz);return this.div;},onScreen:function(){var onScreen=false;if(this.map){var screenBounds=this.map.getExtent();onScreen=screenBounds.containsBounds(this.bounds,true,true);} | |
| 665 | -return onScreen;},display:function(display){this.div.style.display=(display)?"":"none";},CLASS_NAME:"OpenLayers.Marker.Box"});OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(feature,pixel){},onDrag:function(feature,pixel){},onComplete:function(feature,pixel){},layer:null,feature:null,dragHandler:null,dragCallbacks:{},featureHandler:null,featureCallbacks:{},lastPixel:null,initialize:function(layer,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);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 handlerOptions={geometryTypes:this.geometryTypes};this.featureHandler=new OpenLayers.Handler.Feature(this,this.layer,this.featureCallbacks,handlerOptions);},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(feature){if(!this.dragHandler.dragging){this.feature=feature;this.dragHandler.activate();this.over=true;this.map.div.style.cursor="move";}else{if(this.feature.id==feature.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(feature){if(!this.dragHandler.dragging){this.over=false;this.dragHandler.deactivate();this.map.div.style.cursor="default";this.feature=null;}else{if(this.feature.id==feature.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"});OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{"move":this.panMap,"done":this.panMapDone});},panMap:function(xy){this.panned=true;var deltaX=this.handler.last.x-xy.x;var deltaY=this.handler.last.y-xy.y;var size=this.map.getSize();var newXY=new OpenLayers.Pixel(size.w/2+deltaX,size.h/2+deltaY);var newCenter=this.map.getLonLatFromViewPortPx(newXY);this.map.setCenter(newCenter,null,this.handler.dragging);},panMapDone:function(xy){if(this.panned){this.panMap(xy);this.panned=false;}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Control.KeyboardDefaults=OpenLayers.Class(OpenLayers.Control,{slideFactor:75,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.handler){this.handler.destroy();} | |
| 666 | -this.handler=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){this.handler=new OpenLayers.Handler.Keyboard(this,{"keypress":this.defaultKeyPress});this.activate();},defaultKeyPress:function(code){switch(code){case OpenLayers.Event.KEY_LEFT:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Event.KEY_RIGHT:this.map.pan(this.slideFactor,0);break;case OpenLayers.Event.KEY_UP:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Event.KEY_DOWN:this.map.pan(0,this.slideFactor);break;case 33:var size=this.map.getSize();this.map.pan(0,-0.75*size.h);break;case 34:var size=this.map.getSize();this.map.pan(0,0.75*size.h);break;case 35:var size=this.map.getSize();this.map.pan(0.75*size.w,0);break;case 36:var size=this.map.getSize();this.map.pan(-0.75*size.w,0);break;case 43:this.map.zoomIn();break;case 45:this.map.zoomOut();break;case 107:this.map.zoomIn();break;case 109:this.map.zoomOut();break;}},CLASS_NAME:"OpenLayers.Control.KeyboardDefaults"});OpenLayers.State={UNKNOWN:'Unknown',INSERT:'Insert',UPDATE:'Update',DELETE:'Delete'} | |
| 667 | -OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,state:null,style:null,initialize:function(geometry,attributes,style){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,attributes]);this.lonlat=null;this.geometry=geometry;this.state=null;this.attributes={};if(attributes){this.attributes=OpenLayers.Util.extend(this.attributes,attributes);} | |
| 668 | -this.style=style?style:null;},destroy:function(){if(this.layer){this.layer.removeFeatures(this);this.layer=null;} | |
| 669 | -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,toleranceLon,toleranceLat){var atPoint=false;if(this.geometry){atPoint=this.geometry.atPoint(lonlat,toleranceLon,toleranceLat);} | |
| 670 | -return atPoint;},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.Feature.WFS=OpenLayers.Class(OpenLayers.Feature,{initialize:function(layer,xmlNode){var newArguments=arguments;var data=this.processXMLNode(xmlNode);newArguments=new Array(layer,data.lonlat,data) | |
| 671 | -OpenLayers.Feature.prototype.initialize.apply(this,newArguments);this.createMarker();this.layer.addMarker(this.marker);},destroy:function(){if(this.marker!=null){this.layer.removeMarker(this.marker);} | |
| 672 | -OpenLayers.Feature.prototype.destroy.apply(this,arguments);},processXMLNode:function(xmlNode){var point=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,"http://www.opengis.net/gml","gml","Point");var text=OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(point[0],"http://www.opengis.net/gml","gml","coordinates")[0]);var floats=text.split(",");return{lonlat:new OpenLayers.LonLat(parseFloat(floats[0]),parseFloat(floats[1])),id:null};},CLASS_NAME:"OpenLayers.Feature.WFS"});OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);var callbacks={"down":this.startBox,"move":this.moveBox,"out":this.removeBox,"up":this.endBox};this.dragHandler=new OpenLayers.Handler.Drag(this,callbacks,{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.x<this.dragHandler.start.x){this.zoomBox.style.left=xy.x+"px";} | |
| 673 | -if(xy.y<this.dragHandler.start.y){this.zoomBox.style.top=xy.y+"px";}},endBox:function(end){var result;if(Math.abs(this.dragHandler.start.x-end.x)>5||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();} | |
| 674 | -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.Handler.RegularPolygon=OpenLayers.Class(OpenLayers.Handler.Drag,{sides:4,radius:null,snapAngle:null,snapToggle:'shiftKey',persist:false,angle:null,fixedRadius:false,feature:null,layer:null,origin:null,initialize:function(control,callbacks,options){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'],{});OpenLayers.Handler.prototype.initialize.apply(this,[control,callbacks,options]);this.options=(options)?options:new Object();},setOptions:function(newOptions){OpenLayers.Util.extend(this.options,newOptions);OpenLayers.Util.extend(this,newOptions);},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var options={displayInLayerSwitcher:false};this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,options);this.map.addLayer(this.layer);activated=true;} | |
| 675 | -return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.Drag.prototype.deactivate.apply(this,arguments)){if(this.dragging){this.cancel();} | |
| 676 | -this.map.removeLayer(this.layer,false);this.layer.destroy();if(this.feature){this.feature.destroy();} | |
| 677 | -deactivated=true;} | |
| 678 | -return deactivated;},down:function(evt){this.fixedRadius=!!(this.radius);var maploc=this.map.getLonLatFromPixel(evt.xy);this.origin=new OpenLayers.Geometry.Point(maploc.lon,maploc.lat);if(!this.fixedRadius){this.radius=this.map.getResolution();} | |
| 679 | -if(this.persist){this.clear();} | |
| 680 | -this.feature=new OpenLayers.Feature.Vector();this.createGeometry();this.layer.addFeatures([this.feature]);this.layer.drawFeature(this.feature,this.style);},move:function(evt){var maploc=this.map.getLonLatFromPixel(evt.xy);var point=new OpenLayers.Geometry.Point(maploc.lon,maploc.lat);if(this.fixedRadius){this.origin=point;}else{this.calculateAngle(point,evt);this.radius=Math.max(this.map.getResolution()/2,point.distanceTo(this.origin));} | |
| 681 | -this.modifyGeometry();this.layer.drawFeature(this.feature,this.style);},up:function(evt){this.finalize();},out:function(evt){this.finalize();},createGeometry:function(){this.angle=Math.PI*((1/this.sides)-(1/2));if(this.snapAngle){this.angle+=this.snapAngle*(Math.PI/180);} | |
| 682 | -this.feature.geometry=OpenLayers.Geometry.Polygon.createRegularPolygon(this.origin,this.radius,this.sides,this.snapAngle);},modifyGeometry:function(){var angle,dx,dy,point;var ring=this.feature.geometry.components[0];if(ring.components.length!=(this.sides+1)){this.createGeometry();} | |
| 683 | -for(var i=0;i<this.sides;++i){point=ring.components[i];angle=this.angle+(i*2*Math.PI/this.sides);point.x=this.origin.x+(this.radius*Math.cos(angle));point.y=this.origin.y+(this.radius*Math.sin(angle));point.clearBounds();}},calculateAngle:function(point,evt){var alpha=Math.atan2(point.y-this.origin.y,point.x-this.origin.x);if(this.snapAngle&&(this.snapToggle&&!evt[this.snapToggle])){var snapAngleRad=(Math.PI/180)*this.snapAngle;this.angle=Math.round(alpha/snapAngleRad)*snapAngleRad;}else{this.angle=alpha;}},cancel:function(){this.callback("cancel",null);this.finalize();},finalize:function(){this.origin=null;this.radius=this.options.radius;},clear:function(){this.layer.renderer.clear();this.layer.destroyFeatures();},callback:function(name,args){if(this.callbacks[name]){this.callbacks[name].apply(this.control,[this.feature.geometry.clone()]);} | |
| 684 | -if(!this.persist&&(name=="done"||name=="cancel")){this.clear();}},CLASS_NAME:"OpenLayers.Handler.RegularPolygon"});OpenLayers.Layer.EventPane=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:true,isFixed:true,pane:null,mapObject:null,initialize:function(name,options){OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(this.pane==null){this.pane=OpenLayers.Util.createDiv(this.div.id+"_EventPane");}},destroy:function(){this.mapObject=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Layer.prototype.setMap.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;this.pane.style.display=this.div.style.display;this.pane.style.width="100%";this.pane.style.height="100%";if(OpenLayers.Util.getBrowserName()=="msie"){this.pane.style.background="url("+OpenLayers.Util.getImagesLocation()+"blank.gif)";} | |
| 685 | -if(this.isFixed){this.map.viewPortDiv.appendChild(this.pane);}else{this.map.layerContainerDiv.appendChild(this.pane);} | |
| 686 | -this.loadMapObject();if(this.mapObject==null){this.loadWarningMessage();}},removeMap:function(map){if(this.pane&&this.pane.parentNode){this.pane.parentNode.removeChild(this.pane);this.pane=null;} | |
| 687 | -OpenLayers.Layer.prototype.removeMap.apply(this,arguments);},loadWarningMessage:function(){this.div.style.backgroundColor="darkblue";var viewSize=this.map.getSize();msgW=Math.min(viewSize.w,300);msgH=Math.min(viewSize.h,200);var size=new OpenLayers.Size(msgW,msgH);var centerPx=new OpenLayers.Pixel(viewSize.w/2,viewSize.h/2);var topLeft=centerPx.add(-size.w/2,-size.h/2);var div=OpenLayers.Util.createDiv(this.name+"_warning",topLeft,size,null,null,null,"auto");div.style.padding="7px";div.style.backgroundColor="yellow";div.innerHTML=this.getWarningHTML();this.div.appendChild(div);},getWarningHTML:function(){return"";},display:function(display){OpenLayers.Layer.prototype.display.apply(this,arguments);this.pane.style.display=this.div.style.display;},setZIndex:function(zIndex){OpenLayers.Layer.prototype.setZIndex.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(this.mapObject!=null){var newCenter=this.map.getCenter();var newZoom=this.map.getZoom();if(newCenter!=null){var moOldCenter=this.getMapObjectCenter();var oldCenter=this.getOLLonLatFromMapObjectLonLat(moOldCenter);var moOldZoom=this.getMapObjectZoom();var oldZoom=this.getOLZoomFromMapObjectZoom(moOldZoom);if(!(newCenter.equals(oldCenter))||!(newZoom==oldZoom)){var center=this.getMapObjectLonLatFromOLLonLat(newCenter);var zoom=this.getMapObjectZoomFromOLZoom(newZoom);this.setMapObjectCenter(center,zoom);}}}},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var moPixel=this.getMapObjectPixelFromOLPixel(viewPortPx);var moLonLat=this.getMapObjectLonLatFromMapObjectPixel(moPixel) | |
| 688 | -lonlat=this.getOLLonLatFromMapObjectLonLat(moLonLat);} | |
| 689 | -return lonlat;},getViewPortPxFromLonLat:function(lonlat){var viewPortPx=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var moLonLat=this.getMapObjectLonLatFromOLLonLat(lonlat);var moPixel=this.getMapObjectPixelFromMapObjectLonLat(moLonLat) | |
| 690 | -viewPortPx=this.getOLPixelFromMapObjectPixel(moPixel);} | |
| 691 | -return viewPortPx;},getOLLonLatFromMapObjectLonLat:function(moLonLat){var olLonLat=null;if(moLonLat!=null){var lon=this.getLongitudeFromMapObjectLonLat(moLonLat);var lat=this.getLatitudeFromMapObjectLonLat(moLonLat);olLonLat=new OpenLayers.LonLat(lon,lat);} | |
| 692 | -return olLonLat;},getMapObjectLonLatFromOLLonLat:function(olLonLat){var moLatLng=null;if(olLonLat!=null){moLatLng=this.getMapObjectLonLatFromLonLat(olLonLat.lon,olLonLat.lat);} | |
| 693 | -return moLatLng;},getOLPixelFromMapObjectPixel:function(moPixel){var olPixel=null;if(moPixel!=null){var x=this.getXFromMapObjectPixel(moPixel);var y=this.getYFromMapObjectPixel(moPixel);olPixel=new OpenLayers.Pixel(x,y);} | |
| 694 | -return olPixel;},getMapObjectPixelFromOLPixel:function(olPixel){var moPixel=null;if(olPixel!=null){moPixel=this.getMapObjectPixelFromXY(olPixel.x,olPixel.y);} | |
| 695 | -return moPixel;},CLASS_NAME:"OpenLayers.Layer.EventPane"});OpenLayers.Layer.FixedZoomLevels=OpenLayers.Class({initialize:function(){},initResolutions:function(){var props=new Array('minZoomLevel','maxZoomLevel','numZoomLevels');for(var i=0;i<props.length;i++){var property=props[i];this[property]=(this.options[property]!=null)?this.options[property]:this.map[property];} | |
| 696 | -if((this.minZoomLevel==null)||(this.minZoomLevel<this.MIN_ZOOM_LEVEL)){this.minZoomLevel=this.MIN_ZOOM_LEVEL;} | |
| 697 | -var limitZoomLevels=this.MAX_ZOOM_LEVEL-this.minZoomLevel+1;if(this.numZoomLevels!=null){this.numZoomLevels=Math.min(this.numZoomLevels,limitZoomLevels);}else{if(this.maxZoomLevel!=null){var zoomDiff=this.maxZoomLevel-this.minZoomLevel+1;this.numZoomLevels=Math.min(zoomDiff,limitZoomLevels);}else{this.numZoomLevels=limitZoomLevels;}} | |
| 698 | -this.maxZoomLevel=this.minZoomLevel+this.numZoomLevels-1;if(this.RESOLUTIONS!=null){var resolutionsIndex=0;this.resolutions=[];for(var i=this.minZoomLevel;i<this.numZoomLevels;i++){this.resolutions[resolutionsIndex++]=this.RESOLUTIONS[i];}}},getResolution:function(){if(this.resolutions!=null){return OpenLayers.Layer.prototype.getResolution.apply(this,arguments);}else{var resolution=null;var viewSize=this.map.getSize();var extent=this.getExtent();if((viewSize!=null)&&(extent!=null)){resolution=Math.max(extent.getWidth()/viewSize.w,extent.getHeight()/viewSize.h);} | |
| 699 | -return resolution;}},getExtent:function(){var extent=null;var size=this.map.getSize();var tlPx=new OpenLayers.Pixel(0,0);var tlLL=this.getLonLatFromViewPortPx(tlPx);var brPx=new OpenLayers.Pixel(size.w,size.h);var brLL=this.getLonLatFromViewPortPx(brPx);if((tlLL!=null)&&(brLL!=null)){extent=new OpenLayers.Bounds(tlLL.lon,brLL.lat,brLL.lon,tlLL.lat);} | |
| 700 | -return extent;},getZoomForResolution:function(resolution){if(this.resolutions!=null){return OpenLayers.Layer.prototype.getZoomForResolution.apply(this,arguments);}else{var extent=OpenLayers.Layer.prototype.getExtent.apply(this,[resolution]);return this.getZoomForExtent(extent);}},getOLZoomFromMapObjectZoom:function(moZoom){var zoom=null;if(moZoom!=null){zoom=moZoom-this.minZoomLevel;} | |
| 701 | -return zoom;},getMapObjectZoomFromOLZoom:function(olZoom){var zoom=null;if(olZoom!=null){zoom=olZoom+this.minZoomLevel;} | |
| 702 | -return zoom;},CLASS_NAME:"FixedZoomLevels.js"});OpenLayers.Layer.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:false,initialize:function(name,url,params,options){var newArguments=arguments;newArguments=[name,options];OpenLayers.Layer.prototype.initialize.apply(this,newArguments);this.url=url;this.params=OpenLayers.Util.extend({},params);},destroy:function(){this.url=null;this.params=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.options);} | |
| 703 | -obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);return obj;},setUrl:function(newUrl){this.url=newUrl;},mergeNewParams:function(newParams){this.params=OpenLayers.Util.extend(this.params,newParams);this.redraw();},selectUrl:function(paramString,urls){var product=1;for(var i=0;i<paramString.length;i++){product*=paramString.charCodeAt(i)*this.URL_HASH_FACTOR;product-=Math.floor(product);} | |
| 704 | -return urls[Math.floor(product*urls.length)];},getFullRequestString:function(newParams,altUrl){var url=altUrl||this.url;var allParams=OpenLayers.Util.extend({},this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var paramsString=OpenLayers.Util.getParameterString(allParams);if(url instanceof Array){url=this.selectUrl(paramsString,url);} | |
| 705 | -var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}} | |
| 706 | -paramsString=OpenLayers.Util.getParameterString(allParams);var requestString=url;if(paramsString!=""){var lastServerChar=url.charAt(url.length-1);if((lastServerChar=="&")||(lastServerChar=="?")){requestString+=paramsString;}else{if(url.indexOf('?')==-1){requestString+='?'+paramsString;}else{requestString+='&'+paramsString;}}} | |
| 707 | -return requestString;},CLASS_NAME:"OpenLayers.Layer.HTTPRequest"});OpenLayers.Layer.Image=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:true,url:null,extent:null,size:null,tile:null,aspectRatio:null,initialize:function(name,url,extent,size,options){this.url=url;this.extent=extent;this.size=size;OpenLayers.Layer.prototype.initialize.apply(this,[name,options]);this.aspectRatio=(this.extent.getHeight()/this.size.h)/(this.extent.getWidth()/this.size.w);},destroy:function(){if(this.tile){this.tile.destroy();this.tile=null;} | |
| 708 | -OpenLayers.Layer.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Image(this.name,this.url,this.extent,this.size,this.options);} | |
| 709 | -obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);return obj;},setMap:function(map){if(this.options.maxResolution==null){this.options.maxResolution=this.aspectRatio*this.extent.getWidth()/this.size.w;} | |
| 710 | -OpenLayers.Layer.prototype.setMap.apply(this,arguments);},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var firstRendering=(this.tile==null);if(zoomChanged||firstRendering){this.setTileSize();var ul=new OpenLayers.LonLat(this.extent.left,this.extent.top);var ulPx=this.map.getLayerPxFromLonLat(ul);if(firstRendering){this.tile=new OpenLayers.Tile.Image(this,ulPx,this.extent,null,this.tileSize);}else{this.tile.size=this.tileSize.clone();this.tile.position=ulPx.clone();} | |
| 711 | -this.tile.draw();}},setTileSize:function(){var tileWidth=this.extent.getWidth()/this.map.getResolution();var tileHeight=this.extent.getHeight()/this.map.getResolution();this.tileSize=new OpenLayers.Size(tileWidth,tileHeight);},setUrl:function(newUrl){this.url=newUrl;this.tile.draw();},getURL:function(bounds){return this.url;},CLASS_NAME:"OpenLayers.Layer.Image"});OpenLayers.Layer.Markers=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:false,markers:null,drawn:false,initialize:function(name,options){OpenLayers.Layer.prototype.initialize.apply(this,arguments);this.markers=[];},destroy:function(){this.clearMarkers();this.markers=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(zoomChanged||!this.drawn){for(i=0;i<this.markers.length;i++){this.drawMarker(this.markers[i]);} | |
| 712 | -this.drawn=true;}},addMarker:function(marker){this.markers.push(marker);if(this.map&&this.map.getExtent()){marker.map=this.map;this.drawMarker(marker);}},removeMarker:function(marker){OpenLayers.Util.removeItem(this.markers,marker);if((marker.icon!=null)&&(marker.icon.imageDiv!=null)&&(marker.icon.imageDiv.parentNode==this.div)){this.div.removeChild(marker.icon.imageDiv);marker.drawn=false;}},clearMarkers:function(){if(this.markers!=null){while(this.markers.length>0){this.removeMarker(this.markers[0]);}}},drawMarker:function(marker){var px=this.map.getLayerPxFromLonLat(marker.lonlat);if(px==null){marker.display(false);}else{var markerImg=marker.draw(px);if(!marker.drawn){this.div.appendChild(markerImg);marker.drawn=true;}}},getDataExtent:function(){var maxExtent=null;if(this.markers&&(this.markers.length>0)){var maxExtent=new OpenLayers.Bounds();for(var i=0;i<this.markers.length;i++){var marker=this.markers[i];maxExtent.extend(marker.lonlat);}} | |
| 713 | -return maxExtent;},CLASS_NAME:"OpenLayers.Layer.Markers"});OpenLayers.Layer.SphericalMercator={getExtent:function(){var extent=null;if(this.sphericalMercator){extent=this.map.calculateBounds();}else{extent=OpenLayers.Layer.FixedZoomLevels.prototype.getExtent.apply(this);} | |
| 714 | -return extent;},initMercatorParameters:function(){this.RESOLUTIONS=[];var maxResolution=156543.0339;for(var zoom=0;zoom<=this.MAX_ZOOM_LEVEL;++zoom){this.RESOLUTIONS[zoom]=maxResolution/Math.pow(2,zoom);} | |
| 715 | -this.units="m";this.projection="EPSG:900913";},forwardMercator:function(lon,lat){var x=lon*20037508.34/180;var y=Math.log(Math.tan((90+lat)*Math.PI/360))/(Math.PI/180);y=y*20037508.34/180;return new OpenLayers.LonLat(x,y);},inverseMercator:function(x,y){var lon=(x/20037508.34)*180;var lat=(y/20037508.34)*180;lat=180/Math.PI*(2*Math.atan(Math.exp(lat*Math.PI/180))-Math.PI/2);return new OpenLayers.LonLat(lon,lat);}};OpenLayers.Control.DrawFeature=OpenLayers.Class(OpenLayers.Control,{layer:null,callbacks:null,featureAdded:function(){},handlerOptions:null,initialize:function(layer,handler,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.callbacks=OpenLayers.Util.extend({done:this.drawFeature},this.callbacks);this.layer=layer;this.handler=new handler(this,this.callbacks,this.handlerOptions);},drawFeature:function(geometry){var feature=new OpenLayers.Feature.Vector(geometry);this.layer.addFeatures([feature]);this.featureAdded(feature);},CLASS_NAME:"OpenLayers.Control.DrawFeature"});OpenLayers.Control.SelectFeature=OpenLayers.Class(OpenLayers.Control,{multiple:false,hover:false,onSelect:function(){},onUnselect:function(){},geometryTypes:null,layer:null,callbacks:null,selectStyle:OpenLayers.Feature.Vector.style['select'],handler:null,initialize:function(layer,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.layer=layer;this.callbacks=OpenLayers.Util.extend({click:this.clickFeature,over:this.overFeature,out:this.outFeature},this.callbacks);var handlerOptions={geometryTypes:this.geometryTypes};this.handler=new OpenLayers.Handler.Feature(this,layer,this.callbacks,handlerOptions);},clickFeature:function(feature){if(this.hover){return;} | |
| 716 | -if(this.multiple){if(OpenLayers.Util.indexOf(this.layer.selectedFeatures,feature)>-1){this.unselect(feature);}else{this.select(feature);}}else{if(OpenLayers.Util.indexOf(this.layer.selectedFeatures,feature)>-1){this.unselect(feature);}else{if(this.layer.selectedFeatures){for(var i=0;i<this.layer.selectedFeatures.length;i++){this.unselect(this.layer.selectedFeatures[i]);}} | |
| 717 | -this.select(feature);}}},overFeature:function(feature){if(!this.hover){return;} | |
| 718 | -if(!(OpenLayers.Util.indexOf(this.layer.selectedFeatures,feature)>-1)){this.select(feature);}},outFeature:function(feature){if(!this.hover){return;} | |
| 719 | -this.unselect(feature);},select:function(feature){if(feature.originalStyle==null){feature.originalStyle=feature.style;} | |
| 720 | -this.layer.selectedFeatures.push(feature);feature.style=this.selectStyle;this.layer.drawFeature(feature);this.onSelect(feature);},unselect:function(feature){if(feature.originalStyle!=null){feature.style=feature.originalStyle;} | |
| 721 | -this.layer.drawFeature(feature);OpenLayers.Util.removeItem(this.layer.selectedFeatures,feature);this.onUnselect(feature);},setMap:function(map){this.handler.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.SelectFeature"});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(position){if(position instanceof OpenLayers.Bounds){var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.left,position.bottom));var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.right,position.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(position),this.map.getZoom()+1);}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(options){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,[options]);},read:function(wkt){var features,type,str;var matches=this.regExes.typeStr.exec(wkt);if(matches){type=matches[1].toLowerCase();str=matches[2];if(this.parse[type]){features=this.parse[type].apply(this,[str]);}} | |
| 722 | -return features;},write:function(features){var collection,geometry,type,data,isCollection;if(features.constructor==Array){collection=features;isCollection=true;}else{collection=[features];isCollection=false;} | |
| 723 | -var pieces=[];if(isCollection){pieces.push('GEOMETRYCOLLECTION(');} | |
| 724 | -for(var i=0;i<collection.length;++i){if(isCollection&&i>0){pieces.push(',');} | |
| 725 | -geometry=collection[i].geometry;type=geometry.CLASS_NAME.split('.')[2].toLowerCase();if(!this.extract[type]){return null;} | |
| 726 | -data=this.extract[type].apply(this,[geometry]);pieces.push(type.toUpperCase()+'('+data+')');} | |
| 727 | -if(isCollection){pieces.push(')');} | |
| 728 | -return pieces.join('');},extract:{'point':function(point){return point.x+' '+point.y;},'multipoint':function(multipoint){var array=[];for(var i=0;i<multipoint.components.length;++i){array.push(this.extract.point.apply(this,[multipoint.components[i]]));} | |
| 729 | -return array.join(',');},'linestring':function(linestring){var array=[];for(var i=0;i<linestring.components.length;++i){array.push(this.extract.point.apply(this,[linestring.components[i]]));} | |
| 730 | -return array.join(',');},'multilinestring':function(multilinestring){var array=[];for(var i=0;i<multilinestring.components.length;++i){array.push('('+ | |
| 731 | -this.extract.linestring.apply(this,[multilinestring.components[i]])+')');} | |
| 732 | -return array.join(',');},'polygon':function(polygon){var array=[];for(var i=0;i<polygon.components.length;++i){array.push('('+ | |
| 733 | -this.extract.linestring.apply(this,[polygon.components[i]])+')');} | |
| 734 | -return array.join(',');},'multipolygon':function(multipolygon){var array=[];for(var i=0;i<multipolygon.components.length;++i){array.push('('+ | |
| 735 | -this.extract.polygon.apply(this,[multipolygon.components[i]])+')');} | |
| 736 | -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 components=[];for(var i=0;i<points.length;++i){components.push(this.parse.point.apply(this,[points[i]]).geometry);} | |
| 737 | -return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(components));},'linestring':function(str){var points=OpenLayers.String.trim(str).split(',');var components=[];for(var i=0;i<points.length;++i){components.push(this.parse.point.apply(this,[points[i]]).geometry);} | |
| 738 | -return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(components));},'multilinestring':function(str){var line;var lines=OpenLayers.String.trim(str).split(this.regExes.parenComma);var components=[];for(var i=0;i<lines.length;++i){line=lines[i].replace(this.regExes.trimParens,'$1');components.push(this.parse.linestring.apply(this,[line]).geometry);} | |
| 739 | -return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(components));},'polygon':function(str){var ring,linestring,linearring;var rings=OpenLayers.String.trim(str).split(this.regExes.parenComma);var components=[];for(var i=0;i<rings.length;++i){ring=rings[i].replace(this.regExes.trimParens,'$1');linestring=this.parse.linestring.apply(this,[ring]).geometry;linearring=new OpenLayers.Geometry.LinearRing(linestring.components) | |
| 740 | -components.push(linearring);} | |
| 741 | -return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(components));},'multipolygon':function(str){var polygon;var polygons=OpenLayers.String.trim(str).split(this.regExes.doubleParenComma);var components=[];for(var i=0;i<polygons.length;++i){polygon=polygons[i].replace(this.regExes.trimParens,'$1');components.push(this.parse.polygon.apply(this,[polygon]).geometry);} | |
| 742 | -return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(components));},'geometrycollection':function(str){str=str.replace(/,\s*([A-Za-z])/g,'|$1');var wktArray=OpenLayers.String.trim(str).split('|');var components=[];for(var i=0;i<wktArray.length;++i){components.push(OpenLayers.Format.WKT.prototype.read.apply(this,[wktArray[i]]));} | |
| 743 | -return components;}},CLASS_NAME:"OpenLayers.Format.WKT"});OpenLayers.Layer.Boxes=OpenLayers.Class(OpenLayers.Layer.Markers,{initialize:function(name,options){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments);},drawMarker:function(marker){var bounds=marker.bounds;var topleft=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(bounds.left,bounds.top));var botright=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(bounds.right,bounds.bottom));if(botright==null||topleft==null){marker.display(false);}else{var sz=new OpenLayers.Size(Math.max(1,botright.x-topleft.x),Math.max(1,botright.y-topleft.y));var markerDiv=marker.draw(topleft,sz);if(!marker.drawn){this.div.appendChild(markerDiv);marker.drawn=true;}}},removeMarker:function(marker){OpenLayers.Util.removeItem(this.markers,marker);if((marker.div!=null)&&(marker.div.parentNode==this.div)){this.div.removeChild(marker.div);}},CLASS_NAME:"OpenLayers.Layer.Boxes"});OpenLayers.Layer.GeoRSS=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,selectedFeature:null,icon:null,popupSize:null,useFeedTitle:true,initialize:function(name,location,options){OpenLayers.Layer.Markers.prototype.initialize.apply(this,[name,options]);this.location=location;this.features=[];this.events.triggerEvent("loadstart");OpenLayers.loadURL(location,null,this,this.parseData);},destroy:function(){this.clearFeatures();this.features=null;OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);},parseData:function(ajaxRequest){var doc=ajaxRequest.responseXML;if(!doc||ajaxRequest.fileType!="XML"){doc=OpenLayers.parseXMLString(ajaxRequest.responseText);} | |
| 744 | -if(this.useFeedTitle){var name=null;try{name=doc.getElementsByTagNameNS('*','title')[0].firstChild.nodeValue;} | |
| 745 | -catch(e){name=doc.getElementsByTagName('title')[0].firstChild.nodeValue;} | |
| 746 | -if(name){this.setName(name);}} | |
| 747 | -var itemlist=null;try{itemlist=doc.getElementsByTagNameNS('*','item');} | |
| 748 | -catch(e){itemlist=doc.getElementsByTagName('item');} | |
| 749 | -if(itemlist.length==0){try{itemlist=doc.getElementsByTagNameNS('*','entry');} | |
| 750 | -catch(e){itemlist=doc.getElementsByTagName('entry');}} | |
| 751 | -for(var i=0;i<itemlist.length;i++){var data={};var point=OpenLayers.Util.getNodes(itemlist[i],'georss:point');var lat=OpenLayers.Util.getNodes(itemlist[i],'geo:lat');var lon=OpenLayers.Util.getNodes(itemlist[i],'geo:long');if(point.length>0){var location=point[0].firstChild.nodeValue.split(" ");if(location.length!=2){var location=point[0].firstChild.nodeValue.split(",");}}else if(lat.length>0&&lon.length>0){var location=[parseFloat(lat[0].firstChild.nodeValue),parseFloat(lon[0].firstChild.nodeValue)];}else{continue;} | |
| 752 | -location=new OpenLayers.LonLat(parseFloat(location[1]),parseFloat(location[0]));var title="Untitled";try{title=OpenLayers.Util.getNodes(itemlist[i],"title")[0].firstChild.nodeValue;} | |
| 753 | -catch(e){title="Untitled";} | |
| 754 | -var descr_nodes=null;try{descr_nodes=itemlist[i].getElementsByTagNameNS("*","description");} | |
| 755 | -catch(e){descr_nodes=itemlist[i].getElementsByTagName("description");} | |
| 756 | -if(descr_nodes.length==0){try{descr_nodes=itemlist[i].getElementsByTagNameNS("*","summary");} | |
| 757 | -catch(e){descr_nodes=itemlist[i].getElementsByTagName("summary");}} | |
| 758 | -var description="No description.";try{description=descr_nodes[0].firstChild.nodeValue;} | |
| 759 | -catch(e){description="No description.";} | |
| 760 | -try{var link=OpenLayers.Util.getNodes(itemlist[i],"link")[0].firstChild.nodeValue;} | |
| 761 | -catch(e){try{var link=OpenLayers.Util.getNodes(itemlist[i],"link")[0].getAttribute("href");} | |
| 762 | -catch(e){}} | |
| 763 | -data.icon=this.icon==null?OpenLayers.Marker.defaultIcon():this.icon.clone();data.popupSize=this.popupSize?this.popupSize.clone():new OpenLayers.Size(250,120);if((title!=null)&&(description!=null)){contentHTML='<div class="olLayerGeoRSSClose">[x]</div>';contentHTML+='<div class="olLayerGeoRSSTitle">';if(link)contentHTML+='<a class="link" href="'+link+'" target="_blank">';contentHTML+=title;if(link)contentHTML+='</a>';contentHTML+='</div>';contentHTML+='<div style="" class="olLayerGeoRSSDescription">';contentHTML+=description;contentHTML+='</div>';data['popupContentHTML']=contentHTML;} | |
| 764 | -var feature=new OpenLayers.Feature(this,location,data);this.features.push(feature);var marker=feature.createMarker();marker.events.register('click',feature,this.markerClick);this.addMarker(marker);} | |
| 765 | -this.events.triggerEvent("loadend");},markerClick:function(evt){sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0;i<this.layer.map.popups.length;i++){this.layer.map.removePopup(this.layer.map.popups[i]);} | |
| 766 | -if(!sameMarkerClicked){var popup=this.createPopup();OpenLayers.Event.observe(popup.div,"click",OpenLayers.Function.bind(function(){for(var i=0;i<this.layer.map.popups.length;i++){this.layer.map.removePopup(this.layer.map.popups[i]);}},this));this.layer.map.addPopup(popup);} | |
| 767 | -OpenLayers.Event.stop(evt);},clearFeatures:function(){if(this.features!=null){while(this.features.length>0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.GeoRSS"});OpenLayers.Layer.Google=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:19,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031,0.00000536441802978515,0.00000268220901489257],type:null,sphericalMercator:false,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.addContainerPxFunction();if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();}},loadMapObject:function(){try{this.mapObject=new GMap2(this.div);var poweredBy=this.div.lastChild;this.div.removeChild(poweredBy);this.pane.appendChild(poweredBy);poweredBy.className="olLayerGooglePoweredBy gmnoprint";poweredBy.style.left="";poweredBy.style.bottom="";var termsOfUse=this.div.lastChild;this.div.removeChild(termsOfUse);this.pane.appendChild(termsOfUse);termsOfUse.className="olLayerGoogleCopyright";termsOfUse.style.right="";termsOfUse.style.bottom="";}catch(e){}},setMap:function(map){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);if(this.type!=null){this.map.events.register("moveend",this,this.setMapType);}},setMapType:function(){if(this.mapObject.getCenter()!=null){this.mapObject.setMapType(this.type);this.map.events.unregister("moveend",this,this.setMapType);}},onMapResize:function(){this.mapObject.checkResize();},getOLBoundsFromMapObjectBounds:function(moBounds){var olBounds=null;if(moBounds!=null){var sw=moBounds.getSouthWest();var ne=moBounds.getNorthEast();if(this.sphericalMercator){sw=this.forwardMercator(sw.lng(),sw.lat());ne=this.forwardMercator(ne.lng(),ne.lat());}else{sw=new OpenLayers.LonLat(sw.lng(),sw.lat());ne=new OpenLayers.LonLat(ne.lng(),ne.lat());} | |
| 768 | -olBounds=new OpenLayers.Bounds(sw.lon,sw.lat,ne.lon,ne.lat);} | |
| 769 | -return olBounds;},getMapObjectBoundsFromOLBounds:function(olBounds){var moBounds=null;if(olBounds!=null){var sw=this.sphericalMercator?this.inverseMercator(olBounds.bottom,olBounds.left):new OpenLayers.LonLat(olBounds.bottom,olBounds.left);var ne=this.sphericalMercator?this.inverseMercator(olBounds.top,olBounds.right):new OpenLayers.LonLat(olBounds.top,olBounds.right);moBounds=new GLatLngBounds(new GLatLng(sw.lat,sw.lon),new GLatLng(ne.lat,ne.lon));} | |
| 770 | -return moBounds;},addContainerPxFunction:function(){if((typeof GMap2!="undefined")&&!GMap2.prototype.fromLatLngToContainerPixel){GMap2.prototype.fromLatLngToContainerPixel=function(gLatLng){var gPoint=this.fromLatLngToDivPixel(gLatLng);var div=this.getContainer().firstChild.firstChild;gPoint.x+=div.offsetLeft;gPoint.y+=div.offsetTop;return gPoint;};}},getWarningHTML:function(){var html="";html+="The Google Layer was unable to load correctly.<br>";html+="<br>";html+="To get rid of this message, select a new BaseLayer " | |
| 771 | -html+="in the layer switcher in the upper-right corner.<br>";html+="<br>";html+="Most likely, this is because the Google Maps library";html+=" script was either not included, or does not contain the";html+=" correct API key for your site.<br>";html+="<br>";html+="Developers: For help getting this working correctly, ";html+="<a href='http://trac.openlayers.org/wiki/Google' " | |
| 772 | -html+="target='_blank'>";html+="click here";html+="</a>";return html;},setMapObjectCenter:function(center,zoom){this.mapObject.setCenter(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCenter();},getMapObjectZoom:function(){return this.mapObject.getZoom();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){return this.mapObject.fromContainerPixelToLatLng(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.fromLatLngToContainerPixel(moLonLat);},getMapObjectZoomFromMapObjectBounds:function(moBounds){return this.mapObject.getBoundsZoomLevel(moBounds);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lng(),moLonLat.lat()).lon:moLonLat.lng();},getLatitudeFromMapObjectLonLat:function(moLonLat){var lat=this.sphericalMercator?this.forwardMercator(moLonLat.lng(),moLonLat.lat()).lat:moLonLat.lat();return lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var gLatLng;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);gLatLng=new GLatLng(lonlat.lat,lonlat.lon);}else{gLatLng=new GLatLng(lat,lon);} | |
| 773 | -return gLatLng;},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},getMapObjectPixelFromXY:function(x,y){return new GPoint(x,y);},CLASS_NAME:"OpenLayers.Layer.Google"});OpenLayers.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,grid:null,singleTile:false,ratio:1.5,buffer:2,numLoadingTiles:0,initialize:function(name,url,params,options){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.events.addEventType("tileloaded");this.grid=[];},destroy:function(){this.clearGrid();this.grid=null;this.tileSize=null;OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments);},clearGrid:function(){if(this.grid){for(var iRow=0;iRow<this.grid.length;iRow++){var row=this.grid[iRow];for(var iCol=0;iCol<row.length;iCol++){var tile=row[iCol];this.removeTileMonitoringHooks(tile);tile.destroy();}} | |
| 774 | -this.grid=[];}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.options);} | |
| 775 | -obj=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[obj]);if(this.tileSize!=null){obj.tileSize=this.tileSize.clone();} | |
| 776 | -obj.grid=[];return obj;},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);bounds=bounds||this.map.getExtent();if(bounds!=null){var forceReTile=!this.grid.length||zoomChanged;var tilesBounds=this.getTilesBounds();if(this.singleTile){if(forceReTile||(!dragging&&!tilesBounds.containsBounds(bounds))){this.initSingleTile(bounds);}}else{if(forceReTile||!tilesBounds.containsBounds(bounds,true)){this.initGriddedTiles(bounds);}else{this.moveGriddedTiles(bounds);}}}},setTileSize:function(size){if(this.singleTile){var size=this.map.getSize().clone();size.h=parseInt(size.h*this.ratio);size.w=parseInt(size.w*this.ratio);} | |
| 777 | -OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[size]);},getGridBounds:function(){var msg="The getGridBounds() function is deprecated. It will be "+"removed in 3.0. Please use getTilesBounds() instead.";OpenLayers.Console.warn(msg);return this.getTilesBounds();},getTilesBounds:function(){var bounds=null;if(this.grid.length){var bottom=this.grid.length-1;var bottomLeftTile=this.grid[bottom][0];var right=this.grid[0].length-1;var topRightTile=this.grid[0][right];bounds=new OpenLayers.Bounds(bottomLeftTile.bounds.left,bottomLeftTile.bounds.bottom,topRightTile.bounds.right,topRightTile.bounds.top);} | |
| 778 | -return bounds;},initSingleTile:function(bounds){var center=bounds.getCenterLonLat();var tileWidth=bounds.getWidth()*this.ratio;var tileHeight=bounds.getHeight()*this.ratio;var tileBounds=new OpenLayers.Bounds(center.lon-(tileWidth/2),center.lat-(tileHeight/2),center.lon+(tileWidth/2),center.lat+(tileHeight/2));var ul=new OpenLayers.LonLat(tileBounds.left,tileBounds.top);var px=this.map.getLayerPxFromLonLat(ul);if(!this.grid.length){this.grid[0]=[];} | |
| 779 | -var tile=this.grid[0][0];if(!tile){tile=this.addTile(tileBounds,px);this.addTileMonitoringHooks(tile);tile.draw();this.grid[0][0]=tile;}else{tile.moveTo(tileBounds,px);} | |
| 780 | -this.removeExcessTiles(1,1);},initGriddedTiles:function(bounds){var viewSize=this.map.getSize();var minRows=Math.ceil(viewSize.h/this.tileSize.h)+ | |
| 781 | -Math.max(1,2*this.buffer);var minCols=Math.ceil(viewSize.w/this.tileSize.w)+ | |
| 782 | -Math.max(1,2*this.buffer);var extent=this.map.getMaxExtent();var resolution=this.map.getResolution();var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left-extent.left;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=extent.left+tilecol*tilelon;var offsetlat=bounds.top-(extent.bottom+tilelat);var tilerow=Math.ceil(offsetlat/tilelat)+this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=-tilerowremain*this.tileSize.h;var tileoffsetlat=extent.bottom+tilerow*tilelat;tileoffsetx=Math.round(tileoffsetx);tileoffsety=Math.round(tileoffsety);this.origin=new OpenLayers.Pixel(tileoffsetx,tileoffsety);var startX=tileoffsetx;var startLon=tileoffsetlon;var rowidx=0;do{var row=this.grid[rowidx++];if(!row){row=[];this.grid.push(row);} | |
| 783 | -tileoffsetlon=startLon;tileoffsetx=startX;var colidx=0;do{var tileBounds=new OpenLayers.Bounds(tileoffsetlon,tileoffsetlat,tileoffsetlon+tilelon,tileoffsetlat+tilelat);var x=tileoffsetx;x-=parseInt(this.map.layerContainerDiv.style.left);var y=tileoffsety;y-=parseInt(this.map.layerContainerDiv.style.top);var px=new OpenLayers.Pixel(x,y);var tile=row[colidx++];if(!tile){tile=this.addTile(tileBounds,px);this.addTileMonitoringHooks(tile);row.push(tile);}else{tile.moveTo(tileBounds,px,false);} | |
| 784 | -tileoffsetlon+=tilelon;tileoffsetx+=this.tileSize.w;}while((tileoffsetlon<=bounds.right+tilelon*this.buffer)||colidx<minCols) | |
| 785 | -tileoffsetlat-=tilelat;tileoffsety+=this.tileSize.h;}while((tileoffsetlat>=bounds.bottom-tilelat*this.buffer)||rowidx<minRows) | |
| 786 | -this.removeExcessTiles(rowidx,colidx);this.spiralTileLoad();},spiralTileLoad:function(){var tileQueue=[];var directions=["right","down","left","up"];var iRow=0;var iCell=-1;var direction=OpenLayers.Util.indexOf(directions,"right");var directionsTried=0;while(directionsTried<directions.length){var testRow=iRow;var testCell=iCell;switch(directions[direction]){case"right":testCell++;break;case"down":testRow++;break;case"left":testCell--;break;case"up":testRow--;break;} | |
| 787 | -var tile=null;if((testRow<this.grid.length)&&(testRow>=0)&&(testCell<this.grid[0].length)&&(testCell>=0)){tile=this.grid[testRow][testCell];} | |
| 788 | -if((tile!=null)&&(!tile.queued)){tileQueue.unshift(tile);tile.queued=true;directionsTried=0;iRow=testRow;iCell=testCell;}else{direction=(direction+1)%4;directionsTried++;}} | |
| 789 | -for(var i=0;i<tileQueue.length;i++){var tile=tileQueue[i] | |
| 790 | -tile.draw();tile.queued=false;}},addTile:function(bounds,position){},addTileMonitoringHooks:function(tile){tile.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.triggerEvent("loadstart");} | |
| 791 | -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 tlLayer=this.grid[0][0].position;var tlViewPort=this.map.getViewPortPxFromLayerPx(tlLayer);if(tlViewPort.x>-this.tileSize.w*(buffer-1)){this.shiftColumn(true);}else if(tlViewPort.x<-this.tileSize.w*buffer){this.shiftColumn(false);}else if(tlViewPort.y>-this.tileSize.h*(buffer-1)){this.shiftRow(true);}else if(tlViewPort.y<-this.tileSize.h*buffer){this.shiftRow(false);}else{break;}};if(this.buffer==0){for(var r=0,rl=this.grid.length;r<rl;r++){var row=this.grid[r];for(var c=0,cl=row.length;c<cl;c++){var tile=row[c];if(!tile.drawn&&tile.bounds.intersectsBounds(bounds,false)){tile.draw();}}}}},shiftRow:function(prepend){var modelRowIndex=(prepend)?0:(this.grid.length-1);var modelRow=this.grid[modelRowIndex];var resolution=this.map.getResolution();var deltaY=(prepend)?-this.tileSize.h:this.tileSize.h;var deltaLat=resolution*-deltaY;var row=(prepend)?this.grid.pop():this.grid.shift();for(var i=0;i<modelRow.length;i++){var modelTile=modelRow[i];var bounds=modelTile.bounds.clone();var position=modelTile.position.clone();bounds.bottom=bounds.bottom+deltaLat;bounds.top=bounds.top+deltaLat;position.y=position.y+deltaY;row[i].moveTo(bounds,position);} | |
| 792 | -if(prepend){this.grid.unshift(row);}else{this.grid.push(row);}},shiftColumn:function(prepend){var deltaX=(prepend)?-this.tileSize.w:this.tileSize.w;var resolution=this.map.getResolution();var deltaLon=resolution*deltaX;for(var i=0;i<this.grid.length;i++){var row=this.grid[i];var modelTileIndex=(prepend)?0:(row.length-1);var modelTile=row[modelTileIndex];var bounds=modelTile.bounds.clone();var position=modelTile.position.clone();bounds.left=bounds.left+deltaLon;bounds.right=bounds.right+deltaLon;position.x=position.x+deltaX;var tile=prepend?this.grid[i].pop():this.grid[i].shift() | |
| 793 | -tile.moveTo(bounds,position);if(prepend){this.grid[i].unshift(tile);}else{this.grid[i].push(tile);}}},removeExcessTiles:function(rows,columns){while(this.grid.length>rows){var row=this.grid.pop();for(var i=0,l=row.length;i<l;i++){var tile=row[i];this.removeTileMonitoringHooks(tile) | |
| 794 | -tile.destroy();}} | |
| 795 | -while(this.grid[0].length>columns){for(var i=0,l=this.grid.length;i<l;i++){var row=this.grid[i];var tile=row.pop();this.removeTileMonitoringHooks(tile);tile.destroy();}}},onMapResize:function(){if(this.singleTile){this.clearGrid();this.setTileSize();this.initSingleTile(this.map.getExtent());}},getTileBounds:function(viewPortPx){var maxExtent=this.map.getMaxExtent();var resolution=this.getResolution();var tileMapWidth=resolution*this.tileSize.w;var tileMapHeight=resolution*this.tileSize.h;var mapPoint=this.getLonLatFromViewPortPx(viewPortPx);var tileLeft=maxExtent.left+(tileMapWidth*Math.floor((mapPoint.lon- | |
| 796 | -maxExtent.left)/tileMapWidth));var tileBottom=maxExtent.bottom+(tileMapHeight*Math.floor((mapPoint.lat- | |
| 797 | -maxExtent.bottom)/tileMapHeight));return new OpenLayers.Bounds(tileLeft,tileBottom,tileLeft+tileMapWidth,tileBottom+tileMapHeight);},CLASS_NAME:"OpenLayers.Layer.Grid"});OpenLayers.Layer.MultiMap=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();this.RESOLUTIONS.unshift(10);}},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div);}catch(e){}},getWarningHTML:function(){var html="";html+="The MM Layer was unable to load correctly.<br>";html+="<br>";html+="To get rid of this message, select a new BaseLayer " | |
| 798 | -html+="in the layer switcher in the upper-right corner.<br>";html+="<br>";html+="Most likely, this is because the MM library";html+=" script was either not correctly included.<br>";html+="<br>";html+="Demmlopers: For help getting this working correctly, ";html+="<a href='http://trac.openlayers.org/wiki/MultiMap' " | |
| 799 | -html+="target='_blank'>";html+="click here";html+="</a>";return html;},setMapObjectCenter:function(center,zoom){this.mapObject.goToPosition(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition();},getMapObjectZoom:function(){return this.mapObject.getZoomFactor();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){moPixel.x=moPixel.x-(this.map.getSize().w/2);moPixel.y=moPixel.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.geoPosToContainerPixels(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lon:moLonLat.lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.lon,moLonLat.lat).lat:moLonLat.lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var mmLatLon;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);mmLatLon=new MMLatLon(lonlat.lat,lonlat.lon);}else{mmLatLon=new MMLatLon(lat,lon);} | |
| 800 | -return mmLatLon;},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},getMapObjectPixelFromXY:function(x,y){return new MMPoint(x,y);},CLASS_NAME:"OpenLayers.Layer.MultiMap"});OpenLayers.Layer.Text=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,selectedFeature:null,initialize:function(name,options){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments);this.features=new Array();if(this.location!=null){var onFail=function(e){this.events.triggerEvent("loadend");};this.events.triggerEvent("loadstart");OpenLayers.loadURL(this.location,null,this,this.parseData,onFail);}},destroy:function(){this.clearFeatures();this.features=null;OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);},parseData:function(ajaxRequest){var text=ajaxRequest.responseText;var lines=text.split('\n');var columns;for(var lcv=0;lcv<(lines.length-1);lcv++){var currLine=lines[lcv].replace(/^\s*/,'').replace(/\s*$/,'');if(currLine.charAt(0)!='#'){if(!columns){columns=currLine.split('\t');}else{var vals=currLine.split('\t');var location=new OpenLayers.LonLat(0,0);var title;var url;var icon,iconSize,iconOffset,overflow;var set=false;for(var valIndex=0;valIndex<vals.length;valIndex++){if(vals[valIndex]){if(columns[valIndex]=='point'){var coords=vals[valIndex].split(',');location.lat=parseFloat(coords[0]);location.lon=parseFloat(coords[1]);set=true;}else if(columns[valIndex]=='lat'){location.lat=parseFloat(vals[valIndex]);set=true;}else if(columns[valIndex]=='lon'){location.lon=parseFloat(vals[valIndex]);set=true;}else if(columns[valIndex]=='title') | |
| 801 | -title=vals[valIndex];else if(columns[valIndex]=='image'||columns[valIndex]=='icon') | |
| 802 | -url=vals[valIndex];else if(columns[valIndex]=='iconSize'){var size=vals[valIndex].split(',');iconSize=new OpenLayers.Size(parseFloat(size[0]),parseFloat(size[1]));}else if(columns[valIndex]=='iconOffset'){var offset=vals[valIndex].split(',');iconOffset=new OpenLayers.Pixel(parseFloat(offset[0]),parseFloat(offset[1]));}else if(columns[valIndex]=='title'){title=vals[valIndex];}else if(columns[valIndex]=='description'){description=vals[valIndex];}else if(columns[valIndex]=='overflow'){overflow=vals[valIndex];}}} | |
| 803 | -if(set){var data={};if(url!=null){data.icon=new OpenLayers.Icon(url,iconSize,iconOffset);}else{data.icon=OpenLayers.Marker.defaultIcon();if(iconSize!=null){data.icon.setSize(iconSize);}} | |
| 804 | -if((title!=null)&&(description!=null)){data['popupContentHTML']='<h2>'+title+'</h2><p>'+description+'</p>';} | |
| 805 | -data['overflow']=overflow||"auto";var feature=new OpenLayers.Feature(this,location,data);this.features.push(feature);var marker=feature.createMarker();if((title!=null)&&(description!=null)){marker.events.register('click',feature,this.markerClick);} | |
| 806 | -this.addMarker(marker);}}}} | |
| 807 | -this.events.triggerEvent("loadend");},markerClick:function(evt){var sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0;i<this.layer.map.popups.length;i++){this.layer.map.removePopup(this.layer.map.popups[i]);} | |
| 808 | -if(!sameMarkerClicked){this.layer.map.addPopup(this.createPopup());} | |
| 809 | -OpenLayers.Event.stop(evt);},clearFeatures:function(){if(this.features!=null){while(this.features.length>0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.Text"});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,options){var defaultStyle=OpenLayers.Feature.Vector.style['default'];this.style=OpenLayers.Util.extend({},defaultStyle);OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(!this.renderer||!this.renderer.supported()){this.assignRenderer();} | |
| 810 | -if(!this.renderer||!this.renderer.supported()){this.renderer=null;this.displayError();} | |
| 811 | -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();} | |
| 812 | -this.renderer=null;this.geometryType=null;this.drawn=null;},assignRenderer:function(){for(var i=0;i<this.renderers.length;i++){var rendererClass=OpenLayers.Renderer[this.renderers[i]];if(rendererClass&&rendererClass.prototype.supported()){this.renderer=new rendererClass(this.div);break;}}},displayError:function(){if(this.reportError){var message="Your browser does not support vector rendering. "+"Currently supported renderers are:\n";message+=this.renderers.join("\n");alert(message);}},setMap:function(map){OpenLayers.Layer.prototype.setMap.apply(this,arguments);if(!this.renderer){this.map.removeLayer(this);}else{this.renderer.map=this.map;this.renderer.setSize(this.map.getSize());}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);this.renderer.setSize(this.map.getSize());},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(!dragging){this.div.style.left=-parseInt(this.map.layerContainerDiv.style.left)+"px";this.div.style.top=-parseInt(this.map.layerContainerDiv.style.top)+"px";var extent=this.map.getExtent();this.renderer.setExtent(extent);} | |
| 813 | -if(!this.drawn||zoomChanged){this.drawn=true;for(var i=0;i<this.features.length;i++){var feature=this.features[i];this.drawFeature(feature);}}},addFeatures:function(features){if(!(features instanceof Array)){features=[features];} | |
| 814 | -for(var i=0;i<features.length;i++){var feature=features[i];if(this.geometryType&&!(feature.geometry instanceof this.geometryType)){var throwStr="addFeatures : component should be an "+ | |
| 815 | -this.geometryType.prototype.CLASS_NAME;throw throwStr;} | |
| 816 | -this.features.push(feature);feature.layer=this;if(!feature.style){feature.style=OpenLayers.Util.extend({},this.style);} | |
| 817 | -this.preFeatureInsert(feature);if(this.drawn){this.drawFeature(feature);} | |
| 818 | -this.onFeatureInsert(feature);}},removeFeatures:function(features){if(!(features instanceof Array)){features=[features];} | |
| 819 | -for(var i=features.length-1;i>=0;i--){var feature=features[i];this.features=OpenLayers.Util.removeItem(this.features,feature);if(feature.geometry){this.renderer.eraseGeometry(feature.geometry);} | |
| 820 | -if(OpenLayers.Util.indexOf(this.selectedFeatures,feature)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,feature);}}},destroyFeatures:function(){this.selectedFeatures=[];for(var i=this.features.length-1;i>=0;i--){this.features[i].destroy();}},drawFeature:function(feature,style){if(style==null){if(feature.style){style=feature.style;}else{style=this.style;}} | |
| 821 | -this.renderer.drawFeature(feature,style);},eraseFeatures:function(features){this.renderer.eraseFeatures(features);},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;} | |
| 822 | -var featureId=this.renderer.getFeatureIdFromEvent(evt);return this.getFeatureById(featureId);},getFeatureById:function(featureId){var feature=null;for(var i=0;i<this.features.length;++i){if(this.features[i].id==featureId){feature=this.features[i];break;}} | |
| 823 | -return feature;},onFeatureInsert:function(feature){},preFeatureInsert:function(feature){},CLASS_NAME:"OpenLayers.Layer.Vector"});OpenLayers.Layer.VirtualEarth=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,sphericalMercator:false,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();}},loadMapObject:function(){var veDiv=OpenLayers.Util.createDiv(this.name);var sz=this.map.getSize();veDiv.style.width=sz.w;veDiv.style.height=sz.h;this.div.appendChild(veDiv);try{this.mapObject=new VEMap(this.name);}catch(e){} | |
| 824 | -if(this.mapObject!=null){try{this.mapObject.LoadMap(null,null,this.type);}catch(e){} | |
| 825 | -this.mapObject.HideDashboard();}},getWarningHTML:function(){var html="";html+="The VE Layer was unable to load correctly.<br>";html+="<br>";html+="To get rid of this message, select a new BaseLayer " | |
| 826 | -html+="in the layer switcher in the upper-right corner.<br>";html+="<br>";html+="Most likely, this is because the VE library";html+=" script was either not correctly included.<br>";html+="<br>";html+="Developers: For help getting this working correctly, ";html+="<a href='http://trac.openlayers.org/wiki/VirtualEarth' " | |
| 827 | -html+="target='_blank'>";html+="click here";html+="</a>";return html;},setMapObjectCenter:function(center,zoom){this.mapObject.SetCenterAndZoom(center,zoom);},getMapObjectCenter:function(){return this.mapObject.GetCenter();},getMapObjectZoom:function(){return this.mapObject.GetZoomLevel();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){return this.mapObject.PixelToLatLong(moPixel.x,moPixel.y);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.LatLongToPixel(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.Longitude,moLonLat.Latitude).lon:moLonLat.Longitude;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.Longitude,moLonLat.Latitude).lat:moLonLat.Latitude;},getMapObjectLonLatFromLonLat:function(lon,lat){var veLatLong;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);veLatLong=new VELatLong(lonlat.lat,lonlat.lon);}else{veLatLong=new VELatLong(lat,lon);} | |
| 828 | -return veLatLong;},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},getMapObjectPixelFromXY:function(x,y){return new Msn.VE.Pixel(x,y);},CLASS_NAME:"OpenLayers.Layer.VirtualEarth"});OpenLayers.Layer.Yahoo=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:15,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,sphericalMercator:false,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();}},loadMapObject:function(){try{var size=this.getMapObjectSizeFromOLSize(this.map.getSize());this.mapObject=new YMap(this.div,this.type,size);this.mapObject.disableKeyControls();this.mapObject.disableDragMap();}catch(e){}},onMapResize:function(){try{var size=this.getMapObjectSizeFromOLSize(this.map.getSize());this.mapObject.resizeTo(size);}catch(e){}},setMap:function(map){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);this.map.events.register("moveend",this,this.fixYahooEventPane);},fixYahooEventPane:function(){var yahooEventPane=OpenLayers.Util.getElement("ygddfdiv");if(yahooEventPane!=null){if(yahooEventPane.parentNode!=null) | |
| 829 | -yahooEventPane.parentNode.removeChild(yahooEventPane);this.map.events.unregister("moveend",this,this.fixYahooEventPane);}},getWarningHTML:function(){var html="";html+="The Yahoo Layer was unable to load correctly.<br>";html+="<br>";html+="To get rid of this message, select a new BaseLayer " | |
| 830 | -html+="in the layer switcher in the upper-right corner.<br>";html+="<br>";html+="Most likely, this is because the Yahoo library";html+=" script was either not correctly included.<br>";html+="<br>";html+="Developers: For help getting this working correctly, ";html+="<a href='http://trac.openlayers.org/wiki/Yahoo' " | |
| 831 | -html+="target='_blank'>";html+="click here";html+="</a>";return html;},getOLZoomFromMapObjectZoom:function(moZoom){var zoom=null;if(moZoom!=null){zoom=OpenLayers.Layer.FixedZoomLevels.prototype.getOLZoomFromMapObjectZoom.apply(this,[moZoom]);zoom=18-zoom;} | |
| 832 | -return zoom;},getMapObjectZoomFromOLZoom:function(olZoom){var zoom=null;if(olZoom!=null){zoom=OpenLayers.Layer.FixedZoomLevels.prototype.getMapObjectZoomFromOLZoom.apply(this,[olZoom]);zoom=18-zoom;} | |
| 833 | -return zoom;},setMapObjectCenter:function(center,zoom){this.mapObject.drawZoomAndCenter(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCenterLatLon();},getMapObjectZoom:function(){return this.mapObject.getZoomLevel();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){return this.mapObject.convertXYLatLon(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.convertLatLonXY(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.Lon,moLonLat.Lat).lon:moLonLat.Lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return this.sphericalMercator?this.forwardMercator(moLonLat.Lon,moLonLat.Lat).lat:moLonLat.Lat;},getMapObjectLonLatFromLonLat:function(lon,lat){var yLatLong;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);yLatLong=new YGeoPoint(lonlat.lat,lonlat.lon);}else{yLatLong=new YGeoPoint(lat,lon);} | |
| 834 | -return yLatLong;},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},getMapObjectPixelFromXY:function(x,y){return new YCoordPoint(x,y);},getMapObjectSizeFromOLSize:function(olSize){return new YSize(olSize.w,olSize.h);},CLASS_NAME:"OpenLayers.Layer.Yahoo"});OpenLayers.Control.ModifyFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,layer:null,feature:null,vertices:null,virtualVertices:null,selectControl:null,dragControl:null,keyboardHandler:null,deleteCodes:null,virtualStyle:null,onModificationStart:function(){},onModification:function(){},onModificationEnd:function(){},initialize:function(layer,options){this.layer=layer;this.vertices=[];this.virtualVertices=[];this.styleVirtual=OpenLayers.Util.extend({},this.layer.style);this.styleVirtual.fillOpacity=0.3;this.styleVirtual.strokeOpacity=0.3;this.deleteCodes=[46,100];OpenLayers.Control.prototype.initialize.apply(this,[options]);if(!(this.deleteCodes instanceof Array)){this.deleteCodes=[this.deleteCodes];} | |
| 835 | -var control=this;var selectOptions={geometryTypes:this.geometryTypes,onSelect:function(feature){control.selectFeature.apply(control,[feature]);},onUnselect:function(feature){control.unselectFeature.apply(control,[feature]);}};this.selectControl=new OpenLayers.Control.SelectFeature(layer,selectOptions);var dragOptions={geometryTypes:["OpenLayers.Geometry.Point"],snappingOptions:this.snappingOptions,onStart:function(feature,pixel){control.dragStart.apply(control,[feature,pixel]);},onDrag:function(feature){control.dragVertex.apply(control,[feature]);},onComplete:function(feature){control.dragComplete.apply(control,[feature]);}};this.dragControl=new OpenLayers.Control.DragFeature(layer,dragOptions);var keyboardOptions={keypress:this.handleKeypress};this.keyboardHandler=new OpenLayers.Handler.Keyboard(this,keyboardOptions);},destroy:function(){this.layer=null;this.selectControl.destroy();this.dragControl.destroy();this.keyboardHandler.destroy();OpenLayers.Control.prototype.destroy.apply(this,[]);},activate:function(){return(this.selectControl.activate()&&this.keyboardHandler.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments));},deactivate:function(){var deactivated=false;if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.layer.removeFeatures(this.vertices);this.layer.removeFeatures(this.virtualVertices);this.vertices=[];this.dragControl.deactivate();if(this.feature){this.selectControl.unselect.apply(this.selectControl,[this.feature]);} | |
| 836 | -this.selectControl.deactivate();this.keyboardHandler.deactivate();deactivated=true;} | |
| 837 | -return deactivated;},selectFeature:function(feature){this.feature=feature;this.resetVertices();this.dragControl.activate();this.onModificationStart(this.feature);},unselectFeature:function(feature){this.layer.removeFeatures(this.vertices);this.layer.removeFeatures(this.virtualVertices);this.vertices=[];this.virtualVertices=[];this.feature=null;this.dragControl.deactivate();this.onModificationEnd(feature);},dragStart:function(feature,pixel){if(feature!=this.feature&&OpenLayers.Util.indexOf(this.vertices,feature)==-1&&OpenLayers.Util.indexOf(this.virtualVertices,feature)==-1){if(this.feature){this.selectControl.clickFeature.apply(this.selectControl,[this.feature]);} | |
| 838 | -if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)!=-1){this.selectControl.clickFeature.apply(this.selectControl,[feature]);this.dragControl.overFeature.apply(this.dragControl,[feature]);this.dragControl.lastPixel=pixel;this.dragControl.dragHandler.started=true;this.dragControl.dragHandler.start=pixel;this.dragControl.dragHandler.last=pixel;}}},dragVertex:function(vertex){if(this.feature.geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){if(this.feature!=vertex){this.feature=vertex;}}else{if(OpenLayers.Util.indexOf(this.virtualVertices,vertex)!=-1){vertex.geometry.parent.addComponent(vertex.geometry,vertex._index);delete vertex._index;OpenLayers.Util.removeItem(this.virtualVertices,vertex);this.layer.removeFeatures(vertex);}} | |
| 839 | -this.layer.drawFeature(this.feature,this.selectControl.selectStyle);this.layer.removeFeatures(this.virtualVertices);this.layer.drawFeature(vertex);},dragComplete:function(vertex){this.resetVertices();this.onModification(this.feature);},resetVertices:function(){if(this.vertices.length>0){this.layer.removeFeatures(this.vertices);this.vertices=[];} | |
| 840 | -if(this.virtualVertices.length>0){this.layer.removeFeatures(this.virtualVertices);this.virtualVertices=[];} | |
| 841 | -if(this.feature&&this.feature.geometry.CLASS_NAME!="OpenLayers.Geometry.Point"){this.collectVertices(this.feature.geometry);this.layer.addFeatures(this.vertices);this.layer.addFeatures(this.virtualVertices);}},handleKeypress:function(code){if(this.feature&&OpenLayers.Util.indexOf(this.deleteCodes,code)!=-1){var vertex=this.dragControl.feature;if(vertex&&OpenLayers.Util.indexOf(this.vertices,vertex)!=-1){vertex.geometry.parent.removeComponent(vertex.geometry);this.layer.drawFeature(this.feature,this.selectControl.selectStyle);this.resetVertices();this.onModification(this.feature);}}},collectVertices:function(){this.vertices=[];this.virtualVirtices=[];var control=this;function collectComponentVertices(geometry){var i,vertex,component;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){vertex=new OpenLayers.Feature.Vector(geometry);control.vertices.push(vertex);}else{for(i=0;i<geometry.components.length;++i){component=geometry.components[i];if(component.CLASS_NAME=="OpenLayers.Geometry.Point"){vertex=new OpenLayers.Feature.Vector(component);control.vertices.push(vertex);}else{collectComponentVertices(component);}} | |
| 842 | -if(geometry.CLASS_NAME!="OpenLayers.Geometry.MultiPoint"){for(i=0;i<geometry.components.length-1;++i){var prevVertex=geometry.components[i];var nextVertex=geometry.components[i+1];if(prevVertex.CLASS_NAME=="OpenLayers.Geometry.Point"&&nextVertex.CLASS_NAME=="OpenLayers.Geometry.Point"){var x=(prevVertex.x+nextVertex.x)/2;var y=(prevVertex.y+nextVertex.y)/2;var point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x,y),null,control.styleVirtual);point.geometry.parent=geometry;point._index=i+1;control.virtualVertices.push(point);}}}}} | |
| 843 | -collectComponentVertices(this.feature.geometry);},setMap:function(map){this.selectControl.setMap(map);this.dragControl.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.ModifyFeature"});OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,zoomBox:null,wheelHandler:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},activate:function(){this.dragPan.activate();this.wheelHandler.activate();this.zoomBox.activate();return OpenLayers.Control.prototype.activate.apply(this,arguments);},deactivate:function(){this.zoomBox.deactivate();this.dragPan.deactivate();this.wheelHandler.deactivate();return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},draw:function(){this.map.events.register("dblclick",this,this.defaultDblClick);this.dragPan=new OpenLayers.Control.DragPan({map:this.map});this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:OpenLayers.Handler.MOD_SHIFT});this.dragPan.draw();this.zoomBox.draw();this.wheelHandler=new OpenLayers.Handler.MouseWheel(this,{"up":this.wheelUp,"down":this.wheelDown});this.activate();},defaultDblClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},wheelChange:function(evt,deltaZ){var newZoom=this.map.getZoom()+deltaZ;if(!this.map.isValidZoomLevel(newZoom))return;var size=this.map.getSize();var deltaX=size.w/2-evt.xy.x;var deltaY=evt.xy.y-size.h/2;var newRes=this.map.baseLayer.resolutions[newZoom];var zoomPoint=this.map.getLonLatFromPixel(evt.xy);var newCenter=new OpenLayers.LonLat(zoomPoint.lon+deltaX*newRes,zoomPoint.lat+deltaY*newRes);this.map.setCenter(newCenter,newZoom);},wheelUp:function(evt){this.wheelChange(evt,1);},wheelDown:function(evt){this.wheelChange(evt,-1);},CLASS_NAME:"OpenLayers.Control.Navigation"});OpenLayers.Geometry=OpenLayers.Class({id:null,parent:null,bounds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){this.id=null;this.bounds=null;},clone:function(){return new OpenLayers.Geometry();},setBounds:function(bounds){if(bounds){this.bounds=bounds.clone();}},clearBounds:function(){this.bounds=null;if(this.parent){this.parent.clearBounds();}},extendBounds:function(newBounds){var bounds=this.getBounds();if(!bounds){this.setBounds(newBounds);}else{this.bounds.extend(newBounds);}},getBounds:function(){if(this.bounds==null){this.calculateBounds();} | |
| 844 | -return this.bounds;},calculateBounds:function(){},atPoint:function(lonlat,toleranceLon,toleranceLat){var atPoint=false;var bounds=this.getBounds();if((bounds!=null)&&(lonlat!=null)){var dX=(toleranceLon!=null)?toleranceLon:0;var dY=(toleranceLat!=null)?toleranceLat:0;var toleranceBounds=new OpenLayers.Bounds(this.bounds.left-dX,this.bounds.bottom-dY,this.bounds.right+dX,this.bounds.top+dY);atPoint=toleranceBounds.containsLonLat(lonlat);} | |
| 845 | -return atPoint;},getLength:function(){return 0.0;},getArea:function(){return 0.0;},toString:function(){return OpenLayers.Format.WKT.prototype.write(new OpenLayers.Feature.Vector(this));},CLASS_NAME:"OpenLayers.Geometry"});OpenLayers.Layer.GML=OpenLayers.Class(OpenLayers.Layer.Vector,{loaded:false,format:null,initialize:function(name,url,options){var newArguments=[];newArguments.push(name,options);OpenLayers.Layer.Vector.prototype.initialize.apply(this,newArguments);this.url=url;},setVisibility:function(visibility,noEvent){OpenLayers.Layer.Vector.prototype.setVisibility.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGML();}},moveTo:function(bounds,zoomChanged,minor){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.events.triggerEvent("loadstart");this.loadGML();}},loadGML:function(){if(!this.loaded){var results=OpenLayers.loadURL(this.url,null,this,this.requestSuccess,this.requestFailure);this.loaded=true;}},requestSuccess:function(request){var doc=request.responseXML;if(!doc||request.fileType!="XML"){doc=request.responseText;} | |
| 846 | -var gml=this.format?new this.format():new OpenLayers.Format.GML();this.addFeatures(gml.read(doc));this.events.triggerEvent("loadend");},requestFailure:function(request){alert("Error in loading GML file "+this.url);this.events.triggerEvent("loadend");},CLASS_NAME:"OpenLayers.Layer.GML"});OpenLayers.Layer.KaMap=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,units:null,resolution:OpenLayers.DOTS_PER_INCH,DEFAULT_PARAMS:{i:'jpeg',map:''},initialize:function(name,url,params,options){var newArguments=[];newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);this.params=(params?params:{});if(params){OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);}},getURL:function(bounds){bounds=this.adjustBounds(bounds);var mapRes=this.map.getResolution();var scale=Math.round((this.map.getScale()*10000))/10000;var pX=Math.round(bounds.left/mapRes);var pY=-Math.round(bounds.top/mapRes);return this.getFullRequestString({t:pY,l:pX,s:scale});},addTile:function(bounds,position){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);},initGriddedTiles:function(bounds){var viewSize=this.map.getSize();var minRows=Math.ceil(viewSize.h/this.tileSize.h)+Math.max(1,2*this.buffer);var minCols=Math.ceil(viewSize.w/this.tileSize.w)+Math.max(1,2*this.buffer);var extent=this.map.getMaxExtent();var resolution=this.map.getResolution();var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=tilecol*tilelon;var offsetlat=bounds.top;var tilerow=Math.ceil(offsetlat/tilelat)+this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=-(tilerowremain+1)*this.tileSize.h;var tileoffsetlat=tilerow*tilelat;tileoffsetx=Math.round(tileoffsetx);tileoffsety=Math.round(tileoffsety);this.origin=new OpenLayers.Pixel(tileoffsetx,tileoffsety);var startX=tileoffsetx;var startLon=tileoffsetlon;var rowidx=0;do{var row=this.grid[rowidx++];if(!row){row=[];this.grid.push(row);} | |
| 847 | -tileoffsetlon=startLon;tileoffsetx=startX;var colidx=0;do{var tileBounds=new OpenLayers.Bounds(tileoffsetlon,tileoffsetlat,tileoffsetlon+tilelon,tileoffsetlat+tilelat);var x=tileoffsetx;x-=parseInt(this.map.layerContainerDiv.style.left);var y=tileoffsety;y-=parseInt(this.map.layerContainerDiv.style.top);var px=new OpenLayers.Pixel(x,y);var tile=row[colidx++];if(!tile){tile=this.addTile(tileBounds,px);this.addTileMonitoringHooks(tile);row.push(tile);}else{tile.moveTo(tileBounds,px,false);} | |
| 848 | -tileoffsetlon+=tilelon;tileoffsetx+=this.tileSize.w;}while(tileoffsetlon<=bounds.right+tilelon*this.buffer||colidx<minCols) | |
| 849 | -tileoffsetlat-=tilelat;tileoffsety+=this.tileSize.h;}while(tileoffsetlat>=bounds.bottom-tilelat*this.buffer||rowidx<minRows) | |
| 850 | -this.removeExcessTiles(rowidx,colidx);this.spiralTileLoad();},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.KaMap(this.name,this.url,this.params,this.options);} | |
| 851 | -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);if(this.tileSize!=null){obj.tileSize=this.tileSize.clone();} | |
| 852 | -obj.grid=[];return obj;},getTileBounds:function(viewPortPx){var resolution=this.getResolution();var tileMapWidth=resolution*this.tileSize.w;var tileMapHeight=resolution*this.tileSize.h;var mapPoint=this.getLonLatFromViewPortPx(viewPortPx);var tileLeft=tileMapWidth*Math.floor(mapPoint.lon/tileMapWidth);var tileBottom=tileMapHeight*Math.floor(mapPoint.lat/tileMapHeight);return new OpenLayers.Bounds(tileLeft,tileBottom,tileLeft+tileMapWidth,tileBottom+tileMapHeight);},CLASS_NAME:"OpenLayers.Layer.KaMap"});OpenLayers.Layer.MapServer=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{mode:"map",map_imagetype:"png"},initialize:function(name,url,params,options){var newArguments=[];newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);if(arguments.length>0){OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);} | |
| 853 | -if(options==null||options.isBaseLayer==null){this.isBaseLayer=((this.params.transparent!="true")&&(this.params.transparent!=true));}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.MapServer(this.name,this.url,this.params,this.options);} | |
| 854 | -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},getURL:function(bounds){bounds=this.adjustBounds(bounds);var extent=[bounds.left,bounds.bottom,bounds.right,bounds.top];var imageSize=this.getImageSize();var url=this.getFullRequestString({mapext:extent,imgext:extent,map_size:[imageSize.w,imageSize.h],imgx:imageSize.w/2,imgy:imageSize.h/2,imgxy:[imageSize.w,imageSize.h]});return url;},getFullRequestString:function(newParams,altUrl){var url=(altUrl==null)?this.url:altUrl;if(typeof url=="object"){url=url[Math.floor(Math.random()*url.length)];} | |
| 855 | -var requestString=url;var allParams=OpenLayers.Util.extend({},this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}} | |
| 856 | -var paramsString=OpenLayers.Util.getParameterString(allParams);paramsString=paramsString.replace(/,/g,"+");if(paramsString!=""){var lastServerChar=url.charAt(url.length-1);if((lastServerChar=="&")||(lastServerChar=="?")){requestString+=paramsString;}else{if(url.indexOf('?')==-1){requestString+='?'+paramsString;}else{requestString+='&'+paramsString;}}} | |
| 857 | -return requestString;},CLASS_NAME:"OpenLayers.Layer.MapServer"});OpenLayers.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.Grid,{serviceVersion:"1.0.0",isBaseLayer:true,tileOrigin:null,initialize:function(name,url,options){var newArguments=[];newArguments.push(name,url,{},options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TMS(this.name,this.url,this.options);} | |
| 858 | -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){bounds=this.adjustBounds(bounds);var res=this.map.getResolution();var x=Math.round((bounds.left-this.tileOrigin.lon)/(res*this.tileSize.w));var y=Math.round((bounds.bottom-this.tileOrigin.lat)/(res*this.tileSize.h));var z=this.map.getZoom();var path=this.serviceVersion+"/"+this.layername+"/"+z+"/"+x+"/"+y+"."+this.type;var url=this.url;if(url instanceof Array){url=this.selectUrl(path,url);} | |
| 859 | -return url+path;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},setMap:function(map){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom);}},CLASS_NAME:"OpenLayers.Layer.TMS"});OpenLayers.Layer.TileCache=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,tileOrigin:null,format:'image/png',initialize:function(name,url,layername,options){options=OpenLayers.Util.extend({maxResolution:180/256},options);this.layername=layername;OpenLayers.Layer.Grid.prototype.initialize.apply(this,[name,url,{},options]);this.extension=this.format.split('/')[1].toLowerCase();this.extension=(this.extension=='jpeg')?'jpg':this.extension;},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TileCache(this.name,this.url,this.options);} | |
| 860 | -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){var res=this.map.getResolution();var bbox=this.maxExtent;var size=this.tileSize;var tileX=Math.floor((bounds.left-bbox.left)/(res*size.w));var tileY=Math.floor((bounds.bottom-bbox.bottom)/(res*size.h));var tileZ=this.map.zoom;function zeroPad(number,length){number=String(number);var zeros=[];for(var i=0;i<length;++i){zeros.push('0');} | |
| 861 | -return zeros.join('').substring(0,length-number.length)+number;} | |
| 862 | -var components=[this.layername,zeroPad(tileZ,2),zeroPad(parseInt(tileX/1000000),3),zeroPad((parseInt(tileX/1000)%1000),3),zeroPad((parseInt(tileX)%1000),3),zeroPad(parseInt(tileY/1000000),3),zeroPad((parseInt(tileY/1000)%1000),3),zeroPad((parseInt(tileY)%1000),3)+'.'+this.extension];var path=components.join('/');var url=this.url;if(url instanceof Array){url=this.selectUrl(path,url);} | |
| 863 | -url=(url.charAt(url.length-1)=='/')?url:url+'/';return url+path;},addTile:function(bounds,position){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);},setMap:function(map){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom);}},CLASS_NAME:"OpenLayers.Layer.TileCache"});OpenLayers.Layer.WFS=OpenLayers.Class(OpenLayers.Layer.Vector,OpenLayers.Layer.Markers,{isBaseLayer:false,tile:null,ratio:2,DEFAULT_PARAMS:{service:"WFS",version:"1.0.0",request:"GetFeature"},featureClass:null,vectorMode:true,encodeBBOX:false,extractAttributes:false,initialize:function(name,url,params,options){if(options==undefined){options={};} | |
| 864 | -if(options.featureClass||!OpenLayers.Layer.Vector||!OpenLayers.Feature.Vector){this.vectorMode=false;} | |
| 865 | -OpenLayers.Util.extend(options,{'reportError':false});var newArguments=[];newArguments.push(name,options);OpenLayers.Layer.Vector.prototype.initialize.apply(this,newArguments);if(!this.renderer||!this.vectorMode){this.vectorMode=false;if(!options.featureClass){options.featureClass=OpenLayers.Feature.WFS;} | |
| 866 | -OpenLayers.Layer.Markers.prototype.initialize.apply(this,newArguments);} | |
| 867 | -if(this.params&&this.params.typename&&!this.options.typename){this.options.typename=this.params.typename;} | |
| 868 | -if(!this.options.geometry_column){this.options.geometry_column="the_geom";} | |
| 869 | -this.params=params;OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));this.url=url;},destroy:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.destroy.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);}},setMap:function(map){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.setMap.apply(this,arguments);}},moveTo:function(bounds,zoomChanged,dragging){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);} | |
| 870 | -if(dragging){return false;} | |
| 871 | -if(zoomChanged){if(this.vectorMode){this.renderer.clear();}} | |
| 872 | -if(this.options.minZoomLevel){var err="The minZoomLevel property is only intended for use "+"with the FixedZoomLevels-descendent layers. That this "+"wfs layer checks for minZoomLevel is a relic of the"+"past. We cannot, however, remove it without possibly "+"breaking OL based applications that may depend on it."+" Therefore we are deprecating it -- the minZoomLevel "+"check below will be removed at 3.0. Please instead "+"use min/max resolution setting as described here: "+"http://trac.openlayers.org/wiki/SettingZoomLevels";OpenLayers.Console.warn(err);if(this.map.getZoom()<this.options.minZoomLevel){return null;}} | |
| 873 | -if(bounds==null){bounds=this.map.getExtent();} | |
| 874 | -var firstRendering=(this.tile==null);var outOfBounds=(!firstRendering&&!this.tile.bounds.containsBounds(bounds));if((zoomChanged||firstRendering||(!dragging&&outOfBounds))&&this.inRange){var center=bounds.getCenterLonLat();var tileWidth=bounds.getWidth()*this.ratio;var tileHeight=bounds.getHeight()*this.ratio;var tileBounds=new OpenLayers.Bounds(center.lon-(tileWidth/2),center.lat-(tileHeight/2),center.lon+(tileWidth/2),center.lat+(tileHeight/2));var tileSize=this.map.getSize();tileSize.w=tileSize.w*this.ratio;tileSize.h=tileSize.h*this.ratio;var ul=new OpenLayers.LonLat(tileBounds.left,tileBounds.top);var pos=this.map.getLayerPxFromLonLat(ul);var url=this.getFullRequestString();var params={BBOX:this.encodeBBOX?tileBounds.toBBOX():tileBounds.toArray()};url+="&"+OpenLayers.Util.getParameterString(params);if(!this.tile){this.tile=new OpenLayers.Tile.WFS(this,pos,tileBounds,url,tileSize);this.addTileMonitoringHooks(this.tile);this.tile.draw();}else{if(this.vectorMode){this.destroyFeatures();this.renderer.clear();}else{this.clearMarkers();} | |
| 875 | -this.removeTileMonitoringHooks(this.tile);this.tile.destroy();this.tile=null;this.tile=new OpenLayers.Tile.WFS(this,pos,tileBounds,url,tileSize);this.addTileMonitoringHooks(this.tile);this.tile.draw();}}},addTileMonitoringHooks:function(tile){tile.onLoadStart=function(){if(this==this.layer.tile){this.layer.events.triggerEvent("loadstart");}};tile.events.register("loadstart",tile,tile.onLoadStart);tile.onLoadEnd=function(){if(this==this.layer.tile){this.layer.events.triggerEvent("tileloaded");this.layer.events.triggerEvent("loadend");}};tile.events.register("loadend",tile,tile.onLoadEnd);},removeTileMonitoringHooks:function(tile){tile.events.unregister("loadstart",tile,tile.onLoadStart);tile.events.unregister("loadend",tile,tile.onLoadEnd);},onMapResize:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.onMapResize.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.onMapResize.apply(this,arguments);}},mergeNewParams:function(newParams){var upperParams=OpenLayers.Util.upperCaseObject(newParams);var newArguments=[upperParams];OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,newArguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WFS(this.name,this.url,this.params,this.options);} | |
| 876 | -if(this.vectorMode){obj=OpenLayers.Layer.Vector.prototype.clone.apply(this,[obj]);}else{obj=OpenLayers.Layer.Markers.prototype.clone.apply(this,[obj]);} | |
| 877 | -return obj;},getFullRequestString:function(newParams){var projection=this.map.getProjection();this.params.SRS=(projection=="none")?null:projection;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},commit:function(){if(!this.writer){this.writer=new OpenLayers.Format.WFS({},this);} | |
| 878 | -var data=this.writer.write(this.features);var url=this.url;if(OpenLayers.ProxyHost&&OpenLayers.String.startsWith(this.url,"http")){url=OpenLayers.ProxyHost+escape(this.url);} | |
| 879 | -var success=OpenLayers.Function.bind(this.commitSuccess,this);var failure=OpenLayers.Function.bind(this.commitFailure,this);data=OpenLayers.Ajax.serializeXMLToString(data);new OpenLayers.Ajax.Request(url,{method:'post',postBody:data,onComplete:success,onFailure:failure});},commitSuccess:function(request){var response=request.responseText;if(response.indexOf('SUCCESS')!=-1){this.commitReport('WFS Transaction: SUCCESS',response);for(var i=0;i<this.features.length;i++){this.features[i].state=null;}}else if(response.indexOf('FAILED')!=-1||response.indexOf('Exception')!=-1){this.commitReport('WFS Transaction: FAILED',response);}},commitFailure:function(request){},commitReport:function(string,response){alert(string);},refresh:function(){if(this.tile){if(this.vectorMode){this.renderer.clear();this.features.length=0;}else{this.clearMarkers();this.markers.length=0;} | |
| 880 | -this.tile.draw();}},CLASS_NAME:"OpenLayers.Layer.WFS"});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,options){var newArguments=[];params=OpenLayers.Util.upperCaseObject(params);newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((options==null)||(!options.isBaseLayer)){this.isBaseLayer=false;} | |
| 881 | -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);} | |
| 882 | -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){bounds=this.adjustBounds(bounds);var imageSize=this.getImageSize();return this.getFullRequestString({BBOX:this.encodeBBOX?bounds.toBBOX():bounds.toArray(),WIDTH:imageSize.w,HEIGHT:imageSize.h});},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},mergeNewParams:function(newParams){var upperParams=OpenLayers.Util.upperCaseObject(newParams);var newArguments=[upperParams];OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,newArguments);},getFullRequestString:function(newParams){var projection=this.map.getProjection();this.params.SRS=(projection=="none")?null:projection;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Layer.WorldWind=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{},isBaseLayer:true,lzd:null,zoomLevels:null,initialize:function(name,url,lzd,zoomLevels,params,options){this.lzd=lzd;this.zoomLevels=zoomLevels;var newArguments=[];newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);this.params=(params?params:{});if(params){OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);}},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},getZoom:function(){var zoom=this.map.getZoom();var extent=this.map.getMaxExtent();zoom=zoom-Math.log(this.maxResolution/(this.lzd/512))/Math.log(2);return zoom;},getURL:function(bounds){bounds=this.adjustBounds(bounds);var zoom=this.getZoom();var extent=this.map.getMaxExtent();var deg=this.lzd/Math.pow(2,this.getZoom());var x=Math.floor((bounds.left-extent.left)/deg);var y=Math.floor((bounds.bottom-extent.bottom)/deg);if(this.map.getResolution()<=(this.lzd/512)&&this.getZoom()<=this.zoomLevels){return this.getFullRequestString({L:zoom,X:x,Y:y});}else{return OpenLayers.Util.getImagesLocation()+"blank.gif";}},CLASS_NAME:"OpenLayers.Layer.WorldWind"});OpenLayers.Control.NavToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(options){OpenLayers.Control.Panel.prototype.initialize.apply(this,[options]);this.addControls([new OpenLayers.Control.Navigation(),new OpenLayers.Control.ZoomBox()]);},draw:function(){var div=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return div;},CLASS_NAME:"OpenLayers.Control.NavToolbar"});OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(components){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];if(components!=null){this.addComponents(components);}},destroy:function(){this.components.length=0;this.components=null;},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()");for(var i=0;i<this.components.length;i++){geometry.addComponent(this.components[i].clone());} | |
| 883 | -OpenLayers.Util.applyDefaults(geometry,this);return geometry;},getComponentsString:function(){var strings=[];for(var i=0;i<this.components.length;i++){strings.push(this.components[i].toShortString());} | |
| 884 | -return strings.join(",");},calculateBounds:function(){this.bounds=null;if(this.components&&this.components.length>0){this.setBounds(this.components[0].getBounds());for(var i=1;i<this.components.length;i++){this.extendBounds(this.components[i].getBounds());}}},addComponents:function(components){if(!(components instanceof Array)){components=[components];} | |
| 885 | -for(var i=0;i<components.length;i++){this.addComponent(components[i]);}},addComponent:function(component,index){var added=false;if(component){if(this.componentTypes==null||(OpenLayers.Util.indexOf(this.componentTypes,component.CLASS_NAME)>-1)){if(index!=null&&(index<this.components.length)){var components1=this.components.slice(0,index);var components2=this.components.slice(index,this.components.length);components1.push(component);this.components=components1.concat(components2);}else{this.components.push(component);} | |
| 886 | -component.parent=this;this.clearBounds();added=true;}} | |
| 887 | -return added;},removeComponents:function(components){if(!(components instanceof Array)){components=[components];} | |
| 888 | -for(var i=0;i<components.length;i++){this.removeComponent(components[i]);}},removeComponent:function(component){OpenLayers.Util.removeItem(this.components,component);this.clearBounds();},getLength:function(){var length=0.0;for(var i=0;i<this.components.length;i++){length+=this.components[i].getLength();} | |
| 889 | -return length;},getArea:function(){var area=0.0;for(var i=0;i<this.components.length;i++){area+=this.components[i].getArea();} | |
| 890 | -return area;},move:function(x,y){for(var i=0;i<this.components.length;i++){this.components[i].move(x,y);}},rotate:function(angle,origin){for(var i=0;i<this.components.length;++i){this.components[i].rotate(angle,origin);}},resize:function(scale,origin){for(var i=0;i<this.components.length;++i){this.components[i].resize(scale,origin);}},equals:function(geometry){var equivalent=true;if(!geometry.CLASS_NAME||(this.CLASS_NAME!=geometry.CLASS_NAME)){equivalent=false;}else if(!(geometry.components instanceof Array)||(geometry.components.length!=this.components.length)){equivalent=false;}else{for(var i=0;i<this.components.length;++i){if(!this.components[i].equals(geometry.components[i])){equivalent=false;break;}}} | |
| 891 | -return equivalent;},CLASS_NAME:"OpenLayers.Geometry.Collection"});OpenLayers.Geometry.Point=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,initialize:function(x,y){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(x);this.y=parseFloat(y);},clone:function(obj){if(obj==null){obj=new OpenLayers.Geometry.Point(this.x,this.y);} | |
| 892 | -OpenLayers.Util.applyDefaults(obj,this);return obj;},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y);},distanceTo:function(point){var distance=0.0;if((this.x!=null)&&(this.y!=null)&&(point!=null)&&(point.x!=null)&&(point.y!=null)){var dx2=Math.pow(this.x-point.x,2);var dy2=Math.pow(this.y-point.y,2);distance=Math.sqrt(dx2+dy2);} | |
| 893 | -return distance;},equals:function(geom){var equals=false;if(geom!=null){equals=((this.x==geom.x&&this.y==geom.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(geom.x)&&isNaN(geom.y)));} | |
| 894 | -return equals;},toShortString:function(){return(this.x+", "+this.y);},move:function(x,y){this.x=this.x+x;this.y=this.y+y;this.clearBounds();},rotate:function(angle,origin){angle*=Math.PI/180;var radius=this.distanceTo(origin);var theta=angle+Math.atan2(this.y-origin.y,this.x-origin.x);this.x=origin.x+(radius*Math.cos(theta));this.y=origin.y+(radius*Math.sin(theta));this.clearBounds();},resize:function(scale,origin){this.x=origin.x+(scale*(this.x-origin.x));this.y=origin.y+(scale*(this.y-origin.y));this.clearBounds();},CLASS_NAME:"OpenLayers.Geometry.Point"});OpenLayers.Geometry.Rectangle=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,width:null,height:null,initialize:function(x,y,width,height){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=x;this.y=y;this.width=width;this.height=height;},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x+this.width,this.y+this.height);},getLength:function(){var length=(2*this.width)+(2*this.height);return length;},getArea:function(){var area=this.width*this.height;return area;},CLASS_NAME:"OpenLayers.Geometry.Rectangle"});OpenLayers.Geometry.Surface=OpenLayers.Class(OpenLayers.Geometry,{initialize:function(){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Geometry.Surface"});OpenLayers.Layer.MapServer.Untiled=OpenLayers.Class(OpenLayers.Layer.MapServer,{singleTile:true,initialize:function(name,url,params,options){OpenLayers.Layer.MapServer.prototype.initialize.apply(this,arguments);var msg="The OpenLayers.Layer.MapServer.Untiled class is deprecated and "+"will be removed in 3.0. Instead, you should use the "+"normal OpenLayers.Layer.MapServer class, passing it the option "+"'singleTile' as true.";OpenLayers.Console.warn(msg);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.MapServer.Untiled(this.name,this.url,this.params,this.options);} | |
| 895 | -obj=OpenLayers.Layer.MapServer.prototype.clone.apply(this,[obj]);return obj;},CLASS_NAME:"OpenLayers.Layer.MapServer.Untiled"});OpenLayers.Layer.WMS.Untiled=OpenLayers.Class(OpenLayers.Layer.WMS,{singleTile:true,initialize:function(name,url,params,options){OpenLayers.Layer.WMS.prototype.initialize.apply(this,arguments);var msg="The OpenLayers.Layer.WMS.Untiled class is deprecated and "+"will be removed in 3.0. Instead, you should use the "+"normal OpenLayers.Layer.WMS class, passing it the option "+"'singleTile' as true.";OpenLayers.Console.warn(msg);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WMS.Untiled(this.name,this.url,this.params,this.options);} | |
| 896 | -obj=OpenLayers.Layer.WMS.prototype.clone.apply(this,[obj]);return obj;},CLASS_NAME:"OpenLayers.Layer.WMS.Untiled"});OpenLayers.Geometry.MultiLineString=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LineString"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});OpenLayers.Geometry.MultiPoint=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},addPoint:function(point,index){this.addComponent(point,index);},removePoint:function(point){this.removeComponent(point);},CLASS_NAME:"OpenLayers.Geometry.MultiPoint"});OpenLayers.Geometry.MultiPolygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Polygon"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Geometry.MultiPolygon"});OpenLayers.Geometry.Polygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LinearRing"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},getArea:function(){var area=0.0;if(this.components&&(this.components.length>0)){area+=Math.abs(this.components[0].getArea());for(var i=1;i<this.components.length;i++){area-=Math.abs(this.components[i].getArea());}} | |
| 897 | -return area;},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Geometry.Polygon.createRegularPolygon=function(origin,radius,sides,rotation){var angle=Math.PI*((1/sides)-(1/2));if(rotation){angle+=(rotation/180)*Math.PI;} | |
| 898 | -var rotateAngle,x,y;var points=[];for(var i=0;i<sides;++i){rotatedAngle=angle+(i*2*Math.PI/sides);x=origin.x+(radius*Math.cos(rotatedAngle));y=origin.y+(radius*Math.sin(rotatedAngle));points.push(new OpenLayers.Geometry.Point(x,y));} | |
| 899 | -var ring=new OpenLayers.Geometry.LinearRing(points);return new OpenLayers.Geometry.Polygon([ring]);} | |
| 900 | -OpenLayers.Handler.Point=OpenLayers.Class(OpenLayers.Handler,{point:null,layer:null,drawing:false,mouseDown:false,lastDown:null,lastUp:null,initialize:function(control,callbacks,options){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'],{});OpenLayers.Handler.prototype.initialize.apply(this,arguments);},activate:function(){if(!OpenLayers.Handler.prototype.activate.apply(this,arguments)){return false;} | |
| 901 | -var options={displayInLayerSwitcher:false};this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,options);this.map.addLayer(this.layer);return true;},createFeature:function(){this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point());},deactivate:function(){if(!OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){return false;} | |
| 902 | -if(this.drawing){this.cancel();} | |
| 903 | -this.map.removeLayer(this.layer,false);this.layer.destroy();this.layer=null;return true;},destroyFeature:function(){this.point.destroy();this.point=null;},finalize:function(){this.layer.renderer.clear();this.callback("done",[this.geometryClone()]);this.destroyFeature();this.drawing=false;this.mouseDown=false;this.lastDown=null;this.lastUp=null;},cancel:function(){this.layer.renderer.clear();this.callback("cancel",[this.geometryClone()]);this.destroyFeature();this.drawing=false;this.mouseDown=false;this.lastDown=null;this.lastUp=null;},dblclick:function(evt){OpenLayers.Event.stop(evt);return false;},drawFeature:function(){this.layer.drawFeature(this.point,this.style);},geometryClone:function(){return this.point.geometry.clone();},mousedown:function(evt){if(!this.checkModifiers(evt)){return true;} | |
| 904 | -if(this.lastDown&&this.lastDown.equals(evt.xy)){return true;} | |
| 905 | -if(this.lastDown==null){this.createFeature();} | |
| 906 | -this.lastDown=evt.xy;this.drawing=true;var lonlat=this.map.getLonLatFromPixel(evt.xy);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.drawFeature();return false;},mousemove:function(evt){if(this.drawing){var lonlat=this.map.getLonLatFromPixel(evt.xy);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.point.geometry.clearBounds();this.drawFeature();} | |
| 907 | -return true;},mouseup:function(evt){if(this.drawing){this.finalize();return false;}else{return true;}},CLASS_NAME:"OpenLayers.Handler.Point"});OpenLayers.Geometry.Curve=OpenLayers.Class(OpenLayers.Geometry.MultiPoint,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(points){OpenLayers.Geometry.MultiPoint.prototype.initialize.apply(this,arguments);},getLength:function(){var length=0.0;if(this.components&&(this.components.length>1)){for(var i=1;i<this.components.length;i++){length+=this.components[i-1].distanceTo(this.components[i]);}} | |
| 908 | -return length;},CLASS_NAME:"OpenLayers.Geometry.Curve"});OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{initialize:function(points){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments);},removeComponent:function(point){if(this.components&&(this.components.length>2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);}},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Format.GML=OpenLayers.Class(OpenLayers.Format.XML,{featureNS:"http://mapserver.gis.umn.edu/mapserver",featurePrefix:"feature",featureName:"featureMember",layerName:"features",geometryName:"geometry",collectionName:"FeatureCollection",gmlns:"http://www.opengis.net/gml",extractAttributes:true,initialize:function(options){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)};OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);} | |
| 909 | -var featureNodes=this.getElementsByTagNameNS(data.documentElement,this.gmlns,this.featureName);var features=[];for(var i=0;i<featureNodes.length;i++){var feature=this.parseFeature(featureNodes[i]);if(feature){features.push(feature);}} | |
| 910 | -return features;},parseFeature:function(node){var order=["MultiPolygon","Polygon","MultiLineString","LineString","MultiPoint","Point"];var type,nodeList,geometry,parser;for(var i=0;i<order.length;++i){type=order[i];nodeList=this.getElementsByTagNameNS(node,this.gmlns,type);if(nodeList.length>0){var parser=this.parseGeometry[type.toLowerCase()];if(parser){geometry=parser.apply(this,[nodeList[0]]);}else{OpenLayers.Console.error("Unsupported geometry type: "+ | |
| 911 | -type);} | |
| 912 | -break;}} | |
| 913 | -var attributes;if(this.extractAttributes){attributes=this.parseAttributes(node);} | |
| 914 | -var feature=new OpenLayers.Feature.Vector(geometry,attributes);var childNode=node.firstChild;var fid;while(childNode){if(childNode.nodeType==1){fid=childNode.getAttribute("fid")||childNode.getAttribute("id");if(fid){break;}} | |
| 915 | -childNode=childNode.nextSibling;} | |
| 916 | -feature.fid=fid;return feature;},parseGeometry:{point:function(node){var nodeList;var coords=[];var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"pos");if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);} | |
| 917 | -if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coordinates");if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.removeSpace,"");coords=coordString.split(",");}} | |
| 918 | -if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coord");if(nodeList.length>0){var xList=this.getElementsByTagNameNS(nodeList[0],this.gmlns,"X");var yList=this.getElementsByTagNameNS(nodeList[0],this.gmlns,"Y");if(xList.length>0&&yList.length>0){coords=[xList[0].firstChild.nodeValue,yList[0].firstChild.nodeValue];}}} | |
| 919 | -if(coords.length==2){coords[2]=null;} | |
| 920 | -return new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);},multipoint:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"Point");var components=[];if(nodeList.length>0){var point;for(var i=0;i<nodeList.length;++i){point=this.parseGeometry.point.apply(this,[nodeList[i]]);if(point){components.push(point);}}} | |
| 921 | -return new OpenLayers.Geometry.MultiPoint(components);},linestring:function(node,ring){var nodeList,coordString;var coords=[];var points=[];nodeList=this.getElementsByTagNameNS(node,this.gmlns,"posList");if(nodeList.length>0){coordString=this.concatChildValues(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);var dim=parseInt(nodeList[0].getAttribute("dimension"));var j,x,y,z;for(var i=0;i<coords.length/dim;++i){j=i*dim;x=coords[j];y=coords[j+1];z=(dim==2)?null:coords[j+2];points.push(new OpenLayers.Geometry.Point(x,y,z));}} | |
| 922 | -if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coordinates");if(nodeList.length>0){coordString=this.concatChildValues(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coordString=coordString.replace(this.regExes.trimComma,",");var pointList=coordString.split(this.regExes.splitSpace);for(var i=0;i<pointList.length;++i){coords=pointList[i].split(",");if(coords.length==2){coords[2]=null;} | |
| 923 | -points.push(new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]));}}} | |
| 924 | -var line=null;if(points.length!=0){if(ring){line=new OpenLayers.Geometry.LinearRing(points);}else{line=new OpenLayers.Geometry.LineString(points);}} | |
| 925 | -return line;},multilinestring:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"LineString");var components=[];if(nodeList.length>0){var line;for(var i=0;i<nodeList.length;++i){line=this.parseGeometry.linestring.apply(this,[nodeList[i]]);if(line){components.push(line);}}} | |
| 926 | -return new OpenLayers.Geometry.MultiLineString(components);},polygon:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"LinearRing");var components=[];if(nodeList.length>0){var ring;for(var i=0;i<nodeList.length;++i){ring=this.parseGeometry.linestring.apply(this,[nodeList[i],true]);if(ring){components.push(ring);}}} | |
| 927 | -return new OpenLayers.Geometry.Polygon(components);},multipolygon:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"Polygon");var components=[];if(nodeList.length>0){var polygon;for(var i=0;i<nodeList.length;++i){polygon=this.parseGeometry.polygon.apply(this,[nodeList[i]]);if(polygon){components.push(polygon);}}} | |
| 928 | -return new OpenLayers.Geometry.MultiPolygon(components);}},parseAttributes:function(node){var attributes={};var childNode=node.firstChild;var children,i,child,grandchildren,grandchild,name,value;while(childNode){if(childNode.nodeType==1){children=childNode.childNodes;for(i=0;i<children.length;++i){child=children[i];if(child.nodeType==1){grandchildren=child.childNodes;if(grandchildren.length==1){grandchild=grandchildren[0];if(grandchild.nodeType==3||grandchild.nodeType==4){name=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;value=grandchild.nodeValue.replace(this.regExes.trimSpace,"");attributes[name]=value;}}}} | |
| 929 | -break;} | |
| 930 | -childNode=childNode.nextSibling;} | |
| 931 | -return attributes;},write:function(features){if(!(features instanceof Array)){features=[features];} | |
| 932 | -var gml=this.createElementNS("http://www.opengis.net/wfs","wfs:"+this.collectionName);for(var i=0;i<features.length;i++){gml.appendChild(this.createFeatureXML(features[i]));} | |
| 933 | -return OpenLayers.Format.XML.prototype.write.apply(this,[gml]);},createFeatureXML:function(feature){var geometry=feature.geometry;var geometryNode=this.buildGeometryNode(geometry);var geomContainer=this.createElementNS(this.featureNS,this.featurePrefix+":"+ | |
| 934 | -this.geometryName);geomContainer.appendChild(geometryNode);var featureNode=this.createElementNS(this.gmlns,"gml:"+this.featureName);var featureContainer=this.createElementNS(this.featureNS,this.featurePrefix+":"+ | |
| 935 | -this.layerName);var fid=feature.fid||feature.id;featureContainer.setAttribute("fid",fid);featureContainer.appendChild(geomContainer);for(var attr in feature.attributes){var attrText=this.createTextNode(feature.attributes[attr]);var nodename=attr.substring(attr.lastIndexOf(":")+1);var attrContainer=this.createElementNS(this.featureNS,this.featurePrefix+":"+ | |
| 936 | -nodename);attrContainer.appendChild(attrText);featureContainer.appendChild(attrContainer);} | |
| 937 | -featureNode.appendChild(featureContainer);return featureNode;},buildGeometryNode:function(geometry){var className=geometry.CLASS_NAME;var type=className.substring(className.lastIndexOf(".")+1);var builder=this.buildGeometry[type.toLowerCase()];return builder.apply(this,[geometry]);},buildGeometry:{point:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:Point");gml.appendChild(this.buildCoordinatesNode(geometry));return gml;},multipoint:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:MultiPoint");var points=geometry.components;var pointMember,pointGeom;for(var i=0;i<points.length;i++){pointMember=this.createElementNS(this.gmlns,"gml:pointMember");pointGeom=this.buildGeometry.point.apply(this,[points[i]]);pointMember.appendChild(pointGeom);gml.appendChild(pointMember);} | |
| 938 | -return gml;},linestring:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:LineString");gml.appendChild(this.buildCoordinatesNode(geometry));return gml;},multilinestring:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:MultiLineString");var lines=geometry.components;var lineMember,lineGeom;for(var i=0;i<lines.length;++i){lineMember=this.createElementNS(this.gmlns,"gml:lineStringMember");lineGeom=this.buildGeometry.linestring.apply(this,[lines[i]]);lineMember.appendChild(lineGeom);gml.appendChild(lineMember);} | |
| 939 | -return gml;},linearring:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:LinearRing");gml.appendChild(this.buildCoordinatesNode(geometry));return gml;},polygon:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:Polygon");var rings=geometry.components;var ringMember,ringGeom,type;for(var i=0;i<rings.length;++i){type=(i==0)?"outerBoundaryIs":"innerBoundaryIs";ringMember=this.createElementNS(this.gmlns,"gml:"+type);ringGeom=this.buildGeometry.linearring.apply(this,[rings[i]]);ringMember.appendChild(ringGeom);gml.appendChild(ringMember);} | |
| 940 | -return gml;},multipolygon:function(geometry){var gml=this.createElementNS(this.gmlns,"gml:MultiPolygon");var polys=geometry.components;var polyMember,polyGeom;for(var i=0;i<polys.length;++i){polyMember=this.createElementNS(this.gmlns,"gml:polygonMember");polyGeom=this.buildGeometry.polygon.apply(this,[polys[i]]);polyMember.appendChild(polyGeom);gml.appendChild(polyMember);} | |
| 941 | -return gml;}},buildCoordinatesNode:function(geometry){var coordinatesNode=this.createElementNS(this.gmlns,"gml:coordinates");coordinatesNode.setAttribute("decimal",".");coordinatesNode.setAttribute("cs",",");coordinatesNode.setAttribute("ts"," ");var points=(geometry.components)?geometry.components:[geometry];var parts=[];for(var i=0;i<points.length;i++){parts.push(points[i].x+","+points[i].y);} | |
| 942 | -var txtNode=this.createTextNode(parts.join(" "));coordinatesNode.appendChild(txtNode);return coordinatesNode;},CLASS_NAME:"OpenLayers.Format.GML"});OpenLayers.Format.GeoJSON=OpenLayers.Class(OpenLayers.Format.JSON,{initialize:function(options){OpenLayers.Format.JSON.prototype.initialize.apply(this,[options]);},read:function(json,type,filter){type=(type)?type:"FeatureCollection";var results=null;var obj=null;if(typeof json=="string"){obj=OpenLayers.Format.JSON.prototype.read.apply(this,[json,filter]);}else{obj=json;} | |
| 943 | -if(!obj){OpenLayers.Console.error("Bad JSON: "+json);}else if(typeof(obj.type)!="string"){OpenLayers.Console.error("Bad GeoJSON - no type: "+json);}else if(this.isValidType(obj,type)){switch(type){case"Geometry":try{results=this.parseGeometry(obj);}catch(err){OpenLayers.Console.error(err);} | |
| 944 | -break;case"Feature":try{results=this.parseFeature(obj);results.type="Feature";}catch(err){OpenLayers.Console.error(err);} | |
| 945 | -break;case"GeometryCollection":results=[];for(var i=0;i<obj.geometries.length;++i){try{results.push(this.parseGeometry(obj.geometries[i]));}catch(err){results=null;OpenLayers.Console.error(err);}} | |
| 946 | -break;case"FeatureCollection":results=[];switch(obj.type){case"Feature":try{results.push(this.parseFeature(obj));}catch(err){results=null;OpenLayers.Console.error(err);} | |
| 947 | -break;case"FeatureCollection":for(var i=0;i<obj.features.length;++i){try{results.push(this.parseFeature(obj.features[i]));}catch(err){results=null;OpenLayers.Console.error(err);}} | |
| 948 | -break;case"GeometryCollection":for(var i=0;i<obj.geometries.length;++i){try{var geom=this.parseGeometry(obj.geometries[i]);results.push(new OpenLayers.Feature.Vector(geom));}catch(err){results=null;OpenLayers.Console.error(err);}} | |
| 949 | -break;default:try{var geom=this.parseGeometry(obj);results.push(new OpenLayers.Feature.Vector(geom));}catch(err){results=null;OpenLayers.Console.error(err);}} | |
| 950 | -break;}} | |
| 951 | -return results;},isValidType:function(obj,type){var valid=false;switch(type){case"Geometry":if(OpenLayers.Util.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box"],obj.type)==-1){OpenLayers.Console.error("Unsupported geometry type: "+ | |
| 952 | -obj.type);}else{valid=true;} | |
| 953 | -break;case"FeatureCollection":valid=true;break | |
| 954 | -default:if(obj.type==type){valid=true;}else{OpenLayers.Console.error("Cannot convert types from "+ | |
| 955 | -obj.type+" to "+type);}} | |
| 956 | -return valid;},parseFeature:function(obj){var feature,geometry,attributes;attributes=(obj.properties)?obj.properties:{};try{geometry=this.parseGeometry(obj.geometry);}catch(err){throw err;} | |
| 957 | -feature=new OpenLayers.Feature.Vector(geometry,attributes);if(obj.id){feature.fid=obj.id;} | |
| 958 | -return feature;},parseGeometry:function(obj){var geometry;if(!(obj.coordinates instanceof Array)){throw"Geometry must have coordinates array: "+obj;} | |
| 959 | -if(!this.parseCoords[obj.type.toLowerCase()]){throw"Unsupported geometry type: "+obj.type;} | |
| 960 | -try{geometry=this.parseCoords[obj.type.toLowerCase()].apply(this,[obj.coordinates]);}catch(err){throw err;} | |
| 961 | -return geometry;},parseCoords:{"point":function(array){if(array.length!=2){throw"Only 2D points are supported: "+array;} | |
| 962 | -return new OpenLayers.Geometry.Point(array[0],array[1]);},"multipoint":function(array){var points=[];var p=null;for(var i=0;i<array.length;++i){try{p=this.parseCoords["point"].apply(this,[array[i]]);}catch(err){throw err;} | |
| 963 | -points.push(p);} | |
| 964 | -return new OpenLayers.Geometry.MultiPoint(points);},"linestring":function(array){var points=[];var p=null;for(var i=0;i<array.length;++i){try{p=this.parseCoords["point"].apply(this,[array[i]]);}catch(err){throw err;} | |
| 965 | -points.push(p);} | |
| 966 | -return new OpenLayers.Geometry.LineString(points);},"multilinestring":function(array){var lines=[];var l=null;for(var i=0;i<array.length;++i){try{l=this.parseCoords["linestring"].apply(this,[array[i]]);}catch(err){throw err;} | |
| 967 | -lines.push(l);} | |
| 968 | -return new OpenLayers.Geometry.MultiLineString(lines);},"polygon":function(array){var rings=[];var r,l;for(var i=0;i<array.length;++i){try{l=this.parseCoords["linestring"].apply(this,[array[i]]);}catch(err){throw err;} | |
| 969 | -r=new OpenLayers.Geometry.LinearRing(l.components);rings.push(r);} | |
| 970 | -return new OpenLayers.Geometry.Polygon(rings);},"multipolygon":function(array){var polys=[];var p=null;for(var i=0;i<array.length;++i){try{p=this.parseCoords["polygon"].apply(this,[array[i]]);}catch(err){throw err;} | |
| 971 | -polys.push(p);} | |
| 972 | -return new OpenLayers.Geometry.MultiPolygon(polys);},"box":function(array){if(array.length!=2){throw"GeoJSON box coordinates must have 2 elements";} | |
| 973 | -return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(array[0][0],array[0][1]),new OpenLayers.Geometry.Point(array[1][0],array[0][1]),new OpenLayers.Geometry.Point(array[1][0],array[1][1]),new OpenLayers.Geometry.Point(array[0][0],array[1][1]),new OpenLayers.Geometry.Point(array[0][0],array[0][1])])]);}},write:function(obj,pretty){var geojson={"type":null};if(obj instanceof Array){if(obj[0]instanceof OpenLayers.Feature.Vector){geojson.features=[];}else if(obj[0].CLASS_NAME.search("OpenLayers.Geometry")==0){geojson.geometries=[];} | |
| 974 | -for(var i=0;i<obj.length;++i){var element=obj[i];if(element instanceof OpenLayers.Feature.Vector){if(geojson.type==null){geojson.type="FeatureCollection";if(element.layer&&element.layer.projection){geojson.crs=this.createCRSObject(element);}}else if(geojson.type!="FeatureCollection"){OpenLayers.Console.error("FeatureCollection only supports collections of features: "+element);break;} | |
| 975 | -geojson.features.push(this.extract.feature.apply(this,[element]));}else if(element.CLASS_NAME.search("OpenLayers.Geometry")==0){if(geojson.type==null){geojson.type="GeometryCollection";}else if(geojson.type!="GeometryCollection"){OpenLayers.Console.error("GeometryCollection only supports collections of geometries: "+element);break;} | |
| 976 | -geojson.geometries.push(this.extract.geometry.apply(this,[element]));}}}else if(obj.CLASS_NAME.search("OpenLayers.Geometry")==0){geojson=this.extract.geometry.apply(this,[obj]);}else if(obj instanceof OpenLayers.Feature.Vector){geojson=this.extract.feature.apply(this,[obj]);if(obj.layer&&obj.layer.projection){geojson.crs=this.createCRSObject(obj);}} | |
| 977 | -return OpenLayers.Format.JSON.prototype.write.apply(this,[geojson,pretty]);},createCRSObject:function(object){var proj=object.layer.projection;var crs={} | |
| 978 | -if(proj.match(/epsg:/i)){var code=parseInt(proj.substring(proj.indexOf(":")+1));if(code==4326){crs={"type":"OGC","properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}};}else{crs={"type":"EPSG","properties":{"code":code}};}} | |
| 979 | -return crs;},extract:{'feature':function(feature){var geom=this.extract.geometry.apply(this,[feature.geometry]);return{"type":"Feature","id":feature.fid==null?feature.id:feature.fid,"properties":feature.attributes,"geometry":geom}},'geometry':function(geometry){var geometryType=geometry.CLASS_NAME.split('.')[2];var data=this.extract[geometryType.toLowerCase()].apply(this,[geometry]);return{"type":geometryType,"coordinates":data}},'point':function(point){return[point.x,point.y];},'multipoint':function(multipoint){var array=[];for(var i=0;i<multipoint.components.length;++i){array.push(this.extract.point.apply(this,[multipoint.components[i]]));} | |
| 980 | -return array;},'linestring':function(linestring){var array=[];for(var i=0;i<linestring.components.length;++i){array.push(this.extract.point.apply(this,[linestring.components[i]]));} | |
| 981 | -return array;},'multilinestring':function(multilinestring){var array=[];for(var i=0;i<multilinestring.components.length;++i){array.push(this.extract.linestring.apply(this,[multilinestring.components[i]]));} | |
| 982 | -return array;},'polygon':function(polygon){var array=[];for(var i=0;i<polygon.components.length;++i){array.push(this.extract.linestring.apply(this,[polygon.components[i]]));} | |
| 983 | -return array;},'multipolygon':function(multipolygon){var array=[];for(var i=0;i<multipolygon.components.length;++i){array.push(this.extract.polygon.apply(this,[multipolygon.components[i]]));} | |
| 984 | -return array;}},CLASS_NAME:"OpenLayers.Format.GeoJSON"});OpenLayers.Format.GeoRSS=OpenLayers.Class(OpenLayers.Format.XML,{rssns:"http://backend.userland.com/rss2",featureNS:"http://mapserver.gis.umn.edu/mapserver",georssns:"http://www.georss.org/georss",geons:"http://www.w3.org/2003/01/geo/wgs84_pos#",featureTitle:"Untitled",featureDescription:"No Description",initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},createGeometryFromItem:function(item){var point=this.getElementsByTagNameNS(item,this.georssns,"point");var lat=this.getElementsByTagNameNS(item,this.geons,'lat');var lon=this.getElementsByTagNameNS(item,this.geons,'long');var line=this.getElementsByTagNameNS(item,this.georssns,"line");var polygon=this.getElementsByTagNameNS(item,this.georssns,"polygon");if(point.length>0||(lat.length>0&&lon.length>0)){if(point.length>0){var location=OpenLayers.String.trim(point[0].firstChild.nodeValue).split(/\s+/);if(location.length!=2){var location=OpenLayers.String.trim(point[0].firstChild.nodeValue).split(/\s*,\s*/);}}else{var location=[parseFloat(lat[0].firstChild.nodeValue),parseFloat(lon[0].firstChild.nodeValue)];} | |
| 985 | -var geometry=new OpenLayers.Geometry.Point(parseFloat(location[1]),parseFloat(location[0]));}else if(line.length>0){var coords=OpenLayers.String.trim(line[0].firstChild.nodeValue).split(/\s+/);var components=[];for(var i=0;i<coords.length;i+=2){var point=new OpenLayers.Geometry.Point(parseFloat(coords[i+1]),parseFloat(coords[i]));components.push(point);} | |
| 986 | -geometry=new OpenLayers.Geometry.LineString(components);}else if(polygon.length>0){var coords=OpenLayers.String.trim(polygon[0].firstChild.nodeValue).split(/\s+/);var components=[];for(var i=0;i<coords.length;i+=2){var point=new OpenLayers.Geometry.Point(parseFloat(coords[i+1]),parseFloat(coords[i]));components.push(point);} | |
| 987 | -geometry=new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]);} | |
| 988 | -return geometry;},createFeatureFromItem:function(item){var geometry=this.createGeometryFromItem(item);var title=this.getChildValue(item,"*","title",this.featureTitle);var description=this.getChildValue(item,"*","description",this.getChildValue(item,"*","content",this.featureDescription));var link=this.getChildValue(item,"*","link");if(!link){try{link=this.getElementsByTagNameNS(item,"*","link")[0].getAttribute("href");}catch(e){link=null;}} | |
| 989 | -var id=this.getChildValue(item,"*","id",null);var data={"title":title,"description":description,"link":link};var feature=new OpenLayers.Feature.Vector(geometry,data);feature.fid=id;return feature;},getChildValue:function(node,nsuri,name,def){var value;try{value=this.getElementsByTagNameNS(node,nsuri,name)[0].firstChild.nodeValue;}catch(e){value=(def==undefined)?"":def;} | |
| 990 | -return value;},read:function(doc){if(typeof doc=="string"){doc=OpenLayers.Format.XML.prototype.read.apply(this,[doc]);} | |
| 991 | -var itemlist=null;itemlist=this.getElementsByTagNameNS(doc,'*','item');if(itemlist.length==0){itemlist=this.getElementsByTagNameNS(doc,'*','entry');} | |
| 992 | -var numItems=itemlist.length;var features=new Array(numItems);for(var i=0;i<numItems;i++){features[i]=this.createFeatureFromItem(itemlist[i]);} | |
| 993 | -return features;},write:function(features){var georss;if(features instanceof Array){georss=this.createElementNS(this.rssns,"rss");for(var i=0;i<features.length;i++){georss.appendChild(this.createFeatureXML(features[i]));}}else{georss=this.createFeatureXML(features);} | |
| 994 | -return OpenLayers.Format.XML.prototype.write.apply(this,[georss]);},createFeatureXML:function(feature){var geometryNode=this.buildGeometryNode(feature.geometry);var featureNode=this.createElementNS(this.rssns,"item");var titleNode=this.createElementNS(this.rssns,"title");titleNode.appendChild(this.createTextNode(feature.attributes.title?feature.attributes.title:""));var descNode=this.createElementNS(this.rssns,"description");descNode.appendChild(this.createTextNode(feature.attributes.description?feature.attributes.description:""));featureNode.appendChild(titleNode);featureNode.appendChild(descNode);if(feature.attributes.link){var linkNode=this.createElementNS(this.rssns,"link");linkNode.appendChild(this.createTextNode(feature.attributes.link));featureNode.appendChild(linkNode);} | |
| 995 | -for(var attr in feature.attributes){if(attr=="link"||attr=="title"||attr=="description"){continue;} | |
| 996 | -var attrText=this.createTextNode(feature.attributes[attr]);var nodename=attr;if(attr.search(":")!=-1){nodename=attr.split(":")[1];} | |
| 997 | -var attrContainer=this.createElementNS(this.featureNS,"feature:"+nodename);attrContainer.appendChild(attrText);featureNode.appendChild(attrContainer);} | |
| 998 | -featureNode.appendChild(geometryNode);return featureNode;},buildGeometryNode:function(geometry){var node;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Polygon"){node=this.createElementNS(this.georssns,'georss:polygon');node.appendChild(this.buildCoordinatesNode(geometry.components[0]));} | |
| 999 | -else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"){node=this.createElementNS(this.georssns,'georss:line');node.appendChild(this.buildCoordinatesNode(geometry));} | |
| 1000 | -else if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){node=this.createElementNS(this.georssns,'georss:point');node.appendChild(this.buildCoordinatesNode(geometry));}else{throw"Couldn't parse "+geometry.CLASS_NAME;} | |
| 1001 | -return node;},buildCoordinatesNode:function(geometry){var points=null;if(geometry.components){points=geometry.components;} | |
| 1002 | -var path;if(points){var numPoints=points.length;var parts=new Array(numPoints);for(var i=0;i<numPoints;i++){parts[i]=points[i].y+" "+points[i].x;} | |
| 1003 | -path=parts.join(" ");}else{path=geometry.y+" "+geometry.x;} | |
| 1004 | -return this.createTextNode(path);},CLASS_NAME:"OpenLayers.Format.GeoRSS"});OpenLayers.Format.KML=OpenLayers.Class(OpenLayers.Format.XML,{kmlns:"http://earth.google.com/kml/2.0",placemarksDesc:"No description available",foldersName:"OpenLayers export",foldersDesc:"Exported on "+new Date(),extractAttributes:true,internalns:null,initialize:function(options){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)};OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);} | |
| 1005 | -var featureNodes=this.getElementsByTagNameNS(data,'*',"Placemark");var numFeatures=featureNodes.length;var features=new Array(numFeatures);for(var i=0;i<numFeatures;i++){var feature=this.parseFeature(featureNodes[i]);if(feature){features[i]=feature;}else{throw"Bad Placemark: "+i;}} | |
| 1006 | -return features;},parseFeature:function(node){var order=["MultiGeometry","Polygon","LineString","Point"];var type,nodeList,geometry,parser;for(var i=0;i<order.length;++i){type=order[i];this.internalns=node.namespaceURI?node.namespaceURI:this.kmlns;nodeList=this.getElementsByTagNameNS(node,this.internalns,type);if(nodeList.length>0){var parser=this.parseGeometry[type.toLowerCase()];if(parser){geometry=parser.apply(this,[nodeList[0]]);}else{OpenLayers.Console.error("Unsupported geometry type: "+ | |
| 1007 | -type);} | |
| 1008 | -break;}} | |
| 1009 | -var attributes;if(this.extractAttributes){attributes=this.parseAttributes(node);} | |
| 1010 | -var feature=new OpenLayers.Feature.Vector(geometry,attributes);var fid=node.getAttribute("id");if(fid!=null){feature.fid=fid;} | |
| 1011 | -return feature;},parseGeometry:{point:function(node){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"coordinates");var coords=[];if(nodeList.length>0){var coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.removeSpace,"");coords=coordString.split(",");} | |
| 1012 | -var point=null;if(coords.length>1){if(coords.length==2){coords[2]=null;} | |
| 1013 | -point=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{throw"Bad coordinate string: "+coordString;} | |
| 1014 | -return point;},linestring:function(node,ring){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"coordinates");var line=null;if(nodeList.length>0){var coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coordString=coordString.replace(this.regExes.trimComma,",");var pointList=coordString.split(this.regExes.splitSpace);var numPoints=pointList.length;var points=new Array(numPoints);var coords,numCoords;for(var i=0;i<numPoints;++i){coords=pointList[i].split(",");numCoords=coords.length;if(numCoords>1){if(coords.length==2){coords[2]=null;} | |
| 1015 | -points[i]=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{throw"Bad LineString point coordinates: "+ | |
| 1016 | -pointList[i];}} | |
| 1017 | -if(numPoints){if(ring){line=new OpenLayers.Geometry.LinearRing(points);}else{line=new OpenLayers.Geometry.LineString(points);}}else{throw"Bad LineString coordinates: "+coordString;}} | |
| 1018 | -return line;},polygon:function(node){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"LinearRing");var numRings=nodeList.length;var components=new Array(numRings);if(numRings>0){var ring;for(var i=0;i<nodeList.length;++i){ring=this.parseGeometry.linestring.apply(this,[nodeList[i],true]);if(ring){components[i]=ring;}else{throw"Bad LinearRing geometry: "+i;}}} | |
| 1019 | -return new OpenLayers.Geometry.Polygon(components);},multigeometry:function(node){var child,parser;var parts=[];var children=node.childNodes;for(var i=0;i<children.length;++i){child=children[i];if(child.nodeType==1){type=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;var parser=this.parseGeometry[type.toLowerCase()];if(parser){parts.push(parser.apply(this,[child]));}}} | |
| 1020 | -return new OpenLayers.Geometry.Collection(parts);}},parseAttributes:function(node){var attributes={};var child,grandchildren,grandchild;var children=node.childNodes;for(var i=0;i<children.length;++i){child=children[i];if(child.nodeType==1){grandchildren=child.childNodes;if(grandchildren.length==1){grandchild=grandchildren[0];if(grandchild.nodeType==3||grandchild.nodeType==4){name=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;value=grandchild.nodeValue.replace(this.regExes.trimSpace,"");attributes[name]=value;}}}} | |
| 1021 | -return attributes;},write:function(features){if(!(features instanceof Array)){features=[features];} | |
| 1022 | -var kml=this.createElementNS(this.kmlns,"kml");var folder=this.createFolderXML();for(var i=0;i<features.length;++i){folder.appendChild(this.createPlacemarkXML(features[i]));} | |
| 1023 | -kml.appendChild(folder);return OpenLayers.Format.XML.prototype.write.apply(this,[kml]);},createFolderXML:function(){var folderName=this.createElementNS(this.kmlns,"name");var folderNameText=this.createTextNode(this.foldersName);folderName.appendChild(folderNameText);var folderDesc=this.createElementNS(this.kmlns,"description");var folderDescText=this.createTextNode(this.foldersDesc);folderDesc.appendChild(folderDescText);var folder=this.createElementNS(this.kmlns,"Folder");folder.appendChild(folderName);folder.appendChild(folderDesc);return folder;},createPlacemarkXML:function(feature){var placemarkName=this.createElementNS(this.kmlns,"name");var name=(feature.attributes.name)?feature.attributes.name:feature.id;placemarkName.appendChild(this.createTextNode(name));var placemarkDesc=this.createElementNS(this.kmlns,"description");var desc=(feature.attributes.description)?feature.attributes.description:this.placemarksDesc;placemarkDesc.appendChild(this.createTextNode(desc));var placemarkNode=this.createElementNS(this.kmlns,"Placemark");if(feature.fid!=null){placemarkNode.setAttribute("id",feature.fid);} | |
| 1024 | -placemarkNode.appendChild(placemarkName);placemarkNode.appendChild(placemarkDesc);var geometryNode=this.buildGeometryNode(feature.geometry);placemarkNode.appendChild(geometryNode);return placemarkNode;},buildGeometryNode:function(geometry){var className=geometry.CLASS_NAME;var type=className.substring(className.lastIndexOf(".")+1);var builder=this.buildGeometry[type.toLowerCase()];var node=null;if(builder){node=builder.apply(this,[geometry]);} | |
| 1025 | -return node;},buildGeometry:{point:function(geometry){var kml=this.createElementNS(this.kmlns,"Point");kml.appendChild(this.buildCoordinatesNode(geometry));return kml;},multipoint:function(geometry){return this.buildGeometry.collection(geometry);},linestring:function(geometry){var kml=this.createElementNS(this.kmlns,"LineString");kml.appendChild(this.buildCoordinatesNode(geometry));return kml;},multilinestring:function(geometry){return this.buildGeometry.collection(geometry);},linearring:function(geometry){var kml=this.createElementNS(this.kmlns,"LinearRing");kml.appendChild(this.buildCoordinatesNode(geometry));return kml;},polygon:function(geometry){var kml=this.createElementNS(this.kmlns,"Polygon");var rings=geometry.components;var ringMember,ringGeom,type;for(var i=0;i<rings.length;++i){type=(i==0)?"outerBoundaryIs":"innerBoundaryIs";ringMember=this.createElementNS(this.kmlns,type);ringGeom=this.buildGeometry.linearring.apply(this,[rings[i]]);ringMember.appendChild(ringGeom);kml.appendChild(ringMember);} | |
| 1026 | -return kml;},multipolygon:function(geometry){return this.buildGeometry.collection(geometry);},collection:function(geometry){var kml=this.createElementNS(this.kmlns,"MultiGeometry");var child;for(var i=0;i<geometry.components.length;++i){child=this.buildGeometryNode.apply(this,[geometry.components[i]]);if(child){kml.appendChild(child);}} | |
| 1027 | -return kml;}},buildCoordinatesNode:function(geometry){var coordinatesNode=this.createElementNS(this.kmlns,"coordinates");var path;var points=geometry.components;if(points){var point;var numPoints=points.length;var parts=new Array(numPoints);for(var i=0;i<numPoints;++i){point=points[i];parts[i]=point.x+","+point.y;} | |
| 1028 | -path=parts.join(" ");}else{path=geometry.x+","+geometry.y;} | |
| 1029 | -var txtNode=this.createTextNode(path);coordinatesNode.appendChild(txtNode);return coordinatesNode;},CLASS_NAME:"OpenLayers.Format.KML"});OpenLayers.Geometry.LinearRing=OpenLayers.Class(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(points){OpenLayers.Geometry.LineString.prototype.initialize.apply(this,arguments);},addComponent:function(point,index){var added=false;var lastPoint=this.components.pop();if(index!=null||!point.equals(lastPoint)){added=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments);} | |
| 1030 | -var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);return added;},removeComponent:function(point){if(this.components.length>4){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);}},move:function(x,y){for(var i=0;i<this.components.length-1;i++){this.components[i].move(x,y);}},rotate:function(angle,origin){for(var i=0;i<this.components.length-1;++i){this.components[i].rotate(angle,origin);}},resize:function(scale,origin){for(var i=0;i<this.components.length-1;++i){this.components[i].resize(scale,origin);}},getArea:function(){var area=0.0;if(this.components&&(this.components.length>2)){var sum=0.0;for(var i=0;i<this.components.length-1;i++){var b=this.components[i];var c=this.components[i+1];sum+=(b.x+c.x)*(c.y-b.y);} | |
| 1031 | -area=-sum/2.0;} | |
| 1032 | -return area;},CLASS_NAME:"OpenLayers.Geometry.LinearRing"});OpenLayers.Handler.Path=OpenLayers.Class(OpenLayers.Handler.Point,{line:null,freehand:false,freehandToggle:'shiftKey',initialize:function(control,callbacks,options){OpenLayers.Handler.Point.prototype.initialize.apply(this,arguments);},createFeature:function(){this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString());this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point());},destroyFeature:function(){OpenLayers.Handler.Point.prototype.destroyFeature.apply(this);this.line.destroy();this.line=null;},addPoint:function(){this.line.geometry.addComponent(this.point.geometry.clone(),this.line.geometry.components.length);this.callback("point",[this.point.geometry]);},freehandMode:function(evt){return(this.freehandToggle&&evt[this.freehandToggle])?!this.freehand:this.freehand;},modifyFeature:function(){var index=this.line.geometry.components.length-1;this.line.geometry.components[index].x=this.point.geometry.x;this.line.geometry.components[index].y=this.point.geometry.y;this.line.geometry.components[index].clearBounds();},drawFeature:function(){this.layer.drawFeature(this.line,this.style);this.layer.drawFeature(this.point,this.style);},geometryClone:function(){return this.line.geometry.clone();},mousedown:function(evt){if(this.lastDown&&this.lastDown.equals(evt.xy)){return false;} | |
| 1033 | -if(this.lastDown==null){this.createFeature();} | |
| 1034 | -this.mouseDown=true;this.lastDown=evt.xy;var lonlat=this.control.map.getLonLatFromPixel(evt.xy);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;if((this.lastUp==null)||!this.lastUp.equals(evt.xy)){this.addPoint();} | |
| 1035 | -this.drawFeature();this.drawing=true;return false;},mousemove:function(evt){if(this.drawing){var lonlat=this.map.getLonLatFromPixel(evt.xy);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;if(this.mouseDown&&this.freehandMode(evt)){this.addPoint();}else{this.modifyFeature();} | |
| 1036 | -this.drawFeature();} | |
| 1037 | -return true;},mouseup:function(evt){this.mouseDown=false;if(this.drawing){if(this.freehandMode(evt)){this.finalize();}else{if(this.lastUp==null){this.addPoint();} | |
| 1038 | -this.lastUp=evt.xy;} | |
| 1039 | -return false;} | |
| 1040 | -return true;},dblclick:function(evt){if(!this.freehandMode(evt)){var index=this.line.geometry.components.length-1;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.finalize();} | |
| 1041 | -return false;},CLASS_NAME:"OpenLayers.Handler.Path"});OpenLayers.Format.WFS=OpenLayers.Class(OpenLayers.Format.GML,{layer:null,wfsns:"http://www.opengis.net/wfs",initialize:function(options,layer){OpenLayers.Format.GML.prototype.initialize.apply(this,[options]);this.layer=layer;if(this.layer.featureNS){this.featureNS=this.layer.featureNS;} | |
| 1042 | -if(this.layer.options.geometry_column){this.geometryName=this.layer.options.geometry_column;} | |
| 1043 | -if(this.layer.options.typename){this.featureName=this.layer.options.typename;}},write:function(features){var transaction=document.createElementNS('http://www.opengis.net/wfs','wfs:Transaction');transaction.setAttribute("version","1.0.0");transaction.setAttribute("service","WFS");for(var i=0;i<features.length;i++){switch(features[i].state){case OpenLayers.State.INSERT:transaction.appendChild(this.insert(features[i]));break;case OpenLayers.State.UPDATE:transaction.appendChild(this.update(features[i]));break;case OpenLayers.State.DELETE:transaction.appendChild(this.remove(features[i]));break;}} | |
| 1044 | -return transaction;},createFeatureXML:function(feature){var geometryNode=this.buildGeometryNode(feature.geometry);var geomContainer=document.createElementNS(this.featureNS,"feature:"+this.geometryName);geomContainer.appendChild(geometryNode);var featureContainer=document.createElementNS(this.featureNS,"feature:"+this.featureName);featureContainer.appendChild(geomContainer);for(var attr in feature.attributes){var attrText=document.createTextNode(feature.attributes[attr]);var nodename=attr;if(attr.search(":")!=-1){nodename=attr.split(":")[1];} | |
| 1045 | -var attrContainer=document.createElementNS(this.featureNS,"feature:"+nodename);attrContainer.appendChild(attrText);featureContainer.appendChild(attrContainer);} | |
| 1046 | -return featureContainer;},insert:function(feature){var insertNode=document.createElementNS(this.wfsns,'wfs:Insert');insertNode.appendChild(this.createFeatureXML(feature));return insertNode;},update:function(feature){if(!feature.fid){alert("Can't update a feature for which there is no FID.");} | |
| 1047 | -var updateNode=document.createElementNS(this.wfsns,'wfs:Update');updateNode.setAttribute("typeName",this.layerName);var propertyNode=document.createElementNS(this.wfsns,'wfs:Property');var nameNode=document.createElementNS('http://www.opengis.net/wfs','wfs:Name');var txtNode=document.createTextNode(this.geometryName);nameNode.appendChild(txtNode);propertyNode.appendChild(nameNode);var valueNode=document.createElementNS('http://www.opengis.net/wfs','wfs:Value');valueNode.appendChild(this.buildGeometryNode(feature.geometry));propertyNode.appendChild(valueNode);updateNode.appendChild(propertyNode);var filterNode=document.createElementNS('http://www.opengis.net/ogc','ogc:Filter');var filterIdNode=document.createElementNS('http://www.opengis.net/ogc','ogc:FeatureId');filterIdNode.setAttribute("fid",feature.fid);filterNode.appendChild(filterIdNode);updateNode.appendChild(filterNode);return updateNode;},remove:function(feature){if(!feature.attributes.fid){alert("Can't update a feature for which there is no FID.");return false;} | |
| 1048 | -var deleteNode=document.createElementNS(this.featureNS,'wfs:Delete');deleteNode.setAttribute("typeName",this.layerName);var filterNode=document.createElementNS('http://www.opengis.net/ogc','ogc:Filter');var filterIdNode=document.createElementNS('http://www.opengis.net/ogc','ogc:FeatureId');filterIdNode.setAttribute("fid",feature.attributes.fid);filterNode.appendChild(filterIdNode);deleteNode.appendChild(filterNode);return deleteNode;},destroy:function(){this.layer=null;},CLASS_NAME:"OpenLayers.Format.WFS"});OpenLayers.Handler.Polygon=OpenLayers.Class(OpenLayers.Handler.Path,{polygon:null,initialize:function(control,callbacks,options){OpenLayers.Handler.Path.prototype.initialize.apply(this,arguments);},createFeature:function(){this.polygon=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon());this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LinearRing());this.polygon.geometry.addComponent(this.line.geometry);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point());},destroyFeature:function(){OpenLayers.Handler.Path.prototype.destroyFeature.apply(this);this.polygon.destroy();this.polygon=null;},modifyFeature:function(){var index=this.line.geometry.components.length-2;this.line.geometry.components[index].x=this.point.geometry.x;this.line.geometry.components[index].y=this.point.geometry.y;this.line.geometry.components[index].clearBounds();},drawFeature:function(){this.layer.drawFeature(this.polygon,this.style);this.layer.drawFeature(this.point,this.style);},geometryClone:function(){return this.polygon.geometry.clone();},dblclick:function(evt){if(!this.freehandMode(evt)){var index=this.line.geometry.components.length-2;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.finalize();} | |
| 1049 | -return false;},CLASS_NAME:"OpenLayers.Handler.Polygon"});OpenLayers.Control.EditingToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(layer,options){OpenLayers.Control.Panel.prototype.initialize.apply(this,[options]);this.addControls([new OpenLayers.Control.Navigation()]);var controls=[new OpenLayers.Control.DrawFeature(layer,OpenLayers.Handler.Point,{'displayClass':'olControlDrawFeaturePoint'}),new OpenLayers.Control.DrawFeature(layer,OpenLayers.Handler.Path,{'displayClass':'olControlDrawFeaturePath'}),new OpenLayers.Control.DrawFeature(layer,OpenLayers.Handler.Polygon,{'displayClass':'olControlDrawFeaturePolygon'})];for(var i=0;i<controls.length;i++){controls[i].featureAdded=function(feature){feature.state=OpenLayers.State.INSERT;}} | |
| 1050 | -this.addControls(controls);},draw:function(){var div=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return div;},CLASS_NAME:"OpenLayers.Control.EditingToolbar"}); | |
| 1051 | 0 | \ No newline at end of file |
pacotes/openlayers/art/arrows.svg
| ... | ... | @@ -1,127 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 2 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> | |
| 3 | -<svg | |
| 4 | - xmlns:dc="http://purl.org/dc/elements/1.1/" | |
| 5 | - xmlns:cc="http://web.resource.org/cc/" | |
| 6 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
| 7 | - xmlns:svg="http://www.w3.org/2000/svg" | |
| 8 | - xmlns="http://www.w3.org/2000/svg" | |
| 9 | - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" | |
| 10 | - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |
| 11 | - width="18.000000px" | |
| 12 | - height="18.000000px" | |
| 13 | - id="svg2" | |
| 14 | - sodipodi:version="0.32" | |
| 15 | - inkscape:version="0.42" | |
| 16 | - sodipodi:docbase="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements" | |
| 17 | - sodipodi:docname="pan_icons.svg" | |
| 18 | - inkscape:export-filename="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements/zoom-minus-mini.png" | |
| 19 | - inkscape:export-xdpi="90.000000" | |
| 20 | - inkscape:export-ydpi="90.000000"> | |
| 21 | - <defs | |
| 22 | - id="defs4" /> | |
| 23 | - <sodipodi:namedview | |
| 24 | - id="base" | |
| 25 | - pagecolor="#ffffff" | |
| 26 | - bordercolor="#666666" | |
| 27 | - borderopacity="1.0" | |
| 28 | - inkscape:pageopacity="0.0" | |
| 29 | - inkscape:pageshadow="2" | |
| 30 | - inkscape:zoom="1.0000000" | |
| 31 | - inkscape:cx="9.0000000" | |
| 32 | - inkscape:cy="9.0000000" | |
| 33 | - inkscape:document-units="px" | |
| 34 | - inkscape:current-layer="layer1" | |
| 35 | - inkscape:window-width="1226" | |
| 36 | - inkscape:window-height="800" | |
| 37 | - inkscape:window-x="42" | |
| 38 | - inkscape:window-y="22" /> | |
| 39 | - <metadata | |
| 40 | - id="metadata7"> | |
| 41 | - <rdf:RDF> | |
| 42 | - <cc:Work | |
| 43 | - rdf:about=""> | |
| 44 | - <dc:format>image/svg+xml</dc:format> | |
| 45 | - <dc:type | |
| 46 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |
| 47 | - </cc:Work> | |
| 48 | - </rdf:RDF> | |
| 49 | - </metadata> | |
| 50 | - <g | |
| 51 | - inkscape:label="background" | |
| 52 | - inkscape:groupmode="layer" | |
| 53 | - id="layer1"> | |
| 54 | - <g | |
| 55 | - id="g2110"> | |
| 56 | - <path | |
| 57 | - transform="matrix(0.000000,-1.003160,1.003160,0.000000,-2.844000e-2,18.02844)" | |
| 58 | - d="M 17.971654 9.0000000 A 8.9716539 8.9716539 0 1 1 0.028346062,9.0000000 A 8.9716539 8.9716539 0 1 1 17.971654 9.0000000 z" | |
| 59 | - sodipodi:ry="8.9716539" | |
| 60 | - sodipodi:rx="8.9716539" | |
| 61 | - sodipodi:cy="9.0000000" | |
| 62 | - sodipodi:cx="9.0000000" | |
| 63 | - id="path2059" | |
| 64 | - style="fill:#00008b;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" | |
| 65 | - sodipodi:type="arc" /> | |
| 66 | - <rect | |
| 67 | - transform="matrix(0.000000,-1.000000,1.000000,0.000000,0.000000,0.000000)" | |
| 68 | - y="4.3599998e-06" | |
| 69 | - x="-9.0000048" | |
| 70 | - height="18.000000" | |
| 71 | - width="9.0000000" | |
| 72 | - id="rect2061" | |
| 73 | - style="fill:#00008b;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" /> | |
| 74 | - </g> | |
| 75 | - </g> | |
| 76 | - <g | |
| 77 | - inkscape:groupmode="layer" | |
| 78 | - id="layer4" | |
| 79 | - inkscape:label="zoom" | |
| 80 | - style="display:inline"> | |
| 81 | - <text | |
| 82 | - xml:space="preserve" | |
| 83 | - style="font-size:18.000000px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1.0000000;font-family:Helvetica" | |
| 84 | - x="3.7485352" | |
| 85 | - y="-3.4077148" | |
| 86 | - id="text2114" | |
| 87 | - sodipodi:linespacing="125.00000%" | |
| 88 | - transform="scale(1.000000,-1.000000)"><tspan | |
| 89 | - sodipodi:role="line" | |
| 90 | - id="tspan2118" | |
| 91 | - x="3.7485352" | |
| 92 | - y="-3.4077148">−</tspan></text> | |
| 93 | - </g> | |
| 94 | - <g | |
| 95 | - inkscape:groupmode="layer" | |
| 96 | - id="layer2" | |
| 97 | - inkscape:label="overlay" | |
| 98 | - style="display:none"> | |
| 99 | - <path | |
| 100 | - style="font-size:12.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana" | |
| 101 | - d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227" | |
| 102 | - id="text2082" | |
| 103 | - sodipodi:nodetypes="csccsssscccssscccssssccscc" /> | |
| 104 | - </g> | |
| 105 | - <g | |
| 106 | - inkscape:groupmode="layer" | |
| 107 | - id="layer3" | |
| 108 | - inkscape:label="pan triangle" | |
| 109 | - style="display:none"> | |
| 110 | - <path | |
| 111 | - sodipodi:type="star" | |
| 112 | - style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" | |
| 113 | - id="path2107" | |
| 114 | - sodipodi:sides="3" | |
| 115 | - sodipodi:cx="6.8031497" | |
| 116 | - sodipodi:cy="5.1874018" | |
| 117 | - sodipodi:r1="5.0880113" | |
| 118 | - sodipodi:r2="2.5440056" | |
| 119 | - sodipodi:arg1="1.0471976" | |
| 120 | - sodipodi:arg2="2.0943951" | |
| 121 | - inkscape:flatsided="false" | |
| 122 | - inkscape:rounded="0.0000000" | |
| 123 | - inkscape:randomized="0.0000000" | |
| 124 | - d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z " | |
| 125 | - transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)" /> | |
| 126 | - </g> | |
| 127 | -</svg> |
pacotes/openlayers/art/layer-switcher-maximize.svg
| ... | ... | @@ -1,128 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 2 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> | |
| 3 | -<svg | |
| 4 | - xmlns:dc="http://purl.org/dc/elements/1.1/" | |
| 5 | - xmlns:cc="http://web.resource.org/cc/" | |
| 6 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
| 7 | - xmlns:svg="http://www.w3.org/2000/svg" | |
| 8 | - xmlns="http://www.w3.org/2000/svg" | |
| 9 | - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" | |
| 10 | - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |
| 11 | - width="18.000000px" | |
| 12 | - height="18.000000px" | |
| 13 | - id="svg2" | |
| 14 | - sodipodi:version="0.32" | |
| 15 | - inkscape:version="0.43" | |
| 16 | - sodipodi:docbase="/home/sderle/projects/openlayers/layerswitcher/art" | |
| 17 | - sodipodi:docname="layer-switcher-maximize.svg" | |
| 18 | - inkscape:export-filename="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements/zoom-minus-mini.png" | |
| 19 | - inkscape:export-xdpi="90.000000" | |
| 20 | - inkscape:export-ydpi="90.000000"> | |
| 21 | - <defs | |
| 22 | - id="defs4" /> | |
| 23 | - <sodipodi:namedview | |
| 24 | - id="base" | |
| 25 | - pagecolor="#ffffff" | |
| 26 | - bordercolor="#666666" | |
| 27 | - borderopacity="1.0" | |
| 28 | - inkscape:pageopacity="0.0" | |
| 29 | - inkscape:pageshadow="2" | |
| 30 | - inkscape:zoom="16" | |
| 31 | - inkscape:cx="9" | |
| 32 | - inkscape:cy="9" | |
| 33 | - inkscape:document-units="px" | |
| 34 | - inkscape:current-layer="layer4" | |
| 35 | - inkscape:window-width="1226" | |
| 36 | - inkscape:window-height="800" | |
| 37 | - inkscape:window-x="42" | |
| 38 | - inkscape:window-y="25" /> | |
| 39 | - <metadata | |
| 40 | - id="metadata7"> | |
| 41 | - <rdf:RDF> | |
| 42 | - <cc:Work | |
| 43 | - rdf:about=""> | |
| 44 | - <dc:format>image/svg+xml</dc:format> | |
| 45 | - <dc:type | |
| 46 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |
| 47 | - </cc:Work> | |
| 48 | - </rdf:RDF> | |
| 49 | - </metadata> | |
| 50 | - <g | |
| 51 | - inkscape:label="background" | |
| 52 | - inkscape:groupmode="layer" | |
| 53 | - id="layer1"> | |
| 54 | - <g | |
| 55 | - id="g2110" | |
| 56 | - transform="matrix(-7.849624e-17,1,-1,-7.849624e-17,18,0)"> | |
| 57 | - <path | |
| 58 | - transform="matrix(0,-1.00316,1.00316,0,-2.844e-2,18.02844)" | |
| 59 | - d="M 17.971654 9 A 8.9716539 8.9716539 0 1 1 0.028346062,9 A 8.9716539 8.9716539 0 1 1 17.971654 9 z" | |
| 60 | - sodipodi:ry="8.9716539" | |
| 61 | - sodipodi:rx="8.9716539" | |
| 62 | - sodipodi:cy="9" | |
| 63 | - sodipodi:cx="9" | |
| 64 | - id="path2059" | |
| 65 | - style="fill:#00008b;fill-opacity:1;stroke:none;stroke-width:39.98414612;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
| 66 | - sodipodi:type="arc" /> | |
| 67 | - <rect | |
| 68 | - transform="matrix(0,-1,1,0,0,0)" | |
| 69 | - y="4.3599998e-06" | |
| 70 | - x="-9.0000048" | |
| 71 | - height="18" | |
| 72 | - width="9" | |
| 73 | - id="rect2061" | |
| 74 | - style="fill:#00008b;fill-opacity:1;stroke:none;stroke-width:39.98414612;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> | |
| 75 | - </g> | |
| 76 | - </g> | |
| 77 | - <g | |
| 78 | - inkscape:groupmode="layer" | |
| 79 | - id="layer4" | |
| 80 | - inkscape:label="zoom" | |
| 81 | - style="display:inline"> | |
| 82 | - <text | |
| 83 | - xml:space="preserve" | |
| 84 | - style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;display:inline;font-family:Helvetica" | |
| 85 | - x="1.5214844" | |
| 86 | - y="-3.2949219" | |
| 87 | - id="text2114" | |
| 88 | - sodipodi:linespacing="125%" | |
| 89 | - transform="scale(1,-1)"><tspan | |
| 90 | - sodipodi:role="line" | |
| 91 | - id="tspan2118" | |
| 92 | - x="1.5214844" | |
| 93 | - y="-3.2949219">+</tspan></text> | |
| 94 | - </g> | |
| 95 | - <g | |
| 96 | - inkscape:groupmode="layer" | |
| 97 | - id="layer2" | |
| 98 | - inkscape:label="overlay" | |
| 99 | - style="display:none"> | |
| 100 | - <path | |
| 101 | - style="font-size:12.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana" | |
| 102 | - d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227" | |
| 103 | - id="text2082" | |
| 104 | - sodipodi:nodetypes="csccsssscccssscccssssccscc" /> | |
| 105 | - </g> | |
| 106 | - <g | |
| 107 | - inkscape:groupmode="layer" | |
| 108 | - id="layer3" | |
| 109 | - inkscape:label="pan triangle" | |
| 110 | - style="display:none"> | |
| 111 | - <path | |
| 112 | - sodipodi:type="star" | |
| 113 | - style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" | |
| 114 | - id="path2107" | |
| 115 | - sodipodi:sides="3" | |
| 116 | - sodipodi:cx="6.8031497" | |
| 117 | - sodipodi:cy="5.1874018" | |
| 118 | - sodipodi:r1="5.0880113" | |
| 119 | - sodipodi:r2="2.5440056" | |
| 120 | - sodipodi:arg1="1.0471976" | |
| 121 | - sodipodi:arg2="2.0943951" | |
| 122 | - inkscape:flatsided="false" | |
| 123 | - inkscape:rounded="0.0000000" | |
| 124 | - inkscape:randomized="0.0000000" | |
| 125 | - d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z " | |
| 126 | - transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)" /> | |
| 127 | - </g> | |
| 128 | -</svg> |
pacotes/openlayers/art/layer-switcher-minimize.svg
| ... | ... | @@ -1,142 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 2 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> | |
| 3 | -<svg | |
| 4 | - xmlns:dc="http://purl.org/dc/elements/1.1/" | |
| 5 | - xmlns:cc="http://web.resource.org/cc/" | |
| 6 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
| 7 | - xmlns:svg="http://www.w3.org/2000/svg" | |
| 8 | - xmlns="http://www.w3.org/2000/svg" | |
| 9 | - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" | |
| 10 | - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |
| 11 | - inkscape:export-ydpi="90.000000" | |
| 12 | - inkscape:export-xdpi="90.000000" | |
| 13 | - inkscape:export-filename="/home/sderle/projects/openlayers/layerswitcher/img/layer-switcher-minimize.png" | |
| 14 | - sodipodi:docname="layer-switcher-minimize.svg" | |
| 15 | - sodipodi:docbase="/home/sderle/projects/openlayers/layerswitcher/art" | |
| 16 | - inkscape:version="0.43" | |
| 17 | - sodipodi:version="0.32" | |
| 18 | - id="svg2" | |
| 19 | - height="18.000000px" | |
| 20 | - width="18.000000px"> | |
| 21 | - <defs | |
| 22 | - id="defs4" /> | |
| 23 | - <sodipodi:namedview | |
| 24 | - inkscape:window-y="26" | |
| 25 | - inkscape:window-x="42" | |
| 26 | - inkscape:window-height="800" | |
| 27 | - inkscape:window-width="1226" | |
| 28 | - inkscape:current-layer="layer1" | |
| 29 | - inkscape:document-units="px" | |
| 30 | - inkscape:cy="9.3025513" | |
| 31 | - inkscape:cx="9" | |
| 32 | - inkscape:zoom="16" | |
| 33 | - inkscape:pageshadow="2" | |
| 34 | - inkscape:pageopacity="0.0" | |
| 35 | - borderopacity="1.0" | |
| 36 | - bordercolor="#666666" | |
| 37 | - pagecolor="#ffffff" | |
| 38 | - id="base" /> | |
| 39 | - <metadata | |
| 40 | - id="metadata7"> | |
| 41 | - <rdf:RDF> | |
| 42 | - <cc:Work | |
| 43 | - rdf:about=""> | |
| 44 | - <dc:format>image/svg+xml</dc:format> | |
| 45 | - <dc:type | |
| 46 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |
| 47 | - </cc:Work> | |
| 48 | - </rdf:RDF> | |
| 49 | - </metadata> | |
| 50 | - <g | |
| 51 | - style="display:inline" | |
| 52 | - id="layer1" | |
| 53 | - inkscape:groupmode="layer" | |
| 54 | - inkscape:label="background"> | |
| 55 | - <rect | |
| 56 | - style="fill:#00008b;fill-opacity:0;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" | |
| 57 | - id="rect2061" | |
| 58 | - width="18.014498" | |
| 59 | - height="18.000000" | |
| 60 | - x="-18.014502" | |
| 61 | - y="4.3599998e-06" | |
| 62 | - transform="matrix(0.000000,-1.000000,1.000000,0.000000,0.000000,0.000000)" | |
| 63 | - inkscape:export-xdpi="90" | |
| 64 | - inkscape:export-ydpi="90" | |
| 65 | - inkscape:export-filename="/home/sderle/projects/openlayers/layerswitcher/art/layer-switcher-minimize.png" /> | |
| 66 | - </g> | |
| 67 | - <g | |
| 68 | - inkscape:label="graticule" | |
| 69 | - id="layer5" | |
| 70 | - inkscape:groupmode="layer"> | |
| 71 | - <text | |
| 72 | - xml:space="preserve" | |
| 73 | - style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;display:inline;font-family:Helvetica" | |
| 74 | - x="5.2802601" | |
| 75 | - y="-3.8032362" | |
| 76 | - id="text1432" | |
| 77 | - sodipodi:linespacing="125%" | |
| 78 | - transform="scale(1,-1)"><tspan | |
| 79 | - sodipodi:role="line" | |
| 80 | - id="tspan1434" | |
| 81 | - x="5.2802601" | |
| 82 | - y="-3.8032362">-</tspan></text> | |
| 83 | - <rect | |
| 84 | - style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99699599px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" | |
| 85 | - id="rect1438" | |
| 86 | - width="13.003004" | |
| 87 | - height="13.002999" | |
| 88 | - x="2.498498" | |
| 89 | - y="2.4984975" /> | |
| 90 | - </g> | |
| 91 | - <g | |
| 92 | - style="display:none" | |
| 93 | - inkscape:label="zoom" | |
| 94 | - id="layer4" | |
| 95 | - inkscape:groupmode="layer"> | |
| 96 | - <text | |
| 97 | - transform="scale(1.000000,-1.000000)" | |
| 98 | - sodipodi:linespacing="125.00000%" | |
| 99 | - id="text2114" | |
| 100 | - y="-3.4077148" | |
| 101 | - x="3.7485352" | |
| 102 | - style="font-size:18.000000;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1.0000000;font-family:Helvetica;text-anchor:start;writing-mode:lr-tb" | |
| 103 | - xml:space="preserve"><tspan | |
| 104 | - y="-3.4077148" | |
| 105 | - x="3.7485352" | |
| 106 | - id="tspan2118" | |
| 107 | - sodipodi:role="line">−</tspan></text> | |
| 108 | - </g> | |
| 109 | - <g | |
| 110 | - style="display:none" | |
| 111 | - inkscape:label="overlay" | |
| 112 | - id="layer2" | |
| 113 | - inkscape:groupmode="layer"> | |
| 114 | - <path | |
| 115 | - sodipodi:nodetypes="csccsssscccssscccssssccscc" | |
| 116 | - id="text2082" | |
| 117 | - d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227" | |
| 118 | - style="font-size:12.000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana;text-anchor:start;writing-mode:lr-tb" /> | |
| 119 | - </g> | |
| 120 | - <g | |
| 121 | - style="display:none" | |
| 122 | - inkscape:label="pan triangle" | |
| 123 | - id="layer3" | |
| 124 | - inkscape:groupmode="layer"> | |
| 125 | - <path | |
| 126 | - transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)" | |
| 127 | - d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z " | |
| 128 | - inkscape:randomized="0.0000000" | |
| 129 | - inkscape:rounded="0.0000000" | |
| 130 | - inkscape:flatsided="false" | |
| 131 | - sodipodi:arg2="2.0943951" | |
| 132 | - sodipodi:arg1="1.0471976" | |
| 133 | - sodipodi:r2="2.5440056" | |
| 134 | - sodipodi:r1="5.0880113" | |
| 135 | - sodipodi:cy="5.1874018" | |
| 136 | - sodipodi:cx="6.8031497" | |
| 137 | - sodipodi:sides="3" | |
| 138 | - id="path2107" | |
| 139 | - style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" | |
| 140 | - sodipodi:type="star" /> | |
| 141 | - </g> | |
| 142 | -</svg> |
pacotes/openlayers/art/marker.svg
| ... | ... | @@ -1,25 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | |
| 2 | -<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> | |
| 3 | -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [ | |
| 4 | - <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/"> | |
| 5 | - <!ENTITY ns_svg "http://www.w3.org/2000/svg"> | |
| 6 | -]> | |
| 7 | -<svg version="1.1" id="Layer_1" xmlns:i="&ns_ai;" | |
| 8 | - xmlns="&ns_svg;" width="20.5" height="24.5" viewBox="0 0 20.5 24.5" | |
| 9 | - overflow="visible" enable-background="new 0 0 20.5 24.5" xml:space="preserve"> | |
| 10 | - <g i:extraneous="self"> | |
| 11 | - <rect x="0.25" y="0.25" opacity="0" stroke="#000000" stroke-width="1" width="20" height="24"/> | |
| 12 | - <g id="XMLID_2_"> | |
| 13 | - <g> | |
| 14 | - <polygon fill="#FF0000" points="10.12,0.6 19.93,7.71 10.06,24.03 0.6,7.58 "/> | |
| 15 | - </g> | |
| 16 | - <g> | |
| 17 | - <polyline fill="none" stroke="#000000" stroke-width="1" points="9.98,24.16 10.06,24.03 19.93,7.71 20.06,7.49 "/> | |
| 18 | - <polyline fill="none" stroke="#000000" stroke-width="1" points="10.13,24.16 10.06,24.03 0.6,7.58 0.5,7.41 "/> | |
| 19 | - <polyline fill="none" stroke="#000000" stroke-width="1" points="0.41,7.72 0.6,7.58 10.12,0.6 10.29,0.47 "/> | |
| 20 | - <polyline fill="none" stroke="#000000" stroke-width="1" points="9.94,0.47 10.12,0.6 19.93,7.71 20.06,7.8 "/> | |
| 21 | - </g> | |
| 22 | - </g> | |
| 23 | - <ellipse stroke="#000000" stroke-width="1" cx="10.125" cy="9.25" rx="1.5" ry="1.5"/> | |
| 24 | - </g> | |
| 25 | -</svg> |
pacotes/openlayers/art/measuring-stick-off.svg
| ... | ... | @@ -1,36 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | |
| 2 | -<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> | |
| 3 | -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [ | |
| 4 | - <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/"> | |
| 5 | - <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/"> | |
| 6 | - <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/"> | |
| 7 | - <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/"> | |
| 8 | - <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/"> | |
| 9 | - <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/"> | |
| 10 | - <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/"> | |
| 11 | - <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/"> | |
| 12 | - <!ENTITY ns_svg "http://www.w3.org/2000/svg"> | |
| 13 | - <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> | |
| 14 | -]> | |
| 15 | -<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;" | |
| 16 | - xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28" | |
| 17 | - overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve"> | |
| 18 | - <g i:extraneous="self"> | |
| 19 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/> | |
| 20 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/> | |
| 21 | - <path fill="none" stroke="#FFFFFF" d="M0,27.475"/> | |
| 22 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/> | |
| 23 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/> | |
| 24 | - <line fill="none" stroke="#00008B" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/> | |
| 25 | - <rect x="0.875" y="1.045" fill="#00008B" width="27.125" height="26"/> | |
| 26 | - <line fill="none" stroke="#00008B" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/> | |
| 27 | - <line fill="none" stroke="#FFFFFF" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/> | |
| 28 | - <line fill="none" stroke="#FFFFFF" x1="0.875" y1="1" x2="0.875" y2="27"/> | |
| 29 | - | |
| 30 | - <rect x="5.252" y="11.157" transform="matrix(0.7933 -0.6088 0.6088 0.7933 -5.1621 12.1086)" fill="#FFBF00" width="20" height="5"/> | |
| 31 | - <line fill="#FFBF00" stroke="#000000" x1="8.376" y1="15.783" x2="10.717" y2="18.766"/> | |
| 32 | - <line fill="#FFBF00" stroke="#000000" x1="11.946" y1="13.043" x2="14.288" y2="16.027"/> | |
| 33 | - <line fill="#FFBF00" stroke="#000000" x1="15.342" y1="10.437" x2="17.684" y2="13.42"/> | |
| 34 | - <line fill="#FFBF00" stroke="#000000" x1="18.69" y1="7.869" x2="21.03" y2="10.852"/> | |
| 35 | - </g> | |
| 36 | -</svg> |
pacotes/openlayers/art/measuring-stick-on.svg
| ... | ... | @@ -1,36 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | |
| 2 | -<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> | |
| 3 | -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [ | |
| 4 | - <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/"> | |
| 5 | - <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/"> | |
| 6 | - <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/"> | |
| 7 | - <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/"> | |
| 8 | - <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/"> | |
| 9 | - <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/"> | |
| 10 | - <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/"> | |
| 11 | - <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/"> | |
| 12 | - <!ENTITY ns_svg "http://www.w3.org/2000/svg"> | |
| 13 | - <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> | |
| 14 | -]> | |
| 15 | -<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;" | |
| 16 | - xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28" | |
| 17 | - overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve"> | |
| 18 | - <g i:extraneous="self"> | |
| 19 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/> | |
| 20 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/> | |
| 21 | - <path fill="none" stroke="#FFFFFF" d="M0,27.475"/> | |
| 22 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/> | |
| 23 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/> | |
| 24 | - <line fill="none" stroke="#FFFFFF" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/> | |
| 25 | - <rect x="0.875" y="1.045" fill="#ADD8E6" width="27.125" height="26"/> | |
| 26 | - <line fill="none" stroke="#FFFFFF" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/> | |
| 27 | - <line fill="none" stroke="#00008B" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/> | |
| 28 | - <line fill="none" stroke="#00008B" x1="0.875" y1="1" x2="0.875" y2="27"/> | |
| 29 | - | |
| 30 | - <rect x="4.252" y="12.157" transform="matrix(0.7933 -0.6088 0.6088 0.7933 -5.9776 11.7065)" fill="#FFBF00" width="20" height="5"/> | |
| 31 | - <line fill="#FFBF00" stroke="#000000" x1="7.376" y1="16.783" x2="9.717" y2="19.766"/> | |
| 32 | - <line fill="#FFBF00" stroke="#000000" x1="10.946" y1="14.043" x2="13.288" y2="17.027"/> | |
| 33 | - <line fill="#FFBF00" stroke="#000000" x1="14.342" y1="11.437" x2="16.684" y2="14.42"/> | |
| 34 | - <line fill="#FFBF00" stroke="#000000" x1="17.69" y1="8.869" x2="20.03" y2="11.852"/> | |
| 35 | - </g> | |
| 36 | -</svg> |
pacotes/openlayers/art/panning-hand-off.svg
| ... | ... | @@ -1,44 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | |
| 2 | -<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> | |
| 3 | -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [ | |
| 4 | - <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/"> | |
| 5 | - <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/"> | |
| 6 | - <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/"> | |
| 7 | - <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/"> | |
| 8 | - <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/"> | |
| 9 | - <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/"> | |
| 10 | - <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/"> | |
| 11 | - <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/"> | |
| 12 | - <!ENTITY ns_svg "http://www.w3.org/2000/svg"> | |
| 13 | - <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> | |
| 14 | -]> | |
| 15 | -<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;" | |
| 16 | - xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28" | |
| 17 | - overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve"> | |
| 18 | - <g i:extraneous="self"> | |
| 19 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/> | |
| 20 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/> | |
| 21 | - <path fill="none" stroke="#FFFFFF" d="M0,27.475"/> | |
| 22 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/> | |
| 23 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/> | |
| 24 | - <line fill="none" stroke="#00008B" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/> | |
| 25 | - <rect x="0.875" y="1.045" fill="#00008B" width="27.125" height="26"/> | |
| 26 | - <line fill="none" stroke="#00008B" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/> | |
| 27 | - <line fill="none" stroke="#FFFFFF" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/> | |
| 28 | - <line fill="none" stroke="#FFFFFF" x1="0.875" y1="1" x2="0.875" y2="27"/> | |
| 29 | - <path fill="#FFFFFF" stroke="#000000" d="M9.458,22.458c-0.473-0.168-1.02-1.269-1.363-1.695 | |
| 30 | - c-0.479-0.595-0.894-1.245-1.377-1.829c-0.733-0.887-1.356-1.729-1.854-2.764c-0.375-0.782-0.884-1.997-0.005-2.648 | |
| 31 | - c1.036-0.767,2.095-0.162,2.934,0.479c0.844,0.646,1.729,1.18,2.526,1.869c-0.372-0.305-0.548-0.986-0.778-1.421 | |
| 32 | - c-0.253-0.477-0.565-0.906-0.822-1.375c-0.359-0.657-0.767-1.201-1.21-1.823c-0.544-0.763-1.051-1.74-0.925-2.709 | |
| 33 | - c0.133-1.025,0.972-1.527,1.924-1.207c1.202,0.405,1.969,1.692,2.627,2.698c0.636,0.971,1.201,2.159,1.938,3.042 | |
| 34 | - c-0.222-0.209-0.148-0.508-0.155-0.782c-0.01-0.37-0.097-0.626-0.219-0.967c-0.162-0.455-0.219-0.972-0.24-1.45 | |
| 35 | - c-0.034-0.776-0.25-1.465-0.25-2.247c0-0.988-0.14-1.963,0.71-2.631c0.666-0.523,1.649-0.764,2.381-0.248 | |
| 36 | - c1.385,0.976,1.057,2.999,1.209,4.458c0.079,0.759,0.165,1.489,0.2,2.263c0.022,0.496,0.209,1.067,0.168,1.558 | |
| 37 | - c-0.146-0.269-0.113-0.749-0.127-1.057c-0.022-0.502-0.041-0.982-0.115-1.47c-0.114-0.743-0.188-1.564-0.25-2.324 | |
| 38 | - c-0.152-1.877,2.054-3.17,3.301-1.469c0.884,1.206,0.773,2.643,0.773,4.085c0,0.698-0.034,1.251-0.22,1.91 | |
| 39 | - c-0.13,0.459-0.293,1.222-0.239,1.638c0-0.902,0.334-1.697,0.334-2.588c0-0.678-0.272-2.099,0.581-2.334 | |
| 40 | - c1.065-0.294,2.008,0.875,2.428,1.66c0.458,0.855,0.555,1.901,0.409,2.882c-0.318,2.154-0.845,4.227-2.096,6.072 | |
| 41 | - c-0.268,0.396-0.485,0.838-0.79,1.22c-0.361,0.452-0.923,0.772-1.416,1.071c-0.381,0.232-0.764,0.53-1.176,0.604 | |
| 42 | - c-0.822,0.149-1.725,0.157-2.565,0.157c-1.29,0-2.564-0.068-3.832-0.251c-0.799-0.115-2.12,0.153-2.668-0.54"/> | |
| 43 | - </g> | |
| 44 | -</svg> |
pacotes/openlayers/art/panning-hand-on.svg
| ... | ... | @@ -1,44 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | |
| 2 | -<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> | |
| 3 | -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [ | |
| 4 | - <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/"> | |
| 5 | - <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/"> | |
| 6 | - <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/"> | |
| 7 | - <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/"> | |
| 8 | - <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/"> | |
| 9 | - <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/"> | |
| 10 | - <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/"> | |
| 11 | - <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/"> | |
| 12 | - <!ENTITY ns_svg "http://www.w3.org/2000/svg"> | |
| 13 | - <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> | |
| 14 | -]> | |
| 15 | -<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;" | |
| 16 | - xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28" | |
| 17 | - overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve"> | |
| 18 | - <g i:extraneous="self"> | |
| 19 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/> | |
| 20 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/> | |
| 21 | - <path fill="none" stroke="#FFFFFF" d="M0,27.475"/> | |
| 22 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/> | |
| 23 | - <path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/> | |
| 24 | - <line fill="none" stroke="#FFFFFF" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/> | |
| 25 | - <rect x="0.875" y="1.045" fill="#ADD8E6" width="27.125" height="26"/> | |
| 26 | - <line fill="none" stroke="#FFFFFF" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/> | |
| 27 | - <line fill="none" stroke="#00008B" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/> | |
| 28 | - <line fill="none" stroke="#00008B" x1="0.875" y1="1" x2="0.875" y2="27"/> | |
| 29 | - <path fill="#FFFFFF" stroke="#000000" d="M8.458,23.458c-0.473-0.168-1.02-1.269-1.363-1.695 | |
| 30 | - c-0.479-0.595-0.894-1.245-1.377-1.829c-0.733-0.887-1.356-1.729-1.854-2.764c-0.375-0.782-0.884-1.997-0.005-2.648 | |
| 31 | - c1.036-0.767,2.095-0.161,2.934,0.479c0.844,0.646,1.729,1.18,2.526,1.869c-0.372-0.305-0.548-0.986-0.778-1.421 | |
| 32 | - c-0.253-0.477-0.565-0.906-0.822-1.375c-0.359-0.657-0.767-1.201-1.21-1.823c-0.544-0.763-1.051-1.74-0.925-2.709 | |
| 33 | - c0.133-1.025,0.972-1.527,1.924-1.207c1.202,0.405,1.969,1.692,2.627,2.698c0.636,0.971,1.201,2.159,1.938,3.042 | |
| 34 | - c-0.222-0.21-0.148-0.509-0.155-0.783c-0.01-0.37-0.097-0.626-0.219-0.967c-0.162-0.455-0.219-0.972-0.24-1.45 | |
| 35 | - c-0.034-0.776-0.25-1.465-0.25-2.247c0-0.988-0.14-1.963,0.71-2.631c0.666-0.523,1.649-0.764,2.381-0.248 | |
| 36 | - c1.385,0.976,1.057,2.999,1.209,4.458c0.079,0.759,0.165,1.489,0.2,2.263c0.022,0.496,0.209,1.068,0.168,1.558 | |
| 37 | - c-0.146-0.27-0.113-0.75-0.127-1.058c-0.022-0.502-0.041-0.982-0.115-1.47c-0.114-0.743-0.188-1.564-0.25-2.324 | |
| 38 | - c-0.152-1.877,2.054-3.17,3.301-1.469c0.884,1.206,0.773,2.643,0.773,4.085c0,0.698-0.034,1.251-0.22,1.91 | |
| 39 | - c-0.13,0.459-0.293,1.222-0.239,1.639c0-0.902,0.334-1.697,0.334-2.589c0-0.678-0.272-2.099,0.581-2.334 | |
| 40 | - c1.065-0.294,2.008,0.875,2.428,1.66c0.458,0.855,0.555,1.901,0.409,2.883c-0.318,2.153-0.845,4.227-2.096,6.071 | |
| 41 | - c-0.268,0.396-0.485,0.838-0.79,1.22c-0.361,0.452-0.923,0.772-1.416,1.071c-0.381,0.232-0.764,0.53-1.176,0.604 | |
| 42 | - c-0.822,0.149-1.725,0.157-2.565,0.157c-1.29,0-2.564-0.068-3.832-0.251c-0.799-0.115-2.12,0.153-2.668-0.54"/> | |
| 43 | - </g> | |
| 44 | -</svg> |
pacotes/openlayers/art/slider.svg
| ... | ... | @@ -1,71 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 2 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> | |
| 3 | -<svg | |
| 4 | - xmlns:dc="http://purl.org/dc/elements/1.1/" | |
| 5 | - xmlns:cc="http://web.resource.org/cc/" | |
| 6 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
| 7 | - xmlns:svg="http://www.w3.org/2000/svg" | |
| 8 | - xmlns="http://www.w3.org/2000/svg" | |
| 9 | - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" | |
| 10 | - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |
| 11 | - width="210mm" | |
| 12 | - height="297mm" | |
| 13 | - id="svg2" | |
| 14 | - sodipodi:version="0.32" | |
| 15 | - inkscape:version="0.41.1" | |
| 16 | - sodipodi:docbase="/afs/metacarta.com/user/sderle/public_html/ol.zoombar/art" | |
| 17 | - sodipodi:docname="slider.svg" | |
| 18 | - inkscape:export-filename="/afs/metacarta.com/user/sderle/public_html/ol.zoombar/img/slider.png" | |
| 19 | - inkscape:export-xdpi="90.000000" | |
| 20 | - inkscape:export-ydpi="90.000000"> | |
| 21 | - <defs | |
| 22 | - id="defs3" /> | |
| 23 | - <sodipodi:namedview | |
| 24 | - id="base" | |
| 25 | - pagecolor="#ffffff" | |
| 26 | - bordercolor="#666666" | |
| 27 | - borderopacity="1.0" | |
| 28 | - inkscape:pageopacity="0.0" | |
| 29 | - inkscape:pageshadow="2" | |
| 30 | - inkscape:zoom="39.870978" | |
| 31 | - inkscape:cx="140.00732" | |
| 32 | - inkscape:cy="695.49796" | |
| 33 | - inkscape:document-units="px" | |
| 34 | - inkscape:current-layer="layer1" | |
| 35 | - showgrid="true" | |
| 36 | - inkscape:window-width="1010" | |
| 37 | - inkscape:window-height="538" | |
| 38 | - inkscape:window-x="20" | |
| 39 | - inkscape:window-y="107" /> | |
| 40 | - <metadata | |
| 41 | - id="metadata4"> | |
| 42 | - <rdf:RDF | |
| 43 | - id="RDF5"> | |
| 44 | - <cc:Work | |
| 45 | - rdf:about="" | |
| 46 | - id="Work6"> | |
| 47 | - <dc:format | |
| 48 | - id="format7">image/svg+xml</dc:format> | |
| 49 | - <dc:type | |
| 50 | - id="type9" | |
| 51 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |
| 52 | - </cc:Work> | |
| 53 | - </rdf:RDF> | |
| 54 | - </metadata> | |
| 55 | - <g | |
| 56 | - inkscape:label="Layer 1" | |
| 57 | - inkscape:groupmode="layer" | |
| 58 | - id="layer1"> | |
| 59 | - <rect | |
| 60 | - style="fill:#00008b;fill-opacity:1.0000000;stroke:#000080;stroke-width:4.9999957;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" | |
| 61 | - id="rect1291" | |
| 62 | - x="132.50000" | |
| 63 | - y="354.86218" | |
| 64 | - width="15.014628" | |
| 65 | - height="4.0040474" /> | |
| 66 | - <path | |
| 67 | - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.0000000;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" | |
| 68 | - d="M 134.08880,356.89603 L 146.00000,356.87002" | |
| 69 | - id="path2052" /> | |
| 70 | - </g> | |
| 71 | -</svg> |
pacotes/openlayers/art/zoom-world.svg
| ... | ... | @@ -1,193 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 2 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> | |
| 3 | -<svg | |
| 4 | - xmlns:xml="http://www.w3.org/XML/1998/namespace" | |
| 5 | - xmlns:dc="http://purl.org/dc/elements/1.1/" | |
| 6 | - xmlns:cc="http://web.resource.org/cc/" | |
| 7 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
| 8 | - xmlns:svg="http://www.w3.org/2000/svg" | |
| 9 | - xmlns="http://www.w3.org/2000/svg" | |
| 10 | - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" | |
| 11 | - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |
| 12 | - inkscape:export-ydpi="90.000000" | |
| 13 | - inkscape:export-xdpi="90.000000" | |
| 14 | - inkscape:export-filename="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements/zoom-minus-mini.png" | |
| 15 | - sodipodi:docname="zoom-world.svg" | |
| 16 | - sodipodi:docbase="/afs/metacarta.com/user/sderle/OL/openlayers/assets/ui_elements" | |
| 17 | - inkscape:version="0.41.1" | |
| 18 | - sodipodi:version="0.32" | |
| 19 | - id="svg2" | |
| 20 | - height="18.000000px" | |
| 21 | - width="18.000000px"> | |
| 22 | - <defs | |
| 23 | - id="defs4" /> | |
| 24 | - <sodipodi:namedview | |
| 25 | - inkscape:window-y="26" | |
| 26 | - inkscape:window-x="42" | |
| 27 | - inkscape:window-height="800" | |
| 28 | - inkscape:window-width="1226" | |
| 29 | - inkscape:current-layer="layer5" | |
| 30 | - inkscape:document-units="px" | |
| 31 | - inkscape:cy="9.3025513" | |
| 32 | - inkscape:cx="9.0000000" | |
| 33 | - inkscape:zoom="1.0000000" | |
| 34 | - inkscape:pageshadow="2" | |
| 35 | - inkscape:pageopacity="0.0" | |
| 36 | - borderopacity="1.0" | |
| 37 | - bordercolor="#666666" | |
| 38 | - pagecolor="#ffffff" | |
| 39 | - id="base" /> | |
| 40 | - <metadata | |
| 41 | - id="metadata7"> | |
| 42 | - <rdf:RDF | |
| 43 | - id="RDF1295"> | |
| 44 | - <cc:Work | |
| 45 | - id="Work1297" | |
| 46 | - rdf:about=""> | |
| 47 | - <dc:format | |
| 48 | - id="format1299">image/svg+xml</dc:format> | |
| 49 | - <dc:type | |
| 50 | - id="type1301" | |
| 51 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |
| 52 | - </cc:Work> | |
| 53 | - </rdf:RDF> | |
| 54 | - </metadata> | |
| 55 | - <g | |
| 56 | - style="display:inline" | |
| 57 | - id="layer1" | |
| 58 | - inkscape:groupmode="layer" | |
| 59 | - inkscape:label="background"> | |
| 60 | - <rect | |
| 61 | - style="fill:#00008b;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" | |
| 62 | - id="rect2061" | |
| 63 | - width="18.014498" | |
| 64 | - height="18.000000" | |
| 65 | - x="-18.014502" | |
| 66 | - y="4.3599998e-06" | |
| 67 | - transform="matrix(0.000000,-1.000000,1.000000,0.000000,0.000000,0.000000)" /> | |
| 68 | - </g> | |
| 69 | - <g | |
| 70 | - inkscape:label="graticule" | |
| 71 | - id="layer5" | |
| 72 | - inkscape:groupmode="layer"> | |
| 73 | - <g | |
| 74 | - transform="translate(0.000000,-4.419417e-2)" | |
| 75 | - id="g2876"> | |
| 76 | - <path | |
| 77 | - transform="matrix(1.155321,0.000000,0.000000,1.155321,-2.292065,-1.751761)" | |
| 78 | - d="M 16.869573 9.3188362 A 7.0579743 7.0579743 0 1 1 2.7536244,9.3188362 A 7.0579743 7.0579743 0 1 1 16.869573 9.3188362 z" | |
| 79 | - sodipodi:ry="7.0579743" | |
| 80 | - sodipodi:rx="7.0579743" | |
| 81 | - sodipodi:cy="9.3188362" | |
| 82 | - sodipodi:cx="9.8115988" | |
| 83 | - id="path1321" | |
| 84 | - style="fill:none;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:0.50000000;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" | |
| 85 | - sodipodi:type="arc" /> | |
| 86 | - <path | |
| 87 | - sodipodi:nodetypes="cc" | |
| 88 | - id="path2086" | |
| 89 | - d="M 8.1145142,1.1289949 C 15.315267,9.5238831 8.3963197,17.101449 8.3963197,17.057255" | |
| 90 | - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> | |
| 91 | - <path | |
| 92 | - sodipodi:nodetypes="cc" | |
| 93 | - id="path2846" | |
| 94 | - d="M 11.588885,1.3666059 C 18.922222,9.5405232 11.605526,16.764536 11.605526,16.764536" | |
| 95 | - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> | |
| 96 | - <path | |
| 97 | - sodipodi:nodetypes="cc" | |
| 98 | - id="path2848" | |
| 99 | - d="M 5.2258471,2.0593951 C 11.080923,9.7405585 5.3432210,16.278941 5.3432210,16.278941" | |
| 100 | - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> | |
| 101 | - <path | |
| 102 | - sodipodi:nodetypes="cc" | |
| 103 | - id="path2850" | |
| 104 | - d="M 2.7388198,3.7571959 C 6.3686281,9.1817837 2.9127331,14.361601 2.9127331,14.361601" | |
| 105 | - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> | |
| 106 | - </g> | |
| 107 | - <g | |
| 108 | - transform="matrix(-6.269315e-2,0.998033,-0.998033,-6.269315e-2,18.62352,0.612232)" | |
| 109 | - id="g2883"> | |
| 110 | - <path | |
| 111 | - transform="matrix(1.155321,0.000000,0.000000,1.155321,-2.292065,-1.751761)" | |
| 112 | - d="M 16.869573 9.3188362 A 7.0579743 7.0579743 0 1 1 2.7536244,9.3188362 A 7.0579743 7.0579743 0 1 1 16.869573 9.3188362 z" | |
| 113 | - sodipodi:ry="7.0579743" | |
| 114 | - sodipodi:rx="7.0579743" | |
| 115 | - sodipodi:cy="9.3188362" | |
| 116 | - sodipodi:cx="9.8115988" | |
| 117 | - id="path2885" | |
| 118 | - style="fill:none;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:0.50000000;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" | |
| 119 | - sodipodi:type="arc" /> | |
| 120 | - <path | |
| 121 | - sodipodi:nodetypes="cc" | |
| 122 | - id="path2887" | |
| 123 | - d="M 8.1145142,1.1289949 C 15.315267,9.5238831 8.3963197,17.101449 8.3963197,17.057255" | |
| 124 | - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> | |
| 125 | - <path | |
| 126 | - sodipodi:nodetypes="cc" | |
| 127 | - id="path2889" | |
| 128 | - d="M 11.588885,1.3666059 C 18.922222,9.5405232 11.605526,16.764536 11.605526,16.764536" | |
| 129 | - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> | |
| 130 | - <path | |
| 131 | - sodipodi:nodetypes="cc" | |
| 132 | - id="path2891" | |
| 133 | - d="M 5.2258471,2.0593951 C 11.080923,9.7405585 5.3432210,16.278941 5.3432210,16.278941" | |
| 134 | - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> | |
| 135 | - <path | |
| 136 | - sodipodi:nodetypes="cc" | |
| 137 | - id="path2893" | |
| 138 | - d="M 2.7388198,3.7571959 C 6.3686281,9.1817837 2.9127331,14.361601 2.9127331,14.361601" | |
| 139 | - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> | |
| 140 | - </g> | |
| 141 | - </g> | |
| 142 | - <g | |
| 143 | - style="display:none" | |
| 144 | - inkscape:label="zoom" | |
| 145 | - id="layer4" | |
| 146 | - inkscape:groupmode="layer"> | |
| 147 | - <text | |
| 148 | - transform="scale(1.000000,-1.000000)" | |
| 149 | - sodipodi:linespacing="125.00000%" | |
| 150 | - id="text2114" | |
| 151 | - y="-3.4077148" | |
| 152 | - x="3.7485352" | |
| 153 | - style="font-size:18.000000;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1.0000000;font-family:Helvetica;text-anchor:start;writing-mode:lr-tb" | |
| 154 | - xml:space="preserve"><tspan | |
| 155 | - y="-3.4077148" | |
| 156 | - x="3.7485352" | |
| 157 | - id="tspan2118" | |
| 158 | - sodipodi:role="line">−</tspan></text> | |
| 159 | - </g> | |
| 160 | - <g | |
| 161 | - style="display:none" | |
| 162 | - inkscape:label="overlay" | |
| 163 | - id="layer2" | |
| 164 | - inkscape:groupmode="layer"> | |
| 165 | - <path | |
| 166 | - sodipodi:nodetypes="csccsssscccssscccssssccscc" | |
| 167 | - id="text2082" | |
| 168 | - d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227" | |
| 169 | - style="font-size:12.000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana;text-anchor:start;writing-mode:lr-tb" /> | |
| 170 | - </g> | |
| 171 | - <g | |
| 172 | - style="display:none" | |
| 173 | - inkscape:label="pan triangle" | |
| 174 | - id="layer3" | |
| 175 | - inkscape:groupmode="layer"> | |
| 176 | - <path | |
| 177 | - transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)" | |
| 178 | - d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z " | |
| 179 | - inkscape:randomized="0.0000000" | |
| 180 | - inkscape:rounded="0.0000000" | |
| 181 | - inkscape:flatsided="false" | |
| 182 | - sodipodi:arg2="2.0943951" | |
| 183 | - sodipodi:arg1="1.0471976" | |
| 184 | - sodipodi:r2="2.5440056" | |
| 185 | - sodipodi:r1="5.0880113" | |
| 186 | - sodipodi:cy="5.1874018" | |
| 187 | - sodipodi:cx="6.8031497" | |
| 188 | - sodipodi:sides="3" | |
| 189 | - id="path2107" | |
| 190 | - style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" | |
| 191 | - sodipodi:type="star" /> | |
| 192 | - </g> | |
| 193 | -</svg> |
pacotes/openlayers/art/zoombar.svg
| ... | ... | @@ -1,73 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 2 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> | |
| 3 | -<svg | |
| 4 | - xmlns:dc="http://purl.org/dc/elements/1.1/" | |
| 5 | - xmlns:cc="http://web.resource.org/cc/" | |
| 6 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
| 7 | - xmlns:svg="http://www.w3.org/2000/svg" | |
| 8 | - xmlns="http://www.w3.org/2000/svg" | |
| 9 | - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" | |
| 10 | - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |
| 11 | - width="18" | |
| 12 | - height="18" | |
| 13 | - id="svg2" | |
| 14 | - sodipodi:version="0.32" | |
| 15 | - inkscape:version="0.43" | |
| 16 | - version="1.0" | |
| 17 | - inkscape:export-filename="C:\Documents and Settings\crschmidt\Desktop\zoombar.png" | |
| 18 | - inkscape:export-xdpi="90" | |
| 19 | - inkscape:export-ydpi="90" | |
| 20 | - sodipodi:docbase="C:\Documents and Settings\crschmidt\Desktop" | |
| 21 | - sodipodi:docname="zoombar.svg"> | |
| 22 | - <defs | |
| 23 | - id="defs4" /> | |
| 24 | - <sodipodi:namedview | |
| 25 | - id="base" | |
| 26 | - pagecolor="#ffffff" | |
| 27 | - bordercolor="#666666" | |
| 28 | - borderopacity="1.0" | |
| 29 | - inkscape:pageopacity="0.0" | |
| 30 | - inkscape:pageshadow="2" | |
| 31 | - inkscape:zoom="1" | |
| 32 | - inkscape:cx="-117.50597" | |
| 33 | - inkscape:cy="65.94562" | |
| 34 | - inkscape:document-units="px" | |
| 35 | - inkscape:current-layer="layer1" | |
| 36 | - showguides="false" | |
| 37 | - showgrid="false" | |
| 38 | - inkscape:window-width="1024" | |
| 39 | - inkscape:window-height="721" | |
| 40 | - inkscape:window-x="-4" | |
| 41 | - inkscape:window-y="-4" /> | |
| 42 | - <metadata | |
| 43 | - id="metadata7"> | |
| 44 | - <rdf:RDF> | |
| 45 | - <cc:Work | |
| 46 | - rdf:about=""> | |
| 47 | - <dc:format>image/svg+xml</dc:format> | |
| 48 | - <dc:type | |
| 49 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |
| 50 | - </cc:Work> | |
| 51 | - </rdf:RDF> | |
| 52 | - </metadata> | |
| 53 | - <g | |
| 54 | - inkscape:label="Layer 1" | |
| 55 | - inkscape:groupmode="layer" | |
| 56 | - id="layer1"> | |
| 57 | - <rect | |
| 58 | - style="opacity:0.5;fill:#808080;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000012;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
| 59 | - id="rect1307" | |
| 60 | - width="16.999998" | |
| 61 | - height="10.000004" | |
| 62 | - x="-125.51302" | |
| 63 | - y="-52.420002" /> | |
| 64 | - <path | |
| 65 | - style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999958;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.50196078" | |
| 66 | - d="M -125.54176,-52.415494 L -125.54176,-42.415495" | |
| 67 | - id="path8297" /> | |
| 68 | - <path | |
| 69 | - style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999982;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.50196078" | |
| 70 | - d="M -108.48157,-52.418044 L -108.48157,-42.418046" | |
| 71 | - id="path12667" /> | |
| 72 | - </g> | |
| 73 | -</svg> |
pacotes/openlayers/build/OpenLayers.js
| ... | ... | @@ -1,842 +0,0 @@ |
| 1 | -/* | |
| 2 | - | |
| 3 | - OpenLayers.js -- OpenLayers Map Viewer Library | |
| 4 | - | |
| 5 | - Copyright 2005-2006 MetaCarta, Inc., released under the BSD license. | |
| 6 | - Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt | |
| 7 | - for the full text of the license. | |
| 8 | - | |
| 9 | - Includes compressed code under the following licenses: | |
| 10 | - | |
| 11 | - (For uncompressed versions of the code used please see the | |
| 12 | - OpenLayers SVN repository: <http://openlayers.org/>) | |
| 13 | - | |
| 14 | -*/ | |
| 15 | - | |
| 16 | -/* Contains portions of Prototype.js: | |
| 17 | - * | |
| 18 | - * Prototype JavaScript framework, version 1.4.0 | |
| 19 | - * (c) 2005 Sam Stephenson <sam@conio.net> | |
| 20 | - * | |
| 21 | - * Prototype is freely distributable under the terms of an MIT-style license. | |
| 22 | - * For details, see the Prototype web site: http://prototype.conio.net/ | |
| 23 | - * | |
| 24 | -/*--------------------------------------------------------------------------*/ | |
| 25 | - | |
| 26 | -/** | |
| 27 | -* | |
| 28 | -* Contains portions of Rico <http://openrico.org/> | |
| 29 | -* | |
| 30 | -* Copyright 2005 Sabre Airline Solutions | |
| 31 | -* | |
| 32 | -* Licensed under the Apache License, Version 2.0 (the "License"); you | |
| 33 | -* may not use this file except in compliance with the License. You | |
| 34 | -* may obtain a copy of the License at | |
| 35 | -* | |
| 36 | -* http://www.apache.org/licenses/LICENSE-2.0 | |
| 37 | -* | |
| 38 | -* Unless required by applicable law or agreed to in writing, software | |
| 39 | -* distributed under the License is distributed on an "AS IS" BASIS, | |
| 40 | -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | |
| 41 | -* implied. See the License for the specific language governing | |
| 42 | -* permissions and limitations under the License. | |
| 43 | -* | |
| 44 | -**/ | |
| 45 | - | |
| 46 | -_OPENLAYERS_SFL_=true;OpenLayers=new Object();OpenLayers._scriptName=(typeof(_OPENLAYERS_SFL_)=="undefined"?"lib/OpenLayers.js":"OpenLayers.js");OpenLayers._getScriptLocation=function(){var scriptLocation="";var SCRIPT_NAME=OpenLayers._scriptName;var scripts=document.getElementsByTagName('script');for(var i=0;i<scripts.length;i++){var src=scripts[i].getAttribute('src');if(src){var index=src.lastIndexOf(SCRIPT_NAME);if((index>-1)&&(index+SCRIPT_NAME.length==src.length)){scriptLocation=src.slice(0,-SCRIPT_NAME.length);break;}}} | |
| 47 | -return scriptLocation;} | |
| 48 | -if(typeof(_OPENLAYERS_SFL_)=="undefined"){(function(){var jsfiles=new Array("OpenLayers/BaseTypes.js","OpenLayers/Util.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/Feature.js","OpenLayers/Feature/Vector.js","OpenLayers/Feature/WFS.js","OpenLayers/Tile/Image.js","OpenLayers/Tile/WFS.js","OpenLayers/Layer/Image.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/Canvas.js","OpenLayers/Layer/TMS.js","OpenLayers/Popup/Anchored.js","OpenLayers/Popup/AnchoredBubble.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/Box.js","OpenLayers/Handler/MouseWheel.js","OpenLayers/Handler/Keyboard.js","OpenLayers/Control.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/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/GML.js","OpenLayers/Format/KML.js","OpenLayers/Format/GeoRSS.js","OpenLayers/Format/WFS.js","OpenLayers/Format/WKT.js","OpenLayers/Layer/WFS.js","OpenLayers/Control/MouseToolbar.js","OpenLayers/Control/NavToolbar.js","OpenLayers/Control/EditingToolbar.js");var allScriptTags="";var host=OpenLayers._getScriptLocation()+"lib/";for(var i=0;i<jsfiles.length;i++){if(/MSIE/.test(navigator.userAgent)||/Safari/.test(navigator.userAgent)){var currentScriptTag="<script src='"+host+jsfiles[i]+"'></script>";allScriptTags+=currentScriptTag;}else{var s=document.createElement("script");s.src=host+jsfiles[i];var h=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;h.appendChild(s);}} | |
| 49 | -if(allScriptTags)document.write(allScriptTags);})();} | |
| 50 | -OpenLayers.VERSION_NUMBER="$Revision: 3198 $";OpenLayers.Class={isPrototype:function(){},create:function(){return function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype) | |
| 51 | -this.initialize.apply(this,arguments);}},inherit:function(){var superClass=arguments[0];var proto=new superClass(OpenLayers.Class.isPrototype);for(var i=1;i<arguments.length;i++){if(typeof arguments[i]=="function"){var mixin=arguments[i];arguments[i]=new mixin(OpenLayers.Class.isPrototype);} | |
| 52 | -OpenLayers.Util.extend(proto,arguments[i]);if((arguments[i].hasOwnProperty&&arguments[i].hasOwnProperty('toString'))||(!arguments[i].hasOwnProperty&&arguments[i].toString)){proto.toString=arguments[i].toString;}} | |
| 53 | -return proto;}};OpenLayers.Pixel=OpenLayers.Class.create();OpenLayers.Pixel.prototype={x:0.0,y:0.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)));} | |
| 54 | -return equals;},add:function(x,y){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);} | |
| 55 | -return newPx;},CLASS_NAME:"OpenLayers.Pixel"};OpenLayers.Size=OpenLayers.Class.create();OpenLayers.Size.prototype={w:0.0,h:0.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)));} | |
| 56 | -return equals;},CLASS_NAME:"OpenLayers.Size"};OpenLayers.LonLat=OpenLayers.Class.create();OpenLayers.LonLat.prototype={lon:0.0,lat:0.0,initialize:function(lon,lat){this.lon=parseFloat(lon);this.lat=parseFloat(lat);},toString:function(){return("lon="+this.lon+",lat="+this.lat);},toShortString:function(){return(this.lon+", "+this.lat);},clone:function(){return new OpenLayers.LonLat(this.lon,this.lat);},add:function(lon,lat){return new OpenLayers.LonLat(this.lon+lon,this.lat+lat);},equals:function(ll){var equals=false;if(ll!=null){equals=((this.lon==ll.lon&&this.lat==ll.lat)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(ll.lon)&&isNaN(ll.lat)));} | |
| 57 | -return equals;},CLASS_NAME:"OpenLayers.LonLat"};OpenLayers.LonLat.fromString=function(str){var pair=str.split(",");return new OpenLayers.LonLat(parseFloat(pair[0]),parseFloat(pair[1]));};OpenLayers.Bounds=OpenLayers.Class.create();OpenLayers.Bounds.prototype={left:0.0,bottom:0.0,right:0.0,top:0.0,initialize:function(left,bottom,right,top){this.left=parseFloat(left);this.bottom=parseFloat(bottom);this.right=parseFloat(right);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));} | |
| 58 | -return equals;},toString:function(){return("left-bottom=("+this.left+","+this.bottom+")" | |
| 59 | -+" right-top=("+this.right+","+this.top+")");},toBBOX:function(decimal){if(decimal==null){decimal=6;} | |
| 60 | -var mult=Math.pow(10,decimal);var bbox=Math.round(this.left*mult)/mult+","+ | |
| 61 | -Math.round(this.bottom*mult)/mult+","+ | |
| 62 | -Math.round(this.right*mult)/mult+","+ | |
| 63 | -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){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;} | |
| 64 | -if(bounds){this.left=(bounds.left<this.left)?bounds.left:this.left;this.bottom=(bounds.bottom<this.bottom)?bounds.bottom:this.bottom;this.right=(bounds.right>this.right)?bounds.right:this.right;this.top=(bounds.top>this.top)?bounds.top:this.top;}}},containsLonLat:function(ll,inclusive){return this.contains(ll.lon,ll.lat,inclusive);},containsPixel:function(px,inclusive){return this.contains(px.x,px.y,inclusive);},contains:function(x,y,inclusive){if(inclusive==null){inclusive=true;} | |
| 65 | -var contains=false;if(inclusive){contains=((x>=this.left)&&(x<=this.right)&&(y>=this.bottom)&&(y<=this.top));}else{contains=((x>this.left)&&(x<this.right)&&(y>this.bottom)&&(y<this.top));} | |
| 66 | -return contains;},intersectsBounds:function(bounds,inclusive){if(inclusive==null){inclusive=true;} | |
| 67 | -var inBottom=(bounds.bottom==this.bottom&&bounds.top==this.top)?true:(((bounds.bottom>this.bottom)&&(bounds.bottom<this.top))||((this.bottom>bounds.bottom)&&(this.bottom<bounds.top)));var inTop=(bounds.bottom==this.bottom&&bounds.top==this.top)?true:(((bounds.top>this.bottom)&&(bounds.top<this.top))||((this.top>bounds.bottom)&&(this.top<bounds.top)));var inRight=(bounds.right==this.right&&bounds.left==this.left)?true:(((bounds.right>this.left)&&(bounds.right<this.right))||((this.right>bounds.left)&&(this.right<bounds.right)));var inLeft=(bounds.right==this.right&&bounds.left==this.left)?true:(((bounds.left>this.left)&&(bounds.left<this.right))||((this.left>bounds.left)&&(this.left<bounds.right)));return(this.containsBounds(bounds,true,inclusive)||bounds.containsBounds(this,true,inclusive)||((inTop||inBottom)&&(inLeft||inRight)));},containsBounds:function(bounds,partial,inclusive){if(partial==null){partial=false;} | |
| 68 | -if(inclusive==null){inclusive=true;} | |
| 69 | -var inLeft;var inTop;var inRight;var inBottom;if(inclusive){inLeft=(bounds.left>=this.left)&&(bounds.left<=this.right);inTop=(bounds.top>=this.bottom)&&(bounds.top<=this.top);inRight=(bounds.right>=this.left)&&(bounds.right<=this.right);inBottom=(bounds.bottom>=this.bottom)&&(bounds.bottom<=this.top);}else{inLeft=(bounds.left>this.left)&&(bounds.left<this.right);inTop=(bounds.top>this.bottom)&&(bounds.top<this.top);inRight=(bounds.right>this.left)&&(bounds.right<this.right);inBottom=(bounds.bottom>this.bottom)&&(bounds.bottom<this.top);} | |
| 70 | -return(partial)?(inTop||inBottom)&&(inLeft||inRight):(inTop&&inLeft&&inBottom&&inRight);},determineQuadrant:function(lonlat){var quadrant="";var center=this.getCenterLonLat();quadrant+=(lonlat.lat<center.lat)?"b":"t";quadrant+=(lonlat.lon<center.lon)?"l":"r";return quadrant;},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(quadrant){var opp="";opp+=(quadrant.charAt(0)=='t')?'b':'t';opp+=(quadrant.charAt(1)=='l')?'r':'l';return opp;};OpenLayers.Element={visible:function(element){return OpenLayers.Util.getElement(element).style.display!='none';},toggle:function(){for(var i=0;i<arguments.length;i++){var element=OpenLayers.Util.getElement(arguments[i]);OpenLayers.Element[OpenLayers.Element.visible(element)?'hide':'show'](element);}},hide:function(){for(var i=0;i<arguments.length;i++){var element=OpenLayers.Util.getElement(arguments[i]);element.style.display='none';}},show:function(){for(var i=0;i<arguments.length;i++){var element=OpenLayers.Util.getElement(arguments[i]);element.style.display='';}},remove:function(element){element=OpenLayers.Util.getElement(element);element.parentNode.removeChild(element);},getHeight:function(element){element=OpenLayers.Util.getElement(element);return element.offsetHeight;},getDimensions:function(element){element=OpenLayers.Util.getElement(element);if(OpenLayers.Element.getStyle(element,'display')!='none') | |
| 71 | -return{width:element.offsetWidth,height:element.offsetHeight};var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;els.visibility='hidden';els.position='absolute';els.display='';var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display='none';els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};},getStyle:function(element,style){element=OpenLayers.Util.getElement(element);var value=element.style[style.camelize()];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css.getPropertyValue(style):null;}else if(element.currentStyle){value=element.currentStyle[style.camelize()];}} | |
| 72 | -if(window.opera&&OpenLayers.Util.indexOf(['left','top','right','bottom'],style)!=-1) | |
| 73 | -if(OpenLayers.Element.getStyle(element,'position')=='static')value='auto';return value=='auto'?null:value;}};String.prototype.startsWith=function(sStart){return(this.substr(0,sStart.length)==sStart);};String.prototype.contains=function(str){return(this.indexOf(str)!=-1);};String.prototype.trim=function(){var b=0;while(this.substr(b,1)==" "){b++;} | |
| 74 | -var e=this.length-1;while(this.substr(e,1)==" "){e--;} | |
| 75 | -return this.substring(b,e+1);};String.indexOf=function(object){for(var i=0;i<this.length;i++) | |
| 76 | -if(this[i]==object)return i;return-1;};String.prototype.camelize=function(){var oStringList=this.split('-');if(oStringList.length==1)return oStringList[0];var camelizedString=this.indexOf('-')==0?oStringList[0].charAt(0).toUpperCase()+oStringList[0].substring(1):oStringList[0];for(var i=1,len=oStringList.length;i<len;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1);} | |
| 77 | -return camelizedString;};Number.prototype.limitSigDigs=function(sig){var number=(sig>0)?this.toString():0;if(sig<number.length){var exp=number.length-sig;number=Math.round(this/Math.pow(10,exp))*Math.pow(10,exp);} | |
| 78 | -return parseInt(number);} | |
| 79 | -Function.prototype.bind=function(){var __method=this,args=[],object=arguments[0];for(var i=1;i<arguments.length;i++) | |
| 80 | -args.push(arguments[i]);return function(moreargs){for(var i=0;i<arguments.length;i++) | |
| 81 | -args.push(arguments[i]);return __method.apply(object,args);}};Function.prototype.bindAsEventListener=function(object){var __method=this;return function(event){return __method.call(object,event||window.event);}};OpenLayers.Util=new Object();OpenLayers.Util.getElement=function(){var elements=new Array();for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element=='string'){element=document.getElementById(element);} | |
| 82 | -if(arguments.length==1){return element;} | |
| 83 | -elements.push(element);} | |
| 84 | -return elements;};if($==null){var $=OpenLayers.Util.getElement;} | |
| 85 | -OpenLayers.Util.extend=function(destination,source){for(property in source){destination[property]=source[property];} | |
| 86 | -return destination;};OpenLayers.Util.removeItem=function(array,item){for(var i=0;i<array.length;i++){if(array[i]==item){array.splice(i,1);}} | |
| 87 | -return array;};OpenLayers.Util.clearArray=function(array){array.length=0;};OpenLayers.Util.indexOf=function(array,obj){for(var i=0;i<array.length;i++){if(array[i]==obj)return i;} | |
| 88 | -return-1;};OpenLayers.Util.modifyDOMElement=function(element,id,px,sz,position,border,overflow,opacity){if(id){element.id=id;} | |
| 89 | -if(px){element.style.left=px.x+"px";element.style.top=px.y+"px";} | |
| 90 | -if(sz){element.style.width=sz.w+"px";element.style.height=sz.h+"px";} | |
| 91 | -if(position){element.style.position=position;} | |
| 92 | -if(border){element.style.border=border;} | |
| 93 | -if(overflow){element.style.overflow=overflow;} | |
| 94 | -if(opacity){element.style.opacity=opacity;element.style.filter='alpha(opacity='+(opacity*100)+')';}};OpenLayers.Util.createDiv=function(id,px,sz,imgURL,position,border,overflow,opacity){var dom=document.createElement('div');if(imgURL){dom.style.backgroundImage='url('+imgURL+')';} | |
| 95 | -if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");} | |
| 96 | -if(!position){position="absolute";} | |
| 97 | -OpenLayers.Util.modifyDOMElement(dom,id,px,sz,position,border,overflow,opacity);return dom;};OpenLayers.Util.createImage=function(id,px,sz,imgURL,position,border,opacity,delayDisplay){var image=document.createElement("img");if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");} | |
| 98 | -if(!position){position="relative";} | |
| 99 | -OpenLayers.Util.modifyDOMElement(image,id,px,sz,position,border,null,opacity);if(delayDisplay){image.style.display="none";OpenLayers.Event.observe(image,"load",OpenLayers.Util.onImageLoad.bindAsEventListener(image));OpenLayers.Event.observe(image,"error",OpenLayers.Util.onImageLoadError.bindAsEventListener(image));} | |
| 100 | -image.style.alt=id;image.galleryImg="no";if(imgURL){image.src=imgURL;} | |
| 101 | -return image;};OpenLayers.Util.setOpacity=function(element,opacity){OpenLayers.Util.modifyDOMElement(element,null,null,null,null,null,null,opacity);} | |
| 102 | -OpenLayers.Util.onImageLoad=function(){if(!this.viewRequestID||(this.map&&this.viewRequestID==this.map.viewRequestID)){this.style.backgroundColor=null;this.style.display="";}};OpenLayers.Util.onImageLoadErrorColor="pink";OpenLayers.IMAGE_RELOAD_ATTEMPTS=0;OpenLayers.Util.onImageLoadError=function(){this._attempts=(this._attempts)?(this._attempts+1):1;if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){this.src=this.src;}else{this.style.backgroundColor=OpenLayers.Util.onImageLoadErrorColor;} | |
| 103 | -this.style.display="";};OpenLayers.Util.alphaHack=function(){var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);var filter=false;try{filter=document.body.filters;}catch(e){} | |
| 104 | -return(filter&&(version>=5.5)&&(version<7));} | |
| 105 | -OpenLayers.Util.modifyAlphaImageDiv=function(div,id,px,sz,imgURL,position,border,sizing,opacity){OpenLayers.Util.modifyDOMElement(div,id,px,sz);var img=div.childNodes[0];if(imgURL){img.src=imgURL;} | |
| 106 | -OpenLayers.Util.modifyDOMElement(img,div.id+"_innerImage",null,sz,"relative",border);if(opacity){div.style.opacity=opacity;div.style.filter='alpha(opacity='+(opacity*100)+')';} | |
| 107 | -if(OpenLayers.Util.alphaHack()){div.style.display="inline-block";if(sizing==null){sizing="scale";} | |
| 108 | -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+")";} | |
| 109 | -img.style.filter="progid:DXImageTransform.Microsoft"+".Alpha(opacity=0)";}};OpenLayers.Util.createAlphaImageDiv=function(id,px,sz,imgURL,position,border,sizing,opacity,delayDisplay){var div=OpenLayers.Util.createDiv();var img=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);div.appendChild(img);if(delayDisplay){img.style.display="none";OpenLayers.Event.observe(img,"load",OpenLayers.Util.onImageLoad.bindAsEventListener(div));OpenLayers.Event.observe(img,"error",OpenLayers.Util.onImageLoadError.bindAsEventListener(div));} | |
| 110 | -OpenLayers.Util.modifyAlphaImageDiv(div,id,px,sz,imgURL,position,border,sizing,opacity);return div;};OpenLayers.Util.upperCaseObject=function(object){var uObject=new Object();for(var key in object){uObject[key.toUpperCase()]=object[key];} | |
| 111 | -return uObject;};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=new Array();for(var key in params){var value=params[key];if((value!=null)&&(typeof value!='function')){var encodedValue;if(typeof value=='object'&&value.constructor==Array){var encodedItemArray=new Array();for(var itemIndex=0;itemIndex<value.length;itemIndex++){encodedItemArray.push(encodeURIComponent(value[itemIndex]));} | |
| 112 | -encodedValue=encodedItemArray.join(",");} | |
| 113 | -else{encodedValue=encodeURIComponent(value);} | |
| 114 | -paramsArray.push(encodeURIComponent(key)+"="+encodedValue);}} | |
| 115 | -return paramsArray.join("&");};OpenLayers.ImgPath='';OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||(OpenLayers._getScriptLocation()+"img/");};OpenLayers.Util.Try=function(){var returnValue;for(var i=0;i<arguments.length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}} | |
| 116 | -return returnValue;} | |
| 117 | -OpenLayers.Util.getNodes=function(p,tagName){var nodes=OpenLayers.Util.Try(function(){return OpenLayers.Util._getNodes(p.documentElement.childNodes,tagName);},function(){return OpenLayers.Util._getNodes(p.childNodes,tagName);});return nodes;};OpenLayers.Util._getNodes=function(nodes,tagName){var retArray=new Array();for(var i=0;i<nodes.length;i++){if(nodes[i].nodeName==tagName){retArray.push(nodes[i]);}} | |
| 118 | -return retArray;};OpenLayers.Util.getTagText=function(parent,item,index){var result=OpenLayers.Util.getNodes(parent,item);if(result&&(result.length>0)) | |
| 119 | -{if(!index){index=0;} | |
| 120 | -if(result[index].childNodes.length>1){return result.childNodes[1].nodeValue;} | |
| 121 | -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) | |
| 122 | -val=node.textContent;if(!val) | |
| 123 | -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;} | |
| 124 | -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 iterLimit=20;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){var sinLambda=Math.sin(lambda),cosLambda=Math.cos(lambda);var sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+ | |
| 125 | -(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma==0)return 0;var cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;var sigma=Math.atan2(sinSigma,cosSigma);var alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);var cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);var cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));} | |
| 126 | -if(iterLimit==0)return NaN | |
| 127 | -var uSq=cosSqAlpha*(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 deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)- | |
| 128 | -B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));var s=b*A*(sigma-deltaSigma);var d=s.toFixed(3)/1000;return d;};OpenLayers.Util.getArgs=function(url){if(url==null){url=window.location.href;} | |
| 129 | -var query=(url.indexOf('?')!=-1)?url.substring(url.indexOf('?')+1):'';var args=new Object();pairs=query.split(/[&;]/);for(var i=0;i<pairs.length;++i){keyValue=pairs[i].split(/=/);if(keyValue.length==2){args[decodeURIComponent(keyValue[0])]=decodeURIComponent(keyValue[1]);}} | |
| 130 | -return args;} | |
| 131 | -OpenLayers.Util.lastSeqID=0;OpenLayers.Util.createUniqueID=function(prefix){if(prefix==null){prefix="id_";} | |
| 132 | -OpenLayers.Util.lastSeqID+=1;return prefix+OpenLayers.Util.lastSeqID;};OpenLayers.INCHES_PER_UNIT={'inches':1.0,'ft':12.0,'mi':63360.0,'m':39.3701,'km':39370.1,'dd':4374754};OpenLayers.INCHES_PER_UNIT["in"]=OpenLayers.INCHES_PER_UNIT.inches;OpenLayers.INCHES_PER_UNIT["degrees"]=OpenLayers.INCHES_PER_UNIT.dd;OpenLayers.DOTS_PER_INCH=72;OpenLayers.Util.normalizeScale=function(scale){var normScale=(scale>1.0)?(1.0/scale):scale;return normScale;};OpenLayers.Util.getResolutionFromScale=function(scale,units){if(units==null){units="degrees";} | |
| 133 | -var normScale=OpenLayers.Util.normalizeScale(scale);var resolution=1/(normScale*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH);return resolution;};OpenLayers.Util.getScaleFromResolution=function(resolution,units){if(units==null){units="degrees";} | |
| 134 | -var scale=resolution*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(forElement){var valueT=0,valueL=0;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body) | |
| 135 | -if(OpenLayers.Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}while(element=element.parentNode);return[valueL,valueT];};OpenLayers.Util.isEquivalentUrl=function(url1,url2,options){options=options||new Object();OpenLayers.Util.applyDefaults(options,{ignoreCase:true,ignorePort80:true,ignoreHash:true});urlObj1=OpenLayers.Util.createUrlObject(url1,options);urlObj2=OpenLayers.Util.createUrlObject(url2,options);for(var key in urlObj1){if(options.test){alert(key+"\n1:"+urlObj1[key]+"\n2:"+urlObj2[key]);} | |
| 136 | -var val1=urlObj1[key];var val2=urlObj2[key];switch(key){case"args":break;case"host":case"port":case"protocol":if((val1=="")||(val2=="")){break;} | |
| 137 | -default:if((key!="args")&&(urlObj1[key]!=urlObj2[key])){return false;} | |
| 138 | -break;}} | |
| 139 | -for(var key in urlObj1.args){if(urlObj1.args[key]!=urlObj2.args[key]){return false;} | |
| 140 | -delete urlObj2.args[key];} | |
| 141 | -for(var key in urlObj2.args){return false;} | |
| 142 | -return true;};OpenLayers.Util.createUrlObject=function(url,options){options=options||new Object();var urlObject=new Object();if(options.ignoreCase){url=url.toLowerCase();} | |
| 143 | -var a=document.createElement('a');a.href=url;urlObject.host=a.host;var port=a.port;if(port.length<=0){var newHostLength=urlObject.host.length-(port.length);urlObject.host=urlObject.host.substring(0,newHostLength);} | |
| 144 | -urlObject.protocol=a.protocol;urlObject.port=((port=="80")&&(options.ignorePort80))?"":port;urlObject.hash=(options.ignoreHash)?"":a.hash;var queryString=a.search;if(!queryString){var qMark=url.indexOf("?");queryString=(qMark!=-1)?url.substr(qMark):"";} | |
| 145 | -urlObject.args=OpenLayers.Util.getArgs(queryString);if(((urlObject.protocol=="file:")&&(url.indexOf("file:")!=-1))||((urlObject.protocol!="file:")&&(urlObject.host!=""))){urlObject.pathname=a.pathname;var qIndex=urlObject.pathname.indexOf("?");if(qIndex!=-1){urlObject.pathname=urlObject.pathname.substring(0,qIndex);}}else{var relStr=OpenLayers.Util.removeTail(url);var backs=0;do{var index=relStr.indexOf("../");if(index==0){backs++ | |
| 146 | -relStr=relStr.substr(3);}else if(index>=0){var prevChunk=relStr.substr(0,index-1);var slash=prevChunk.indexOf("/");prevChunk=(slash!=-1)?prevChunk.substr(0,slash+1):"";var postChunk=relStr.substr(index+3);relStr=prevChunk+postChunk;}}while(index!=-1) | |
| 147 | -var windowAnchor=document.createElement("a");var windowUrl=window.location.href;if(options.ignoreCase){windowUrl=windowUrl.toLowerCase();} | |
| 148 | -windowAnchor.href=windowUrl;urlObject.protocol=windowAnchor.protocol;var splitter=(windowAnchor.pathname.indexOf("/")!=-1)?"/":"\\";var dirs=windowAnchor.pathname.split(splitter);dirs.pop();while((backs>0)&&(dirs.length>0)){dirs.pop();backs--;} | |
| 149 | -relStr=dirs.join("/")+"/"+relStr;urlObject.pathname=relStr;} | |
| 150 | -if((urlObject.protocol=="file:")||(urlObject.protocol=="")){urlObject.host="localhost";} | |
| 151 | -return urlObject;};OpenLayers.Util.removeTail=function(url){var head=null;var qMark=url.indexOf("?");var hashMark=url.indexOf("#");if(qMark==-1){head=(hashMark!=-1)?url.substr(0,hashMark):url;}else{head=(hashMark!=-1)?url.substr(0,Math.min(qMark,hashMark)):url.substr(0,qMark);} | |
| 152 | -return head;};OpenLayers.Rico=new Object();OpenLayers.Rico.Corner={round:function(e,options){e=OpenLayers.Util.getElement(e);this._setOptions(options);var color=this.options.color;if(this.options.color=="fromElement") | |
| 153 | -color=this._background(e);var bgColor=this.options.bgColor;if(this.options.bgColor=="fromParent") | |
| 154 | -bgColor=this._background(e.offsetParent);this._roundCornersImpl(e,color,bgColor);},changeColor:function(theDiv,newColor){theDiv.style.backgroundColor=newColor;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx<spanElements.length;currIdx++){spanElements[currIdx].style.backgroundColor=newColor;}},changeOpacity:function(theDiv,newOpacity){var mozillaOpacity=newOpacity;var ieOpacity='alpha(opacity='+newOpacity*100+')';theDiv.style.opacity=mozillaOpacity;theDiv.style.filter=ieOpacity;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx<spanElements.length;currIdx++){spanElements[currIdx].style.opacity=mozillaOpacity;spanElements[currIdx].style.filter=ieOpacity;}},reRound:function(theDiv,options){var topRico=theDiv.parentNode.childNodes[0];var bottomRico=theDiv.parentNode.childNodes[2];theDiv.parentNode.removeChild(topRico);theDiv.parentNode.removeChild(bottomRico);this.round(theDiv.parentNode,options);},_roundCornersImpl:function(e,color,bgColor){if(this.options.border) | |
| 155 | -this._renderBorder(e,bgColor);if(this._isTopRounded()) | |
| 156 | -this._roundTopCorners(e,color,bgColor);if(this._isBottomRounded()) | |
| 157 | -this._roundBottomCorners(e,color,bgColor);},_renderBorder:function(el,bgColor){var borderValue="1px solid "+this._borderColor(bgColor);var borderL="border-left: "+borderValue;var borderR="border-right: "+borderValue;var style="style='"+borderL+";"+borderR+"'";el.innerHTML="<div "+style+">"+el.innerHTML+"</div>"},_roundTopCorners:function(el,color,bgColor){var corner=this._createCorner(bgColor);for(var i=0;i<this.options.numSlices;i++) | |
| 158 | -corner.appendChild(this._createCornerSlice(color,bgColor,i,"top"));el.style.paddingTop=0;el.insertBefore(corner,el.firstChild);},_roundBottomCorners:function(el,color,bgColor){var corner=this._createCorner(bgColor);for(var i=(this.options.numSlices-1);i>=0;i--) | |
| 159 | -corner.appendChild(this._createCornerSlice(color,bgColor,i,"bottom"));el.style.paddingBottom=0;el.appendChild(corner);},_createCorner:function(bgColor){var corner=document.createElement("div");corner.style.backgroundColor=(this._isTransparent()?"transparent":bgColor);return corner;},_createCornerSlice:function(color,bgColor,n,position){var slice=document.createElement("span");var inStyle=slice.style;inStyle.backgroundColor=color;inStyle.display="block";inStyle.height="1px";inStyle.overflow="hidden";inStyle.fontSize="1px";var borderColor=this._borderColor(color,bgColor);if(this.options.border&&n==0){inStyle.borderTopStyle="solid";inStyle.borderTopWidth="1px";inStyle.borderLeftWidth="0px";inStyle.borderRightWidth="0px";inStyle.borderBottomWidth="0px";inStyle.height="0px";inStyle.borderColor=borderColor;} | |
| 160 | -else if(borderColor){inStyle.borderColor=borderColor;inStyle.borderStyle="solid";inStyle.borderWidth="0px 1px";} | |
| 161 | -if(!this.options.compact&&(n==(this.options.numSlices-1))) | |
| 162 | -inStyle.height="2px";this._setMargin(slice,n,position);this._setBorder(slice,n,position);return slice;},_setOptions:function(options){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false} | |
| 163 | -OpenLayers.Util.extend(this.options,options||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent()) | |
| 164 | -this.options.blend=false;},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top")) | |
| 165 | -return"";if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0) | |
| 166 | -return"";if(this.options.corners.indexOf("tl")>=0) | |
| 167 | -return"left";else if(this.options.corners.indexOf("tr")>=0) | |
| 168 | -return"right";return"";},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom")) | |
| 169 | -return"";if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0) | |
| 170 | -return"";if(this.options.corners.indexOf("bl")>=0) | |
| 171 | -return"left";else if(this.options.corners.indexOf("br")>=0) | |
| 172 | -return"right";return"";},_borderColor:function(color,bgColor){if(color=="transparent") | |
| 173 | -return bgColor;else if(this.options.border) | |
| 174 | -return this.options.border;else if(this.options.blend) | |
| 175 | -return this._blend(bgColor,color);else | |
| 176 | -return"";},_setMargin:function(el,n,corners){var marginSize=this._marginSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.marginLeft=marginSize+"px";el.style.marginRight="0px";} | |
| 177 | -else if(whichSide=="right"){el.style.marginRight=marginSize+"px";el.style.marginLeft="0px";} | |
| 178 | -else{el.style.marginLeft=marginSize+"px";el.style.marginRight=marginSize+"px";}},_setBorder:function(el,n,corners){var borderSize=this._borderSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth="0px";} | |
| 179 | -else if(whichSide=="right"){el.style.borderRightWidth=borderSize+"px";el.style.borderLeftWidth="0px";} | |
| 180 | -else{el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";} | |
| 181 | -if(this.options.border!=false) | |
| 182 | -el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";},_marginSize:function(n){if(this._isTransparent()) | |
| 183 | -return 0;var marginSizes=[5,3,2,1];var blendedMarginSizes=[3,2,1,0];var compactMarginSizes=[2,1];var smBlendedMarginSizes=[1,0];if(this.options.compact&&this.options.blend) | |
| 184 | -return smBlendedMarginSizes[n];else if(this.options.compact) | |
| 185 | -return compactMarginSizes[n];else if(this.options.blend) | |
| 186 | -return blendedMarginSizes[n];else | |
| 187 | -return marginSizes[n];},_borderSize:function(n){var transparentBorderSizes=[5,3,2,1];var blendedBorderSizes=[2,1,1,1];var compactBorderSizes=[1,0];var actualBorderSizes=[0,2,0,0];if(this.options.compact&&(this.options.blend||this._isTransparent())) | |
| 188 | -return 1;else if(this.options.compact) | |
| 189 | -return compactBorderSizes[n];else if(this.options.blend) | |
| 190 | -return blendedBorderSizes[n];else if(this.options.border) | |
| 191 | -return actualBorderSizes[n];else if(this._isTransparent()) | |
| 192 | -return transparentBorderSizes[n];return 0;},_hasString:function(str){for(var i=1;i<arguments.length;i++)if(str.indexOf(arguments[i])>=0)return true;return false;},_blend:function(c1,c2){var cc1=OpenLayers.Rico.Color.createFromHex(c1);cc1.blend(OpenLayers.Rico.Color.createFromHex(c2));return cc1;},_background:function(el){try{return OpenLayers.Rico.Color.createColorFromBackground(el).asHex();}catch(err){return"#ffffff";}},_isTransparent:function(){return this.options.color=="transparent";},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr");},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br");},_hasSingleTextChild:function(el){return el.childNodes.length==1&&el.childNodes[0].nodeType==3;}} | |
| 193 | -OpenLayers.ProxyHost="";OpenLayers.nullHandler=function(request){alert("Unhandled request return "+request.statusText);};OpenLayers.loadURL=function(uri,params,caller,onComplete,onFailure){if(OpenLayers.ProxyHost&&uri.startsWith("http")){uri=OpenLayers.ProxyHost+escape(uri);} | |
| 194 | -var success=(onComplete)?onComplete.bind(caller):OpenLayers.nullHandler;var failure=(onFailure)?onFailure.bind(caller):OpenLayers.nullHandler;new OpenLayers.Ajax.Request(uri,{method:'get',parameters:params,onComplete:success,onFailure:failure});};OpenLayers.parseXMLString=function(text){var index=text.indexOf('<');if(index>0){text=text.substring(index);} | |
| 195 | -var ajaxResponse=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");} | |
| 196 | -req.send(null);return req.responseXML;});return ajaxResponse;};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(responderToAdd){for(var i=0;i<this.responders.length;i++) | |
| 197 | -if(responderToAdd==this.responders[i]) | |
| 198 | -return;this.responders.push(responderToAdd);},dispatch:function(callback,request,transport,json){for(var i=0;i<this.responders.length;i++){responder=this.responders[i];if(responder[callback]&&typeof responder[callback]=='function'){try{responder[callback].apply(responder,[request,transport,json]);}catch(e){}}}}};OpenLayers.Ajax.Responders.register({onCreate:function(){OpenLayers.Ajax.activeRequestCount++;},onComplete:function(){OpenLayers.Ajax.activeRequestCount--;}});OpenLayers.Ajax.Base=function(){};OpenLayers.Ajax.Base.prototype={setOptions:function(options){this.options={method:'post',asynchronous:true,parameters:''} | |
| 199 | -OpenLayers.Util.extend(this.options,options||{});},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300);},responseIsFailure:function(){return!this.responseIsSuccess();}} | |
| 200 | -OpenLayers.Ajax.Request=OpenLayers.Class.create();OpenLayers.Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];OpenLayers.Ajax.Request.prototype=OpenLayers.Class.inherit(OpenLayers.Ajax.Base,{initialize:function(url,options){this.transport=OpenLayers.Ajax.getTransport();this.setOptions(options);this.request(url);},request:function(url){var parameters=this.options.parameters||'';if(parameters.length>0)parameters+='&_=';try{this.url=url;if(this.options.method=='get'&¶meters.length>0) | |
| 201 | -this.url+=(this.url.match(/\?/)?'&':'?')+parameters;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=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10);} | |
| 202 | -this.setRequestHeaders();var body=this.options.postBody?this.options.postBody:parameters;this.transport.send(this.options.method=='post'?body:null);}catch(e){this.dispatchException(e);}},setRequestHeaders:function(){var requestHeaders=['X-Requested-With','XMLHttpRequest','X-Prototype-Version','OpenLayers'];if(this.options.method=='post'&&!this.options.postBody){requestHeaders.push('Content-type','application/x-www-form-urlencoded');if(this.transport.overrideMimeType) | |
| 203 | -requestHeaders.push('Connection','close');} | |
| 204 | -if(this.options.requestHeaders) | |
| 205 | -requestHeaders.push.apply(requestHeaders,this.options.requestHeaders);for(var i=0;i<requestHeaders.length;i+=2) | |
| 206 | -this.transport.setRequestHeader(requestHeaders[i],requestHeaders[i+1]);},onStateChange:function(){var readyState=this.transport.readyState;if(readyState!=1) | |
| 207 | -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(readyState){var event=OpenLayers.Ajax.Request.Events[readyState];var transport=this.transport,json=this.evalJSON();if(event=='Complete'){try{(this.options['on'+this.transport.status]||this.options['on'+(this.responseIsSuccess()?'Success':'Failure')]||OpenLayers.Ajax.emptyFunction)(transport,json);}catch(e){this.dispatchException(e);} | |
| 208 | -if((this.header('Content-type')||'').match(/^text\/javascript/i)) | |
| 209 | -this.evalResponse();} | |
| 210 | -try{(this.options['on'+event]||OpenLayers.Ajax.emptyFunction)(transport,json);OpenLayers.Ajax.Responders.dispatch('on'+event,this,transport,json);}catch(e){this.dispatchException(e);} | |
| 211 | -if(event=='Complete') | |
| 212 | -this.transport.onreadystatechange=OpenLayers.Ajax.emptyFunction;},dispatchException:function(exception){(this.options.onException||OpenLayers.Ajax.emptyFunction)(this,exception);OpenLayers.Ajax.Responders.dispatch('onException',this,exception);}});OpenLayers.Ajax.getElementsByTagNameNS=function(parentnode,nsuri,nsprefix,tagname){return parentnode.getElementsByTagNameNS?parentnode.getElementsByTagNameNS(nsuri,tagname):parentnode.getElementsByTagName(nsprefix+':'+tagname);} | |
| 213 | -OpenLayers.Ajax.serializeXMLToString=function(xmldom){var serializer=new XMLSerializer();data=serializer.serializeToString(xmldom);return data;} | |
| 214 | -OpenLayers.Control=OpenLayers.Class.create();OpenLayers.Control.TYPE_BUTTON=1;OpenLayers.Control.TYPE_TOGGLE=2;OpenLayers.Control.TYPE_TOOL=3;OpenLayers.Control.prototype={id:null,map:null,div:null,type:null,displayClass:"",active:null,handler:null,initialize:function(options){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(".","");OpenLayers.Util.extend(this,options);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){if(this.handler){this.handler.destroy();} | |
| 215 | -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;} | |
| 216 | -if(px!=null){this.position=px.clone();} | |
| 217 | -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;} | |
| 218 | -if(this.handler){this.handler.activate();} | |
| 219 | -this.active=true;return true;},deactivate:function(){if(this.active){if(this.handler){this.handler.deactivate();} | |
| 220 | -this.active=false;return true;} | |
| 221 | -return false;},CLASS_NAME:"OpenLayers.Control"};OpenLayers.Handler=OpenLayers.Class.create();OpenLayers.Handler.MOD_NONE=0;OpenLayers.Handler.MOD_SHIFT=1;OpenLayers.Handler.MOD_CTRL=2;OpenLayers.Handler.MOD_ALT=4;OpenLayers.Handler.prototype={id:null,control:null,map:null,keyMask:null,active:false,initialize:function(control,callbacks,options){OpenLayers.Util.extend(this,options);this.control=control;this.callbacks=callbacks;if(control.map){this.setMap(control.map);} | |
| 222 | -OpenLayers.Util.extend(this,options);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},setMap:function(map){this.map=map;},checkModifiers:function(evt){if(this.keyMask==null){return true;} | |
| 223 | -var keyModifiers=(evt.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(evt.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(evt.altKey?OpenLayers.Handler.MOD_ALT:0);return(keyModifiers==this.keyMask);},activate:function(){if(this.active){return false;} | |
| 224 | -var events=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var i=0;i<events.length;i++){if(this[events[i]]){this.register(events[i],this[events[i]]);}} | |
| 225 | -this.active=true;return true;},deactivate:function(){if(!this.active){return false;} | |
| 226 | -var events=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var i=0;i<events.length;i++){if(this[events[i]]){this.unregister(events[i],this[events[i]]);}} | |
| 227 | -this.active=false;return true;},callback:function(name,args){if(this.callbacks[name]){this.callbacks[name].apply(this.control,args);}},register:function(name,method){this.map.events.registerPriority(name,this,method);},unregister:function(name,method){this.map.events.unregister(name,this,method);},destroy:function(){this.control=this.map=null;},CLASS_NAME:"OpenLayers.Handler"};OpenLayers.Icon=OpenLayers.Class.create();OpenLayers.Icon.prototype={url:null,size:null,offset:null,calculateOffset:null,imageDiv:null,px:null,initialize:function(url,size,offset,calculateOffset){this.url=url;this.size=(size)?size:new OpenLayers.Size(20,20);this.offset=offset?offset:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=calculateOffset;var id=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(id);},destroy:function(){OpenLayers.Event.stopObservingElement(this.imageDiv.firstChild);this.imageDiv.innerHTML="";this.imageDiv=null;},clone:function(){return new OpenLayers.Icon(this.url,this.size,this.offset,this.calculateOffset);},setSize:function(size){if(size!=null){this.size=size;} | |
| 228 | -this.draw();},draw:function(px){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,this.size,this.url,"absolute");this.moveTo(px);return this.imageDiv;},setOpacity:function(opacity){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,null,null,null,null,null,opacity);},moveTo:function(px){if(px!=null){this.px=px;} | |
| 229 | -if(this.imageDiv!=null){if(this.px==null){this.display(false);}else{if(this.calculateOffset){this.offset=this.calculateOffset(this.size);} | |
| 230 | -var offsetPx=this.px.offset(this.offset);OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,offsetPx);}}},display:function(display){this.imageDiv.style.display=(display)?"":"none";},CLASS_NAME:"OpenLayers.Icon"};OpenLayers.Popup=OpenLayers.Class.create();OpenLayers.Popup.WIDTH=200;OpenLayers.Popup.HEIGHT=200;OpenLayers.Popup.COLOR="white";OpenLayers.Popup.OPACITY=1;OpenLayers.Popup.BORDER="0px";OpenLayers.Popup.prototype={events:null,id:"",lonlat:null,div:null,size:null,contentHTML:"",backgroundColor:"",opacity:"",border:"",contentDiv:null,groupDiv:null,padding:5,map:null,initialize:function(id,lonlat,size,contentHTML,closeBox){if(id==null){id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");} | |
| 231 | -this.id=id;this.lonlat=lonlat;this.size=(size!=null)?size:new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT);if(contentHTML!=null){this.contentHTML=contentHTML;} | |
| 232 | -this.backgroundColor=OpenLayers.Popup.COLOR;this.opacity=OpenLayers.Popup.OPACITY;this.border=OpenLayers.Popup.BORDER;this.div=OpenLayers.Util.createDiv(this.id,null,null,null,null,null,"hidden");this.div.className='olPopup';this.groupDiv=OpenLayers.Util.createDiv(null,null,null,null,"relative",null,"hidden");var id=this.div.id+"_contentDiv";this.contentDiv=OpenLayers.Util.createDiv(id,null,this.size.clone(),null,"relative",null,"hidden");this.contentDiv.className='olPopupContent';this.groupDiv.appendChild(this.contentDiv);this.div.appendChild(this.groupDiv);if(closeBox==true){var closeSize=new OpenLayers.Size(17,17);var img=OpenLayers.Util.getImagesLocation()+"close.gif";var closeImg=OpenLayers.Util.createAlphaImageDiv(this.id+"_close",null,closeSize,img);closeImg.style.right=this.padding+"px";closeImg.style.top=this.padding+"px";this.groupDiv.appendChild(closeImg);var closePopup=function(e){this.hide();OpenLayers.Event.stop(e);} | |
| 233 | -OpenLayers.Event.observe(closeImg,"click",closePopup.bindAsEventListener(this));} | |
| 234 | -this.registerEvents();},destroy:function(){if(this.map!=null){this.map.removePopup(this);this.map=null;} | |
| 235 | -this.events.destroy();this.events=null;this.div=null;},draw:function(px){if(px==null){if((this.lonlat!=null)&&(this.map!=null)){px=this.map.getLayerPxFromLonLat(this.lonlat);}} | |
| 236 | -this.setSize();this.setBackgroundColor();this.setOpacity();this.setBorder();this.setContentHTML();this.moveTo(px);return this.div;},updatePosition:function(){if((this.lonlat)&&(this.map)){var px=this.map.getLayerPxFromLonLat(this.lonlat);this.moveTo(px);}},moveTo:function(px){if((px!=null)&&(this.div!=null)){this.div.style.left=px.x+"px";this.div.style.top=px.y+"px";}},visible:function(){return OpenLayers.Element.visible(this.div);},toggle:function(){OpenLayers.Element.toggle(this.div);},show:function(){OpenLayers.Element.show(this.div);},hide:function(){OpenLayers.Element.hide(this.div);},setSize:function(size){if(size!=undefined){this.size=size;} | |
| 237 | -if(this.div!=null){this.div.style.width=this.size.w+"px";this.div.style.height=this.size.h+"px";} | |
| 238 | -if(this.contentDiv!=null){this.contentDiv.style.width=this.size.w+"px";this.contentDiv.style.height=this.size.h+"px";}},setBackgroundColor:function(color){if(color!=undefined){this.backgroundColor=color;} | |
| 239 | -if(this.div!=null){this.div.style.backgroundColor=this.backgroundColor;}},setOpacity:function(opacity){if(opacity!=undefined){this.opacity=opacity;} | |
| 240 | -if(this.div!=null){this.div.style.opacity=this.opacity;this.div.style.filter='alpha(opacity='+this.opacity*100+')';}},setBorder:function(border){if(border!=undefined){this.border=border;} | |
| 241 | -if(this.div!=null){this.div.style.border=this.border;}},setContentHTML:function(contentHTML){if(contentHTML!=null){this.contentHTML=contentHTML;} | |
| 242 | -if(this.contentDiv!=null){this.contentDiv.innerHTML=this.contentHTML;}},registerEvents:function(){this.events=new OpenLayers.Events(this,this.div,null,true);this.events.register("mousedown",this,this.onmousedown);this.events.register("mousemove",this,this.onmousemove);this.events.register("mouseup",this,this.onmouseup);this.events.register("click",this,this.onclick);this.events.register("mouseout",this,this.onmouseout);this.events.register("dblclick",this,this.ondblclick);},onmousedown:function(evt){this.mousedown=true;OpenLayers.Event.stop(evt,true);},onmousemove:function(evt){if(this.mousedown){OpenLayers.Event.stop(evt,true);}},onmouseup:function(evt){if(this.mousedown){this.mousedown=false;OpenLayers.Event.stop(evt,true);}},onclick:function(evt){OpenLayers.Event.stop(evt,true);},onmouseout:function(evt){this.mousedown=false;},ondblclick:function(evt){OpenLayers.Event.stop(evt,true);},CLASS_NAME:"OpenLayers.Popup"};OpenLayers.Renderer=OpenLayers.Class.create();OpenLayers.Renderer.prototype={container:null,extent:null,size:null,resolution:null,map:null,initialize:function(containerID){this.container=$(containerID);},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(feature,style){if(style==null){style=feature.style;} | |
| 243 | -this.drawGeometry(feature.geometry,style,feature.id);},drawGeometry:function(geometry,style,featureId){},clear:function(){},getFeatureIdFromEvent:function(evt){},eraseFeatures:function(features){if(!(features instanceof Array)){features=[features];} | |
| 244 | -for(var i=0;i<features.length;++i){this.eraseGeometry(features[i].geometry);}},eraseGeometry:function(geometry){},CLASS_NAME:"OpenLayers.Renderer"};OpenLayers.Rico.Color=OpenLayers.Class.create();OpenLayers.Rico.Color.prototype={initialize:function(red,green,blue){this.rgb={r:red,g:green,b:blue};},setRed:function(r){this.rgb.r=r;},setGreen:function(g){this.rgb.g=g;},setBlue:function(b){this.rgb.b=b;},setHue:function(h){var hsb=this.asHSB();hsb.h=h;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},setSaturation:function(s){var hsb=this.asHSB();hsb.s=s;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},setBrightness:function(b){var hsb=this.asHSB();hsb.b=b;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},darken:function(percent){var hsb=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,Math.max(hsb.b-percent,0));},brighten:function(percent){var hsb=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,Math.min(hsb.b+percent,1));},blend:function(other){this.rgb.r=Math.floor((this.rgb.r+other.rgb.r)/2);this.rgb.g=Math.floor((this.rgb.g+other.rgb.g)/2);this.rgb.b=Math.floor((this.rgb.b+other.rgb.b)/2);},isBright:function(){var hsb=this.asHSB();return this.asHSB().b>0.5;},isDark:function(){return!this.isBright();},asRGB:function(){return"rgb("+this.rgb.r+","+this.rgb.g+","+this.rgb.b+")";},asHex:function(){return"#"+this.rgb.r.toColorPart()+this.rgb.g.toColorPart()+this.rgb.b.toColorPart();},asHSB:function(){return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r,this.rgb.g,this.rgb.b);},toString:function(){return this.asHex();}};OpenLayers.Rico.Color.createFromHex=function(hexCode){if(hexCode.length==4){var shortHexCode=hexCode;var hexCode='#';for(var i=1;i<4;i++)hexCode+=(shortHexCode.charAt(i)+ | |
| 245 | -shortHexCode.charAt(i));} | |
| 246 | -if(hexCode.indexOf('#')==0) | |
| 247 | -hexCode=hexCode.substring(1);var red=hexCode.substring(0,2);var green=hexCode.substring(2,4);var blue=hexCode.substring(4,6);return new OpenLayers.Rico.Color(parseInt(red,16),parseInt(green,16),parseInt(blue,16));} | |
| 248 | -OpenLayers.Rico.Color.createColorFromBackground=function(elem){var actualColor=RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(elem),"backgroundColor","background-color");if(actualColor=="transparent"&&elem.parentNode) | |
| 249 | -return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode);if(actualColor==null) | |
| 250 | -return new OpenLayers.Rico.Color(255,255,255);if(actualColor.indexOf("rgb(")==0){var colors=actualColor.substring(4,actualColor.length-1);var colorArray=colors.split(",");return new OpenLayers.Rico.Color(parseInt(colorArray[0]),parseInt(colorArray[1]),parseInt(colorArray[2]));} | |
| 251 | -else if(actualColor.indexOf("#")==0){return OpenLayers.Rico.Color.createFromHex(actualColor);} | |
| 252 | -else | |
| 253 | -return new OpenLayers.Rico.Color(255,255,255);} | |
| 254 | -OpenLayers.Rico.Color.HSBtoRGB=function(hue,saturation,brightness){var red=0;var green=0;var blue=0;if(saturation==0){red=parseInt(brightness*255.0+0.5);green=red;blue=red;} | |
| 255 | -else{var h=(hue-Math.floor(hue))*6.0;var f=h-Math.floor(h);var p=brightness*(1.0-saturation);var q=brightness*(1.0-saturation*f);var t=brightness*(1.0-(saturation*(1.0-f)));switch(parseInt(h)){case 0:red=(brightness*255.0+0.5);green=(t*255.0+0.5);blue=(p*255.0+0.5);break;case 1:red=(q*255.0+0.5);green=(brightness*255.0+0.5);blue=(p*255.0+0.5);break;case 2:red=(p*255.0+0.5);green=(brightness*255.0+0.5);blue=(t*255.0+0.5);break;case 3:red=(p*255.0+0.5);green=(q*255.0+0.5);blue=(brightness*255.0+0.5);break;case 4:red=(t*255.0+0.5);green=(p*255.0+0.5);blue=(brightness*255.0+0.5);break;case 5:red=(brightness*255.0+0.5);green=(p*255.0+0.5);blue=(q*255.0+0.5);break;}} | |
| 256 | -return{r:parseInt(red),g:parseInt(green),b:parseInt(blue)};} | |
| 257 | -OpenLayers.Rico.Color.RGBtoHSB=function(r,g,b){var hue;var saturation;var brightness;var cmax=(r>g)?r:g;if(b>cmax) | |
| 258 | -cmax=b;var cmin=(r<g)?r:g;if(b<cmin) | |
| 259 | -cmin=b;brightness=cmax/255.0;if(cmax!=0) | |
| 260 | -saturation=(cmax-cmin)/cmax;else | |
| 261 | -saturation=0;if(saturation==0) | |
| 262 | -hue=0;else{var redc=(cmax-r)/(cmax-cmin);var greenc=(cmax-g)/(cmax-cmin);var bluec=(cmax-b)/(cmax-cmin);if(r==cmax) | |
| 263 | -hue=bluec-greenc;else if(g==cmax) | |
| 264 | -hue=2.0+redc-bluec;else | |
| 265 | -hue=4.0+greenc-redc;hue=hue/6.0;if(hue<0) | |
| 266 | -hue=hue+1.0;} | |
| 267 | -return{h:hue,s:saturation,b:brightness};} | |
| 268 | -OpenLayers.Control.ArgParser=OpenLayers.Class.create();OpenLayers.Control.ArgParser.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{center:null,zoom:null,layers:null,initialize:function(element,base){OpenLayers.Control.prototype.initialize.apply(this,arguments);},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var i=0;i<this.map.controls.length;i++){var control=this.map.controls[i];if((control!=this)&&(control.CLASS_NAME=="OpenLayers.Control.ArgParser")){break;}} | |
| 269 | -if(i==this.map.controls.length){var args=OpenLayers.Util.getArgs();if(args.lat&&args.lon){this.center=new OpenLayers.LonLat(parseFloat(args.lon),parseFloat(args.lat));if(args.zoom){this.zoom=parseInt(args.zoom);} | |
| 270 | -this.map.events.register('changebaselayer',this,this.setCenter);this.setCenter();} | |
| 271 | -if(args.layers){this.layers=args.layers;this.map.events.register('addlayer',this,this.configureLayers);this.configureLayers();}}},setCenter:function(){if(this.map.baseLayer){this.map.events.unregister('changebaselayer',this,this.setCenter);this.map.setCenter(this.center,this.zoom);}},configureLayers:function(){if(this.layers.length==this.map.layers.length){this.map.events.unregister('addlayer',this,this.configureLayers);for(var i=0;i<this.layers.length;i++){var layer=this.map.layers[i];var c=this.layers.charAt(i);if(c=="B"){this.map.setBaseLayer(layer);}else if((c=="T")||(c=="F")){layer.setVisibility(c=="T");}}}},CLASS_NAME:"OpenLayers.Control.ArgParser"});OpenLayers.Control.LayerSwitcher=OpenLayers.Class.create();OpenLayers.Control.LayerSwitcher.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{activeColor:"darkblue",layersDiv:null,baseLayersDiv:null,baseLayers:null,dataLbl:null,dataLayersDiv:null,dataLayers:null,minimizeDiv:null,maximizeDiv:null,ascending:true,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Event.stopObservingElement(this.div);OpenLayers.Event.stopObservingElement(this.minimizeDiv);OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.clearLayersArray("base");this.clearLayersArray("data");this.map.events.unregister("addlayer",this,this.redraw);this.map.events.unregister("changelayer",this,this.redraw);this.map.events.unregister("removelayer",this,this.redraw);this.map.events.unregister("changebaselayer",this,this.redraw);OpenLayers.Control.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.register("addlayer",this,this.redraw);this.map.events.register("changelayer",this,this.redraw);this.map.events.register("removelayer",this,this.redraw);this.map.events.register("changebaselayer",this,this.redraw);},draw:function(){OpenLayers.Control.prototype.draw.apply(this);this.loadContents();this.minimizeControl();this.redraw();return this.div;},clearLayersArray:function(layersType){var layers=this[layersType+"Layers"];if(layers){for(var i=0;i<layers.length;i++){var layer=layers[i];OpenLayers.Event.stopObservingElement(layer.inputElem);OpenLayers.Event.stopObservingElement(layer.labelSpan);}} | |
| 272 | -this[layersType+"LayersDiv"].innerHTML="";this[layersType+"Layers"]=new Array();},redraw:function(){this.clearLayersArray("base");this.clearLayersArray("data");var containsOverlays=false;var layers=this.map.layers.slice();if(!this.ascending){layers.reverse();} | |
| 273 | -for(var i=0;i<layers.length;i++){var layer=layers[i];var baseLayer=layer.isBaseLayer;if(baseLayer||layer.displayInLayerSwitcher){if(!baseLayer){containsOverlays=true;} | |
| 274 | -var checked=(baseLayer)?(layer==this.map.baseLayer):layer.getVisibility();var inputElem=document.createElement("input");inputElem.id="input_"+layer.name;inputElem.name=(baseLayer)?"baseLayers":layer.name;inputElem.type=(baseLayer)?"radio":"checkbox";inputElem.value=layer.name;inputElem.checked=checked;inputElem.defaultChecked=checked;if(!baseLayer&&!layer.inRange){inputElem.disabled=true;} | |
| 275 | -var context={'inputElem':inputElem,'layer':layer,'layerSwitcher':this} | |
| 276 | -OpenLayers.Event.observe(inputElem,"mouseup",this.onInputClick.bindAsEventListener(context));var labelSpan=document.createElement("span");if(!baseLayer&&!layer.inRange){labelSpan.style.color="gray";} | |
| 277 | -labelSpan.innerHTML=layer.name;labelSpan.style.verticalAlign=(baseLayer)?"bottom":"baseline";OpenLayers.Event.observe(labelSpan,"click",this.onInputClick.bindAsEventListener(context));var br=document.createElement("br");var groupArray=(baseLayer)?this.baseLayers:this.dataLayers;groupArray.push({'layer':layer,'inputElem':inputElem,'labelSpan':labelSpan});var groupDiv=(baseLayer)?this.baseLayersDiv:this.dataLayersDiv;groupDiv.appendChild(inputElem);groupDiv.appendChild(labelSpan);groupDiv.appendChild(br);}} | |
| 278 | -this.dataLbl.style.display=(containsOverlays)?"":"none";return this.div;},onInputClick:function(e){if(!this.inputElem.disabled){if(this.inputElem.type=="radio"){this.inputElem.checked=true;this.layer.map.setBaseLayer(this.layer,true);this.layer.map.events.triggerEvent("changebaselayer");}else{this.inputElem.checked=!this.inputElem.checked;this.layerSwitcher.updateMap();}} | |
| 279 | -OpenLayers.Event.stop(e);},onLayerClick:function(e){this.updateMap();},updateMap:function(){for(var i=0;i<this.baseLayers.length;i++){var layerEntry=this.baseLayers[i];if(layerEntry.inputElem.checked){this.map.setBaseLayer(layerEntry.layer,false);}} | |
| 280 | -for(var i=0;i<this.dataLayers.length;i++){var layerEntry=this.dataLayers[i];layerEntry.layer.setVisibility(layerEntry.inputElem.checked,true);}},maximizeControl:function(e){this.div.style.width="20em";this.div.style.height="";this.showControls(false);if(e!=null){OpenLayers.Event.stop(e);}},minimizeControl:function(e){this.div.style.width="0px";this.div.style.height="0px";this.showControls(true);if(e!=null){OpenLayers.Event.stop(e);}},showControls:function(minimize){this.maximizeDiv.style.display=minimize?"":"none";this.minimizeDiv.style.display=minimize?"none":"";this.layersDiv.style.display=minimize?"none":"";},loadContents:function(){this.div.style.position="absolute";this.div.style.top="25px";this.div.style.right="0px";this.div.style.left="";this.div.style.fontFamily="sans-serif";this.div.style.fontWeight="bold";this.div.style.marginTop="3px";this.div.style.marginLeft="3px";this.div.style.marginBottom="3px";this.div.style.fontSize="smaller";this.div.style.color="white";this.div.style.backgroundColor="transparent";OpenLayers.Event.observe(this.div,"mouseup",this.mouseUp.bindAsEventListener(this));OpenLayers.Event.observe(this.div,"click",this.ignoreEvent);OpenLayers.Event.observe(this.div,"mousedown",this.mouseDown.bindAsEventListener(this));OpenLayers.Event.observe(this.div,"dblclick",this.ignoreEvent);this.layersDiv=document.createElement("div");this.layersDiv.id="layersDiv";this.layersDiv.style.paddingTop="5px";this.layersDiv.style.paddingLeft="10px";this.layersDiv.style.paddingBottom="5px";this.layersDiv.style.paddingRight="75px";this.layersDiv.style.backgroundColor=this.activeColor;this.layersDiv.style.width="100%";this.layersDiv.style.height="100%";var baseLbl=document.createElement("div");baseLbl.innerHTML="<u>Base Layer</u>";baseLbl.style.marginTop="3px";baseLbl.style.marginLeft="3px";baseLbl.style.marginBottom="3px";this.baseLayersDiv=document.createElement("div");this.baseLayersDiv.style.paddingLeft="10px";this.dataLbl=document.createElement("div");this.dataLbl.innerHTML="<u>Overlays</u>";this.dataLbl.style.marginTop="3px";this.dataLbl.style.marginLeft="3px";this.dataLbl.style.marginBottom="3px";this.dataLayersDiv=document.createElement("div");this.dataLayersDiv.style.paddingLeft="10px";if(this.ascending){this.layersDiv.appendChild(baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);}else{this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);this.layersDiv.appendChild(baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);} | |
| 281 | -this.div.appendChild(this.layersDiv);OpenLayers.Rico.Corner.round(this.div,{corners:"tl bl",bgColor:"transparent",color:this.activeColor,blend:false});OpenLayers.Rico.Corner.changeOpacity(this.layersDiv,0.75);var imgLocation=OpenLayers.Util.getImagesLocation();var sz=new OpenLayers.Size(18,18);var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MaximizeDiv",null,sz,img,"absolute");this.maximizeDiv.style.top="5px";this.maximizeDiv.style.right="0px";this.maximizeDiv.style.left="";this.maximizeDiv.style.display="none";OpenLayers.Event.observe(this.maximizeDiv,"click",this.maximizeControl.bindAsEventListener(this));this.div.appendChild(this.maximizeDiv);var img=imgLocation+'layer-switcher-minimize.png';var sz=new OpenLayers.Size(18,18);this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MinimizeDiv",null,sz,img,"absolute");this.minimizeDiv.style.top="5px";this.minimizeDiv.style.right="0px";this.minimizeDiv.style.left="";this.minimizeDiv.style.display="none";OpenLayers.Event.observe(this.minimizeDiv,"click",this.minimizeControl.bindAsEventListener(this));this.div.appendChild(this.minimizeDiv);},ignoreEvent:function(evt){OpenLayers.Event.stop(evt);},mouseDown:function(evt){this.mouseDown=true;this.ignoreEvent(evt);},mouseUp:function(evt){if(this.mouseDown){this.mouseDown=false;this.ignoreEvent(evt);}},CLASS_NAME:"OpenLayers.Control.LayerSwitcher"});OpenLayers.Control.MouseDefaults=OpenLayers.Class.create();OpenLayers.Control.MouseDefaults.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{performedDrag:false,wheelObserver:null,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.handler){this.handler.destroy();} | |
| 282 | -this.handler=null;this.map.events.unregister("click",this,this.defaultClick);this.map.events.unregister("dblclick",this,this.defaultDblClick);this.map.events.unregister("mousedown",this,this.defaultMouseDown);this.map.events.unregister("mouseup",this,this.defaultMouseUp);this.map.events.unregister("mousemove",this,this.defaultMouseMove);this.map.events.unregister("mouseout",this,this.defaultMouseOut);OpenLayers.Event.stopObserving(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.stopObserving(window,"mousewheel",this.wheelObserver);OpenLayers.Event.stopObserving(document,"mousewheel",this.wheelObserver);this.wheelObserver=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){this.map.events.register("click",this,this.defaultClick);this.map.events.register("dblclick",this,this.defaultDblClick);this.map.events.register("mousedown",this,this.defaultMouseDown);this.map.events.register("mouseup",this,this.defaultMouseUp);this.map.events.register("mousemove",this,this.defaultMouseMove);this.map.events.register("mouseout",this,this.defaultMouseOut);this.registerWheelEvents();},registerWheelEvents:function(){this.wheelObserver=this.onWheelEvent.bindAsEventListener(this);OpenLayers.Event.observe(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.observe(window,"mousewheel",this.wheelObserver);OpenLayers.Event.observe(document,"mousewheel",this.wheelObserver);},defaultClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;var notAfterDrag=!this.performedDrag;this.performedDrag=false;return notAfterDrag;},defaultDblClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},defaultMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.mouseDragStart=evt.xy.clone();this.performedDrag=false;if(evt.shiftKey){this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv('zoomBox',this.mouseDragStart,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);} | |
| 283 | -document.onselectstart=function(){return false;} | |
| 284 | -OpenLayers.Event.stop(evt);},defaultMouseMove:function(evt){this.mousePosition=evt.xy.clone();if(this.mouseDragStart!=null){if(this.zoomBox){var deltaX=Math.abs(this.mouseDragStart.x-evt.xy.x);var deltaY=Math.abs(this.mouseDragStart.y-evt.xy.y);this.zoomBox.style.width=Math.max(1,deltaX)+"px";this.zoomBox.style.height=Math.max(1,deltaY)+"px";if(evt.xy.x<this.mouseDragStart.x){this.zoomBox.style.left=evt.xy.x+"px";} | |
| 285 | -if(evt.xy.y<this.mouseDragStart.y){this.zoomBox.style.top=evt.xy.y+"px";}}else{var deltaX=this.mouseDragStart.x-evt.xy.x;var deltaY=this.mouseDragStart.y-evt.xy.y;var size=this.map.getSize();var newXY=new OpenLayers.Pixel(size.w/2+deltaX,size.h/2+deltaY);var newCenter=this.map.getLonLatFromViewPortPx(newXY);this.map.setCenter(newCenter,null,true);this.mouseDragStart=evt.xy.clone();this.map.div.style.cursor="move";} | |
| 286 | -this.performedDrag=true;}},defaultMouseUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.zoomBox){this.zoomBoxEnd(evt);}else{if(this.performedDrag){this.map.setCenter(this.map.center);}} | |
| 287 | -document.onselectstart=null;this.mouseDragStart=null;this.map.div.style.cursor="";},defaultMouseOut:function(evt){if(this.mouseDragStart!=null&&OpenLayers.Util.mouseLeft(evt,this.map.div)){if(this.zoomBox){this.removeZoomBox();} | |
| 288 | -this.mouseDragStart=null;}},defaultWheelUp:function(evt){if(this.map.getZoom()<=this.map.getNumZoomLevels()){this.map.setCenter(this.map.getLonLatFromPixel(evt.xy),this.map.getZoom()+1);}},defaultWheelDown:function(evt){if(this.map.getZoom()>0){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);} | |
| 289 | -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;} | |
| 290 | -elem=elem.parentNode;} | |
| 291 | -if(inMap){var delta=0;if(!e){e=window.event;} | |
| 292 | -if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera){delta=-delta;}}else if(e.detail){delta=-e.detail/3;} | |
| 293 | -if(delta){e.xy=this.mousePosition;if(delta<0){this.defaultWheelDown(e);}else{this.defaultWheelUp(e);}} | |
| 294 | -OpenLayers.Event.stop(e);}},CLASS_NAME:"OpenLayers.Control.MouseDefaults"});OpenLayers.Control.MousePosition=OpenLayers.Class.create();OpenLayers.Control.MousePosition.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{element:null,prefix:'',separator:', ',suffix:'',numdigits:5,granularity:10,lastXy:null,initialize:function(options){OpenLayers.Control.prototype.initialize.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;} | |
| 295 | -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) | |
| 296 | -{this.lastXy=evt.xy;return;} | |
| 297 | -lonLat=this.map.getLonLatFromPixel(evt.xy);this.lastXy=evt.xy;} | |
| 298 | -var digits=parseInt(this.numdigits);var newHtml=this.prefix+ | |
| 299 | -lonLat.lon.toFixed(digits)+ | |
| 300 | -this.separator+ | |
| 301 | -lonLat.lat.toFixed(digits)+ | |
| 302 | -this.suffix;if(newHtml!=this.element.innerHTML){this.element.innerHTML=newHtml;}},setMap:function(){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.register('mousemove',this,this.redraw);},CLASS_NAME:"OpenLayers.Control.MousePosition"});OpenLayers.Control.PanZoom=OpenLayers.Class.create();OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;OpenLayers.Control.PanZoom.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{slideFactor:50,buttons:null,position:null,initialize:function(){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);} | |
| 303 | -this.buttons=null;this.position=null;},draw:function(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position;this.buttons=new Array();var sz=new OpenLayers.Size(18,18);var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);this._addButton("panup","north-mini.png",centered,sz);px.y=centered.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",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);this._addButton("zoomworld","zoom-world-mini.png",centered.add(0,sz.h*4+5),sz);this._addButton("zoomout","zoom-minus-mini.png",centered.add(0,sz.h*5+5),sz);return this.div;},_addButton:function(id,img,xy,sz){var imgLocation=OpenLayers.Util.getImagesLocation()+img;var btn=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_PanZoom_"+id,xy,sz,imgLocation,"absolute");this.div.appendChild(btn);OpenLayers.Event.observe(btn,"mousedown",this.buttonDown.bindAsEventListener(btn));OpenLayers.Event.observe(btn,"mouseup",this.doubleClick.bindAsEventListener(btn));OpenLayers.Event.observe(btn,"dblclick",this.doubleClick.bindAsEventListener(btn));OpenLayers.Event.observe(btn,"click",this.doubleClick.bindAsEventListener(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;} | |
| 304 | -OpenLayers.Event.stop(evt);},CLASS_NAME:"OpenLayers.Control.PanZoom"});OpenLayers.Control.Panel=OpenLayers.Class.create();OpenLayers.Control.Panel.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{controls:null,defaultControl:null,initialize:function(element){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.controls=[];},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var i=this.controls.length-1;i>=0;i--){OpenLayers.Event.stopObservingElement(this.controls[i].panel_div);this.controls[i].panel_div=null;}},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){for(var i=0;i<this.controls.length;i++){if(this.controls[i]==this.defaultControl){this.controls[i].activate();}} | |
| 305 | -this.redraw();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){for(var i=0;i<this.controls.length;i++){this.controls[i].deactivate();} | |
| 306 | -this.redraw();return true;}else{return false;}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);for(var i=0;i<this.controls.length;i++){this.map.addControl(this.controls[i]);this.controls[i].deactivate();} | |
| 307 | -this.activate();return this.div;},redraw:function(){this.div.innerHTML="";if(this.active){for(var i=0;i<this.controls.length;i++){var element=this.controls[i].panel_div;if(this.controls[i].active){element.className=this.controls[i].displayClass+"ItemActive";}else{element.className=this.controls[i].displayClass+"ItemInactive";} | |
| 308 | -this.div.appendChild(element);}}},activateControl:function(control){if(!this.active){return false;} | |
| 309 | -if(control.type==OpenLayers.Control.TYPE_BUTTON){control.trigger();return;} | |
| 310 | -for(var i=0;i<this.controls.length;i++){if(this.controls[i]==control){control.activate();}else{this.controls[i].deactivate();}} | |
| 311 | -this.redraw();},addControls:function(controls){if(!(controls instanceof Array)){controls=[controls];} | |
| 312 | -this.controls=this.controls.concat(controls);for(var i=0;i<controls.length;i++){var element=document.createElement("div");var textNode=document.createTextNode(" ");controls[i].panel_div=element;OpenLayers.Event.observe(controls[i].panel_div,"click",this.onClick.bind(this,controls[i]));OpenLayers.Event.observe(controls[i].panel_div,"mousedown",OpenLayers.Event.stop.bindAsEventListener());} | |
| 313 | -if(this.map){for(var i=0;i<controls.length;i++){this.map.addControl(controls[i]);controls[i].deactivate();} | |
| 314 | -this.redraw();}},onClick:function(ctrl,evt){OpenLayers.Event.stop(evt?evt:window.event);this.activateControl(ctrl);},CLASS_NAME:"OpenLayers.Control.Panel"});OpenLayers.Control.Permalink=OpenLayers.Class.create();OpenLayers.Control.Permalink.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{element:null,base:'',initialize:function(element,base){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.element=OpenLayers.Util.getElement(element);if(base){this.base=base;}},destroy:function(){if(this.element.parentNode==this.div){this.div.removeChild(this.element);} | |
| 315 | -this.element=null;this.map.events.unregister('moveend',this,this.updateLink);OpenLayers.Control.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var i=0;i<this.map.controls.length;i++){var control=this.map.controls[i];if(control.CLASS_NAME=="OpenLayers.Control.ArgParser"){break;}} | |
| 316 | -if(i==this.map.controls.length){this.map.addControl(new OpenLayers.Control.ArgParser());}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.className=this.displayClass;this.element=document.createElement("a");this.element.style.fontSize="smaller";this.element.innerHTML="Permalink";this.element.href="";this.div.appendChild(this.element);} | |
| 317 | -this.map.events.register('moveend',this,this.updateLink);return this.div;},updateLink:function(){var center=this.map.getCenter();var zoom="zoom="+this.map.getZoom();var lat="lat="+Math.round(center.lat*100000)/100000;var lon="lon="+Math.round(center.lon*100000)/100000;var layers="layers=";for(var i=0;i<this.map.layers.length;i++){var layer=this.map.layers[i];if(layer.isBaseLayer){layers+=(layer==this.map.baseLayer)?"B":"0";}else{layers+=(layer.getVisibility())?"T":"F";}} | |
| 318 | -var href=this.base+"?"+lat+"&"+lon+"&"+zoom+"&"+layers;this.element.href=href;},CLASS_NAME:"OpenLayers.Control.Permalink"});OpenLayers.Control.Scale=OpenLayers.Class.create();OpenLayers.Control.Scale.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{element:null,initialize:function(element){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.element=OpenLayers.Util.getElement(element);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.element=document.createElement("div");this.div.className=this.displayClass;this.element.style.fontSize="smaller";this.div.appendChild(this.element);} | |
| 319 | -this.map.events.register('moveend',this,this.updateScale);this.updateScale();return this.div;},updateScale:function(){var scale=this.map.getScale();if(!scale)return;if(scale>=9500&&scale<=950000){scale=Math.round(scale/1000)+"K";}else if(scale>=950000){scale=Math.round(scale/1000000)+"M";}else{scale=Math.round(scale);} | |
| 320 | -this.element.innerHTML="Scale = 1 : "+scale;},CLASS_NAME:"OpenLayers.Control.Scale"});OpenLayers.Control.ZoomToMaxExtent=OpenLayers.Class.create();OpenLayers.Control.ZoomToMaxExtent.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){if(this.map){this.map.zoomToMaxExtent();}},CLASS_NAME:"OpenLayers.Control.ZoomToMaxExtent"});OpenLayers.Event={observers:false,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(event){return event.target||event.srcElement;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},stop:function(event,allowDefault){if(!allowDefault){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}} | |
| 321 | -if(event.stopPropagation){event.stopPropagation();}else{event.cancelBubble=true;}},findElement:function(event,tagName){var element=OpenLayers.Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase()))) | |
| 322 | -element=element.parentNode;return element;},observe:function(elementParam,name,observer,useCapture){var element=OpenLayers.Util.getElement(elementParam);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent)){name='keydown';} | |
| 323 | -if(!this.observers){this.observers=new Object();} | |
| 324 | -if(!element._eventCacheID){var idPrefix="eventCacheID_";if(element.id){idPrefix=element.id+"_"+idPrefix;} | |
| 325 | -element._eventCacheID=OpenLayers.Util.createUniqueID(idPrefix);} | |
| 326 | -var cacheID=element._eventCacheID;if(!this.observers[cacheID]){this.observers[cacheID]=new Array();} | |
| 327 | -this.observers[cacheID].push({'element':element,'name':name,'observer':observer,'useCapture':useCapture});if(element.addEventListener){element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){element.attachEvent('on'+name,observer);}},stopObservingElement:function(elementParam){var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[cacheID]);},_removeElementObservers:function(elementObservers){if(elementObservers){for(var i=elementObservers.length-1;i>=0;i--){var entry=elementObservers[i];var args=new Array(entry.element,entry.name,entry.observer,entry.useCapture);var removed=OpenLayers.Event.stopObserving.apply(this,args);}}},stopObserving:function(elementParam,name,observer,useCapture){useCapture=useCapture||false;var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;if(name=='keypress'){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent){name='keydown';}} | |
| 328 | -var foundEntry=false;var elementObservers=OpenLayers.Event.observers[cacheID];if(elementObservers){var i=0;while(!foundEntry&&i<elementObservers.length){var cacheEntry=elementObservers[i];if((cacheEntry.name==name)&&(cacheEntry.observer==observer)&&(cacheEntry.useCapture==useCapture)){elementObservers.splice(i,1);if(elementObservers.length==0){delete OpenLayers.Event.observers[cacheID];} | |
| 329 | -foundEntry=true;break;} | |
| 330 | -i++;}} | |
| 331 | -if(element.removeEventListener){element.removeEventListener(name,observer,useCapture);}else if(element&&element.detachEvent){element.detachEvent('on'+name,observer);} | |
| 332 | -return foundEntry;},unloadCache:function(){if(OpenLayers.Event.observers){for(var cacheID in OpenLayers.Event.observers){var elementObservers=OpenLayers.Event.observers[cacheID];OpenLayers.Event._removeElementObservers.apply(this,[elementObservers]);} | |
| 333 | -OpenLayers.Event.observers=false;}},CLASS_NAME:"OpenLayers.Event"};OpenLayers.Event.observe(window,'unload',OpenLayers.Event.unloadCache,false);if(window.Event){OpenLayers.Util.extend(window.Event,OpenLayers.Event);}else{var Event=OpenLayers.Event;} | |
| 334 | -OpenLayers.Events=OpenLayers.Class.create();OpenLayers.Events.prototype={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,element,eventTypes,fallThrough){this.object=object;this.element=element;this.eventTypes=eventTypes;this.fallThrough=fallThrough;this.listeners=new Object();this.eventHandler=this.handleBrowserEvent.bindAsEventListener(this);if(this.eventTypes!=null){for(var i=0;i<this.eventTypes.length;i++){this.listeners[this.eventTypes[i]]=new Array();}} | |
| 335 | -if(this.element!=null){this.attachToElement(element);}},destroy:function(){if(this.element){OpenLayers.Event.stopObservingElement(this.element);} | |
| 336 | -this.element=null;this.listeners=null;this.object=null;this.eventTypes=null;this.fallThrough=null;this.eventHandler=null;},attachToElement:function(element){for(var i=0;i<this.BROWSER_EVENTS.length;i++){var eventType=this.BROWSER_EVENTS[i];if(this.listeners[eventType]==null){this.listeners[eventType]=new Array();} | |
| 337 | -OpenLayers.Event.observe(element,eventType,this.eventHandler);} | |
| 338 | -OpenLayers.Event.observe(element,"dragstart",OpenLayers.Event.stop);},register:function(type,obj,func){if(func!=null){if(obj==null){obj=this.object;} | |
| 339 | -var listeners=this.listeners[type];if(listeners!=null){listeners.push({obj:obj,func:func});}}},registerPriority:function(type,obj,func){if(func!=null){if(obj==null){obj=this.object;} | |
| 340 | -var listeners=this.listeners[type];if(listeners!=null){listeners.unshift({obj:obj,func:func});}}},unregister:function(type,obj,func){if(obj==null){obj=this.object;} | |
| 341 | -var listeners=this.listeners[type];if(listeners!=null){for(var i=0;i<listeners.length;i++){if(listeners[i].obj==obj&&listeners[i].func==func){listeners.splice(i,1);break;}}}},remove:function(type){if(this.listeners[type]!=null){this.listeners[type]=new Array();}},triggerEvent:function(type,evt){if(evt==null){evt=new Object();} | |
| 342 | -evt.object=this.object;evt.element=this.element;var listeners=(this.listeners[type])?this.listeners[type].slice():null;if((listeners!=null)&&(listeners.length>0)){for(var i=0;i<listeners.length;i++){var callback=listeners[i];var continueChain;if(callback.obj!=null){continueChain=callback.func.call(callback.obj,evt);}else{continueChain=callback.func(evt);} | |
| 343 | -if((continueChain!=null)&&(continueChain==false)){break;}} | |
| 344 | -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);} | |
| 345 | -return new OpenLayers.Pixel((evt.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))-this.element.offsets[0],(evt.clientY+(document.documentElement.scrollTop||document.body.scrollTop))-this.element.offsets[1]);},CLASS_NAME:"OpenLayers.Events"};OpenLayers.Format=OpenLayers.Class.create();OpenLayers.Format.prototype={initialize:function(options){OpenLayers.Util.extend(this,options);},read:function(data){alert("Read not implemented.");},write:function(features){alert("Write not implemented.");},CLASS_NAME:"OpenLayers.Format"};OpenLayers.Handler.Box=OpenLayers.Class.create();OpenLayers.Handler.Box.prototype=OpenLayers.Class.inherit(OpenLayers.Handler,{dragHandler:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);var callbacks={"down":this.startBox,"move":this.moveBox,"out":this.removeBox,"up":this.endBox};this.dragHandler=new OpenLayers.Handler.Drag(this,callbacks,{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.x<this.dragHandler.start.x){this.zoomBox.style.left=xy.x+"px";} | |
| 346 | -if(xy.y<this.dragHandler.start.y){this.zoomBox.style.top=xy.y+"px";}},endBox:function(end){var result;if(Math.abs(this.dragHandler.start.x-end.x)>5||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();} | |
| 347 | -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.Handler.Feature=OpenLayers.Class.create();OpenLayers.Handler.Feature.prototype=OpenLayers.Class.inherit(OpenLayers.Handler,{layerIndex:null,feature:null,initialize:function(control,layer,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,[control,callbacks,options]);this.layer=layer;},mousedown:function(evt){var selected=this.select('down',evt);return!selected;},mousemove:function(evt){this.select('move',evt);return true;},mouseup:function(evt){var selected=this.select('up',evt);return!selected;},dblclick:function(evt){var selected=this.select('dblclick',evt);return!selected;},select:function(type,evt){var feature=this.layer.getFeatureFromEvent(evt);if(feature){if(!this.feature){this.callback('over',[feature]);}else if(this.feature!=feature){this.callback('out',[this.feature]);this.callback('over',[feature]);} | |
| 348 | -this.feature=feature;this.callback(type,[feature]);return true;}else{if(this.feature){this.callback('out',[this.feature]);this.feature=null;} | |
| 349 | -return false;}},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)){this.layer.div.style.zIndex=this.layerIndex;return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.Feature"});OpenLayers.Handler.MouseWheel=OpenLayers.Class.create();OpenLayers.Handler.MouseWheel.prototype=OpenLayers.Class.inherit(OpenLayers.Handler,{wheelListener:null,mousePosition:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.wheelListener=this.onWheelEvent.bindAsEventListener(this);},destroy:function(){this.deactivate();this.wheelListener=null;OpenLayers.Handler.prototype.destroy.apply(this,arguments);},onWheelEvent:function(e){if(!this.checkModifiers(e))return;var inMap=false;var elem=OpenLayers.Event.element(e);while(elem!=null){if(this.map&&elem==this.map.div){inMap=true;break;} | |
| 350 | -elem=elem.parentNode;} | |
| 351 | -if(inMap){var delta=0;if(!e){e=window.event;} | |
| 352 | -if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera){delta=-delta;}}else if(e.detail){delta=-e.detail/3;} | |
| 353 | -if(delta){e.xy=this.mousePosition;if(delta<0){this.callback("down",[e,delta]);}else{this.callback("up",[e,delta]);}} | |
| 354 | -OpenLayers.Event.stop(e);}},mousemove:function(evt){this.mousePosition=evt.xy;},activate:function(evt){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.observe(window,"mousewheel",wheelListener);OpenLayers.Event.observe(document,"mousewheel",wheelListener);return true;}else{return false;}},deactivate:function(evt){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.stopObserving(window,"mousewheel",wheelListener);OpenLayers.Event.stopObserving(document,"mousewheel",wheelListener);return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});OpenLayers.Popup.Anchored=OpenLayers.Class.create();OpenLayers.Popup.Anchored.prototype=OpenLayers.Class.inherit(OpenLayers.Popup,{relativePosition:null,anchor:null,initialize:function(id,lonlat,size,contentHTML,anchor,closeBox){var newArguments=new Array(id,lonlat,size,contentHTML,closeBox);OpenLayers.Popup.prototype.initialize.apply(this,newArguments);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);}} | |
| 355 | -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 quadrant=extent.determineQuadrant(lonlat);return OpenLayers.Bounds.oppositeQuadrant(quadrant);},moveTo:function(px){var newPx=this.calculateNewPx(px);var newArguments=new Array(newPx);OpenLayers.Popup.prototype.moveTo.apply(this,newArguments);},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.Renderer.Elements=OpenLayers.Class.create();OpenLayers.Renderer.Elements.prototype=OpenLayers.Class.inherit(OpenLayers.Renderer,{rendererRoot:null,root:null,xmlns:null,initialize:function(containerID){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot();this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);},destroy:function(){this.clear();this.rendererRoot=null;this.root=null;this.xmlns=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments);},clear:function(){if(this.root){while(this.root.childNodes.length>0){this.root.removeChild(this.root.firstChild);}}},getNodeType:function(geometry){},drawGeometry:function(geometry,style,featureId){if((geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")){for(var i=0;i<geometry.components.length;i++){this.drawGeometry(geometry.components[i],style,featureId);} | |
| 356 | -return;};var nodeType=this.getNodeType(geometry);var node=this.nodeFactory(geometry.id,nodeType,geometry);node._featureId=featureId;node._geometryClass=geometry.CLASS_NAME;node._style=style;this.root.appendChild(node);this.drawGeometryNode(node,geometry);},drawGeometryNode:function(node,geometry,style){style=style||node._style;var options={'isFilled':true,'isStroked':true};switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":this.drawPoint(node,geometry);break;case"OpenLayers.Geometry.LineString":options.isFilled=false;this.drawLineString(node,geometry);break;case"OpenLayers.Geometry.LinearRing":this.drawLinearRing(node,geometry);break;case"OpenLayers.Geometry.Polygon":this.drawPolygon(node,geometry);break;case"OpenLayers.Geometry.Surface":this.drawSurface(node,geometry);break;case"OpenLayers.Geometry.Rectangle":this.drawRectangle(node,geometry);break;default:break;} | |
| 357 | -node._style=style;node._options=options;this.setStyle(node,style,options,geometry);},drawPoint:function(node,geometry){},drawLineString:function(node,geometry){},drawLinearRing:function(node,geometry){},drawPolygon:function(node,geometry){},drawRectangle:function(node,geometry){},drawCircle:function(node,geometry){},drawCurve:function(node,geometry){},drawSurface:function(node,geometry){},getFeatureIdFromEvent:function(evt){var node=evt.target||evt.srcElement;return node._featureId;},eraseGeometry:function(geometry){if((geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")){for(var i=0;i<geometry.components.length;i++){this.eraseGeometry(geometry.components[i]);}}else{var element=$(geometry.id);if(element&&element.parentNode){if(element.geometry){element.geometry.destroy();element.geometry=null;} | |
| 358 | -element.parentNode.removeChild(element);}}},nodeFactory:function(id,type,geometry){var node=$(id);if(node){if(!this.nodeTypeCompare(node,type)){node.parentNode.removeChild(node);node=this.nodeFactory(id,type,geometry);}}else{node=this.createNode(type,id);} | |
| 359 | -return node;},CLASS_NAME:"OpenLayers.Renderer.Elements"});OpenLayers.Tile=OpenLayers.Class.create();OpenLayers.Tile.prototype={id:null,layer:null,url:null,bounds:null,size:null,position:null,drawn:false,initialize:function(layer,position,bounds,url,size){this.layer=layer;this.position=position;this.bounds=bounds;this.url=url;this.size=size;this.id=OpenLayers.Util.createUniqueID("Tile_");},destroy:function(){this.layer=null;this.bounds=null;this.size=null;this.position=null;},draw:function(){this.clear();return((this.layer.displayOutsideMaxExtent||(this.layer.maxExtent&&this.bounds.intersectsBounds(this.layer.maxExtent,false)))&&!(this.layer.buffer==0&&!this.bounds.intersectsBounds(this.layer.map.getExtent(),false)));},moveTo:function(bounds,position,redraw){if(redraw==null){redraw=true;} | |
| 360 | -this.clear();this.bounds=bounds.clone();this.position=position.clone();if(redraw){this.draw();}},clear:function(){this.drawn=false;},getBoundsFromBaseLayer:function(position){var topLeft=this.layer.map.getLonLatFromLayerPx(position);var bottomRightPx=position.clone();bottomRightPx.x+=this.size.w;bottomRightPx.y+=this.size.h;var bottomRight=this.layer.map.getLonLatFromLayerPx(bottomRightPx);if(topLeft.lon>bottomRight.lon){if(topLeft.lon<0){topLeft.lon=-180-(topLeft.lon+180);}else{bottomRight.lon=180+bottomRight.lon+180;}} | |
| 361 | -bounds=new OpenLayers.Bounds(topLeft.lon,bottomRight.lat,bottomRight.lon,topLeft.lat);return bounds;},CLASS_NAME:"OpenLayers.Tile"};OpenLayers.Control.MouseToolbar=OpenLayers.Class.create();OpenLayers.Control.MouseToolbar.X=6;OpenLayers.Control.MouseToolbar.Y=300;OpenLayers.Control.MouseToolbar.prototype=OpenLayers.Class.inherit(OpenLayers.Control.MouseDefaults,{mode:null,buttons:null,direction:"vertical",buttonClicked:null,initialize:function(position,direction){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.position=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,OpenLayers.Control.MouseToolbar.Y);if(position){this.position=position;} | |
| 362 | -if(direction){this.direction=direction;} | |
| 363 | -this.measureDivs=[];},destroy:function(){for(var btnId in this.buttons){var btn=this.buttons[btnId];btn.map=null;btn.events.destroy();} | |
| 364 | -OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);OpenLayers.Control.MouseDefaults.prototype.draw.apply(this,arguments);this.buttons=new Object();var sz=new OpenLayers.Size(28,28);var centered=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0);this._addButton("zoombox","drag-rectangle-off.png","drag-rectangle-on.png",centered,sz,"Shift->Drag to zoom to area");centered=centered.add((this.direction=="vertical"?0:sz.w),(this.direction=="vertical"?sz.h:0));this._addButton("pan","panning-hand-off.png","panning-hand-on.png",centered,sz,"Drag the map to pan.");centered=centered.add((this.direction=="vertical"?0:sz.w),(this.direction=="vertical"?sz.h:0));this.switchModeTo("pan");return this.div;},_addButton:function(id,img,activeImg,xy,sz,title){var imgLocation=OpenLayers.Util.getImagesLocation()+img;var activeImgLocation=OpenLayers.Util.getImagesLocation()+activeImg;var btn=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MouseToolbar_"+id,xy,sz,imgLocation,"absolute");this.div.appendChild(btn);btn.imgLocation=imgLocation;btn.activeImgLocation=activeImgLocation;btn.events=new OpenLayers.Events(this,btn,null,true);btn.events.register("mousedown",this,this.buttonDown);btn.events.register("mouseup",this,this.buttonUp);btn.events.register("dblclick",this,OpenLayers.Event.stop);btn.action=id;btn.title=title;btn.alt=title;btn.map=this.map;this.buttons[id]=btn;return btn;},buttonDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.buttonClicked=evt.element.action;OpenLayers.Event.stop(evt);},buttonUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.buttonClicked!=null){if(this.buttonClicked==evt.element.action){this.switchModeTo(evt.element.action);} | |
| 365 | -OpenLayers.Event.stop(evt);this.buttonClicked=null;}},defaultDblClick:function(evt){this.switchModeTo("pan");this.performedDrag=false;var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},defaultMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.mouseDragStart=evt.xy.clone();this.performedDrag=false;this.startViaKeyboard=false;if(evt.shiftKey&&this.mode!="zoombox"){this.switchModeTo("zoombox");this.startViaKeyboard=true;}else if(evt.altKey&&this.mode!="measure"){this.switchModeTo("measure");}else if(!this.mode){this.switchModeTo("pan");} | |
| 366 | -switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv('zoomBox',this.mouseDragStart,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.performedDrag=true;break;case"measure":var distance="";if(this.measureStart){measureEnd=this.map.getLonLatFromViewPortPx(this.mouseDragStart);distance=OpenLayers.Util.distVincenty(this.measureStart,measureEnd);distance=Math.round(distance*100)/100;distance=distance+"km";this.measureStartBox=this.measureBox;} | |
| 367 | -this.measureStart=this.map.getLonLatFromViewPortPx(this.mouseDragStart);;this.measureBox=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),-2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBox.style.width="4px";this.measureBox.style.height="4px";this.measureBox.style.fontSize="1px";this.measureBox.style.backgroundColor="red";this.measureBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBox);if(distance){this.measureBoxDistance=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBoxDistance.innerHTML=distance;this.measureBoxDistance.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBoxDistance);this.measureDivs.push(this.measureBoxDistance);} | |
| 368 | -this.measureBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBox);this.measureDivs.push(this.measureBox);break;default:this.map.div.style.cursor="move";break;} | |
| 369 | -document.onselectstart=function(){return false;} | |
| 370 | -OpenLayers.Event.stop(evt);},switchModeTo:function(mode){if(mode!=this.mode){if(this.mode&&this.buttons[this.mode]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode],null,null,null,this.buttons[this.mode].imgLocation);} | |
| 371 | -if(this.mode=="measure"&&mode!="measure"){for(var i=0;i<this.measureDivs.length;i++){if(this.measureDivs[i]){this.map.layerContainerDiv.removeChild(this.measureDivs[i]);}} | |
| 372 | -this.measureDivs=[];this.measureStart=null;} | |
| 373 | -this.mode=mode;if(this.buttons[mode]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[mode],null,null,null,this.buttons[mode].activeImgLocation);} | |
| 374 | -switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";break;default:this.map.div.style.cursor="";break;}}},leaveMode:function(){this.switchModeTo("pan");},defaultMouseMove:function(evt){if(this.mouseDragStart!=null){switch(this.mode){case"zoombox":var deltaX=Math.abs(this.mouseDragStart.x-evt.xy.x);var deltaY=Math.abs(this.mouseDragStart.y-evt.xy.y);this.zoomBox.style.width=Math.max(1,deltaX)+"px";this.zoomBox.style.height=Math.max(1,deltaY)+"px";if(evt.xy.x<this.mouseDragStart.x){this.zoomBox.style.left=evt.xy.x+"px";} | |
| 375 | -if(evt.xy.y<this.mouseDragStart.y){this.zoomBox.style.top=evt.xy.y+"px";} | |
| 376 | -break;default:var deltaX=this.mouseDragStart.x-evt.xy.x;var deltaY=this.mouseDragStart.y-evt.xy.y;var size=this.map.getSize();var newXY=new OpenLayers.Pixel(size.w/2+deltaX,size.h/2+deltaY);var newCenter=this.map.getLonLatFromViewPortPx(newXY);this.map.setCenter(newCenter,null,true);this.mouseDragStart=evt.xy.clone();} | |
| 377 | -this.performedDrag=true;}},defaultMouseUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;switch(this.mode){case"zoombox":this.zoomBoxEnd(evt);if(this.startViaKeyboard)this.leaveMode();break;case"pan":if(this.performedDrag){this.map.setCenter(this.map.center);}} | |
| 378 | -document.onselectstart=null;this.mouseDragStart=null;this.map.div.style.cursor="default";},defaultMouseOut:function(evt){if(this.mouseDragStart!=null&&OpenLayers.Util.mouseLeft(evt,this.map.div)){if(this.zoomBox){this.removeZoomBox();if(this.startViaKeyboard)this.leaveMode();} | |
| 379 | -this.mouseDragStart=null;this.map.div.style.cursor="default";}},defaultClick:function(evt){if(this.performedDrag){this.performedDrag=false;return false;}}});OpenLayers.Control.OverviewMap=OpenLayers.Class.create();OpenLayers.Control.OverviewMap.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{id:"OverviewMap",element:null,ovmap:null,size:new OpenLayers.Size(180,90),layers:null,minRatio:8,maxRatio:32,mapOptions:null,initialize:function(options){this.layers=new Array();OpenLayers.Control.prototype.initialize.apply(this,[options]);},destroy:function(){if(!this.mapDiv){return;} | |
| 380 | -this.mapDiv.removeChild(this.extentRectangle);this.extentRectangle=null;this.rectEvents.destroy();this.rectEvents=null;this.ovmap.destroy();this.ovmap=null;this.element.removeChild(this.mapDiv);this.mapDiv=null;this.mapDivEvents.destroy();this.mapDivEvents=null;this.div.removeChild(this.element);this.element=null;this.elementEvents.destroy();this.elementEvents=null;if(this.maximizeDiv){OpenLayers.Event.stopObservingElement(this.maximizeDiv);this.div.removeChild(this.maximizeDiv);this.maximizeDiv=null;} | |
| 381 | -if(this.minimizeDiv){OpenLayers.Event.stopObservingElement(this.minimizeDiv);this.div.removeChild(this.minimizeDiv);this.minimizeDiv=null;} | |
| 382 | -this.map.events.unregister('moveend',this,this.update);this.map.events.unregister("changebaselayer",this,this.baseLayerDraw);OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!(this.layers.length>0)){if(this.map.baseLayer){var layer=this.map.baseLayer.clone();this.layers=[layer];}else{this.map.events.register("changebaselayer",this,this.baseLayerDraw);return this.div;}} | |
| 383 | -this.element=document.createElement('div');this.element.className=this.displayClass+'Element';this.element.style.display='none';this.mapDiv=document.createElement('div');this.mapDiv.style.width=this.size.w+'px';this.mapDiv.style.height=this.size.h+'px';this.mapDiv.style.position='relative';this.mapDiv.style.overflow='hidden';this.mapDiv.id=OpenLayers.Util.createUniqueID('overviewMap');this.extentRectangle=document.createElement('div');this.extentRectangle.style.position='absolute';this.extentRectangle.style.zIndex=1000;this.extentRectangle.style.overflow='hidden';this.extentRectangle.style.backgroundImage='url('+ | |
| 384 | -OpenLayers.Util.getImagesLocation()+'blank.gif)';this.extentRectangle.className=this.displayClass+'ExtentRectangle';this.mapDiv.appendChild(this.extentRectangle);this.element.appendChild(this.mapDiv);this.div.appendChild(this.element);this.map.events.register('moveend',this,this.update);this.elementEvents=new OpenLayers.Events(this,this.element);this.elementEvents.register('mousedown',this,function(e){OpenLayers.Event.stop(e);});this.elementEvents.register('click',this,function(e){OpenLayers.Event.stop(e);});this.elementEvents.register('dblclick',this,function(e){OpenLayers.Event.stop(e);});this.rectEvents=new OpenLayers.Events(this,this.extentRectangle,null,true);this.rectEvents.register('mouseout',this,this.rectMouseOut);this.rectEvents.register('mousedown',this,this.rectMouseDown);this.rectEvents.register('mousemove',this,this.rectMouseMove);this.rectEvents.register('mouseup',this,this.rectMouseUp);this.rectEvents.register('click',this,function(e){OpenLayers.Event.stop(e);});this.rectEvents.register('dblclick',this,this.rectDblClick);this.mapDivEvents=new OpenLayers.Events(this,this.mapDiv);this.mapDivEvents.register('click',this,this.mapDivClick);if(!this.outsideViewport){this.div.className=this.displayClass+'Container';var imgLocation=OpenLayers.Util.getImagesLocation();var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv(this.displayClass+'MaximizeButton',null,new OpenLayers.Size(18,18),img,'absolute');this.maximizeDiv.style.display='none';this.maximizeDiv.className=this.displayClass+'MaximizeButton';OpenLayers.Event.observe(this.maximizeDiv,'click',this.maximizeControl.bindAsEventListener(this));OpenLayers.Event.observe(this.maximizeDiv,'dblclick',function(e){OpenLayers.Event.stop(e);});this.div.appendChild(this.maximizeDiv);var img=imgLocation+'layer-switcher-minimize.png';this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv('OpenLayers_Control_minimizeDiv',null,new OpenLayers.Size(18,18),img,'absolute');this.minimizeDiv.style.display='none';this.minimizeDiv.className=this.displayClass+'MinimizeButton';OpenLayers.Event.observe(this.minimizeDiv,'click',this.minimizeControl.bindAsEventListener(this));OpenLayers.Event.observe(this.minimizeDiv,'dblclick',function(e){OpenLayers.Event.stop(e);});this.div.appendChild(this.minimizeDiv);this.minimizeControl();}else{this.element.style.display='';} | |
| 385 | -if(this.map.getExtent()){this.update();} | |
| 386 | -return this.div;},baseLayerDraw:function(){this.draw();this.map.events.unregister("changebaselayer",this,this.baseLayerDraw);},rectMouseOut:function(evt){if(this.rectDragStart!=null){if(this.performedRectDrag){this.rectMouseMove(evt);var rectPxBounds=this.getRectPxBounds();if((rectPxBounds.top<=0)||(rectPxBounds.left<=0)||(rectPxBounds.bottom>=this.size.h-this.hComp)||(rectPxBounds.right>=this.size.w-this.wComp)){this.updateMapToRect();}else{return;}} | |
| 387 | -document.onselectstart=null;this.rectDragStart=null;}},rectMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.rectDragStart=evt.xy.clone();this.performedRectDrag=false;OpenLayers.Event.stop(evt);},rectMouseMove:function(evt){if(this.rectDragStart!=null){var deltaX=this.rectDragStart.x-evt.xy.x;var deltaY=this.rectDragStart.y-evt.xy.y;var rectPxBounds=this.getRectPxBounds();var rectTop=rectPxBounds.top;var rectLeft=rectPxBounds.left;var rectHeight=Math.abs(rectPxBounds.getHeight());var rectWidth=rectPxBounds.getWidth();var newTop=Math.max(0,(rectTop-deltaY));newTop=Math.min(newTop,this.ovmap.size.h-this.hComp-rectHeight);var newLeft=Math.max(0,(rectLeft-deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-this.wComp-rectWidth);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+rectHeight,newLeft+rectWidth,newTop));this.rectDragStart=evt.xy.clone();this.performedRectDrag=true;OpenLayers.Event.stop(evt);}},rectMouseUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.performedRectDrag){this.updateMapToRect();OpenLayers.Event.stop(evt);} | |
| 388 | -document.onselectstart=null;this.rectDragStart=null;},rectDblClick:function(evt){this.performedRectDrag=false;OpenLayers.Event.stop(evt);this.updateOverview();},mapDivClick:function(evt){var pxBounds=this.getRectPxBounds();var pxCenter=pxBounds.getCenterPixel();var deltaX=evt.xy.x-pxCenter.x;var deltaY=evt.xy.y-pxCenter.y;var top=pxBounds.top;var left=pxBounds.left;var height=Math.abs(pxBounds.getHeight());var width=pxBounds.getWidth();var newTop=Math.max(0,(top+deltaY));newTop=Math.min(newTop,this.ovmap.size.h-height);var newLeft=Math.max(0,(left+deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-width);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+height,newLeft+width,newTop));this.updateMapToRect();OpenLayers.Event.stop(evt);},maximizeControl:function(e){this.element.style.display='';this.showToggle(false);if(e!=null){OpenLayers.Event.stop(e);}},minimizeControl:function(e){this.element.style.display='none';this.showToggle(true);if(e!=null){OpenLayers.Event.stop(e);}},showToggle:function(minimize){this.maximizeDiv.style.display=minimize?'':'none';this.minimizeDiv.style.display=minimize?'none':'';},update:function(){if(this.ovmap==null){this.createMap();} | |
| 389 | -if(!this.isSuitableOverview()){this.updateOverview();} | |
| 390 | -this.updateRectToMap();},isSuitableOverview:function(){var mapExtent=this.map.getExtent();var maxExtent=this.map.maxExtent;var testExtent=new OpenLayers.Bounds(Math.max(mapExtent.left,maxExtent.left),Math.max(mapExtent.bottom,maxExtent.bottom),Math.min(mapExtent.right,maxExtent.right),Math.min(mapExtent.top,maxExtent.top));var resRatio=this.ovmap.getResolution()/this.map.getResolution();return((resRatio>this.minRatio)&&(resRatio<=this.maxRatio)&&(this.ovmap.getExtent().containsBounds(testExtent)));},updateOverview:function(){var mapRes=this.map.getResolution();var targetRes=this.ovmap.getResolution();var resRatio=targetRes/mapRes;if(resRatio>this.maxRatio){targetRes=this.minRatio*mapRes;}else if(resRatio<=this.minRatio){targetRes=this.maxRatio*mapRes;} | |
| 391 | -this.ovmap.setCenter(this.map.center,this.ovmap.getZoomForResolution(targetRes));this.updateRectToMap();},createMap:function(){var options=OpenLayers.Util.extend({controls:[],maxResolution:'auto'},this.mapOptions);this.ovmap=new OpenLayers.Map(this.mapDiv.id,options);this.ovmap.addLayers(this.layers);this.ovmap.zoomToMaxExtent();this.wComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-left-width'))+ | |
| 392 | -parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-right-width'));this.wComp=(this.wComp)?this.wComp:2;this.hComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-top-width'))+ | |
| 393 | -parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-bottom-width'));this.hComp=(this.hComp)?this.hComp:2;},updateRectToMap:function(){if(this.map.units!='degrees'){if(this.ovmap.getProjection()&&(this.map.getProjection()!=this.ovmap.getProjection())){alert('The overview map only works when it is in the same projection as the main map');}} | |
| 394 | -var pxBounds=this.getRectBoundsFromMapBounds(this.map.getExtent());if(pxBounds){this.setRectPxBounds(pxBounds);}},updateMapToRect:function(){var pxBounds=this.getRectPxBounds();var lonLatBounds=this.getMapBoundsFromRectBounds(pxBounds);this.map.setCenter(lonLatBounds.getCenterLonLat(),this.map.zoom);},getRectPxBounds:function(){var top=parseInt(this.extentRectangle.style.top);var left=parseInt(this.extentRectangle.style.left);var height=parseInt(this.extentRectangle.style.height);var width=parseInt(this.extentRectangle.style.width);return new OpenLayers.Bounds(left,top+height,left+width,top);},setRectPxBounds:function(pxBounds){var top=Math.max(pxBounds.top,0);var left=Math.max(pxBounds.left,0);var bottom=Math.min(pxBounds.top+Math.abs(pxBounds.getHeight()),this.ovmap.size.h-this.hComp);var right=Math.min(pxBounds.left+pxBounds.getWidth(),this.ovmap.size.w-this.wComp);this.extentRectangle.style.top=parseInt(top)+'px';this.extentRectangle.style.left=parseInt(left)+'px';this.extentRectangle.style.height=parseInt(Math.max(bottom-top,0))+'px';this.extentRectangle.style.width=parseInt(Math.max(right-left,0))+'px';},getRectBoundsFromMapBounds:function(lonLatBounds){var leftBottomLonLat=new OpenLayers.LonLat(lonLatBounds.left,lonLatBounds.bottom);var rightTopLonLat=new OpenLayers.LonLat(lonLatBounds.right,lonLatBounds.top);var leftBottomPx=this.getOverviewPxFromLonLat(leftBottomLonLat);var rightTopPx=this.getOverviewPxFromLonLat(rightTopLonLat);var bounds=null;if(leftBottomPx&&rightTopPx){bounds=new OpenLayers.Bounds(leftBottomPx.x,leftBottomPx.y,rightTopPx.x,rightTopPx.y);} | |
| 395 | -return bounds;},getMapBoundsFromRectBounds:function(pxBounds){var leftBottomPx=new OpenLayers.Pixel(pxBounds.left,pxBounds.bottom);var rightTopPx=new OpenLayers.Pixel(pxBounds.right,pxBounds.top);var leftBottomLonLat=this.getLonLatFromOverviewPx(leftBottomPx);var rightTopLonLat=this.getLonLatFromOverviewPx(rightTopPx);return new OpenLayers.Bounds(leftBottomLonLat.lon,leftBottomLonLat.lat,rightTopLonLat.lon,rightTopLonLat.lat);},getLonLatFromOverviewPx:function(overviewMapPx){var size=this.ovmap.size;var res=this.ovmap.getResolution();var center=this.ovmap.getExtent().getCenterLonLat();var delta_x=overviewMapPx.x-(size.w/2);var delta_y=overviewMapPx.y-(size.h/2);return new OpenLayers.LonLat(center.lon+delta_x*res,center.lat-delta_y*res);},getOverviewPxFromLonLat:function(lonlat){var res=this.ovmap.getResolution();var extent=this.ovmap.getExtent();var px=null;if(extent){px=new OpenLayers.Pixel(Math.round(1/res*(lonlat.lon-extent.left)),Math.round(1/res*(extent.top-lonlat.lat)));} | |
| 396 | -return px;},CLASS_NAME:'OpenLayers.Control.OverviewMap'});OpenLayers.Control.PanZoomBar=OpenLayers.Class.create();OpenLayers.Control.PanZoomBar.prototype=OpenLayers.Class.inherit(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoomBarDiv:null,divEvents:null,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments);},destroy:function(){this.div.removeChild(this.slider);this.slider=null;this.sliderEvents.destroy();this.sliderEvents=null;this.div.removeChild(this.zoombarDiv);this.zoomBarDiv=null;this.divEvents.destroy();this.divEvents=null;this.map.events.unregister("zoomend",this,this.moveZoomBar);this.map.events.unregister("changebaselayer",this,this.redraw) | |
| 397 | -OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.redraw);},redraw:function(){if(this.div!=null){this.div.innerHTML="";} | |
| 398 | -this.draw();},draw:function(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position.clone();this.buttons=new Array();var sz=new OpenLayers.Size(18,18);var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);this._addButton("panup","north-mini.png",centered,sz);px.y=centered.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",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);centered=this._addZoomBar(centered.add(0,sz.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",centered,sz);return this.div;},_addZoomBar:function(centered){var imgLocation=OpenLayers.Util.getImagesLocation();var id="OpenLayers_Control_PanZoomBar_Slider"+this.map.id;var zoomsToEnd=this.map.getNumZoomLevels()-1-this.map.getZoom();var slider=OpenLayers.Util.createAlphaImageDiv(id,centered.add(-1,zoomsToEnd*this.zoomStopHeight),new OpenLayers.Size(20,9),imgLocation+"slider.png","absolute");this.slider=slider;this.sliderEvents=new OpenLayers.Events(this,slider,null,true);this.sliderEvents.register("mousedown",this,this.zoomBarDown);this.sliderEvents.register("mousemove",this,this.zoomBarDrag);this.sliderEvents.register("mouseup",this,this.zoomBarUp);this.sliderEvents.register("dblclick",this,this.doubleClick);this.sliderEvents.register("click",this,this.doubleClick);sz=new OpenLayers.Size();sz.h=this.zoomStopHeight*this.map.getNumZoomLevels();sz.w=this.zoomStopWidth;var div=null | |
| 399 | -if(OpenLayers.Util.alphaHack()){var id="OpenLayers_Control_PanZoomBar"+this.map.id;div=OpenLayers.Util.createAlphaImageDiv(id,centered,new OpenLayers.Size(sz.w,this.zoomStopHeight),imgLocation+"zoombar.png","absolute",null,"crop");div.style.height=sz.h;}else{div=OpenLayers.Util.createDiv('OpenLayers_Control_PanZoomBar_Zoombar'+this.map.id,centered,sz,imgLocation+"zoombar.png");} | |
| 400 | -this.zoombarDiv=div;this.divEvents=new OpenLayers.Events(this,div,null,true);this.divEvents.register("mousedown",this,this.divClick);this.divEvents.register("mousemove",this,this.passEventToSlider);this.divEvents.register("dblclick",this,this.doubleClick);this.divEvents.register("click",this,this.doubleClick);this.div.appendChild(div);this.startTop=parseInt(div.style.top);this.div.appendChild(slider);this.map.events.register("zoomend",this,this.moveZoomBar);centered=centered.add(0,this.zoomStopHeight*this.map.getNumZoomLevels());return centered;},passEventToSlider:function(evt){this.sliderEvents.handleBrowserEvent(evt);},divClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;var y=evt.xy.y;var top=OpenLayers.Util.pagePosition(evt.object)[1];var levels=Math.floor((y-top)/this.zoomStopHeight);this.map.zoomTo((this.map.getNumZoomLevels()-1)-levels);OpenLayers.Event.stop(evt);},zoomBarDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.map.events.register("mousemove",this,this.passEventToSlider);this.map.events.register("mouseup",this,this.passEventToSlider);this.mouseDragStart=evt.xy.clone();this.zoomStart=evt.xy.clone();this.div.style.cursor="move";this.zoombarDiv.offsets=null;OpenLayers.Event.stop(evt);},zoomBarDrag:function(evt){if(this.mouseDragStart!=null){var deltaY=this.mouseDragStart.y-evt.xy.y | |
| 401 | -var offsets=OpenLayers.Util.pagePosition(this.zoombarDiv);if((evt.clientY-offsets[1])>0&&(evt.clientY-offsets[1])<parseInt(this.zoombarDiv.style.height)-2){var newTop=parseInt(this.slider.style.top)-deltaY;this.slider.style.top=newTop+"px";} | |
| 402 | -this.mouseDragStart=evt.xy.clone();OpenLayers.Event.stop(evt);}},zoomBarUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.zoomStart){this.div.style.cursor="";this.map.events.unregister("mouseup",this,this.passEventToSlider);this.map.events.unregister("mousemove",this,this.passEventToSlider);var deltaY=this.zoomStart.y-evt.xy.y | |
| 403 | -this.map.zoomTo(this.map.zoom+Math.round(deltaY/this.zoomStopHeight));this.moveZoomBar();this.mouseDragStart=null;OpenLayers.Event.stop(evt);}},moveZoomBar:function(){var newTop=((this.map.getNumZoomLevels()-1)-this.map.getZoom())*this.zoomStopHeight+this.startTop+1;this.slider.style.top=newTop+"px";},CLASS_NAME:"OpenLayers.Control.PanZoomBar"});OpenLayers.Control.ZoomBox=OpenLayers.Class.create();OpenLayers.Control.ZoomBox.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask});},zoomBox:function(position){if(position instanceof OpenLayers.Bounds){var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.left,position.bottom));var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.right,position.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(position),this.map.getZoom()+1);}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Format.GeoRSS=OpenLayers.Class.create();OpenLayers.Format.GeoRSS.prototype=OpenLayers.Class.inherit(OpenLayers.Format,{rssns:"http://backend.userland.com/rss2",featureNS:"http://mapserver.gis.umn.edu/mapserver",georssns:"http://www.georss.org/georss",write:function(features){var featureCollection=document.createElementNS(this.rssns,"rss");for(var i=0;i<features.length;i++){featureCollection.appendChild(this.createFeatureXML(features[i]));} | |
| 404 | -return featureCollection;},createFeatureXML:function(feature){var geometryNode=this.buildGeometryNode(feature.geometry);var featureNode=document.createElementNS(this.rssns,"item");var titleNode=document.createElementNS(this.rssns,"title");titleNode.appendChild(document.createTextNode(feature.attributes.title?feature.attributes.title:""));var descNode=document.createElementNS(this.rssns,"description");descNode.appendChild(document.createTextNode(feature.attributes.description?feature.attributes.description:""));featureNode.appendChild(titleNode);featureNode.appendChild(descNode);for(var attr in feature.attributes){var attrText=document.createTextNode(feature.attributes[attr]);var nodename=attr;if(attr.search(":")!=-1){nodename=attr.split(":")[1];} | |
| 405 | -var attrContainer=document.createElementNS(this.featureNS,"feature:"+nodename);attrContainer.appendChild(attrText);featureNode.appendChild(attrContainer);} | |
| 406 | -featureNode.appendChild(geometryNode);return featureNode;},buildGeometryNode:function(geometry){var gml="";if(geometry.CLASS_NAME=="OpenLayers.Geometry.Polygon"){gml=document.createElementNS(this.georssns,'georss:polygon');gml.appendChild(this.buildCoordinatesNode(geometry.components[0]));} | |
| 407 | -else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"){gml=document.createElementNS(this.georssns,'georss:line');gml.appendChild(this.buildCoordinatesNode(geometry));} | |
| 408 | -else if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){gml=document.createElementNS(this.georssns,'georss:point');gml.appendChild(this.buildCoordinatesNode(geometry));}else{alert("Couldn't parse "+geometry.CLASS_NAME);} | |
| 409 | -return gml;},buildCoordinatesNode:function(geometry){var points=null;if(geometry.components){points=geometry.components;} | |
| 410 | -var path="";if(points){for(var i=0;i<points.length;i++){path+=points[i].y+" "+points[i].x+" ";}}else{path+=geometry.y+" "+geometry.x+" ";} | |
| 411 | -return document.createTextNode(path);},CLASS_NAME:"OpenLayers.Format.GeoRSS"});OpenLayers.Format.WKT=OpenLayers.Class.create();OpenLayers.Format.WKT.prototype=OpenLayers.Class.inherit(OpenLayers.Format,{initialize:function(options){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,[options]);},read:function(wkt){var features,type,str;var matches=this.regExes.typeStr.exec(wkt);if(matches){type=matches[1].toLowerCase();str=matches[2];if(this.parse[type]){features=this.parse[type].apply(this,[str]);}} | |
| 412 | -return features;},write:function(features){var collection,geometry,type,data,isCollection;if(features.constructor==Array){collection=features;isCollection=true;}else{collection=[features];isCollection=false;} | |
| 413 | -var pieces=[];if(isCollection){pieces.push('GEOMETRYCOLLECTION(');} | |
| 414 | -for(var i=0;i<collection.length;++i){if(isCollection&&i>0){pieces.push(',');} | |
| 415 | -geometry=collection[i].geometry;type=geometry.CLASS_NAME.split('.')[2].toLowerCase();if(!this.extract[type]){return null;} | |
| 416 | -data=this.extract[type].apply(this,[geometry]);pieces.push(type.toUpperCase()+'('+data+')');} | |
| 417 | -if(isCollection){pieces.push(')');} | |
| 418 | -return pieces.join('');},extract:{'point':function(point){return point.x+' '+point.y;},'multipoint':function(multipoint){var array=[];for(var i=0;i<multipoint.components.length;++i){array.push(this.extract.point.apply(this,[multipoint.components[i]]));} | |
| 419 | -return array.join(',');},'linestring':function(linestring){var array=[];for(var i=0;i<linestring.components.length;++i){array.push(this.extract.point.apply(this,[linestring.components[i]]));} | |
| 420 | -return array.join(',');},'multilinestring':function(multilinestring){var array=[];for(var i=0;i<multilinestring.components.length;++i){array.push('('+ | |
| 421 | -this.extract.linestring.apply(this,[multilinestring.components[i]])+')');} | |
| 422 | -return array.join(',');},'polygon':function(polygon){var array=[];for(var i=0;i<polygon.components.length;++i){array.push('('+ | |
| 423 | -this.extract.linestring.apply(this,[polygon.components[i]])+')');} | |
| 424 | -return array.join(',');},'multipolygon':function(multipolygon){var array=[];for(var i=0;i<multipolygon.components.length;++i){array.push('('+ | |
| 425 | -this.extract.polygon.apply(this,[multipolygon.components[i]])+')');} | |
| 426 | -return array.join(',');}},parse:{'point':function(str){var coords=str.trim().split(this.regExes.spaces);return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(coords[0],coords[1]));},'multipoint':function(str){var points=str.trim().split(',');var components=[];for(var i=0;i<points.length;++i){components.push(this.parse.point.apply(this,[points[i]]).geometry);} | |
| 427 | -return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint(components));},'linestring':function(str){var points=str.trim().split(',');var components=[];for(var i=0;i<points.length;++i){components.push(this.parse.point.apply(this,[points[i]]).geometry);} | |
| 428 | -return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(components));},'multilinestring':function(str){var line;var lines=str.trim().split(this.regExes.parenComma);var components=[];for(var i=0;i<lines.length;++i){line=lines[i].replace(this.regExes.trimParens,'$1');components.push(this.parse.linestring.apply(this,[line]).geometry);} | |
| 429 | -return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiLineString(components));},'polygon':function(str){var ring,linestring,linearring;var rings=str.trim().split(this.regExes.parenComma);var components=[];for(var i=0;i<rings.length;++i){ring=rings[i].replace(this.regExes.trimParens,'$1');linestring=this.parse.linestring.apply(this,[ring]).geometry;linearring=new OpenLayers.Geometry.LinearRing(linestring.components) | |
| 430 | -components.push(linearring);} | |
| 431 | -return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(components));},'multipolygon':function(str){var polygon;var polygons=str.trim().split(this.regExes.doubleParenComma);var components=[];for(var i=0;i<polygons.length;++i){polygon=polygons[i].replace(this.regExes.trimParens,'$1');components.push(this.parse.polygon.apply(this,[polygon]).geometry);} | |
| 432 | -return new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(components));},'geometrycollection':function(str){str=str.replace(/,\s*([A-Za-z])/g,'|$1');var wktArray=str.trim().split('|');var components=[];for(var i=0;i<wktArray.length;++i){components.push(OpenLayers.Format.WKT.prototype.read.apply(this,[wktArray[i]]));} | |
| 433 | -return components;}},CLASS_NAME:"OpenLayers.Format.WKT"});OpenLayers.Handler.Drag=OpenLayers.Class.create();OpenLayers.Handler.Drag.prototype=OpenLayers.Class.inherit(OpenLayers.Handler,{started:false,dragging:false,start:null,oldOnselectstart:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);},mousedown:function(evt){if(this.checkModifiers(evt)&&OpenLayers.Event.isLeftClick(evt)){this.started=true;this.dragging=false;this.start=evt.xy.clone();this.map.div.style.cursor="move";this.callback("down",[evt.xy]);OpenLayers.Event.stop(evt);return false;} | |
| 434 | -return true;},mousemove:function(evt){if(this.started){this.dragging=true;this.callback("move",[evt.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;document.onselectstart=function(){return false;}}} | |
| 435 | -return true;},mouseup:function(evt){if(this.started){this.started=false;this.map.div.style.cursor="";this.callback("up",[evt.xy]);document.onselectstart=this.oldOnselectstart;} | |
| 436 | -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.callback("out",[]);if(document.onselectstart){document.onselectstart=this.oldOnselectstart;}} | |
| 437 | -return true;},click:function(evt){if(this.dragging){this.dragging=false;return false;} | |
| 438 | -this.started=false;return true;},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;return true;}else{return false;}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.dragging=false;return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Keyboard=OpenLayers.Class.create();OpenLayers.Handler.Keyboard.prototype=OpenLayers.Class.inherit(OpenLayers.Handler,{KEY_EVENTS:["keydown","keypress","keyup"],eventListener:null,initialize:function(){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.eventListener=this.handleKeyEvent.bindAsEventListener(this);},destroy:function(){this.deactivate();this.eventListener=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){for(var i=0;i<this.KEY_EVENTS.length;i++){OpenLayers.Event.observe(window,this.KEY_EVENTS[i],this.eventListener);} | |
| 439 | -return true;}else{return false;}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var i=0;i<this.KEY_EVENTS.length;i++){OpenLayers.Event.stopObserving(document,this.KEY_EVENTS[i],this.eventListener);} | |
| 440 | -return true;}else{return false;}},handleKeyEvent:function(evt){if(this.checkModifiers(evt)){this.callback(evt.type,[evt.charCode||evt.keyCode]);}},CLASS_NAME:"OpenLayers.Handler.Keyboard"});OpenLayers.Map=OpenLayers.Class.create();OpenLayers.Map.TILE_WIDTH=256;OpenLayers.Map.TILE_HEIGHT=256;OpenLayers.Map.prototype={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,unloadDestroy: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',maxResolution:1.40625,minResolution:null,maxScale:null,minScale:null,maxExtent:null,minExtent:null,numZoomLevels:16,theme:null,fallThrough:false,initialize:function(div,options){this.setOptions(options);this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=div=OpenLayers.Util.getElement(div);var id=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);id=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.events=new OpenLayers.Events(this,div,this.EVENT_TYPES,this.fallThrough);this.updateSize();this.events.register("movestart",this,this.updateSize);if(navigator.appName.contains("Microsoft")){this.events.register("resize",this,this.updateSize);}else{OpenLayers.Event.observe(window,'resize',this.updateSize.bindAsEventListener(this));} | |
| 441 | -if(this.theme){var addNode=true;var nodes=document.getElementsByTagName('link');for(var i=0;i<nodes.length;++i){if(OpenLayers.Util.isEquivalentUrl(nodes.item(i).href,this.theme)){addNode=false;break;}} | |
| 442 | -if(addNode){var cssNode=document.createElement('link');cssNode.setAttribute('rel','stylesheet');cssNode.setAttribute('type','text/css');cssNode.setAttribute('href',this.theme);document.getElementsByTagName('head')[0].appendChild(cssNode);}} | |
| 443 | -this.layers=[];if(this.controls==null){if(OpenLayers.Control!=null){this.controls=[new OpenLayers.Control.Navigation(),new OpenLayers.Control.PanZoom(),new OpenLayers.Control.ArgParser()];}else{this.controls=[];}} | |
| 444 | -for(var i=0;i<this.controls.length;i++){this.addControlToMap(this.controls[i]);} | |
| 445 | -this.popups=new Array();this.unloadDestroy=this.destroy.bindAsEventListener(this);OpenLayers.Event.observe(window,'unload',this.unloadDestroy);},destroy:function(){if(!this.unloadDestroy){return false;} | |
| 446 | -OpenLayers.Event.stopObserving(window,'unload',this.unloadDestroy);this.unloadDestroy=null;if(this.layers!=null){for(var i=this.layers.length-1;i>=0;--i){this.layers[i].destroy(false);} | |
| 447 | -this.layers=null;} | |
| 448 | -if(this.controls!=null){for(var i=this.controls.length-1;i>=0;--i){this.controls[i].destroy();} | |
| 449 | -this.controls=null;} | |
| 450 | -if(this.viewPortDiv){this.div.removeChild(this.viewPortDiv);} | |
| 451 | -this.viewPortDiv=null;this.events.destroy();this.events=null;},setOptions:function(options){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,options);},getTileSize:function(){return this.tileSize;},getLayer:function(id){var foundLayer=null;for(var i=0;i<this.layers.length;i++){var layer=this.layers[i];if(layer.id==id){foundLayer=layer;}} | |
| 452 | -return foundLayer;},setLayerZIndex:function(layer,zIdx){layer.setZIndex(this.Z_INDEX_BASE[layer.isBaseLayer?'BaseLayer':'Overlay'] | |
| 453 | -+zIdx*5);},addLayer:function(layer){for(var i=0;i<this.layers.length;i++){if(this.layers[i]==layer){return false;}} | |
| 454 | -layer.div.style.overflow="";this.setLayerZIndex(layer,this.layers.length);if(layer.isFixed){this.viewPortDiv.appendChild(layer.div);}else{this.layerContainerDiv.appendChild(layer.div);} | |
| 455 | -this.layers.push(layer);layer.setMap(this);if(layer.isBaseLayer){if(this.baseLayer==null){this.setBaseLayer(layer);}else{layer.setVisibility(false);}}else{if(this.getCenter()!=null){layer.moveTo(this.getExtent(),true);}} | |
| 456 | -this.events.triggerEvent("addlayer");},addLayers:function(layers){for(var i=0;i<layers.length;i++){this.addLayer(layers[i]);}},removeLayer:function(layer,setNewBaseLayer){if(setNewBaseLayer==null){setNewBaseLayer=true;} | |
| 457 | -if(layer.isFixed){this.viewPortDiv.removeChild(layer.div);}else{this.layerContainerDiv.removeChild(layer.div);} | |
| 458 | -layer.map=null;OpenLayers.Util.removeItem(this.layers,layer);if(setNewBaseLayer&&(this.baseLayer==layer)){this.baseLayer=null;for(i=0;i<this.layers.length;i++){var iLayer=this.layers[i];if(iLayer.isBaseLayer){this.setBaseLayer(iLayer);break;}}} | |
| 459 | -this.events.triggerEvent("removelayer");},getNumLayers:function(){return this.layers.length;},getLayerIndex:function(layer){return OpenLayers.Util.indexOf(this.layers,layer);},setLayerIndex:function(layer,idx){var base=this.getLayerIndex(layer);if(idx<0) | |
| 460 | -idx=0;else if(idx>this.layers.length) | |
| 461 | -idx=this.layers.length;if(base!=idx){this.layers.splice(base,1);this.layers.splice(idx,0,layer);for(var i=0;i<this.layers.length;i++) | |
| 462 | -this.setLayerZIndex(this.layers[i],i);this.events.triggerEvent("changelayer");}},raiseLayer:function(layer,delta){var idx=this.getLayerIndex(layer)+delta;this.setLayerIndex(layer,idx);},setBaseLayer:function(newBaseLayer,noEvent){var oldExtent=null;if(this.baseLayer){oldExtent=this.baseLayer.getExtent();} | |
| 463 | -if(newBaseLayer!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,newBaseLayer)!=-1){if(this.baseLayer!=null){this.baseLayer.setVisibility(false,noEvent);} | |
| 464 | -this.baseLayer=newBaseLayer;this.viewRequestID++;this.baseLayer.setVisibility(true,noEvent);var center=this.getCenter();if(center!=null){if(oldExtent==null){this.setCenter(center,this.getZoom(),false,true);}else{this.setCenter(oldExtent.getCenterLonLat(),this.getZoomForExtent(oldExtent),false,true);}} | |
| 465 | -if((noEvent==null)||(noEvent==false)){this.events.triggerEvent("changebaselayer");}}}},addControl:function(control,px){this.controls.push(control);this.addControlToMap(control,px);},addControlToMap:function(control,px){control.outsideViewport=(control.div!=null);control.setMap(this);var div=control.draw(px);if(div){if(!control.outsideViewport){div.style.zIndex=this.Z_INDEX_BASE['Control']+ | |
| 466 | -this.controls.length;this.viewPortDiv.appendChild(div);}}},addPopup:function(popup,exclusive){if(exclusive){for(var i=0;i<this.popups.length;i++){this.removePopup(this.popups[i]);}} | |
| 467 | -popup.map=this;this.popups.push(popup);var popupDiv=popup.draw();if(popupDiv){popupDiv.style.zIndex=this.Z_INDEX_BASE['Popup']+ | |
| 468 | -this.popups.length;this.layerContainerDiv.appendChild(popupDiv);}},removePopup:function(popup){OpenLayers.Util.removeItem(this.popups,popup);if(popup.div){try{this.layerContainerDiv.removeChild(popup.div);} | |
| 469 | -catch(e){}} | |
| 470 | -popup.map=null;},getSize:function(){var size=null;if(this.size!=null){size=this.size.clone();} | |
| 471 | -return size;},updateSize:function(){this.events.element.offsets=null;var newSize=this.getCurrentSize();var oldSize=this.getSize();if(oldSize==null) | |
| 472 | -this.size=oldSize=newSize;if(!newSize.equals(oldSize)){this.size=newSize;for(var i=0;i<this.layers.length;i++){this.layers[i].onMapResize();} | |
| 473 | -if(this.baseLayer!=null){var center=new OpenLayers.Pixel(newSize.w/2,newSize.h/2);var centerLL=this.getLonLatFromViewPortPx(center);var zoom=this.getZoom();this.zoom=null;this.setCenter(this.getCenter(),zoom);}}},getCurrentSize:function(){var size=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(size.w==0&&size.h==0||isNaN(size.w)&&isNaN(size.h)){var dim=OpenLayers.Element.getDimensions(this.div);size.w=dim.width;size.h=dim.height;} | |
| 474 | -if(size.w==0&&size.h==0||isNaN(size.w)&&isNaN(size.h)){size.w=parseInt(this.div.style.width);size.h=parseInt(this.div.style.height);} | |
| 475 | -return size;},calculateBounds:function(center,resolution){var extent=null;if(center==null){center=this.getCenter();} | |
| 476 | -if(resolution==null){resolution=this.getResolution();} | |
| 477 | -if((center!=null)&&(resolution!=null)){var size=this.getSize();var w_deg=size.w*resolution;var h_deg=size.h*resolution;extent=new OpenLayers.Bounds(center.lon-w_deg/2,center.lat-h_deg/2,center.lon+w_deg/2,center.lat+h_deg/2);} | |
| 478 | -return extent;},getCenter:function(){return this.center;},getZoom:function(){return this.zoom;},pan:function(dx,dy){var centerPx=this.getViewPortPxFromLonLat(this.getCenter());var newCenterPx=centerPx.add(dx,dy);if(!newCenterPx.equals(centerPx)){var newCenterLonLat=this.getLonLatFromViewPortPx(newCenterPx);this.setCenter(newCenterLonLat);}},setCenter:function(lonlat,zoom,dragging,forceZoomChange){if(!this.center&&!this.isValidLonLat(lonlat)){lonlat=this.maxExtent.getCenterLonLat();} | |
| 479 | -var zoomChanged=forceZoomChange||((this.isValidZoomLevel(zoom))&&(zoom!=this.getZoom()));var centerChanged=(this.isValidLonLat(lonlat))&&(!lonlat.equals(this.center));if(zoomChanged||centerChanged||!dragging){if(!dragging){this.events.triggerEvent("movestart");} | |
| 480 | -if(centerChanged){if((!zoomChanged)&&(this.center)){this.centerLayerContainer(lonlat);} | |
| 481 | -this.center=lonlat.clone();} | |
| 482 | -if((zoomChanged)||(this.layerContainerOrigin==null)){this.layerContainerOrigin=this.center.clone();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px";} | |
| 483 | -if(zoomChanged){this.zoom=zoom;for(var i=0;i<this.popups.length;i++){this.popups[i].updatePosition();} | |
| 484 | -this.viewRequestID++;} | |
| 485 | -var bounds=this.getExtent();this.baseLayer.moveTo(bounds,zoomChanged,dragging);for(var i=0;i<this.layers.length;i++){var layer=this.layers[i];if(!layer.isBaseLayer){var moveLayer;var inRange=layer.calculateInRange();if(layer.inRange!=inRange){layer.inRange=inRange;moveLayer=true;this.events.triggerEvent("changelayer");}else{moveLayer=(layer.visibility&&layer.inRange);} | |
| 486 | -if(moveLayer){layer.moveTo(bounds,zoomChanged,dragging);}}} | |
| 487 | -this.events.triggerEvent("move");if(zoomChanged){this.events.triggerEvent("zoomend");}} | |
| 488 | -if(!dragging){this.events.triggerEvent("moveend");}},centerLayerContainer:function(lonlat){var originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){this.layerContainerDiv.style.left=(originPx.x-newPx.x)+"px";this.layerContainerDiv.style.top=(originPx.y-newPx.y)+"px";}},isValidZoomLevel:function(zoomLevel){return((zoomLevel!=null)&&(zoomLevel>=0)&&(zoomLevel<this.getNumZoomLevels()));},isValidLonLat:function(lonlat){var valid=false;if(lonlat!=null){var maxExtent=this.getMaxExtent();valid=maxExtent.containsLonLat(lonlat);} | |
| 489 | -return valid;},getProjection:function(){var projection=null;if(this.baseLayer!=null){projection=this.baseLayer.projection;} | |
| 490 | -return projection;},getMaxResolution:function(){var maxResolution=null;if(this.baseLayer!=null){maxResolution=this.baseLayer.maxResolution;} | |
| 491 | -return maxResolution;},getMaxExtent:function(){var maxExtent=null;if(this.baseLayer!=null){maxExtent=this.baseLayer.maxExtent;} | |
| 492 | -return maxExtent;},getNumZoomLevels:function(){var numZoomLevels=null;if(this.baseLayer!=null){numZoomLevels=this.baseLayer.numZoomLevels;} | |
| 493 | -return numZoomLevels;},getExtent:function(){var extent=null;if(this.baseLayer!=null){extent=this.baseLayer.getExtent();} | |
| 494 | -return extent;},getResolution:function(){var resolution=null;if(this.baseLayer!=null){resolution=this.baseLayer.getResolution();} | |
| 495 | -return resolution;},getScale:function(){var scale=null;if(this.baseLayer!=null){var res=this.getResolution();var units=this.baseLayer.units;scale=OpenLayers.Util.getScaleFromResolution(res,units);} | |
| 496 | -return scale;},getZoomForExtent:function(bounds){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForExtent(bounds);} | |
| 497 | -return zoom;},getZoomForResolution:function(resolution){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForResolution(resolution);} | |
| 498 | -return zoom;},zoomTo:function(zoom){if(this.isValidZoomLevel(zoom)){this.setCenter(null,zoom);}},zoomIn:function(){this.zoomTo(this.getZoom()+1);},zoomOut:function(){this.zoomTo(this.getZoom()-1);},zoomToExtent:function(bounds){this.setCenter(bounds.getCenterLonLat(),this.getZoomForExtent(bounds));},zoomToMaxExtent:function(){this.zoomToExtent(this.getMaxExtent());},zoomToScale:function(scale){var res=OpenLayers.Util.getResolutionFromScale(scale,this.baseLayer.units);var size=this.getSize();var w_deg=size.w*res;var h_deg=size.h*res;var center=this.getCenter();var extent=new OpenLayers.Bounds(center.lon-w_deg/2,center.lat-h_deg/2,center.lon+w_deg/2,center.lat+h_deg/2);this.zoomToExtent(extent);},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if(this.baseLayer!=null){lonlat=this.baseLayer.getLonLatFromViewPortPx(viewPortPx);} | |
| 499 | -return lonlat;},getViewPortPxFromLonLat:function(lonlat){var px=null;if(this.baseLayer!=null){px=this.baseLayer.getViewPortPxFromLonLat(lonlat);} | |
| 500 | -return px;},getLonLatFromPixel:function(px){return this.getLonLatFromViewPortPx(px);},getPixelFromLonLat:function(lonlat){return this.getViewPortPxFromLonLat(lonlat);},getViewPortPxFromLayerPx:function(layerPx){var viewPortPx=null;if(layerPx!=null){var dX=parseInt(this.layerContainerDiv.style.left);var dY=parseInt(this.layerContainerDiv.style.top);viewPortPx=layerPx.add(dX,dY);} | |
| 501 | -return viewPortPx;},getLayerPxFromViewPortPx:function(viewPortPx){var layerPx=null;if(viewPortPx!=null){var dX=-parseInt(this.layerContainerDiv.style.left);var dY=-parseInt(this.layerContainerDiv.style.top);layerPx=viewPortPx.add(dX,dY);if(isNaN(layerPx.x)||isNaN(layerPx.y)){layerPx=null;}} | |
| 502 | -return layerPx;},getLonLatFromLayerPx:function(px){px=this.getViewPortPxFromLayerPx(px);return this.getLonLatFromViewPortPx(px);},getLayerPxFromLonLat:function(lonlat){var px=this.getViewPortPxFromLonLat(lonlat);return this.getLayerPxFromViewPortPx(px);},CLASS_NAME:"OpenLayers.Map"};OpenLayers.Marker=OpenLayers.Class.create();OpenLayers.Marker.prototype={icon:null,lonlat:null,events:null,map:null,initialize:function(lonlat,icon){this.lonlat=lonlat;var newIcon=(icon)?icon:OpenLayers.Marker.defaultIcon();if(this.icon==null){this.icon=newIcon;}else{this.icon.url=newIcon.url;this.icon.size=newIcon.size;this.icon.offset=newIcon.offset;this.icon.calculateOffset=newIcon.calculateOffset;} | |
| 503 | -this.events=new OpenLayers.Events(this,this.icon.imageDiv,null);},destroy:function(){this.map=null;this.events.destroy();this.events=null;if(this.icon!=null){this.icon.destroy();this.icon=null;}},draw:function(px){return this.icon.draw(px);},moveTo:function(px){if((px!=null)&&(this.icon!=null)){this.icon.moveTo(px);} | |
| 504 | -this.lonlat=this.map.getLonLatFromLayerPx(px);},onScreen:function(){var onScreen=false;if(this.map){var screenBounds=this.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);} | |
| 505 | -return onScreen;},inflate:function(inflate){if(this.icon){var newSize=new OpenLayers.Size(this.icon.size.w*inflate,this.icon.size.h*inflate);this.icon.setSize(newSize);}},setOpacity:function(opacity){this.icon.setOpacity(opacity);},display:function(display){this.icon.display(display);},CLASS_NAME:"OpenLayers.Marker"};OpenLayers.Marker.defaultIcon=function(){var url=OpenLayers.Util.getImagesLocation()+"marker.png";var size=new OpenLayers.Size(21,25);var calculateOffset=function(size){return new OpenLayers.Pixel(-(size.w/2),-size.h);};return new OpenLayers.Icon(url,size,null,calculateOffset);};OpenLayers.Popup.AnchoredBubble=OpenLayers.Class.create();OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Popup.AnchoredBubble.prototype=OpenLayers.Class.inherit(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(id,lonlat,size,contentHTML,anchor,closeBox){OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);},draw:function(px){OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments);this.setContentHTML();this.setRicoCorners(!this.rounded);this.rounded=true;this.setBackgroundColor();this.setOpacity();return this.div;},setSize:function(size){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);if(this.contentDiv!=null){var contentSize=this.size.clone();contentSize.h-=(2*OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);contentSize.h-=(2*this.padding);this.contentDiv.style.height=contentSize.h+"px";this.contentDiv.style.width=contentSize.w+"px";if(this.map){this.setRicoCorners(!this.rounded);this.rounded=true;}}},setBackgroundColor:function(color){if(color!=undefined){this.backgroundColor=color;} | |
| 506 | -if(this.div!=null){if(this.contentDiv!=null){this.div.style.background="transparent";OpenLayers.Rico.Corner.changeColor(this.contentDiv,this.backgroundColor);}}},setOpacity:function(opacity){if(opacity!=undefined){this.opacity=opacity;} | |
| 507 | -if(this.div!=null){if(this.contentDiv!=null){OpenLayers.Rico.Corner.changeOpacity(this.contentDiv,this.opacity);}}},setBorder:function(border){this.border=0;},setRicoCorners:function(firstTime){var corners=this.getCornersToRound(this.relativePosition);var options={corners:corners,color:this.backgroundColor,bgColor:"transparent",blend:false};if(firstTime){OpenLayers.Rico.Corner.round(this.div,options);}else{OpenLayers.Rico.Corner.reRound(this.groupDiv,options);this.setBackgroundColor();this.setOpacity();}},getCornersToRound:function(){var corners=['tl','tr','bl','br'];var corner=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(corners,corner);return corners.join(" ");},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Renderer.SVG=OpenLayers.Class.create();OpenLayers.Renderer.SVG.prototype=OpenLayers.Class.inherit(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",maxPixel:15000,localResolution:null,initialize:function(containerID){if(!this.supported()){return;} | |
| 508 | -OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments);},supported:function(){var svgFeature="http://www.w3.org/TR/SVG11/feature#SVG";var supported=(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(svgFeature,"1.1")));return supported;},setExtent:function(extent){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();if(!this.localResolution||resolution!=this.localResolution){this.left=-extent.left/resolution;this.top=extent.top/resolution;} | |
| 509 | -var left=0;var top=0;if(this.localResolution&&resolution==this.localResolution){left=(this.left)-(-extent.left/resolution);top=(this.top)-(extent.top/resolution);} | |
| 510 | -this.localResolution=resolution;var extentString=left+" "+top+" "+ | |
| 511 | -extent.getWidth()/resolution+" "+extent.getHeight()/resolution;this.rendererRoot.setAttributeNS(null,"viewBox",extentString);},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(geometry){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":nodeType="circle";break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;} | |
| 512 | -return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;if(node._geometryClass=="OpenLayers.Geometry.Point"){node.setAttributeNS(null,"r",style.pointRadius);} | |
| 513 | -if(options.isFilled){node.setAttributeNS(null,"fill",style.fillColor);node.setAttributeNS(null,"fill-opacity",style.fillOpacity);}else{node.setAttributeNS(null,"fill","none");} | |
| 514 | -if(options.isStroked){node.setAttributeNS(null,"stroke",style.strokeColor);node.setAttributeNS(null,"stroke-opacity",style.strokeOpacity);node.setAttributeNS(null,"stroke-width",style.strokeWidth);}else{node.setAttributeNS(null,"stroke","none");} | |
| 515 | -if(style.pointerEvents){node.setAttributeNS(null,"pointer-events",style.pointerEvents);} | |
| 516 | -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);} | |
| 517 | -return node;},nodeTypeCompare:function(node,type){return(type==node.nodeName);},createRenderRoot:function(){var id=this.container.id+"_svgRoot";var rendererRoot=this.nodeFactory(id,"svg");return rendererRoot;},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,geometry){this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){var resolution=this.getResolution();var x=(geometry.x/resolution+this.left);var y=(geometry.y/resolution-this.top);var draw=true;if(x<-this.maxPixel||x>this.maxPixel){draw=false;} | |
| 518 | -if(y<-this.maxPixel||y>this.maxPixel){draw=false;} | |
| 519 | -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,geometry){node.setAttributeNS(null,"points",this.getComponentsString(geometry.components));},drawLinearRing:function(node,geometry){node.setAttributeNS(null,"points",this.getComponentsString(geometry.components));},drawPolygon:function(node,geometry){var d="";var draw=true;for(var j=0;j<geometry.components.length;j++){var linearRing=geometry.components[j];d+=" M";for(var i=0;i<linearRing.components.length;i++){var component=this.getShortString(linearRing.components[i]) | |
| 520 | -if(component){d+=" "+component;}else{draw=false;}}} | |
| 521 | -d+=" z";if(draw){node.setAttributeNS(null,"d",d);node.setAttributeNS(null,"fill-rule","evenodd");}else{node.setAttributeNS(null,"d","");}},drawRectangle:function(node,geometry){var x=(geometry.x/resolution+this.left);var y=(geometry.y/resolution-this.top);var draw=true;if(x<-this.maxPixel||x>this.maxPixel){draw=false;} | |
| 522 | -if(y<-this.maxPixel||y>this.maxPixel){draw=false;} | |
| 523 | -if(draw){node.setAttributeNS(null,"x",x);node.setAttributeNS(null,"y",y);node.setAttributeNS(null,"width",geometry.width);node.setAttributeNS(null,"height",geometry.height);}else{node.setAttributeNS(null,"x","");node.setAttributeNS(null,"y","");node.setAttributeNS(null,"width",0);node.setAttributeNS(null,"height",0);}},drawCurve:function(node,geometry){var d=null;var draw=true;for(var i=0;i<geometry.components.length;i++){if((i%3)==0&&(i/3)==0){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 524 | -d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 525 | -d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 526 | -d+=" "+component;}} | |
| 527 | -if(draw){node.setAttributeNS(null,"d",d);}else{node.setAttributeNS(null,"d","");}},drawSurface:function(node,geometry){var d=null;var draw=true;for(var i=0;i<geometry.components.length;i++){if((i%3)==0&&(i/3)==0){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 528 | -d="M "+component;}else if((i%3)==1){var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 529 | -d+=" C "+component;}else{var component=this.getShortString(geometry.components[i]);if(!component){draw=false;} | |
| 530 | -d+=" "+component;}} | |
| 531 | -d+=" Z";if(draw){node.setAttributeNS(null,"d",d);}else{node.setAttributeNS(null,"d","");}},getComponentsString:function(components){var strings=[];for(var i=0;i<components.length;i++){var component=this.getShortString(components[i]);if(component){strings.push(component);}} | |
| 532 | -return strings.join(",");},getShortString:function(point){var resolution=this.getResolution();var x=(point.x/resolution+this.left);var y=(point.y/resolution-this.top);if(x<-this.maxPixel||x>this.maxPixel){return false;} | |
| 533 | -if(y<-this.maxPixel||y>this.maxPixel){return false;} | |
| 534 | -var string=x+","+y;return string;},CLASS_NAME:"OpenLayers.Renderer.SVG"});OpenLayers.Renderer.VML=OpenLayers.Class.create();OpenLayers.Renderer.VML.prototype=OpenLayers.Class.inherit(OpenLayers.Renderer.Elements,{xmlns:"urn:schemas-microsoft-com:vml",initialize:function(containerID){if(!this.supported()){return;} | |
| 535 | -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;");OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments);},supported:function(){var supported=document.namespaces;return supported;},setExtent:function(extent){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();var org=extent.left/resolution+" "+ | |
| 536 | -extent.top/resolution;this.root.setAttribute("coordorigin",org);var size=extent.getWidth()/resolution+" "+ | |
| 537 | --extent.getHeight()/resolution;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(geometry){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":nodeType="v:oval";break;case"OpenLayers.Geometry.Rectangle":nodeType="v:rect";break;case"OpenLayers.Geometry.LineString":case"OpenLayers.Geometry.LinearRing":case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="v:shape";break;default:break;} | |
| 538 | -return nodeType;},setStyle:function(node,style,options,geometry){style=style||node._style;options=options||node._options;if(node._geometryClass=="OpenLayers.Geometry.Point"){this.drawCircle(node,geometry,style.pointRadius);} | |
| 539 | -var fillColor=(options.isFilled)?style.fillColor:"none";node.setAttribute("fillcolor",fillColor);var fills=node.getElementsByTagName("fill");var fill=(fills.length==0)?null:fills[0];if(!options.isFilled){if(fill){node.removeChild(fill);}}else{if(!fill){fill=this.createNode('v:fill',node.id+"_fill");node.appendChild(fill);} | |
| 540 | -fill.setAttribute("opacity",style.fillOpacity);} | |
| 541 | -var strokeColor=(options.isStroked)?style.strokeColor:"none";node.setAttribute("strokecolor",strokeColor);node.setAttribute("strokeweight",style.strokeWidth);var strokes=node.getElementsByTagName("stroke");var stroke=(strokes.length==0)?null:strokes[0];if(!options.isStroked){if(stroke){node.removeChild(stroke);}}else{if(!stroke){stroke=this.createNode('v:stroke',node.id+"_stroke");node.appendChild(stroke);} | |
| 542 | -stroke.setAttribute("opacity",style.strokeOpacity);} | |
| 543 | -if(style.cursor){node.style.cursor=style.cursor;}},setNodeDimension:function(node,geometry){var bbox=geometry.getBounds();var resolution=this.getResolution();var scaledBox=new OpenLayers.Bounds((bbox.left/resolution).toFixed(),(bbox.bottom/resolution).toFixed(),(bbox.right/resolution).toFixed(),(bbox.top/resolution).toFixed());node.style.left=scaledBox.left;node.style.top=scaledBox.top;node.style.width=scaledBox.getWidth();node.style.height=scaledBox.getHeight();node.coordorigin=scaledBox.left+" "+scaledBox.top;node.coordsize=scaledBox.getWidth()+" "+scaledBox.getHeight();},createNode:function(type,id){var node=document.createElement(type);if(id){node.setAttribute('id',id);} | |
| 544 | -return node;},nodeTypeCompare:function(node,type){var subType=type;var splitIndex=subType.indexOf(":");if(splitIndex!=-1){subType=subType.substr(splitIndex+1);} | |
| 545 | -var nodeName=node.nodeName;splitIndex=nodeName.indexOf(":");if(splitIndex!=-1){nodeName=nodeName.substr(splitIndex+1);} | |
| 546 | -return(subType==nodeName);},createRenderRoot:function(){var id=this.container.id+"_vmlRoot";var rendererRoot=this.nodeFactory(id,"div");return rendererRoot;},createRoot:function(){var id=this.container.id+"_root";var root=this.nodeFactory(id,"v:group");return root;},drawPoint:function(node,geometry){this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){var resolution=this.getResolution();node.style.left=(geometry.x/resolution).toFixed()-radius;node.style.top=(geometry.y/resolution).toFixed()-radius;var diameter=radius*2;node.style.width=diameter;node.style.height=diameter;},drawLineString:function(node,geometry){this.drawLine(node,geometry,false);},drawLinearRing:function(node,geometry){this.drawLine(node,geometry,true);},drawLine:function(node,geometry,closeLine){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path="m";for(var i=0;i<geometry.components.length;i++){var x=(geometry.components[i].x/resolution);var y=(geometry.components[i].y/resolution);path+=" "+x.toFixed()+","+y.toFixed()+" l ";} | |
| 547 | -if(closeLine){path+=" x";} | |
| 548 | -path+=" e";node.path=path;},drawPolygon:function(node,geometry){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path="";for(var j=0;j<geometry.components.length;j++){var linearRing=geometry.components[j];path+="m";for(var i=0;i<linearRing.components.length;i++){var x=linearRing.components[i].x/resolution;var y=linearRing.components[i].y/resolution;path+=" "+x.toFixed()+","+y.toFixed();if(i==0){path+=" l";}} | |
| 549 | -path+=" x ";} | |
| 550 | -path+="e";node.path=path;},drawRectangle:function(node,geometry){var resolution=this.getResolution();node.style.left=geometry.x/resolution;node.style.top=geometry.y/resolution;node.style.width=geometry.width/resolution;node.style.height=geometry.height/resolution;},drawCurve:function(node,geometry){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path="";for(var i=0;i<geometry.components.length;i++){var x=geometry.components[i].x/resolution;var y=geometry.components[i].y/resolution;if((i%3)==0&&(i/3)==0){path+="m"}else if((i%3)==1){path+=" c"} | |
| 551 | -path+=" "+x+","+y;} | |
| 552 | -path+=" x e";node.path=path;},drawSurface:function(node,geometry){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path="";for(var i=0;i<geometry.components.length;i++){var x=geometry.components[i].x/resolution;var y=geometry.components[i].y/resolution;if((i%3)==0&&(i/3)==0){path+="m";}else if((i%3)==1){path+=" c";} | |
| 553 | -path+=" "+x+","+y;} | |
| 554 | -path+=" x e";node.path=path;},CLASS_NAME:"OpenLayers.Renderer.VML"});OpenLayers.Tile.Image=OpenLayers.Class.create();OpenLayers.Tile.Image.prototype=OpenLayers.Class.inherit(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,initialize:function(layer,position,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;}} | |
| 555 | -this.imgDiv=null;if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){this.layer.div.removeChild(this.frame);} | |
| 556 | -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);} | |
| 557 | -if(!OpenLayers.Tile.prototype.draw.apply(this,arguments)){return false;} | |
| 558 | -if(this.imgDiv==null){this.initImgDiv();} | |
| 559 | -this.imgDiv.viewRequestID=this.layer.map.viewRequestID;this.url=this.layer.getURL(this.bounds);OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);if(this.layer.alpha){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,this.layer.imageSize,this.url);}else{this.imgDiv.src=this.url;OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,this.layer.imageSize);} | |
| 560 | -this.drawn=true;return true;},clear:function(){OpenLayers.Tile.prototype.clear.apply(this,arguments);if(this.imgDiv){this.imgDiv.style.display="none";}},moveTo:function(bounds,position,redraw){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){bounds=this.getBoundsFromBaseLayer(position);} | |
| 561 | -this.url=this.layer.getURL(bounds);OpenLayers.Tile.prototype.moveTo.apply(this,arguments);},initImgDiv:function(){if(this.layer.alpha){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,this.layer.imageOffset,this.layer.imageSize,null,"relative",null,null,null,true);}else{this.imgDiv=OpenLayers.Util.createImage(null,this.layer.imageOffset,this.layer.imageSize,null,"relative",null,null,true);} | |
| 562 | -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);} | |
| 563 | -this.imgDiv.map=this.layer.map;},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.WFS=OpenLayers.Class.create();OpenLayers.Tile.WFS.prototype=OpenLayers.Class.inherit(OpenLayers.Tile,{features:null,url:null,initialize:function(layer,position,bounds,url,size){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=url;this.features=new Array();},destroy:function(){OpenLayers.Tile.prototype.destroy.apply(this,arguments);this.destroyAllFeatures();this.features=null;this.url=null;},clear:function(){OpenLayers.Tile.prototype.clear.apply(this,arguments);this.destroyAllFeatures();},draw:function(){if(OpenLayers.Tile.prototype.draw.apply(this,arguments)){this.loadFeaturesForRegion(this.requestSuccess);}},loadFeaturesForRegion:function(success,failure){OpenLayers.loadURL(this.url,null,this,success);},requestSuccess:function(request){var doc=request.responseXML;if(!doc||request.fileType!="XML"){doc=OpenLayers.parseXMLString(request.responseText);} | |
| 564 | -if(this.layer.vectorMode){var gml=new OpenLayers.Format.GML({extractAttributes:this.layer.options.extractAttributes});this.layer.addFeatures(gml.read(doc));}else{var resultFeatures=OpenLayers.Ajax.getElementsByTagNameNS(doc,"http://www.opengis.net/gml","gml","featureMember");this.addResults(resultFeatures);}},addResults:function(results){for(var i=0;i<results.length;i++){var feature=new this.layer.featureClass(this.layer,results[i]);this.features.push(feature);}},destroyAllFeatures:function(){while(this.features.length>0){var feature=this.features.shift();feature.destroy();}},CLASS_NAME:"OpenLayers.Tile.WFS"});OpenLayers.Control.DragPan=OpenLayers.Class.create();OpenLayers.Control.DragPan.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{"move":this.panMap,"up":this.panMapDone});},panMap:function(xy){var deltaX=this.handler.start.x-xy.x;var deltaY=this.handler.start.y-xy.y;var size=this.map.getSize();var newXY=new OpenLayers.Pixel(size.w/2+deltaX,size.h/2+deltaY);var newCenter=this.map.getLonLatFromViewPortPx(newXY);this.map.setCenter(newCenter,null,true);this.handler.start=xy;},panMapDone:function(xy){var deltaX=this.handler.start.x-xy.x;var deltaY=this.handler.start.y-xy.y;var size=this.map.getSize();var newXY=new OpenLayers.Pixel(size.w/2+deltaX,size.h/2+deltaY);var newCenter=this.map.getLonLatFromViewPortPx(newXY);this.map.setCenter(newCenter,null,false);this.handler.start=xy;},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Control.KeyboardDefaults=OpenLayers.Class.create();OpenLayers.Control.KeyboardDefaults.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{slideFactor:75,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.handler){this.handler.destroy();} | |
| 565 | -this.handler=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){this.handler=new OpenLayers.Handler.Keyboard(this,{"keypress":this.defaultKeyPress});this.activate();},defaultKeyPress:function(code){switch(code){case OpenLayers.Event.KEY_LEFT:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Event.KEY_RIGHT:this.map.pan(this.slideFactor,0);break;case OpenLayers.Event.KEY_UP:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Event.KEY_DOWN:this.map.pan(0,this.slideFactor);break;case 33:var size=this.map.getSize();this.map.pan(0,-0.75*size.h);break;case 34:var size=this.map.getSize();this.map.pan(0,0.75*size.h);break;case 35:var size=this.map.getSize();this.map.pan(0.75*size.w,0);break;case 36:var size=this.map.getSize();this.map.pan(-0.75*size.w,0);break;case 43:this.map.zoomIn();break;case 45:this.map.zoomOut();break;case 107:this.map.zoomIn();break;case 109:this.map.zoomOut();break;}},CLASS_NAME:"OpenLayers.Control.KeyboardDefaults"});OpenLayers.Feature=OpenLayers.Class.create();OpenLayers.Feature.prototype={events:null,layer:null,id:null,lonlat:null,data:null,marker:null,popup:null,initialize:function(layer,lonlat,data){this.layer=layer;this.lonlat=lonlat;this.data=(data!=null)?data:new Object();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);}} | |
| 566 | -if(this.events){this.events.destroy();} | |
| 567 | -this.events=null;this.layer=null;this.id=null;this.lonlat=null;this.data=null;if(this.marker!=null){this.destroyMarker(this.marker);this.marker=null;} | |
| 568 | -if(this.popup!=null){this.destroyPopup(this.popup);this.popup=null;}},onScreen:function(){var onScreen=false;if((this.layer!=null)&&(this.layer.map!=null)){var screenBounds=this.layer.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);} | |
| 569 | -return onScreen;},createMarker:function(){var marker=null;if(this.lonlat!=null){this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);} | |
| 570 | -return this.marker;},destroyMarker:function(){this.marker.destroy();},createPopup:function(closeBox){if(this.lonlat!=null){var id=this.id+"_popup";var anchor=(this.marker)?this.marker.icon:null;this.popup=new OpenLayers.Popup.AnchoredBubble(id,this.lonlat,this.data.popupSize,this.data.popupContentHTML,anchor,closeBox);} | |
| 571 | -return this.popup;},destroyPopup:function(){this.popup.destroy()},CLASS_NAME:"OpenLayers.Feature"};OpenLayers.Layer=OpenLayers.Class.create();OpenLayers.Layer.prototype={id:null,name:null,div:null,EVENT_TYPES:["loadstart","loadend","loadcancel"],events:null,map:null,isBaseLayer:false,alpha:false,displayInLayerSwitcher:true,visibility:true,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,initialize:function(name,options){this.addOptions(options);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);}},destroy:function(setNewBaseLayer){if(setNewBaseLayer==null){setNewBaseLayer=true;} | |
| 572 | -if(this.map!=null){this.map.removeLayer(this,setNewBaseLayer);} | |
| 573 | -this.map=null;this.name=null;this.div=null;this.options=null;if(this.events){this.events.destroy();} | |
| 574 | -this.events=null;},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer(this.name,this.options);} | |
| 575 | -OpenLayers.Util.applyDefaults(obj,this);obj.map=null;return obj;},setName:function(newName){if(newName!=this.name){this.name=newName;if(this.map!=null){this.map.events.triggerEvent("changelayer");}}},addOptions:function(newOptions){if(this.options==null){this.options=new Object();} | |
| 576 | -OpenLayers.Util.extend(this.options,newOptions);OpenLayers.Util.extend(this,newOptions);},onMapResize:function(){},moveTo:function(bounds,zoomChanged,dragging){var display=this.visibility;if(!this.isBaseLayer){display=display&&this.inRange;} | |
| 577 | -this.display(display);},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";} | |
| 578 | -this.setTileSize();}},setTileSize:function(size){var tileSize=(size)?size:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=tileSize;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(tileSize.w+(2*this.gutter),tileSize.h+(2*this.gutter));}else{this.imageSize=tileSize;this.imageOffset=new OpenLayers.Pixel(0,0);}},getVisibility:function(){return this.visibility;},setVisibility:function(visibility,noEvent){if(visibility!=this.visibility){this.visibility=visibility;this.display(visibility);if(visibility&&this.map!=null){var extent=this.map.getExtent();if(extent!=null){this.moveTo(extent,true);}} | |
| 579 | -if((this.map!=null)&&((noEvent==null)||(noEvent==false))){this.map.events.triggerEvent("changelayer");}}},display:function(display){if(display!=(this.div.style.display!="none")){this.div.style.display=(display)?"block":"none";}},calculateInRange:function(){var inRange=false;if(this.map){var resolution=this.map.getResolution();inRange=((resolution>=this.minResolution)&&(resolution<=this.maxResolution));} | |
| 580 | -return inRange;},setIsBaseLayer:function(isBaseLayer){if(isBaseLayer!=this.isBaseLayer){this.isBaseLayer=isBaseLayer;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 confProps=new Object();for(var i=0;i<props.length;i++){var property=props[i];confProps[property]=this.options[property]||this.map[property];} | |
| 581 | -if((!confProps.numZoomLevels)&&(confProps.maxZoomLevel)){confProps.numZoomLevels=confProps.maxZoomLevel+1;} | |
| 582 | -if((confProps.scales!=null)||(confProps.resolutions!=null)){if(confProps.scales!=null){confProps.resolutions=new Array();for(var i=0;i<confProps.scales.length;i++){var scale=confProps.scales[i];confProps.resolutions[i]=OpenLayers.Util.getResolutionFromScale(scale,confProps.units);}} | |
| 583 | -confProps.numZoomLevels=confProps.resolutions.length;}else{confProps.resolutions=new Array();if(confProps.minScale){confProps.maxResolution=OpenLayers.Util.getResolutionFromScale(confProps.minScale,confProps.units);}else if(confProps.maxResolution=="auto"){var viewSize=this.map.getSize();var wRes=confProps.maxExtent.getWidth()/viewSize.w;var hRes=confProps.maxExtent.getHeight()/viewSize.h;confProps.maxResolution=Math.max(wRes,hRes);} | |
| 584 | -if(confProps.maxScale!=null){confProps.minResolution=OpenLayers.Util.getResolutionFromScale(confProps.maxScale);}else if((confProps.minResolution=="auto")&&(confProps.minExtent!=null)){var viewSize=this.map.getSize();var wRes=confProps.minExtent.getWidth()/viewSize.w;var hRes=confProps.minExtent.getHeight()/viewSize.h;confProps.minResolution=Math.max(wRes,hRes);} | |
| 585 | -if(confProps.minResolution!=null){var ratio=confProps.maxResolution/confProps.minResolution;confProps.numZoomLevels=Math.floor(Math.log(ratio)/Math.log(2))+1;} | |
| 586 | -for(var i=0;i<confProps.numZoomLevels;i++){var res=confProps.maxResolution/Math.pow(2,i) | |
| 587 | -confProps.resolutions.push(res);}} | |
| 588 | -confProps.resolutions.sort(function(a,b){return(b-a);});this.resolutions=confProps.resolutions;this.maxResolution=confProps.resolutions[0];var lastIndex=confProps.resolutions.length-1;this.minResolution=confProps.resolutions[lastIndex];this.scales=new Array();for(var i=0;i<confProps.resolutions.length;i++){this.scales[i]=OpenLayers.Util.getScaleFromResolution(confProps.resolutions[i],confProps.units);} | |
| 589 | -this.minScale=this.scales[0];this.maxScale=this.scales[this.scales.length-1];this.numZoomLevels=confProps.numZoomLevels;},getResolution:function(){var zoom=this.map.getZoom();return this.resolutions[zoom];},getExtent:function(){return this.map.calculateBounds();},getZoomForExtent:function(extent){var viewSize=this.map.getSize();var idealResolution=Math.max(extent.getWidth()/viewSize.w,extent.getHeight()/viewSize.h);return this.getZoomForResolution(idealResolution);},getZoomForResolution:function(resolution){for(var i=1;i<this.resolutions.length;i++){if(this.resolutions[i]<resolution){break;}} | |
| 590 | -return(i-1);},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if(viewPortPx!=null){var size=this.map.getSize();var center=this.map.getCenter();if(center){var res=this.map.getResolution();var delta_x=viewPortPx.x-(size.w/2);var delta_y=viewPortPx.y-(size.h/2);lonlat=new OpenLayers.LonLat(center.lon+delta_x*res,center.lat-delta_y*res);}} | |
| 591 | -return lonlat;},getViewPortPxFromLonLat:function(lonlat){var px=null;if(lonlat!=null){var resolution=this.map.getResolution();var extent=this.map.getExtent();px=new OpenLayers.Pixel(Math.round(1/resolution*(lonlat.lon-extent.left)),Math.round(1/resolution*(extent.top-lonlat.lat)));} | |
| 592 | -return px;},adjustBoundsByGutter:function(bounds){var mapGutter=this.gutter*this.map.getResolution();bounds=new OpenLayers.Bounds(bounds.left-mapGutter,bounds.bottom-mapGutter,bounds.right+mapGutter,bounds.top+mapGutter);return bounds;},setOpacity:function(opacity){if(opacity!=this.opacity){this.opacity=opacity;for(var i=0;i<this.div.childNodes.length;++i){var element=this.div.childNodes[i].firstChild;OpenLayers.Util.modifyDOMElement(element,null,null,null,null,null,null,opacity);}}},setZIndex:function(zIdx){this.div.style.zIndex=zIdx;},CLASS_NAME:"OpenLayers.Layer"};OpenLayers.Marker.Box=OpenLayers.Class.create();OpenLayers.Marker.Box.prototype=OpenLayers.Class.inherit(OpenLayers.Marker,{bounds:null,div:null,initialize:function(bounds,borderColor,borderWidth){this.bounds=bounds;this.div=OpenLayers.Util.createDiv();this.div.style.overflow='hidden';this.events=new OpenLayers.Events(this,this.div,null);this.setBorder(borderColor,borderWidth);},destroy:function(){this.bounds=null;this.div=null;OpenLayers.Marker.prototype.destroy.apply(this,arguments);},setBorder:function(color,width){if(!color){color="red";} | |
| 593 | -if(!width){width=2;} | |
| 594 | -this.div.style.border=width+"px solid "+color;},draw:function(px,sz){OpenLayers.Util.modifyDOMElement(this.div,null,px,sz);return this.div;},onScreen:function(){var onScreen=false;if(this.map){var screenBounds=this.map.getExtent();onScreen=screenBounds.containsBounds(this.bounds,true,true);} | |
| 595 | -return onScreen;},display:function(display){this.div.style.display=(display)?"":"none";},CLASS_NAME:"OpenLayers.Marker.Box"});OpenLayers.Control.Navigation=OpenLayers.Class.create();OpenLayers.Control.Navigation.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{dragPan:null,zoomBox:null,wheelHandler:null,activate:function(){this.dragPan.activate();this.wheelHandler.activate();this.zoomBox.activate();return OpenLayers.Control.prototype.activate.apply(this,arguments);},deactivate:function(){this.zoomBox.deactivate();this.dragPan.deactivate();this.wheelHandler.deactivate();return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},draw:function(){this.map.events.register("dblclick",this,this.defaultDblClick);this.dragPan=new OpenLayers.Control.DragPan({map:this.map});this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:OpenLayers.Handler.MOD_SHIFT});this.dragPan.draw();this.zoomBox.draw();this.wheelHandler=new OpenLayers.Handler.MouseWheel(this,{"up":this.wheelUp,"down":this.wheelDown});this.activate();},defaultDblClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},wheelChange:function(evt,deltaZ){var newZoom=this.map.getZoom()+deltaZ;if(!this.map.isValidZoomLevel(newZoom))return;var size=this.map.getSize();var deltaX=size.w/2-evt.xy.x;var deltaY=evt.xy.y-size.h/2;var newRes=this.map.baseLayer.resolutions[newZoom];var zoomPoint=this.map.getLonLatFromPixel(evt.xy);var newCenter=new OpenLayers.LonLat(zoomPoint.lon+deltaX*newRes,zoomPoint.lat+deltaY*newRes);this.map.setCenter(newCenter,newZoom);},wheelUp:function(evt){this.wheelChange(evt,1);},wheelDown:function(evt){this.wheelChange(evt,-1);},CLASS_NAME:"OpenLayers.Control.Navigation"});OpenLayers.State={UNKNOWN:'Unknown',INSERT:'Insert',UPDATE:'Update',DELETE:'Delete'} | |
| 596 | -OpenLayers.Feature.Vector=OpenLayers.Class.create();OpenLayers.Feature.Vector.prototype=OpenLayers.Class.inherit(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,state:null,style:null,initialize:function(geometry,data,style){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,data]);this.lonlat=null;this.geometry=geometry;this.state=null;this.attributes=new Object();if(data){this.attributes=OpenLayers.Util.extend(this.attributes,data);} | |
| 597 | -this.style=style?style:null;},destroy:function(){if(this.layer){this.layer.removeFeatures(this);this.layer=null;} | |
| 598 | -this.geometry=null;OpenLayers.Feature.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Feature(null,this.geometry.clone(),this.data);} | |
| 599 | -OpenLayers.Util.applyDefaults(obj,this);return obj;},onScreen:function(){return null;},createMarker:function(){return null;},destroyMarker:function(){},createPopup:function(){return null;},atPoint:function(lonlat,toleranceLon,toleranceLat){var atPoint=false;if(this.geometry){atPoint=this.geometry.atPoint(lonlat,toleranceLon,toleranceLat);} | |
| 600 | -return atPoint;},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,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,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,strokeWidth:4,hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted"}};OpenLayers.Feature.WFS=OpenLayers.Class.create();OpenLayers.Feature.WFS.prototype=OpenLayers.Class.inherit(OpenLayers.Feature,{initialize:function(layer,xmlNode){var newArguments=arguments;var data=this.processXMLNode(xmlNode);newArguments=new Array(layer,data.lonlat,data) | |
| 601 | -OpenLayers.Feature.prototype.initialize.apply(this,newArguments);this.createMarker();this.layer.addMarker(this.marker);},destroy:function(){if(this.marker!=null){this.layer.removeMarker(this.marker);} | |
| 602 | -OpenLayers.Feature.prototype.destroy.apply(this,arguments);},processXMLNode:function(xmlNode){var point=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,"http://www.opengis.net/gml","gml","Point");var text=OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(point[0],"http://www.opengis.net/gml","gml","coordinates")[0]);var floats=text.split(",");return{lonlat:new OpenLayers.LonLat(parseFloat(floats[0]),parseFloat(floats[1])),id:null};},CLASS_NAME:"OpenLayers.Feature.WFS"});OpenLayers.Layer.Canvas=OpenLayers.Class.create();OpenLayers.Layer.Canvas.prototype=OpenLayers.Class.inherit(OpenLayers.Layer,{isBaseLayer:false,isFixed:true,canvas:null,lines:new Array(),initialize:function(name,options){OpenLayers.Layer.prototype.initialize.apply(this,arguments);},destroy:function(){canvas=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);this.redraw();},setStrokeColor:function(color){var ctx=this.canvas.getContext("2d");ctx.strokeStyle=color;},setStrokeWidth:function(width){var ctx=this.canvas.getContext("2d");ctx.lineWidth=width;},setAlpha:function(alpha){var ctx=this.canvas.getContext("2d");ctx.globalAlpha=alpha;},clearCanvas:function(){if(this.canvas!=null){this.canvas.getContext("2d").clearRect(0,0,this.map.getSize().w,this.map.getSize().h);}},drawLine:function(start,end){var ctx=this.canvas.getContext("2d");this.addLine(start,end);this.lines.push(new Array(start,end,ctx.strokeStyle,ctx.lineWidth,ctx.globalAlpha));},addLine:function(start,end){var ctx=this.canvas.getContext("2d");var startpx=this.map.getPixelFromLonLat(start);var endpx=this.map.getPixelFromLonLat(end);ctx.beginPath();ctx.moveTo(startpx.x,startpx.y);ctx.lineTo(endpx.x,endpx.y);ctx.closePath();ctx.stroke();},redraw:function(){if(!this.canvas){this.canvas=document.createElement("CANVAS");this.canvas.setAttribute("width",this.map.getSize().w);this.canvas.setAttribute("height",this.map.getSize().h);this.div.appendChild(this.canvas);}else{this.clearCanvas();} | |
| 603 | -for(var i=0;i<this.lines.length;i++){this.setStrokeColor(this.lines[i][2]);this.setStrokeWidth(this.lines[i][3]);this.setAlpha(this.lines[i][4]);this.addLine(this.lines[i][0],this.lines[i][1]);}},CLASS_NAME:"OpenLayers.Layer.Canvas"});OpenLayers.Layer.EventPane=OpenLayers.Class.create();OpenLayers.Layer.EventPane.prototype=OpenLayers.Class.inherit(OpenLayers.Layer,{isBaseLayer:true,isFixed:true,pane:null,mapObject:null,initialize:function(name,options){OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(this.pane==null){this.pane=OpenLayers.Util.createDiv(this.div.id+"_EventPane");}},destroy:function(){this.mapObject=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Layer.prototype.setMap.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;this.pane.style.display=this.div.style.display;this.pane.style.width="100%";this.pane.style.height="100%";if(/MSIE/.test(navigator.userAgent)){this.pane.style.background="url("+OpenLayers.Util.getImagesLocation()+"blank.gif)";} | |
| 604 | -if(this.isFixed){this.map.viewPortDiv.appendChild(this.pane);}else{this.map.layerContainerDiv.appendChild(this.pane);} | |
| 605 | -this.loadMapObject();if(this.mapObject==null){this.loadWarningMessage();}},loadWarningMessage:function(){this.div.style.backgroundColor="darkblue";var viewSize=this.map.getSize();msgW=Math.min(viewSize.w,300);msgH=Math.min(viewSize.h,200);var size=new OpenLayers.Size(msgW,msgH);var centerPx=new OpenLayers.Pixel(viewSize.w/2,viewSize.h/2);var topLeft=centerPx.add(-size.w/2,-size.h/2);var div=OpenLayers.Util.createDiv(this.name+"_warning",topLeft,size,null,null,null,"auto");div.style.padding="7px";div.style.backgroundColor="yellow";div.innerHTML=this.getWarningHTML();this.div.appendChild(div);},display:function(display){OpenLayers.Layer.prototype.display.apply(this,arguments);this.pane.style.display=this.div.style.display;},setZIndex:function(zIndex){OpenLayers.Layer.prototype.setZIndex.apply(this,arguments);this.pane.style.zIndex=parseInt(this.div.style.zIndex)+1;},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(this.mapObject!=null){var newCenter=this.map.getCenter();var newZoom=this.map.getZoom();if(newCenter!=null){var moOldCenter=this.getMapObjectCenter();var oldCenter=this.getOLLonLatFromMapObjectLonLat(moOldCenter);var moOldZoom=this.getMapObjectZoom();var oldZoom=this.getOLZoomFromMapObjectZoom(moOldZoom);if(!(newCenter.equals(oldCenter))||!(newZoom==oldZoom)){var center=this.getMapObjectLonLatFromOLLonLat(newCenter);var zoom=this.getMapObjectZoomFromOLZoom(newZoom);this.setMapObjectCenter(center,zoom);}}}},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var moPixel=this.getMapObjectPixelFromOLPixel(viewPortPx);var moLonLat=this.getMapObjectLonLatFromMapObjectPixel(moPixel) | |
| 606 | -lonlat=this.getOLLonLatFromMapObjectLonLat(moLonLat);} | |
| 607 | -return lonlat;},getViewPortPxFromLonLat:function(lonlat){var viewPortPx=null;if((this.mapObject!=null)&&(this.getMapObjectCenter()!=null)){var moLonLat=this.getMapObjectLonLatFromOLLonLat(lonlat);var moPixel=this.getMapObjectPixelFromMapObjectLonLat(moLonLat) | |
| 608 | -viewPortPx=this.getOLPixelFromMapObjectPixel(moPixel);} | |
| 609 | -return viewPortPx;},getOLLonLatFromMapObjectLonLat:function(moLonLat){var olLonLat=null;if(moLonLat!=null){var lon=this.getLongitudeFromMapObjectLonLat(moLonLat);var lat=this.getLatitudeFromMapObjectLonLat(moLonLat);olLonLat=new OpenLayers.LonLat(lon,lat);} | |
| 610 | -return olLonLat;},getMapObjectLonLatFromOLLonLat:function(olLonLat){var moLatLng=null;if(olLonLat!=null){moLatLng=this.getMapObjectLonLatFromLonLat(olLonLat.lon,olLonLat.lat);} | |
| 611 | -return moLatLng;},getOLPixelFromMapObjectPixel:function(moPixel){var olPixel=null;if(moPixel!=null){var x=this.getXFromMapObjectPixel(moPixel);var y=this.getYFromMapObjectPixel(moPixel);olPixel=new OpenLayers.Pixel(x,y);} | |
| 612 | -return olPixel;},getMapObjectPixelFromOLPixel:function(olPixel){var moPixel=null;if(olPixel!=null){moPixel=this.getMapObjectPixelFromXY(olPixel.x,olPixel.y);} | |
| 613 | -return moPixel;},CLASS_NAME:"OpenLayers.Layer.EventPane"});OpenLayers.Layer.FixedZoomLevels=OpenLayers.Class.create();OpenLayers.Layer.FixedZoomLevels.prototype={initialize:function(){},initResolutions:function(){var props=new Array('minZoomLevel','maxZoomLevel','numZoomLevels');for(var i=0;i<props.length;i++){var property=props[i];this[property]=(this.options[property]!=null)?this.options[property]:this.map[property];} | |
| 614 | -if((this.minZoomLevel==null)||(this.minZoomLevel<this.MIN_ZOOM_LEVEL)){this.minZoomLevel=this.MIN_ZOOM_LEVEL;} | |
| 615 | -var limitZoomLevels=this.MAX_ZOOM_LEVEL-this.minZoomLevel+1;if(this.numZoomLevels!=null){this.numZoomLevels=Math.min(this.numZoomLevels,limitZoomLevels);}else{if(this.maxZoomLevel!=null){var zoomDiff=this.maxZoomLevel-this.minZoomLevel+1;this.numZoomLevels=Math.min(zoomDiff,limitZoomLevels);}else{this.numZoomLevels=limitZoomLevels;}} | |
| 616 | -this.maxZoomLevel=this.minZoomLevel+this.numZoomLevels-1;if(this.RESOLUTIONS!=null){var resolutionsIndex=0;this.resolutions=[];for(var i=this.minZoomLevel;i<this.numZoomLevels;i++){this.resolutions[resolutionsIndex++]=this.RESOLUTIONS[i];}}},getResolution:function(){if(this.resolutions!=null){return OpenLayers.Layer.prototype.getResolution.apply(this,arguments);}else{var resolution=null;var viewSize=this.map.getSize();var extent=this.getExtent();if((viewSize!=null)&&(extent!=null)){resolution=Math.max(extent.getWidth()/viewSize.w,extent.getHeight()/viewSize.h);} | |
| 617 | -return resolution;}},getExtent:function(){var extent=null;var size=this.map.getSize();var tlPx=new OpenLayers.Pixel(0,0);var tlLL=this.getLonLatFromViewPortPx(tlPx);var brPx=new OpenLayers.Pixel(size.w,size.h);var brLL=this.getLonLatFromViewPortPx(brPx);if((tlLL!=null)&&(brLL!=null)){extent=new OpenLayers.Bounds(tlLL.lon,brLL.lat,brLL.lon,tlLL.lat);} | |
| 618 | -return extent;},getZoomForResolution:function(resolution){if(this.resolutions!=null){return OpenLayers.Layer.prototype.getZoomForResolution.apply(this,arguments);}else{var extent=OpenLayers.Layer.prototype.getExtent.apply(this,[resolution]);return this.getZoomForExtent(extent);}},getOLZoomFromMapObjectZoom:function(moZoom){var zoom=null;if(moZoom!=null){zoom=moZoom-this.minZoomLevel;} | |
| 619 | -return zoom;},getMapObjectZoomFromOLZoom:function(olZoom){var zoom=null;if(olZoom!=null){zoom=olZoom+this.minZoomLevel;} | |
| 620 | -return zoom;},CLASS_NAME:"FixedZoomLevels.js"};OpenLayers.Layer.HTTPRequest=OpenLayers.Class.create();OpenLayers.Layer.HTTPRequest.prototype=OpenLayers.Class.inherit(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:false,initialize:function(name,url,params,options){var newArguments=arguments;newArguments=[name,options];OpenLayers.Layer.prototype.initialize.apply(this,newArguments);this.url=url;this.params=OpenLayers.Util.extend(new Object(),params);},destroy:function(){this.url=null;this.params=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.options);} | |
| 621 | -obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);return obj;},setUrl:function(newUrl){this.url=newUrl;},mergeNewParams:function(newParams){this.params=OpenLayers.Util.extend(this.params,newParams);},selectUrl:function(paramString,urls){var product=1;for(var i=0;i<paramString.length;i++){product*=paramString.charCodeAt(i)*this.URL_HASH_FACTOR;product-=Math.floor(product);} | |
| 622 | -return urls[Math.floor(product*urls.length)];},getFullRequestString:function(newParams,altUrl){var url=altUrl||this.url;var allParams=OpenLayers.Util.extend(new Object(),this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var paramsString=OpenLayers.Util.getParameterString(allParams);if(url instanceof Array){url=this.selectUrl(paramsString,url);} | |
| 623 | -var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getArgs(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}} | |
| 624 | -paramsString=OpenLayers.Util.getParameterString(allParams);var requestString=url;if(paramsString!=""){var lastServerChar=url.charAt(url.length-1);if((lastServerChar=="&")||(lastServerChar=="?")){requestString+=paramsString;}else{if(url.indexOf('?')==-1){requestString+='?'+paramsString;}else{requestString+='&'+paramsString;}}} | |
| 625 | -return requestString;},CLASS_NAME:"OpenLayers.Layer.HTTPRequest"});OpenLayers.Layer.Image=OpenLayers.Class.create();OpenLayers.Layer.Image.prototype=OpenLayers.Class.inherit(OpenLayers.Layer,{isBaseLayer:true,url:null,extent:null,size:null,tile:null,aspectRatio:null,initialize:function(name,url,extent,size,options){this.url=url;this.extent=extent;this.size=size;OpenLayers.Layer.prototype.initialize.apply(this,[name,options]);this.aspectRatio=(this.extent.getHeight()/this.size.h)/(this.extent.getWidth()/this.size.w);},destroy:function(){this.tile.destroy();this.tile=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Image(this.name,this.url,this.extent,this.size,this.options);} | |
| 626 | -obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);return obj;},setMap:function(map){if(this.options.maxResolution==null){this.options.maxResolution=this.aspectRatio*this.extent.getWidth()/this.size.w;} | |
| 627 | -OpenLayers.Layer.prototype.setMap.apply(this,arguments);},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var firstRendering=(this.tile==null);if(zoomChanged||firstRendering){this.setTileSize();var ul=new OpenLayers.LonLat(this.extent.left,this.extent.top);var ulPx=this.map.getLayerPxFromLonLat(ul);if(firstRendering){this.tile=new OpenLayers.Tile.Image(this,ulPx,this.extent,this.url,this.tileSize);}else{this.tile.size=this.tileSize.clone();this.tile.position=ulPx.clone();} | |
| 628 | -this.tile.draw();}},setTileSize:function(){var tileWidth=this.extent.getWidth()/this.map.getResolution();var tileHeight=this.extent.getHeight()/this.map.getResolution();this.tileSize=new OpenLayers.Size(tileWidth,tileHeight);this.imageSize=this.tileSize;this.imageOffset=new OpenLayers.Pixel(0,0);},setUrl:function(newUrl){this.url=newUrl;this.draw();},getURL:function(bounds){return this.url;},CLASS_NAME:"OpenLayers.Layer.Image"});OpenLayers.Layer.Markers=OpenLayers.Class.create();OpenLayers.Layer.Markers.prototype=OpenLayers.Class.inherit(OpenLayers.Layer,{isBaseLayer:false,markers:null,drawn:false,initialize:function(name,options){OpenLayers.Layer.prototype.initialize.apply(this,arguments);this.markers=new Array();},destroy:function(){this.clearMarkers();markers=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(zoomChanged||!this.drawn){this.redraw();this.drawn=true;}},addMarker:function(marker){this.markers.push(marker);if(this.map&&this.map.getExtent()){marker.map=this.map;this.drawMarker(marker);}},removeMarker:function(marker){OpenLayers.Util.removeItem(this.markers,marker);if((marker.icon!=null)&&(marker.icon.imageDiv!=null)&&(marker.icon.imageDiv.parentNode==this.div)){this.div.removeChild(marker.icon.imageDiv);}},clearMarkers:function(){if(this.markers!=null){while(this.markers.length>0){this.removeMarker(this.markers[0]);}}},redraw:function(){for(i=0;i<this.markers.length;i++){this.drawMarker(this.markers[i]);}},drawMarker:function(marker){var px=this.map.getLayerPxFromLonLat(marker.lonlat);if(px==null){marker.display(false);}else{var markerImg=marker.draw(px);if(!marker.drawn){this.div.appendChild(markerImg);marker.drawn=true;}}},CLASS_NAME:"OpenLayers.Layer.Markers"});OpenLayers.Control.DrawFeature=OpenLayers.Class.create();OpenLayers.Control.DrawFeature.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{layer:null,callbacks:null,featureAdded:function(){},handlerOptions:null,initialize:function(layer,handler,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.callbacks=OpenLayers.Util.extend({done:this.drawFeature},this.callbacks);this.layer=layer;this.handler=new handler(this,this.callbacks,this.handlerOptions);},drawFeature:function(geometry){var feature=new OpenLayers.Feature.Vector(geometry);this.layer.addFeatures([feature]);this.featureAdded(feature);},CLASS_NAME:"OpenLayers.Control.DrawFeature"});OpenLayers.Control.NavToolbar=OpenLayers.Class.create();OpenLayers.Control.NavToolbar.prototype=OpenLayers.Class.inherit(OpenLayers.Control.Panel,{initialize:function(options){OpenLayers.Control.Panel.prototype.initialize.apply(this,arguments);this.addControls([new OpenLayers.Control.Navigation(),new OpenLayers.Control.ZoomBox()]);},draw:function(){var div=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return div;},CLASS_NAME:"OpenLayers.Control.NavToolbar"});OpenLayers.Control.SelectFeature=OpenLayers.Class.create();OpenLayers.Control.SelectFeature.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{multiple:false,hover:false,onSelect:function(){},onUnselect:function(){},layer:null,callbacks:null,selectStyle:OpenLayers.Feature.Vector.style['select'],handler:null,initialize:function(layer,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.callbacks=OpenLayers.Util.extend({down:this.downFeature,over:this.overFeature,out:this.outFeature},this.callbacks);this.layer=layer;this.handler=new OpenLayers.Handler.Feature(this,layer,this.callbacks);},downFeature:function(feature){if(this.hover){return;} | |
| 629 | -if(this.multiple){if(OpenLayers.Util.indexOf(this.layer.selectedFeatures,feature)>-1){this.unselect(feature);}else{this.select(feature);}}else{if(OpenLayers.Util.indexOf(this.layer.selectedFeatures,feature)>-1){this.unselect(feature);}else{if(this.layer.selectedFeatures){for(var i=0;i<this.layer.selectedFeatures.length;i++){this.unselect(this.layer.selectedFeatures[i]);}} | |
| 630 | -this.select(feature);}}},overFeature:function(feature){if(!this.hover){return;} | |
| 631 | -if(!(OpenLayers.Util.indexOf(this.layer.selectedFeatures,feature)>-1)){this.select(feature);}},outFeature:function(feature){if(!this.hover){return;} | |
| 632 | -this.unselect(feature);},select:function(feature){if(feature.originalStyle==null){feature.originalStyle=feature.style;} | |
| 633 | -this.layer.selectedFeatures.push(feature);this.layer.drawFeature(feature,this.selectStyle);this.onSelect(feature);},unselect:function(feature){if(feature.originalStyle==null){feature.originalStyle=feature.style;} | |
| 634 | -this.layer.drawFeature(feature,feature.originalStyle);OpenLayers.Util.removeItem(this.layer.selectedFeatures,feature);this.onUnselect(feature);},setMap:function(map){this.handler.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Format.KML=OpenLayers.Class.create();OpenLayers.Format.KML.prototype=OpenLayers.Class.inherit(OpenLayers.Format,{featureNS:"http://mapserver.gis.umn.edu/mapserver",collectionName:"FeatureCollection",kmlns:"http://earth.google.com/kml/2.0",read:function(data){if(typeof data=="string"){data=OpenLayers.parseXMLString(data);} | |
| 635 | -var featureNodes=OpenLayers.Ajax.getElementsByTagNameNS(data,this.kmlns,"","Placemark");var features=[];for(var i=0;i<featureNodes.length;i++){var feature=this.parseFeature(featureNodes[i]);if(feature){features.push(feature);}} | |
| 636 | -return features;},parseFeature:function(xmlNode){var geom;var p;var feature=new OpenLayers.Feature.Vector();if(OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.kmlns,"","Point").length!=0){var point=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.kmlns,"","Point")[0];p=this.parseCoords(point);if(p.points){geom=p.points[0];geom.extendBounds(p.bounds);}}else if(OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.kmlns,"","LineString").length!=0){var linestring=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.kmlns,"","LineString")[0];p=this.parseCoords(linestring);if(p.points){geom=new OpenLayers.Geometry.LineString(p.points);geom.extendBounds(p.bounds);}} | |
| 637 | -feature.geometry=geom;feature.attributes=this.parseAttributes(xmlNode);return feature;},parseAttributes:function(xmlNode){var nodes=xmlNode.childNodes;var attributes={};for(var i=0;i<nodes.length;i++){var name=nodes[i].nodeName;var value=OpenLayers.Util.getXmlNodeValue(nodes[i]);if((name.search(":pos")!=-1)||(name.search(":posList")!=-1)||(name.search(":coordinates")!=-1)){continue;} | |
| 638 | -if((nodes[i].childNodes.length==1&&nodes[i].childNodes[0].nodeName=="#text")||(nodes[i].childNodes.length==0&&nodes[i].nodeName!="#text")){attributes[name]=value;} | |
| 639 | -OpenLayers.Util.extend(attributes,this.parseAttributes(nodes[i]))} | |
| 640 | -return attributes;},parseCoords:function(xmlNode){var p=[];p.points=[];var coordNodes=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.kmlns,"","coordinates")[0];var coordString=OpenLayers.Util.getXmlNodeValue(coordNodes);var firstCoord=coordString.split(" ");while(firstCoord[0]=="") | |
| 641 | -firstCoord.shift();var dim=firstCoord[0].split(",").length;var nums=(coordString)?coordString.split(/[, \n\t]+/):[];while(nums[0]=="") | |
| 642 | -nums.shift();while(nums[nums.length-1]=="") | |
| 643 | -nums.pop();for(i=0;i<nums.length;i=i+dim){x=parseFloat(nums[i]);y=parseFloat(nums[i+1]);p.points.push(new OpenLayers.Geometry.Point(x,y));if(!p.bounds){p.bounds=new OpenLayers.Bounds(x,y,x,y);}else{p.bounds.extend(x,y);}} | |
| 644 | -return p;},CLASS_NAME:"OpenLayers.Format.KML"});OpenLayers.Geometry=OpenLayers.Class.create();OpenLayers.Geometry.prototype={id:null,parent:null,bounds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){this.id=null;this.bounds=null;},setBounds:function(bounds){if(bounds){this.bounds=bounds.clone();}},clearBounds:function(){this.bounds=null;if(this.parent){this.parent.clearBounds();}},extendBounds:function(newBounds){var bounds=this.getBounds();if(!bounds){this.setBounds(newBounds);}else{this.bounds.extend(newBounds);}},getBounds:function(){if(this.bounds==null){this.calculateBounds();} | |
| 645 | -return this.bounds;},calculateBounds:function(){},atPoint:function(lonlat,toleranceLon,toleranceLat){var atPoint=false;var bounds=this.getBounds();if((bounds!=null)&&(lonlat!=null)){var dX=(toleranceLon!=null)?toleranceLon:0;var dY=(toleranceLat!=null)?toleranceLat:0;var toleranceBounds=new OpenLayers.Bounds(this.bounds.left-dX,this.bounds.bottom-dY,this.bounds.right+dX,this.bounds.top+dY);atPoint=toleranceBounds.containsLonLat(lonlat);} | |
| 646 | -return atPoint;},getLength:function(){return 0.0;},getArea:function(){return 0.0;},toString:function(){return OpenLayers.Format.WKT.prototype.write(new OpenLayers.Feature.Vector(this));},CLASS_NAME:"OpenLayers.Geometry"};OpenLayers.Layer.Boxes=OpenLayers.Class.create();OpenLayers.Layer.Boxes.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Markers,{initialize:function(name,options){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments);},drawMarker:function(marker){var bounds=marker.bounds;var topleft=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(bounds.left,bounds.top));var botright=this.map.getLayerPxFromLonLat(new OpenLayers.LonLat(bounds.right,bounds.bottom));if(botright==null||topleft==null){marker.display(false);}else{var sz=new OpenLayers.Size(Math.max(1,botright.x-topleft.x),Math.max(1,botright.y-topleft.y));var markerDiv=marker.draw(topleft,sz);if(!marker.drawn){this.div.appendChild(markerDiv);marker.drawn=true;}}},removeMarker:function(marker){OpenLayers.Util.removeItem(this.markers,marker);if((marker.div!=null)&&(marker.div.parentNode==this.div)){this.div.removeChild(marker.div);}},CLASS_NAME:"OpenLayers.Layer.Boxes"});OpenLayers.Layer.GeoRSS=OpenLayers.Class.create();OpenLayers.Layer.GeoRSS.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Markers,{location:null,features:null,selectedFeature:null,initialize:function(name,location){OpenLayers.Layer.Markers.prototype.initialize.apply(this,[name]);this.location=location;this.features=new Array();OpenLayers.loadURL(location,null,this,this.parseData);},destroy:function(){this.clearFeatures();this.features=null;OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);},parseData:function(ajaxRequest){var doc=ajaxRequest.responseXML;if(!doc||ajaxRequest.fileType!="XML"){doc=OpenLayers.parseXMLString(ajaxRequest.responseText);} | |
| 647 | -this.name=null;try{this.name=doc.getElementsByTagNameNS('*','title')[0].firstChild.nodeValue;} | |
| 648 | -catch(e){this.name=doc.getElementsByTagName('title')[0].firstChild.nodeValue;} | |
| 649 | -var itemlist=null;try{itemlist=doc.getElementsByTagNameNS('*','item');} | |
| 650 | -catch(e){itemlist=doc.getElementsByTagName('item');} | |
| 651 | -if(itemlist.length==0){try{itemlist=doc.getElementsByTagNameNS('*','entry');} | |
| 652 | -catch(e){itemlist=doc.getElementsByTagName('entry');}} | |
| 653 | -for(var i=0;i<itemlist.length;i++){var data={};var point=OpenLayers.Util.getNodes(itemlist[i],'georss:point');var lat=OpenLayers.Util.getNodes(itemlist[i],'geo:lat');var lon=OpenLayers.Util.getNodes(itemlist[i],'geo:long');if(point.length>0){var location=point[0].firstChild.nodeValue.split(" ");if(location.length!=2){var location=point[0].firstChild.nodeValue.split(",");}}else if(lat.length>0&&lon.length>0){var location=[parseFloat(lat[0].firstChild.nodeValue),parseFloat(lon[0].firstChild.nodeValue)];}else{continue;} | |
| 654 | -location=new OpenLayers.LonLat(parseFloat(location[1]),parseFloat(location[0]));var title="Untitled";try{title=OpenLayers.Util.getNodes(itemlist[i],"title")[0].firstChild.nodeValue;} | |
| 655 | -catch(e){title="Untitled";} | |
| 656 | -var descr_nodes=null;try{descr_nodes=itemlist[i].getElementsByTagNameNS("*","description");} | |
| 657 | -catch(e){descr_nodes=itemlist[i].getElementsByTagName("description");} | |
| 658 | -if(descr_nodes.length==0){try{descr_nodes=itemlist[i].getElementsByTagNameNS("*","summary");} | |
| 659 | -catch(e){descr_nodes=itemlist[i].getElementsByTagName("summary");}} | |
| 660 | -var description="No description.";try{description=descr_nodes[0].firstChild.nodeValue;} | |
| 661 | -catch(e){description="No description.";} | |
| 662 | -try{var link=OpenLayers.Util.getNodes(itemlist[i],"link")[0].firstChild.nodeValue;} | |
| 663 | -catch(e){try{var link=OpenLayers.Util.getNodes(itemlist[i],"link")[0].getAttribute("href");} | |
| 664 | -catch(e){}} | |
| 665 | -data.icon=OpenLayers.Marker.defaultIcon();data.popupSize=new OpenLayers.Size(250,120);if((title!=null)&&(description!=null)){contentHTML='<div class="olLayerGeoRSSClose">[x]</div>';contentHTML+='<div class="olLayerGeoRSSTitle">';if(link)contentHTML+='<a class="link" href="'+link+'" target="_blank">';contentHTML+=title;if(link)contentHTML+='</a>';contentHTML+='</div>';contentHTML+='<div style="" class="olLayerGeoRSSDescription">';contentHTML+=description;contentHTML+='</div>';data['popupContentHTML']=contentHTML;} | |
| 666 | -var feature=new OpenLayers.Feature(this,location,data);this.features.push(feature);var marker=feature.createMarker();marker.events.register('click',feature,this.markerClick);this.addMarker(marker);}},markerClick:function(evt){sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0;i<this.layer.map.popups.length;i++){this.layer.map.removePopup(this.layer.map.popups[i]);} | |
| 667 | -if(!sameMarkerClicked){var popup=this.createPopup();OpenLayers.Event.observe(popup.div,"click",function(){for(var i=0;i<this.layer.map.popups.length;i++){this.layer.map.removePopup(this.layer.map.popups[i]);}}.bindAsEventListener(this));this.layer.map.addPopup(popup);} | |
| 668 | -OpenLayers.Event.stop(evt);},clearFeatures:function(){if(this.features!=null){while(this.features.length>0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.GeoRSS"});OpenLayers.Layer.Google=OpenLayers.Class.create();OpenLayers.Layer.Google.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:19,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,.00002145767211914062,.00001072883605957031,.00000536441802978515,.00000268220901489257],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.addContainerPxFunction();},loadMapObject:function(){try{this.mapObject=new GMap2(this.div);var poweredBy=this.div.lastChild;this.div.removeChild(poweredBy);this.pane.appendChild(poweredBy);poweredBy.className="olLayerGooglePoweredBy gmnoprint";poweredBy.style.left="";poweredBy.style.bottom="";var termsOfUse=this.div.lastChild;this.div.removeChild(termsOfUse);this.pane.appendChild(termsOfUse);termsOfUse.className="olLayerGoogleCopyright";termsOfUse.style.right="";termsOfUse.style.bottom="";}catch(e){}},setMap:function(map){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);if(this.type!=null){this.map.events.register("moveend",this,this.setMapType);}},setMapType:function(){if(this.mapObject.getCenter()!=null){this.mapObject.setMapType(this.type);this.map.events.unregister("moveend",this,this.setMapType);}},onMapResize:function(){this.mapObject.checkResize();},getOLBoundsFromMapObjectBounds:function(moBounds){var olBounds=null;if(moBounds!=null){var sw=moBounds.getSouthWest();var ne=moBounds.getNorthEast();olBounds=new OpenLayers.Bounds(sw.lng(),sw.lat(),ne.lng(),ne.lat());} | |
| 669 | -return olBounds;},getMapObjectBoundsFromOLBounds:function(olBounds){var moBounds=null;if(olBounds!=null){var sw=new GLatLng(olBounds.bottom,olBounds.left);var ne=new GLatLng(olBounds.top,olBounds.right);moBounds=new GLatLngBounds(sw,ne);} | |
| 670 | -return moBounds;},addContainerPxFunction:function(){if(typeof GMap2!="undefined"&&!GMap2.fromLatLngToContainerPixel){GMap2.prototype.fromLatLngToContainerPixel=function(gLatLng){var gPoint=this.fromLatLngToDivPixel(gLatLng);var div=this.b.firstChild.firstChild;gPoint.x+=div.offsetLeft;gPoint.y+=div.offsetTop;return gPoint;};}},getWarningHTML:function(){var html="";html+="The Google Layer was unable to load correctly.<br>";html+="<br>";html+="To get rid of this message, select a new BaseLayer " | |
| 671 | -html+="in the layer switcher in the upper-right corner.<br>";html+="<br>";html+="Most likely, this is because the Google Maps library";html+=" script was either not included, or does not contain the";html+=" correct API key for your site.<br>";html+="<br>";html+="Developers: For help getting this working correctly, ";html+="<a href='http://trac.openlayers.org/wiki/Google' " | |
| 672 | -html+="target='_blank'>";html+="click here";html+="</a>";return html;},setMapObjectCenter:function(center,zoom){this.mapObject.setCenter(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCenter();},getMapObjectZoom:function(){return this.mapObject.getZoom();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){return this.mapObject.fromContainerPixelToLatLng(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.fromLatLngToContainerPixel(moLonLat);},getMapObjectZoomFromMapObjectBounds:function(moBounds){return this.mapObject.getBoundsZoomLevel(moBounds);},getLongitudeFromMapObjectLonLat:function(moLonLat){return moLonLat.lng();},getLatitudeFromMapObjectLonLat:function(moLonLat){return moLonLat.lat();},getMapObjectLonLatFromLonLat:function(lon,lat){return new GLatLng(lat,lon);},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},getMapObjectPixelFromXY:function(x,y){return new GPoint(x,y);},CLASS_NAME:"OpenLayers.Layer.Google"});OpenLayers.Layer.Grid=OpenLayers.Class.create();OpenLayers.Layer.Grid.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.HTTPRequest,{tileSize:null,grid:null,buffer:2,initialize:function(name,url,params,options){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.grid=new Array();},destroy:function(){this.clearGrid();this.grid=null;this.tileSize=null;OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments);},clearGrid:function(){if(this.grid){for(var iRow=0;iRow<this.grid.length;iRow++){var row=this.grid[iRow];for(var iCol=0;iCol<row.length;iCol++){row[iCol].destroy();}} | |
| 673 | -this.grid=[];}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.options);} | |
| 674 | -obj=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[obj]);if(this.tileSize!=null){obj.tileSize=this.tileSize.clone();} | |
| 675 | -obj.grid=new Array();return obj;},setMap:function(map){OpenLayers.Layer.HTTPRequest.prototype.setMap.apply(this,arguments);if(this.tileSize==null){this.tileSize=this.map.getTileSize();}},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);if(bounds==null){bounds=this.map.getExtent();} | |
| 676 | -if(bounds!=null){if(!this.grid.length||zoomChanged||!this.getGridBounds().containsBounds(bounds,true)){this._initTiles();}else{var buffer=(this.buffer)?this.buffer*1.5:1;while(true){var tlLayer=this.grid[0][0].position;var tlViewPort=this.map.getViewPortPxFromLayerPx(tlLayer);if(tlViewPort.x>-this.tileSize.w*(buffer-1)){this.shiftColumn(true);}else if(tlViewPort.x<-this.tileSize.w*buffer){this.shiftColumn(false);}else if(tlViewPort.y>-this.tileSize.h*(buffer-1)){this.shiftRow(true);}else if(tlViewPort.y<-this.tileSize.h*buffer){this.shiftRow(false);}else{break;}};if(this.buffer==0){for(var r=0,rl=this.grid.length;r<rl;r++){var row=this.grid[r];for(var c=0,cl=row.length;c<cl;c++){var tile=row[c];if(!tile.drawn&&tile.bounds.intersectsBounds(bounds,false)){tile.draw();}}}}}}},getGridBounds:function(){var bottom=this.grid.length-1;var bottomLeftTile=this.grid[bottom][0];var right=this.grid[0].length-1;var topRightTile=this.grid[0][right];return new OpenLayers.Bounds(bottomLeftTile.bounds.left,bottomLeftTile.bounds.bottom,topRightTile.bounds.right,topRightTile.bounds.top);},_initTiles:function(){var viewSize=this.map.getSize();var minRows=Math.ceil(viewSize.h/this.tileSize.h)+1;var minCols=Math.ceil(viewSize.w/this.tileSize.w)+1;var bounds=this.map.getExtent();var extent=this.map.getMaxExtent();var resolution=this.map.getResolution();var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left-extent.left;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=extent.left+tilecol*tilelon;var offsetlat=bounds.top-(extent.bottom+tilelat);var tilerow=Math.ceil(offsetlat/tilelat)+this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=-tilerowremain*this.tileSize.h;var tileoffsetlat=extent.bottom+tilerow*tilelat;tileoffsetx=Math.round(tileoffsetx);tileoffsety=Math.round(tileoffsety);this.origin=new OpenLayers.Pixel(tileoffsetx,tileoffsety);var startX=tileoffsetx;var startLon=tileoffsetlon;var rowidx=0;do{var row=this.grid[rowidx++];if(!row){row=new Array();this.grid.push(row);} | |
| 677 | -tileoffsetlon=startLon;tileoffsetx=startX;var colidx=0;do{var tileBounds=new OpenLayers.Bounds(tileoffsetlon,tileoffsetlat,tileoffsetlon+tilelon,tileoffsetlat+tilelat);var x=tileoffsetx;x-=parseInt(this.map.layerContainerDiv.style.left);var y=tileoffsety;y-=parseInt(this.map.layerContainerDiv.style.top);var px=new OpenLayers.Pixel(x,y);var tile=row[colidx++];if(!tile){tile=this.addTile(tileBounds,px);row.push(tile);}else{tile.moveTo(tileBounds,px,false);} | |
| 678 | -tileoffsetlon+=tilelon;tileoffsetx+=this.tileSize.w;}while((tileoffsetlon<=bounds.right+tilelon*this.buffer)||colidx<minCols) | |
| 679 | -tileoffsetlat-=tilelat;tileoffsety+=this.tileSize.h;}while((tileoffsetlat>=bounds.bottom-tilelat*this.buffer)||rowidx<minRows) | |
| 680 | -while(this.grid.length>rowidx){var row=this.grid.pop();for(var i=0,l=row.length;i<l;i++){row[i].destroy();}} | |
| 681 | -while(this.grid[0].length>colidx){for(var i=0,l=this.grid.length;i<l;i++){var row=this.grid[i];var tile=row.pop();tile.destroy();}} | |
| 682 | -this.spiralTileLoad();},spiralTileLoad:function(){var tileQueue=new Array();var directions=["right","down","left","up"];var iRow=0;var iCell=-1;var direction=OpenLayers.Util.indexOf(directions,"right");var directionsTried=0;while(directionsTried<directions.length){var testRow=iRow;var testCell=iCell;switch(directions[direction]){case"right":testCell++;break;case"down":testRow++;break;case"left":testCell--;break;case"up":testRow--;break;} | |
| 683 | -var tile=null;if((testRow<this.grid.length)&&(testRow>=0)&&(testCell<this.grid[0].length)&&(testCell>=0)){tile=this.grid[testRow][testCell];} | |
| 684 | -if((tile!=null)&&(!tile.queued)){tileQueue.unshift(tile);tile.queued=true;directionsTried=0;iRow=testRow;iCell=testCell;}else{direction=(direction+1)%4;directionsTried++;}} | |
| 685 | -for(var i=0;i<tileQueue.length;i++){var tile=tileQueue[i] | |
| 686 | -tile.draw();tile.queued=false;}},addTile:function(bounds,position){},mergeNewParams:function(newArguments){OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,[newArguments]);if(this.map!=null){this._initTiles();}},shiftRow:function(prepend){var modelRowIndex=(prepend)?0:(this.grid.length-1);var modelRow=this.grid[modelRowIndex];var resolution=this.map.getResolution();var deltaY=(prepend)?-this.tileSize.h:this.tileSize.h;var deltaLat=resolution*-deltaY;var row=(prepend)?this.grid.pop():this.grid.shift();for(var i=0;i<modelRow.length;i++){var modelTile=modelRow[i];var bounds=modelTile.bounds.clone();var position=modelTile.position.clone();bounds.bottom=bounds.bottom+deltaLat;bounds.top=bounds.top+deltaLat;position.y=position.y+deltaY;row[i].moveTo(bounds,position);} | |
| 687 | -if(prepend){this.grid.unshift(row);}else{this.grid.push(row);}},shiftColumn:function(prepend){var deltaX=(prepend)?-this.tileSize.w:this.tileSize.w;var resolution=this.map.getResolution();var deltaLon=resolution*deltaX;for(var i=0;i<this.grid.length;i++){var row=this.grid[i];var modelTileIndex=(prepend)?0:(row.length-1);var modelTile=row[modelTileIndex];var bounds=modelTile.bounds.clone();var position=modelTile.position.clone();bounds.left=bounds.left+deltaLon;bounds.right=bounds.right+deltaLon;position.x=position.x+deltaX;var tile=prepend?this.grid[i].pop():this.grid[i].shift() | |
| 688 | -tile.moveTo(bounds,position);if(prepend){this.grid[i].unshift(tile);}else{this.grid[i].push(tile);}}},CLASS_NAME:"OpenLayers.Layer.Grid"});OpenLayers.Layer.MultiMap=OpenLayers.Class.create();OpenLayers.Layer.MultiMap.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[9,1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);},loadMapObject:function(){try{this.mapObject=new MultimapViewer(this.div);}catch(e){}},getWarningHTML:function(){var html="";html+="The MM Layer was unable to load correctly.<br>";html+="<br>";html+="To get rid of this message, select a new BaseLayer " | |
| 689 | -html+="in the layer switcher in the upper-right corner.<br>";html+="<br>";html+="Most likely, this is because the MM library";html+=" script was either not correctly included.<br>";html+="<br>";html+="Demmlopers: For help getting this working correctly, ";html+="<a href='http://trac.openlayers.org/wiki/MultiMap' " | |
| 690 | -html+="target='_blank'>";html+="click here";html+="</a>";return html;},setMapObjectCenter:function(center,zoom){this.mapObject.goToPosition(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCurrentPosition();},getMapObjectZoom:function(){return this.mapObject.getZoomFactor();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){moPixel.x=moPixel.x-(this.map.getSize().w/2);moPixel.y=moPixel.y-(this.map.getSize().h/2);return this.mapObject.getMapPositionAt(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.geoPosToContainerPixels(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return moLonLat.lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return moLonLat.lat;},getMapObjectLonLatFromLonLat:function(lon,lat){return new MMLatLon(lat,lon);},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},getMapObjectPixelFromXY:function(x,y){return new MMPoint(x,y);},CLASS_NAME:"OpenLayers.Layer.MultiMap"});OpenLayers.Layer.Text=OpenLayers.Class.create();OpenLayers.Layer.Text.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Markers,{location:null,features:null,selectedFeature:null,initialize:function(name,options){OpenLayers.Layer.Markers.prototype.initialize.apply(this,arguments);this.features=new Array();if(this.location!=null){OpenLayers.loadURL(this.location,null,this,this.parseData);}},destroy:function(){this.clearFeatures();this.features=null;OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);},parseData:function(ajaxRequest){var text=ajaxRequest.responseText;var lines=text.split('\n');var columns;for(var lcv=0;lcv<(lines.length-1);lcv++){var currLine=lines[lcv].replace(/^\s*/,'').replace(/\s*$/,'');if(currLine.charAt(0)!='#'){if(!columns){columns=currLine.split('\t');}else{var vals=currLine.split('\t');var location=new OpenLayers.LonLat(0,0);var title;var url;var icon,iconSize,iconOffset;var set=false;for(var valIndex=0;valIndex<vals.length;valIndex++){if(vals[valIndex]){if(columns[valIndex]=='point'){var coords=vals[valIndex].split(',');location.lat=parseFloat(coords[0]);location.lon=parseFloat(coords[1]);set=true;}else if(columns[valIndex]=='lat'){location.lat=parseFloat(vals[valIndex]);set=true;}else if(columns[valIndex]=='lon'){location.lon=parseFloat(vals[valIndex]);set=true;}else if(columns[valIndex]=='title') | |
| 691 | -title=vals[valIndex];else if(columns[valIndex]=='image'||columns[valIndex]=='icon') | |
| 692 | -url=vals[valIndex];else if(columns[valIndex]=='iconSize'){var size=vals[valIndex].split(',');iconSize=new OpenLayers.Size(parseFloat(size[0]),parseFloat(size[1]));}else if(columns[valIndex]=='iconOffset'){var offset=vals[valIndex].split(',');iconOffset=new OpenLayers.Pixel(parseFloat(offset[0]),parseFloat(offset[1]));}else if(columns[valIndex]=='title'){title=vals[valIndex];}else if(columns[valIndex]=='description'){description=vals[valIndex];}}} | |
| 693 | -if(set){var data=new Object();if(url!=null){data.icon=new OpenLayers.Icon(url,iconSize,iconOffset);}else{data.icon=OpenLayers.Marker.defaultIcon();if(iconSize!=null){data.icon.setSize(iconSize);}} | |
| 694 | -if((title!=null)&&(description!=null)){data['popupContentHTML']='<h2>'+title+'</h2><p>'+description+'</p>';} | |
| 695 | -var feature=new OpenLayers.Feature(this,location,data);this.features.push(feature);var marker=feature.createMarker();if((title!=null)&&(description!=null)){marker.events.register('click',feature,this.markerClick);} | |
| 696 | -this.addMarker(marker);}}}}},markerClick:function(evt){sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0;i<this.layer.map.popups.length;i++){this.layer.map.removePopup(this.layer.map.popups[i]);} | |
| 697 | -if(!sameMarkerClicked){this.layer.map.addPopup(this.createPopup());} | |
| 698 | -OpenLayers.Event.stop(evt);},clearFeatures:function(){if(this.features!=null){while(this.features.length>0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.Text"});OpenLayers.Layer.Vector=OpenLayers.Class.create();OpenLayers.Layer.Vector.prototype=OpenLayers.Class.inherit(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,options){var defaultStyle=OpenLayers.Feature.Vector.style['default'];this.style=OpenLayers.Util.extend({},defaultStyle);OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(!this.renderer||!this.renderer.supported()){this.assignRenderer();} | |
| 699 | -if(!this.renderer||!this.renderer.supported()){this.renderer=null;this.displayError();} | |
| 700 | -this.features=new Array();this.selectedFeatures=new Array();},destroy:function(){OpenLayers.Layer.prototype.destroy.apply(this,arguments);this.destroyFeatures();this.features=null;this.selectedFeatures=null;if(this.renderer){this.renderer.destroy();} | |
| 701 | -this.renderer=null;this.geometryType=null;this.drawn=null;},assignRenderer:function(){for(var i=0;i<this.renderers.length;i++){var rendererClass=OpenLayers.Renderer[this.renderers[i]];if(rendererClass&&rendererClass.prototype.supported()){this.renderer=new rendererClass(this.div);break;}}},displayError:function(){if(this.reportError){var message="Your browser does not support vector rendering. "+"Currently supported renderers are:\n";message+=this.renderers.join("\n");alert(message);}},setMap:function(map){OpenLayers.Layer.prototype.setMap.apply(this,arguments);if(!this.renderer){this.map.removeLayer(this);}else{this.renderer.map=this.map;this.renderer.setSize(this.map.getSize());}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);this.renderer.setSize(this.map.getSize());},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);if(!dragging){this.div.style.left=-parseInt(this.map.layerContainerDiv.style.left)+"px";this.div.style.top=-parseInt(this.map.layerContainerDiv.style.top)+"px";var extent=this.map.getExtent();this.renderer.setExtent(extent);} | |
| 702 | -if(!this.drawn||zoomChanged){this.drawn=true;for(var i=0;i<this.features.length;i++){var feature=this.features[i];this.drawFeature(feature);}}},addFeatures:function(features){if(!(features instanceof Array)){features=[features];} | |
| 703 | -for(var i=0;i<features.length;i++){var feature=features[i];if(this.geometryType&&!(feature.geometry instanceof this.geometryType)){var throwStr="addFeatures : component should be an "+ | |
| 704 | -this.geometryType.prototype.CLASS_NAME;throw throwStr;} | |
| 705 | -this.features.push(feature);feature.layer=this;if(!feature.style){feature.style=OpenLayers.Util.extend({},this.style);} | |
| 706 | -this.preFeatureInsert(feature);if(this.drawn){this.drawFeature(feature);} | |
| 707 | -this.onFeatureInsert(feature);}},removeFeatures:function(features){if(!(features instanceof Array)){features=[features];} | |
| 708 | -for(var i=features.length-1;i>=0;i--){var feature=features[i];this.features=OpenLayers.Util.removeItem(this.features,feature);if(feature.geometry){this.renderer.eraseGeometry(feature.geometry);} | |
| 709 | -if(OpenLayers.Util.indexOf(this.selectedFeatures,feature)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,feature);}}},destroyFeatures:function(){this.selectedFeatures=new Array();for(var i=this.features.length-1;i>=0;i--){this.features[i].destroy();}},drawFeature:function(feature,style){if(style==null){if(feature.style){style=feature.style;}else{style=this.style;}} | |
| 710 | -this.renderer.drawFeature(feature,style);},eraseFeatures:function(features){this.renderer.eraseFeatures(features);},getFeatureFromEvent:function(evt){var featureId=this.renderer.getFeatureIdFromEvent(evt);return this.getFeatureById(featureId);},getFeatureById:function(featureId){var feature=null;for(var i=0;i<this.features.length;++i){if(this.features[i].id==featureId){feature=this.features[i];break;}} | |
| 711 | -return feature;},onFeatureInsert:function(feature){},preFeatureInsert:function(feature){},CLASS_NAME:"OpenLayers.Layer.Vector"});OpenLayers.Layer.VirtualEarth=OpenLayers.Class.create();OpenLayers.Layer.VirtualEarth.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:1,MAX_ZOOM_LEVEL:17,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);},loadMapObject:function(){var veDiv=OpenLayers.Util.createDiv(this.name);var sz=this.map.getSize();veDiv.style.width=sz.w;veDiv.style.height=sz.h;this.div.appendChild(veDiv);try{this.mapObject=new VEMap(this.name);}catch(e){} | |
| 712 | -if(this.mapObject!=null){try{this.mapObject.LoadMap(null,null,this.type);}catch(e){} | |
| 713 | -this.mapObject.HideDashboard();}},getWarningHTML:function(){var html="";html+="The VE Layer was unable to load correctly.<br>";html+="<br>";html+="To get rid of this message, select a new BaseLayer " | |
| 714 | -html+="in the layer switcher in the upper-right corner.<br>";html+="<br>";html+="Most likely, this is because the VE library";html+=" script was either not correctly included.<br>";html+="<br>";html+="Developers: For help getting this working correctly, ";html+="<a href='http://trac.openlayers.org/wiki/VirtualEarth' " | |
| 715 | -html+="target='_blank'>";html+="click here";html+="</a>";return html;},setMapObjectCenter:function(center,zoom){this.mapObject.SetCenterAndZoom(center,zoom);},getMapObjectCenter:function(){return this.mapObject.GetCenter();},getMapObjectZoom:function(){return this.mapObject.GetZoomLevel();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){return this.mapObject.PixelToLatLong(moPixel.x,moPixel.y);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.LatLongToPixel(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return moLonLat.Longitude;},getLatitudeFromMapObjectLonLat:function(moLonLat){return moLonLat.Latitude;},getMapObjectLonLatFromLonLat:function(lon,lat){return new VELatLong(lat,lon);},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},getMapObjectPixelFromXY:function(x,y){return new Msn.VE.Pixel(x,y);},CLASS_NAME:"OpenLayers.Layer.VirtualEarth"});OpenLayers.Layer.Yahoo=OpenLayers.Class.create();OpenLayers.Layer.Yahoo.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:15,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);},loadMapObject:function(){try{this.mapObject=new YMap(this.div,this.type);}catch(e){}},setMap:function(map){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);this.map.events.register("moveend",this,this.fixYahooEventPane);},fixYahooEventPane:function(){var yahooEventPane=OpenLayers.Util.getElement("ygddfdiv");if(yahooEventPane!=null){if(yahooEventPane.parentNode!=null) | |
| 716 | -yahooEventPane.parentNode.removeChild(yahooEventPane);this.map.events.unregister("moveend",this,this.fixYahooEventPane);}},getWarningHTML:function(){var html="";html+="The Yahoo Layer was unable to load correctly.<br>";html+="<br>";html+="To get rid of this message, select a new BaseLayer " | |
| 717 | -html+="in the layer switcher in the upper-right corner.<br>";html+="<br>";html+="Most likely, this is because the Yahoo library";html+=" script was either not correctly included.<br>";html+="<br>";html+="Developers: For help getting this working correctly, ";html+="<a href='http://trac.openlayers.org/wiki/Yahoo' " | |
| 718 | -html+="target='_blank'>";html+="click here";html+="</a>";return html;},getOLZoomFromMapObjectZoom:function(moZoom){var zoom=null;if(moZoom!=null){zoom=OpenLayers.Layer.FixedZoomLevels.prototype.getOLZoomFromMapObjectZoom.apply(this,[moZoom]);zoom=18-zoom;} | |
| 719 | -return zoom;},getMapObjectZoomFromOLZoom:function(olZoom){var zoom=null;if(olZoom!=null){zoom=OpenLayers.Layer.FixedZoomLevels.prototype.getMapObjectZoomFromOLZoom.apply(this,[olZoom]);zoom=18-zoom;} | |
| 720 | -return zoom;},setMapObjectCenter:function(center,zoom){this.mapObject.drawZoomAndCenter(center,zoom);},getMapObjectCenter:function(){return this.mapObject.getCenterLatLon();},getMapObjectZoom:function(){return this.mapObject.getZoomLevel();},getMapObjectLonLatFromMapObjectPixel:function(moPixel){return this.mapObject.convertXYLatLon(moPixel);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){return this.mapObject.convertLatLonXY(moLonLat);},getLongitudeFromMapObjectLonLat:function(moLonLat){return moLonLat.Lon;},getLatitudeFromMapObjectLonLat:function(moLonLat){return moLonLat.Lat;},getMapObjectLonLatFromLonLat:function(lon,lat){return new YGeoPoint(lat,lon);},getXFromMapObjectPixel:function(moPixel){return moPixel.x;},getYFromMapObjectPixel:function(moPixel){return moPixel.y;},getMapObjectPixelFromXY:function(x,y){return new YCoordPoint(x,y);},CLASS_NAME:"OpenLayers.Layer.Yahoo"});OpenLayers.Control.EditingToolbar=OpenLayers.Class.create();OpenLayers.Control.EditingToolbar.prototype=OpenLayers.Class.inherit(OpenLayers.Control.Panel,{initialize:function(layer,options){OpenLayers.Control.Panel.prototype.initialize.apply(this,[options]);this.addControls([new OpenLayers.Control.Navigation()]);var controls=[new OpenLayers.Control.DrawFeature(layer,OpenLayers.Handler.Point,{'displayClass':'olControlDrawFeaturePoint'}),new OpenLayers.Control.DrawFeature(layer,OpenLayers.Handler.Path,{'displayClass':'olControlDrawFeaturePath'}),new OpenLayers.Control.DrawFeature(layer,OpenLayers.Handler.Polygon,{'displayClass':'olControlDrawFeaturePolygon'})];for(var i=0;i<controls.length;i++){controls[i].featureAdded=function(feature){feature.state=OpenLayers.State.INSERT;}} | |
| 721 | -this.addControls(controls);},draw:function(){var div=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);this.activateControl(this.controls[0]);return div;},CLASS_NAME:"OpenLayers.Control.EditingToolbar"});OpenLayers.Format.GML=OpenLayers.Class.create();OpenLayers.Format.GML.prototype=OpenLayers.Class.inherit(OpenLayers.Format,{featureNS:"http://mapserver.gis.umn.edu/mapserver",featureName:"featureMember",layerName:"features",geometryName:"geometry",collectionName:"FeatureCollection",gmlns:"http://www.opengis.net/gml",extractAttributes:true,read:function(data){if(typeof data=="string"){data=OpenLayers.parseXMLString(data);} | |
| 722 | -var featureNodes=OpenLayers.Ajax.getElementsByTagNameNS(data,this.gmlns,"gml",this.featureName);if(featureNodes.length==0){return[];} | |
| 723 | -var dim;var coordNodes=OpenLayers.Ajax.getElementsByTagNameNS(featureNodes[0],this.gmlns,"gml","posList");if(coordNodes.length==0){coordNodes=OpenLayers.Ajax.getElementsByTagNameNS(featureNodes[0],this.gmlns,"gml","pos");} | |
| 724 | -if(coordNodes.length>0){dim=coordNodes[0].getAttribute("srsDimension");} | |
| 725 | -this.dim=(dim=="3"||dim==3)?3:2;var features=[];for(var i=0;i<featureNodes.length;i++){var feature=this.parseFeature(featureNodes[i]);if(feature){features.push(feature);}} | |
| 726 | -return features;},parseFeature:function(xmlNode){var geom;var p;var feature=new OpenLayers.Feature.Vector();if(OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","MultiPolygon").length!=0){var multipolygon=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","MultiPolygon")[0];feature.fid=multipolygon.parentNode.parentNode.getAttribute('fid');geom=new OpenLayers.Geometry.MultiPolygon();var polygons=OpenLayers.Ajax.getElementsByTagNameNS(multipolygon,this.gmlns,"gml","Polygon");for(var i=0;i<polygons.length;i++){polygon=this.parsePolygonNode(polygons[i],geom);geom.addComponents(polygon);}} | |
| 727 | -else if(OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","MultiLineString").length!=0){var multilinestring=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","MultiLineString")[0];feature.fid=multilinestring.parentNode.parentNode.getAttribute('fid');geom=new OpenLayers.Geometry.MultiLineString();var lineStrings=OpenLayers.Ajax.getElementsByTagNameNS(multilinestring,this.gmlns,"gml","LineString");for(var i=0;i<lineStrings.length;i++){p=this.parseCoords(lineStrings[i]);if(p.points){var lineString=new OpenLayers.Geometry.LineString(p.points);geom.addComponents(lineString);}}} | |
| 728 | -else if(OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","MultiPoint").length!=0){var multiPoint=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","MultiPoint")[0];feature.fid=multiPoint.parentNode.parentNode.getAttribute('fid');geom=new OpenLayers.Geometry.MultiPoint();var points=OpenLayers.Ajax.getElementsByTagNameNS(multiPoint,this.gmlns,"gml","Point");for(var i=0;i<points.length;i++){p=this.parseCoords(points[i]);geom.addComponents(p.points[0]);}} | |
| 729 | -else if(OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","Polygon").length!=0){var polygon=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","Polygon")[0];feature.fid=polygon.parentNode.parentNode.getAttribute('fid');geom=this.parsePolygonNode(polygon);} | |
| 730 | -else if(OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","LineString").length!=0){var lineString=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","LineString")[0];feature.fid=lineString.parentNode.parentNode.getAttribute('fid');p=this.parseCoords(lineString);if(p.points){geom=new OpenLayers.Geometry.LineString(p.points);}} | |
| 731 | -else if(OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","Point").length!=0){var point=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","Point")[0];feature.fid=point.parentNode.parentNode.getAttribute('fid');p=this.parseCoords(point);if(p.points){geom=p.points[0];}} | |
| 732 | -feature.geometry=geom;if(this.extractAttributes){feature.attributes=this.parseAttributes(xmlNode);} | |
| 733 | -return feature;},parseAttributes:function(xmlNode){var nodes=xmlNode.childNodes;var attributes={};for(var i=0;i<nodes.length;i++){var name=nodes[i].nodeName;var value=OpenLayers.Util.getXmlNodeValue(nodes[i]);if((name.search(":pos")!=-1)||(name.search(":posList")!=-1)||(name.search(":coordinates")!=-1)){continue;} | |
| 734 | -if((nodes[i].childNodes.length==1&&nodes[i].childNodes[0].nodeName=="#text")||(nodes[i].childNodes.length==0&&nodes[i].nodeName!="#text")){attributes[name]=value;} | |
| 735 | -OpenLayers.Util.extend(attributes,this.parseAttributes(nodes[i]))} | |
| 736 | -return attributes;},parsePolygonNode:function(polygonNode){var linearRings=OpenLayers.Ajax.getElementsByTagNameNS(polygonNode,this.gmlns,"gml","LinearRing");var rings=[];var p;var polyBounds;for(var i=0;i<linearRings.length;i++){p=this.parseCoords(linearRings[i]);ring1=new OpenLayers.Geometry.LinearRing(p.points);rings.push(ring1);} | |
| 737 | -var poly=new OpenLayers.Geometry.Polygon(rings);return poly;},parseCoords:function(xmlNode){var x,y,left,bottom,right,top,bounds;var p=[];if(xmlNode){p.points=[];var coordNodes=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","posList");if(coordNodes.length==0){coordNodes=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","pos");} | |
| 738 | -if(coordNodes.length==0){coordNodes=OpenLayers.Ajax.getElementsByTagNameNS(xmlNode,this.gmlns,"gml","coordinates");} | |
| 739 | -var coordString=OpenLayers.Util.getXmlNodeValue(coordNodes[0]);var nums=(coordString)?coordString.split(/[, \n\t]+/):[];while(nums[0]=="") | |
| 740 | -nums.shift();while(nums[nums.length-1]=="") | |
| 741 | -nums.pop();for(i=0;i<nums.length;i=i+this.dim){x=parseFloat(nums[i]);y=parseFloat(nums[i+1]);p.points.push(new OpenLayers.Geometry.Point(x,y));}} | |
| 742 | -return p;},write:function(features){var featureCollection=document.createElementNS("http://www.opengis.net/wfs","wfs:"+this.collectionName);for(var i=0;i<features.length;i++){featureCollection.appendChild(this.createFeatureXML(features[i]));} | |
| 743 | -return featureCollection;},createFeatureXML:function(feature){var geometryNode=this.buildGeometryNode(feature.geometry);var geomContainer=document.createElementNS(this.featureNS,"feature:"+this.geometryName);geomContainer.appendChild(geometryNode);var featureNode=document.createElementNS(this.gmlns,"gml:"+this.featureName);var featureContainer=document.createElementNS(this.featureNS,"feature:"+this.layerName);featureContainer.appendChild(geomContainer);for(var attr in feature.attributes){var attrText=document.createTextNode(feature.attributes[attr]);var nodename=attr;if(attr.search(":")!=-1){nodename=attr.split(":")[1];} | |
| 744 | -var attrContainer=document.createElementNS(this.featureNS,"feature:"+nodename);attrContainer.appendChild(attrText);featureContainer.appendChild(attrContainer);} | |
| 745 | -featureNode.appendChild(featureContainer);return featureNode;},buildGeometryNode:function(geometry){var gml="";if(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon"||geometry.CLASS_NAME=="OpenLayers.Geometry.Polygon"){gml=document.createElementNS(this.gmlns,'gml:MultiPolygon');var polygonMember=document.createElementNS(this.gmlns,'gml:polygonMember');var polygon=document.createElementNS(this.gmlns,'gml:Polygon');var outerRing=document.createElementNS(this.gmlns,'gml:outerBoundaryIs');var linearRing=document.createElementNS(this.gmlns,'gml:LinearRing');linearRing.appendChild(this.buildCoordinatesNode(geometry.components[0]));outerRing.appendChild(linearRing);polygon.appendChild(outerRing);polygonMember.appendChild(polygon);gml.appendChild(polygonMember);} | |
| 746 | -else if(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiLineString"||geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"){gml=document.createElementNS(this.gmlns,'gml:MultiLineString');var lineStringMember=document.createElementNS(this.gmlns,'gml:lineStringMember');var lineString=document.createElementNS(this.gmlns,'gml:LineString');lineString.appendChild(this.buildCoordinatesNode(geometry));lineStringMember.appendChild(lineString);gml.appendChild(lineStringMember);} | |
| 747 | -else if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"||geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPoint"){gml=document.createElementNS(this.gmlns,'gml:MultiPoint');var parts="";if(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPoint"){parts=geometry.components;}else{parts=[geometry];} | |
| 748 | -for(var i=0;i<parts.length;i++){var pointMember=document.createElementNS(this.gmlns,'gml:pointMember');var point=document.createElementNS(this.gmlns,'gml:Point');point.appendChild(this.buildCoordinatesNode(parts[i]));pointMember.appendChild(point);gml.appendChild(pointMember);}} | |
| 749 | -return gml;},buildCoordinatesNode:function(geometry){var coordinatesNode=document.createElementNS(this.gmlns,"gml:coordinates");coordinatesNode.setAttribute("decimal",".");coordinatesNode.setAttribute("cs",",");coordinatesNode.setAttribute("ts"," ");var points=null;if(geometry.components){points=geometry.components;} | |
| 750 | -var path="";if(points){for(var i=0;i<points.length;i++){path+=points[i].x+","+points[i].y+" ";}}else{path+=geometry.x+","+geometry.y+" ";} | |
| 751 | -var txtNode=document.createTextNode(path);coordinatesNode.appendChild(txtNode);return coordinatesNode;},CLASS_NAME:"OpenLayers.Format.GML"});OpenLayers.Geometry.Collection=OpenLayers.Class.create();OpenLayers.Geometry.Collection.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(components){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=new Array();if(components!=null){this.addComponents(components);}},destroy:function(){this.components.length=0;this.components=null;},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()");for(var i=0;i<this.components.length;i++){geometry.addComponent(this.components[i].clone());} | |
| 752 | -OpenLayers.Util.applyDefaults(geometry,this);return geometry;},getComponentsString:function(){var strings=[];for(var i=0;i<this.components.length;i++){strings.push(this.components[i].toShortString());} | |
| 753 | -return strings.join(",");},calculateBounds:function(){this.bounds=null;if(!this.components||(this.components.length>0)){this.setBounds(this.components[0].getBounds());for(var i=1;i<this.components.length;i++){this.extendBounds(this.components[i].getBounds());}}},addComponents:function(components){if(!(components instanceof Array)){components=[components];} | |
| 754 | -for(var i=0;i<components.length;i++){this.addComponent(components[i]);}},addComponent:function(component,index){var added=false;if(component){if(this.componentTypes==null||(OpenLayers.Util.indexOf(this.componentTypes,component.CLASS_NAME)>-1)){if(index!=null&&(index<this.components.length)){var components1=this.components.slice(0,index);var components2=this.components.slice(index,this.components.length);components1.push(component);this.components=components1.concat(components2);}else{this.components.push(component);} | |
| 755 | -component.parent=this;this.clearBounds();added=true;}} | |
| 756 | -return added;},removeComponents:function(components){if(!(components instanceof Array)){components=[components];} | |
| 757 | -for(var i=0;i<components.length;i++){this.removeComponent(components[i]);}},removeComponent:function(component){OpenLayers.Util.removeItem(this.components,component);this.clearBounds();},getLength:function(){var length=0.0;for(var i=0;i<this.components.length;i++){length+=this.components[i].getLength();} | |
| 758 | -return length;},getArea:function(){var area=0.0;for(var i=0;i<this.components.length;i++){area+=this.components[i].getArea();} | |
| 759 | -return area;},move:function(x,y){for(var i=0;i<this.components.length;i++){this.components[i].move(x,y);}},equals:function(geometry){var equivalent=true;if(!geometry.CLASS_NAME||(this.CLASS_NAME!=geometry.CLASS_NAME)){equivalent=false;}else if(!(geometry.components instanceof Array)||(geometry.components.length!=this.components.length)){equivalent=false;}else{for(var i=0;i<this.components.length;++i){if(!this.components[i].equals(geometry.components[i])){equivalent=false;break;}}} | |
| 760 | -return equivalent;},CLASS_NAME:"OpenLayers.Geometry.Collection"});OpenLayers.Geometry.Point=OpenLayers.Class.create();OpenLayers.Geometry.Point.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry,{x:null,y:null,initialize:function(x,y){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(x);this.y=parseFloat(y);},clone:function(obj){if(obj==null){obj=new OpenLayers.Geometry.Point(this.x,this.y);} | |
| 761 | -OpenLayers.Util.applyDefaults(obj,this);return obj;},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y);},distanceTo:function(point){var distance=0.0;if((this.x!=null)&&(this.y!=null)&&(point!=null)&&(point.x!=null)&&(point.y!=null)){var dx2=Math.pow(this.x-point.x,2);var dy2=Math.pow(this.y-point.y,2);distance=Math.sqrt(dx2+dy2);} | |
| 762 | -return distance;},equals:function(geom){var equals=false;if(geom!=null){equals=((this.x==geom.x&&this.y==geom.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(geom.x)&&isNaN(geom.y)));} | |
| 763 | -return equals;},toShortString:function(){return(this.x+", "+this.y);},move:function(x,y){this.x=this.x+x;this.y=this.y+y;},CLASS_NAME:"OpenLayers.Geometry.Point"});OpenLayers.Geometry.Rectangle=OpenLayers.Class.create();OpenLayers.Geometry.Rectangle.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry,{x:null,y:null,width:null,height:null,initialize:function(x,y,width,height){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=x;this.y=y;this.width=width;this.height=height;},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x+this.width,this.y+this.height);},getLength:function(){var length=(2*this.width)+(2*this.height);return length;},getArea:function(){var area=this.width*this.height;return area;},CLASS_NAME:"OpenLayers.Geometry.Rectangle"});OpenLayers.Geometry.Surface=OpenLayers.Class.create();OpenLayers.Geometry.Surface.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry,{initialize:function(){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Geometry.Surface"});OpenLayers.Layer.GML=OpenLayers.Class.create();OpenLayers.Layer.GML.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Vector,{loaded:false,format:null,initialize:function(name,url,options){var newArguments=new Array() | |
| 764 | -newArguments.push(name,options);OpenLayers.Layer.Vector.prototype.initialize.apply(this,newArguments);this.url=url;},setVisibility:function(visibility,noEvent){OpenLayers.Layer.Vector.prototype.setVisibility.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGML();}},moveTo:function(bounds,zoomChanged,minor){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGML();}},loadGML:function(){if(!this.loaded){var results=OpenLayers.loadURL(this.url,null,this,this.requestSuccess,this.requestFailure);this.loaded=true;}},requestSuccess:function(request){var doc=request.responseXML;if(!doc||request.fileType!="XML"){doc=request.responseText;} | |
| 765 | -var gml=this.format?new this.format():new OpenLayers.Format.GML();this.addFeatures(gml.read(doc));},requestFailure:function(request){alert("Error in loading GML file "+this.url);},CLASS_NAME:"OpenLayers.Layer.GML"});OpenLayers.Layer.KaMap=OpenLayers.Class.create();OpenLayers.Layer.KaMap.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Grid,{isBaseLayer:true,units:null,resolution:OpenLayers.DOTS_PER_INCH,DEFAULT_PARAMS:{i:'jpeg',map:''},initialize:function(name,url,params,options){var newArguments=new Array();newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);this.params=(params?params:{});if(params){OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);}},getURL:function(bounds){var mapRes=this.map.getResolution();var scale=Math.round((this.map.getScale()*10000))/10000;var pX=Math.round(bounds.left/mapRes);var pY=-Math.round(bounds.top/mapRes);return this.getFullRequestString({t:pY,l:pX,s:scale});},addTile:function(bounds,position){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);},_initTiles:function(){var viewSize=this.map.getSize();var bounds=this.map.getExtent();var extent=this.map.getMaxExtent();var resolution=this.map.getResolution();var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left;var tilecol=Math.floor(offsetlon/tilelon);var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=tilecol*tilelon;var offsetlat=bounds.top;var tilerow=Math.ceil(offsetlat/tilelat);var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=-(tilerowremain+1)*this.tileSize.h;var tileoffsetlat=tilerow*tilelat;tileoffsetx=Math.round(tileoffsetx);tileoffsety=Math.round(tileoffsety);this.origin=new OpenLayers.Pixel(tileoffsetx,tileoffsety);var startX=tileoffsetx;var startLon=tileoffsetlon;var rowidx=0;do{var row;row=this.grid[rowidx++];if(!row){row=new Array();this.grid.push(row);} | |
| 766 | -tileoffsetlon=startLon;tileoffsetx=startX;var colidx=0;do{var tileBounds=new OpenLayers.Bounds(tileoffsetlon,tileoffsetlat,tileoffsetlon+tilelon,tileoffsetlat+tilelat);var x=tileoffsetx;x-=parseInt(this.map.layerContainerDiv.style.left);var y=tileoffsety;y-=parseInt(this.map.layerContainerDiv.style.top);var px=new OpenLayers.Pixel(x,y);var tile;tile=row[colidx++];if(!tile){tile=this.addTile(tileBounds,px);row.push(tile);}else{tile.moveTo(tileBounds,px,false);} | |
| 767 | -tileoffsetlon+=tilelon;tileoffsetx+=this.tileSize.w;}while(tileoffsetlon<=bounds.right+tilelon*this.buffer) | |
| 768 | -tileoffsetlat-=tilelat;tileoffsety+=this.tileSize.h;}while(tileoffsetlat>=bounds.bottom-tilelat*this.buffer) | |
| 769 | -this.spiralTileLoad();},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.KaMap(this.name,this.url,this.params,this.options);} | |
| 770 | -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);if(this.tileSize!=null){obj.tileSize=this.tileSize.clone();} | |
| 771 | -obj.grid=new Array();return obj;},CLASS_NAME:"OpenLayers.Layer.KaMap"});OpenLayers.Layer.MapServer=OpenLayers.Class.create();OpenLayers.Layer.MapServer.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{mode:"map",map_imagetype:"png"},initialize:function(name,url,params,options){var newArguments=new Array();newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);if(arguments.length>0){OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);} | |
| 772 | -if(options==null||options.isBaseLayer==null){this.isBaseLayer=((this.params.transparent!="true")&&(this.params.transparent!=true));}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.MapServer(this.name,this.url,this.params,this.options);} | |
| 773 | -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},addTile:function(bounds,position){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);},getURL:function(bounds){if(this.gutter){bounds=this.adjustBoundsByGutter(bounds);} | |
| 774 | -var extent=[bounds.left,bounds.bottom,bounds.right,bounds.top];var url=this.getFullRequestString({mapext:extent,imgext:extent,map_size:[this.imageSize.w,this.imageSize.h],imgx:this.imageSize.w/2,imgy:this.imageSize.h/2,imgxy:[this.imageSize.w,this.imageSize.h]});return url;},getFullRequestString:function(newParams,altUrl){var url=(altUrl==null)?this.url:altUrl;if(typeof url=="object"){url=url[Math.floor(Math.random()*url.length)];} | |
| 775 | -var requestString=url;var allParams=OpenLayers.Util.extend(new Object(),this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getArgs(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}} | |
| 776 | -var paramsString=OpenLayers.Util.getParameterString(allParams);paramsString=paramsString.replace(/,/g,"+");if(paramsString!=""){var lastServerChar=url.charAt(url.length-1);if((lastServerChar=="&")||(lastServerChar=="?")){requestString+=paramsString;}else{if(url.indexOf('?')==-1){requestString+='?'+paramsString;}else{requestString+='&'+paramsString;}}} | |
| 777 | -return requestString;},CLASS_NAME:"OpenLayers.Layer.MapServer"});OpenLayers.Layer.TMS=OpenLayers.Class.create();OpenLayers.Layer.TMS.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Grid,{reproject:false,isBaseLayer:true,tileOrigin:null,initialize:function(name,url,options){var newArguments=new Array();newArguments.push(name,url,{},options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TMS(this.name,this.url,this.options);} | |
| 778 | -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){var res=this.map.getResolution();var x=(bounds.left-this.tileOrigin.lon)/(res*this.tileSize.w);var y=(bounds.bottom-this.tileOrigin.lat)/(res*this.tileSize.h);var z=this.map.getZoom();var path="1.0.0"+"/"+this.layername+"/"+z+"/"+x+"/"+y+"."+this.type;var url=this.url;if(url instanceof Array){url=this.selectUrl(path,url);} | |
| 779 | -return url+path;},addTile:function(bounds,position){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);},setMap:function(map){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom);}},CLASS_NAME:"OpenLayers.Layer.TMS"});OpenLayers.Layer.WFS=OpenLayers.Class.create();OpenLayers.Layer.WFS.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Vector,OpenLayers.Layer.Markers,{isBaseLayer:false,ratio:2,DEFAULT_PARAMS:{service:"WFS",version:"1.0.0",request:"GetFeature"},featureClass:null,vectorMode:true,initialize:function(name,url,params,options){if(options==undefined){options={};} | |
| 780 | -if(options.featureClass||!OpenLayers.Layer.Vector||!OpenLayers.Feature.Vector){this.vectorMode=false;} | |
| 781 | -OpenLayers.Util.extend(options,{'reportError':false});var newArguments=new Array() | |
| 782 | -newArguments.push(name,options);OpenLayers.Layer.Vector.prototype.initialize.apply(this,newArguments);if(!this.renderer||!this.vectorMode){this.vectorMode=false;if(!options.featureClass){options.featureClass=OpenLayers.Feature.WFS;} | |
| 783 | -OpenLayers.Layer.Markers.prototype.initialize.apply(this,newArguments);} | |
| 784 | -if(this.params&&this.params.typename&&!this.options.typename){this.options.typename=this.params.typename;} | |
| 785 | -if(!this.options.geometry_column){this.options.geometry_column="the_geom";} | |
| 786 | -this.params=params;OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));this.url=url;},destroy:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.destroy.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);}},setMap:function(map){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.setMap.apply(this,arguments);}},moveTo:function(bounds,zoomChanged,dragging){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);} | |
| 787 | -if(dragging){return false;} | |
| 788 | -if(zoomChanged){if(this.vectorMode){this.renderer.clear();}} | |
| 789 | -if(this.options.minZoomLevel&&this.map.getZoom()<this.options.minZoomLevel){return null;};if(bounds==null){bounds=this.map.getExtent();} | |
| 790 | -var firstRendering=(this.tile==null);var outOfBounds=(!firstRendering&&!this.tile.bounds.containsBounds(bounds));if(zoomChanged||firstRendering||(!dragging&&outOfBounds)){var center=bounds.getCenterLonLat();var tileWidth=bounds.getWidth()*this.ratio;var tileHeight=bounds.getHeight()*this.ratio;var tileBounds=new OpenLayers.Bounds(center.lon-(tileWidth/2),center.lat-(tileHeight/2),center.lon+(tileWidth/2),center.lat+(tileHeight/2));var tileSize=this.map.getSize();tileSize.w=tileSize.w*this.ratio;tileSize.h=tileSize.h*this.ratio;var ul=new OpenLayers.LonLat(tileBounds.left,tileBounds.top);var pos=this.map.getLayerPxFromLonLat(ul);var url=this.getFullRequestString();var params={BBOX:tileBounds.toBBOX()};url+="&"+OpenLayers.Util.getParameterString(params);if(!this.tile){this.tile=new OpenLayers.Tile.WFS(this,pos,tileBounds,url,tileSize);this.tile.draw();}else{if(this.vectorMode){this.destroyFeatures();this.renderer.clear();}else{this.clearMarkers();} | |
| 791 | -this.tile.destroy();this.tile=null;this.tile=new OpenLayers.Tile.WFS(this,pos,tileBounds,url,tileSize);this.tile.draw();}}},onMapResize:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.onMapResize.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.onMapResize.apply(this,arguments);}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WFS(this.name,this.url,this.params,this.options);} | |
| 792 | -if(this.vectorMode){obj=OpenLayers.Layer.Vector.prototype.clone.apply(this,[obj]);}else{obj=OpenLayers.Layer.Markers.prototype.clone.apply(this,[obj]);} | |
| 793 | -return obj;},getFullRequestString:function(newParams){var projection=this.map.getProjection();this.params.SRS=(projection=="none")?null:projection;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},commit:function(){if(!this.writer){this.writer=new OpenLayers.Format.WFS({},this);} | |
| 794 | -var data=this.writer.write(this.features);var url=this.url;if(OpenLayers.ProxyHost&&this.url.startsWith("http")){url=OpenLayers.ProxyHost+escape(this.url);} | |
| 795 | -var success=this.commitSuccess.bind(this);var failure=this.commitFailure.bind(this) | |
| 796 | -data=OpenLayers.Ajax.serializeXMLToString(data);new OpenLayers.Ajax.Request(url,{method:'post',postBody:data,onComplete:success,onFailure:failure});},commitSuccess:function(request){var response=request.responseText;if(response.indexOf('SUCCESS')!=-1){this.commitReport('WFS Transaction: SUCCESS',response);for(var i=0;i<this.features.length;i++){i.state=null;}}else if(response.indexOf('FAILED')!=-1||response.indexOf('Exception')!=-1){this.commitReport('WFS Transaction: FAILED',response);}},commitFailure:function(request){},commitReport:function(string,response){alert(string);},refresh:function(){if(this.tile){if(this.vectorMode){this.renderer.clear();OpenLayers.Util.clearArray(this.features);}else{this.clearMarkers();OpenLayers.Util.clearArray(this.markers);} | |
| 797 | -this.tile.draw();}},CLASS_NAME:"OpenLayers.Layer.WFS"});OpenLayers.Layer.WMS=OpenLayers.Class.create();OpenLayers.Layer.WMS.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{service:"WMS",version:"1.1.1",request:"GetMap",styles:"",exceptions:"application/vnd.ogc.se_inimage",format:"image/jpeg"},reproject:true,initialize:function(name,url,params,options){var newArguments=new Array();params=OpenLayers.Util.upperCaseObject(params);newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(options==null||options.isBaseLayer==null){this.isBaseLayer=((this.params.TRANSPARENT!="true")&&(this.params.TRANSPARENT!=true));}},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);} | |
| 798 | -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){if(this.gutter){bounds=this.adjustBoundsByGutter(bounds);} | |
| 799 | -return this.getFullRequestString({BBOX:bounds.toBBOX(),WIDTH:this.imageSize.w,HEIGHT:this.imageSize.h});},addTile:function(bounds,position){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);},mergeNewParams:function(newParams){var upperParams=OpenLayers.Util.upperCaseObject(newParams);var newArguments=[upperParams];OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,newArguments);},getFullRequestString:function(newParams){var projection=this.map.getProjection();this.params.SRS=(projection=="none")?null:projection;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Layer.WorldWind=OpenLayers.Class.create();OpenLayers.Layer.WorldWind.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{},isBaseLayer:true,lzd:null,zoomLevels:null,initialize:function(name,url,lzd,zoomLevels,params,options){this.lzd=lzd;this.zoomLevels=zoomLevels;var newArguments=new Array();newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);this.params=(params?params:{});if(params){OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);}},addTile:function(bounds,position){if(this.map.getResolution()<=(this.lzd/512)&&this.getZoom()<=this.zoomLevels){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);}else{return new OpenLayers.Tile.Image(this,position,bounds,OpenLayers.Util.getImagesLocation()+"blank.gif",this.tileSize);}},getZoom:function(){var zoom=this.map.getZoom();var extent=this.map.getMaxExtent();zoom=zoom-Math.log(this.maxResolution/(this.lzd/512))/Math.log(2);return zoom;},getURL:function(bounds){var zoom=this.getZoom();var extent=this.map.getMaxExtent();var deg=this.lzd/Math.pow(2,this.getZoom());var x=Math.floor((bounds.left-extent.left)/deg);var y=Math.floor((bounds.bottom-extent.bottom)/deg);if(this.map.getResolution()<=(this.lzd/512)&&this.getZoom()<=this.zoomLevels){return this.getFullRequestString({L:zoom,X:x,Y:y});}else{return OpenLayers.Util.getImagesLocation()+"blank.gif";}},CLASS_NAME:"OpenLayers.Layer.WorldWind"});OpenLayers.Format.WFS=OpenLayers.Class.create();OpenLayers.Format.WFS.prototype=OpenLayers.Class.inherit(OpenLayers.Format.GML,{layer:null,wfsns:"http://www.opengis.net/wfs",initialize:function(options,layer){OpenLayers.Format.GML.prototype.initialize.apply(this,[options]);this.layer=layer;if(this.layer.featureNS){this.featureNS=this.layer.featureNS;} | |
| 800 | -if(this.layer.options.geometry_column){this.geometryName=this.layer.options.geometry_column;} | |
| 801 | -if(this.layer.options.typename){this.featureName=this.layer.options.typename;}},write:function(features){var transaction=document.createElementNS('http://www.opengis.net/wfs','wfs:Transaction');for(var i=0;i<features.length;i++){switch(features[i].state){case OpenLayers.State.INSERT:transaction.appendChild(this.insert(features[i]));break;case OpenLayers.State.UPDATE:transaction.appendChild(this.update(features[i]));break;case OpenLayers.State.DELETE:transaction.appendChild(this.remove(features[i]));break;}} | |
| 802 | -return transaction;},createFeatureXML:function(feature){var geometryNode=this.buildGeometryNode(feature.geometry);var geomContainer=document.createElementNS(this.featureNS,"feature:"+this.geometryName);geomContainer.appendChild(geometryNode);var featureContainer=document.createElementNS(this.featureNS,"feature:"+this.featureName);featureContainer.appendChild(geomContainer);for(var attr in feature.attributes){var attrText=document.createTextNode(feature.attributes[attr]);var nodename=attr;if(attr.search(":")!=-1){nodename=attr.split(":")[1];} | |
| 803 | -var attrContainer=document.createElementNS(this.featureNS,"feature:"+nodename);attrContainer.appendChild(attrText);featureContainer.appendChild(attrContainer);} | |
| 804 | -return featureContainer;},insert:function(feature){var insertNode=document.createElementNS(this.wfsns,'wfs:Insert');insertNode.appendChild(this.createFeatureXML(feature));return insertNode;},update:function(feature){if(!feature.fid){alert("Can't update a feature for which there is no FID.");} | |
| 805 | -var updateNode=document.createElementNS(this.wfsns,'wfs:Update');updateNode.setAttribute("typeName",this.layerName);var propertyNode=document.createElementNS(this.wfsns,'wfs:Property');var nameNode=document.createElementNS('http://www.opengis.net/wfs','wfs:Name');var txtNode=document.createTextNode(this.geometryName);nameNode.appendChild(txtNode);propertyNode.appendChild(nameNode);var valueNode=document.createElementNS('http://www.opengis.net/wfs','wfs:Value');valueNode.appendChild(this.buildGeometryNode(feature.geometry));propertyNode.appendChild(valueNode);updateNode.appendChild(propertyNode);var filterNode=document.createElementNS('http://www.opengis.net/ogc','ogc:Filter');var filterIdNode=document.createElementNS('http://www.opengis.net/ogc','ogc:FeatureId');filterIdNode.setAttribute("fid",feature.fid);filterNode.appendChild(filterIdNode);updateNode.appendChild(filterNode);return updateNode;},remove:function(feature){if(!feature.attributes.fid){alert("Can't update a feature for which there is no FID.");return false;} | |
| 806 | -var deleteNode=document.createElementNS(this.featureNS,'wfs:Delete');deleteNode.setAttribute("typeName",this.layerName);var filterNode=document.createElementNS('http://www.opengis.net/ogc','ogc:Filter');var filterIdNode=document.createElementNS('http://www.opengis.net/ogc','ogc:FeatureId');filterIdNode.setAttribute("fid",feature.attributes.fid);filterNode.appendChild(filterIdNode);deleteNode.appendChild(filterNode);return deleteNode;},destroy:function(){this.layer=null;},CLASS_NAME:"OpenLayers.Format.WFS"});OpenLayers.Geometry.MultiLineString=OpenLayers.Class.create();OpenLayers.Geometry.MultiLineString.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LineString"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});OpenLayers.Geometry.MultiPoint=OpenLayers.Class.create();OpenLayers.Geometry.MultiPoint.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},addPoint:function(point,index){this.addComponent(point,index);},removePoint:function(point){this.removeComponent(point);},CLASS_NAME:"OpenLayers.Geometry.MultiPoint"});OpenLayers.Geometry.MultiPolygon=OpenLayers.Class.create();OpenLayers.Geometry.MultiPolygon.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Polygon"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Geometry.MultiPolygon"});OpenLayers.Geometry.Polygon=OpenLayers.Class.create();OpenLayers.Geometry.Polygon.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LinearRing"],initialize:function(components){OpenLayers.Geometry.Collection.prototype.initialize.apply(this,arguments);},getArea:function(){var area=0.0;if(this.components&&(this.components.length>0)){area+=Math.abs(this.components[0].getArea());for(var i=1;i<this.components.length;i++){area-=Math.abs(this.components[i].getArea());}} | |
| 807 | -return area;},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Handler.Point=OpenLayers.Class.create();OpenLayers.Handler.Point.prototype=OpenLayers.Class.inherit(OpenLayers.Handler,{point:null,layer:null,drawing:false,mouseDown:false,lastDown:null,lastUp:null,initialize:function(control,callbacks,options){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'],{});OpenLayers.Handler.prototype.initialize.apply(this,arguments);},activate:function(){if(!OpenLayers.Handler.prototype.activate.apply(this,arguments)){return false;} | |
| 808 | -var options={displayInLayerSwitcher:false};this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,options);this.map.addLayer(this.layer);return true;},createFeature:function(){this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point());},deactivate:function(){if(!OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){return false;} | |
| 809 | -if(this.drawing){this.cancel();} | |
| 810 | -this.map.removeLayer(this.layer,false);this.layer.destroy();return true;},destroyFeature:function(){this.point.destroy();},finalize:function(){this.layer.renderer.clear();this.callback("done",[this.geometryClone()]);this.destroyFeature();this.drawing=false;this.mouseDown=false;this.lastDown=null;this.lastUp=null;},cancel:function(){this.layer.renderer.clear();this.callback("cancel",[this.geometryClone()]);this.destroyFeature();this.drawing=false;this.mouseDown=false;this.lastDown=null;this.lastUp=null;},dblclick:function(evt){OpenLayers.Event.stop(evt);return false;},drawFeature:function(){this.layer.drawFeature(this.point,this.style);},geometryClone:function(){return this.point.geometry.clone();},mousedown:function(evt){if(!this.checkModifiers(evt)){return true;} | |
| 811 | -if(this.lastDown&&this.lastDown.equals(evt.xy)){return true;} | |
| 812 | -if(this.lastDown==null){this.createFeature();} | |
| 813 | -this.lastDown=evt.xy;this.drawing=true;var lonlat=this.map.getLonLatFromPixel(evt.xy);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.drawFeature();return false;},mousemove:function(evt){if(this.drawing){var lonlat=this.map.getLonLatFromPixel(evt.xy);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.drawFeature();} | |
| 814 | -return true;},mouseup:function(evt){if(this.drawing){this.finalize();return false;}else{return true;}},CLASS_NAME:"OpenLayers.Handler.Point"});OpenLayers.Layer.MapServer.Untiled=OpenLayers.Class.create();OpenLayers.Layer.MapServer.Untiled.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.HTTPRequest,{default_params:{mode:"map",map_imagetype:"png"},reproject:true,ratio:1,tile:null,doneLoading:false,initialize:function(name,url,params,options){var newArguments=[];newArguments.push(name,url,params,options);OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,newArguments);OpenLayers.Util.applyDefaults(this.params,this.default_params);if((options==null)||(options.isBaseLayer==null)){this.isBaseLayer=((this.params.transparent!="true")&&(this.params.transparent!=true));}},destroy:function(){if(this.tile){this.tile.destroy();this.tile=null;} | |
| 815 | -OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.MapServer.Untiled(this.name,this.url,this.params,this.options);} | |
| 816 | -obj=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[obj]);return obj;},setMap:function(map){OpenLayers.Layer.HTTPRequest.prototype.setMap.apply(this,arguments);},setTileSize:function(){var tileSize=this.map.getSize();tileSize.w=tileSize.w*this.ratio;tileSize.h=tileSize.h*this.ratio;this.tileSize=tileSize;this.imageSize=tileSize;this.imageOffset=new OpenLayers.Pixel(0,0);},moveTo:function(bounds,zoomChanged,dragging){if(!this.doneLoading){this.events.triggerEvent("loadcancel");this.doneLoading=true;} | |
| 817 | -OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);if(bounds==null){bounds=this.map.getExtent();} | |
| 818 | -var firstRendering=(this.tile==null);var outOfBounds=(!firstRendering&&!this.tile.bounds.containsBounds(bounds));if(zoomChanged||firstRendering||(!dragging&&outOfBounds)){if(this.tile){this.tile.clear();} | |
| 819 | -var center=bounds.getCenterLonLat();var tileWidth=bounds.getWidth()*this.ratio;var tileHeight=bounds.getHeight()*this.ratio;var tileBounds=new OpenLayers.Bounds(center.lon-(tileWidth/2),center.lat-(tileHeight/2),center.lon+(tileWidth/2),center.lat+(tileHeight/2));this.setTileSize();var url=this.getURL(tileBounds);var ul=new OpenLayers.LonLat(tileBounds.left,tileBounds.top);var pos=this.map.getLayerPxFromLonLat(ul);if(this.tile&&!this.tile.size.equals(this.tileSize)){this.tile.destroy();this.tile=null;} | |
| 820 | -this.events.triggerEvent("loadstart");this.doneLoading=false;if(!this.tile){this.tile=new OpenLayers.Tile.Image(this,pos,tileBounds,url,this.tileSize);this.tile.draw();var onload=function(){this.doneLoading=true;this.events.triggerEvent("loadend");} | |
| 821 | -OpenLayers.Event.observe(this.tile.imgDiv,'load',onload.bindAsEventListener(this));}else{this.tile.moveTo(tileBounds,pos);}}},getURL:function(bounds){var url=this.getFullRequestString({mapext:bounds.toBBOX().replace(/,/g," "),imgext:bounds.toBBOX().replace(/,/g," "),map_size:this.tileSize.w+" "+this.tileSize.h,imgx:this.tileSize.w/2,imgy:this.tileSize.h/2,imgxy:this.tileSize.w+" "+this.tileSize.h});return url;},setUrl:function(newUrl){OpenLayers.Layer.HTTPRequest.prototype.setUrl.apply(this,arguments);this.moveTo();},mergeNewParams:function(newParams){OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,[newParams]);this.moveTo(null,true);},getFullRequestString:function(newParams){var projection=this.map.getProjection();this.params.srs=(projection=="none")?null:projection;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},CLASS_NAME:"OpenLayers.Layer.MapServer.Untiled"});OpenLayers.Layer.WMS.Untiled=OpenLayers.Class.create();OpenLayers.Layer.WMS.Untiled.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.HTTPRequest,{DEFAULT_PARAMS:{service:"WMS",version:"1.1.1",request:"GetMap",styles:"",exceptions:"application/vnd.ogc.se_inimage",format:"image/jpeg"},reproject:true,ratio:2,tile:null,doneLoading:false,initialize:function(name,url,params,options){var newArguments=new Array();params=OpenLayers.Util.upperCaseObject(params);newArguments.push(name,url,params,options);OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,newArguments);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if((options==null)||(options.isBaseLayer==null)){this.isBaseLayer=((this.params.TRANSPARENT!="true")&&(this.params.TRANSPARENT!=true));}},destroy:function(){if(this.tile){this.tile.destroy();this.tile=null;} | |
| 822 | -OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WMS.Untiled(this.name,this.url,this.params,this.options);} | |
| 823 | -obj=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[obj]);obj.tile=null;return obj;},setMap:function(map){OpenLayers.Layer.HTTPRequest.prototype.setMap.apply(this,arguments);},setTileSize:function(){var tileSize=this.map.getSize();tileSize.w=tileSize.w*this.ratio;tileSize.h=tileSize.h*this.ratio;this.tileSize=tileSize;this.imageSize=tileSize;this.imageOffset=new OpenLayers.Pixel(0,0);},moveTo:function(bounds,zoomChanged,dragging){if(!this.doneLoading){this.events.triggerEvent("loadcancel");this.doneLoading=true;} | |
| 824 | -OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);if(bounds==null){bounds=this.map.getExtent();} | |
| 825 | -var firstRendering=(this.tile==null);var outOfBounds=(!firstRendering&&!this.tile.bounds.containsBounds(bounds));if(zoomChanged||firstRendering||(!dragging&&outOfBounds)){if(this.tile){this.tile.clear();} | |
| 826 | -var center=bounds.getCenterLonLat();var tileWidth=bounds.getWidth()*this.ratio;var tileHeight=bounds.getHeight()*this.ratio;var tileBounds=new OpenLayers.Bounds(center.lon-(tileWidth/2),center.lat-(tileHeight/2),center.lon+(tileWidth/2),center.lat+(tileHeight/2));this.setTileSize();var url=this.getURL(tileBounds);var ul=new OpenLayers.LonLat(tileBounds.left,tileBounds.top);var pos=this.map.getLayerPxFromLonLat(ul);if(this.tile&&!this.tile.size.equals(this.tileSize)){this.tile.destroy();this.tile=null;} | |
| 827 | -this.events.triggerEvent("loadstart");this.doneLoading=false;if(!this.tile){this.tile=new OpenLayers.Tile.Image(this,pos,tileBounds,url,this.tileSize);this.tile.draw();var onload=function(){this.doneLoading=true;this.events.triggerEvent("loadend");} | |
| 828 | -OpenLayers.Event.observe(this.tile.imgDiv,'load',onload.bindAsEventListener(this));}else{this.tile.moveTo(tileBounds,pos);}}},getURL:function(bounds){return this.getFullRequestString({'BBOX':bounds.toBBOX(),'WIDTH':this.tileSize.w,'HEIGHT':this.tileSize.h});},setUrl:function(newUrl){OpenLayers.Layer.HTTPRequest.prototype.setUrl.apply(this,arguments);this.moveTo();},mergeNewParams:function(newParams){var upperParams=OpenLayers.Util.upperCaseObject(newParams);var newArguments=[upperParams];OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this,newArguments);this.moveTo(null,true);},getFullRequestString:function(newParams){var projection=this.map.getProjection();this.params.SRS=(projection=="none")?null:projection;return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},CLASS_NAME:"OpenLayers.Layer.WMS.Untiled"});OpenLayers.Geometry.Curve=OpenLayers.Class.create();OpenLayers.Geometry.Curve.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry.MultiPoint,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(points){OpenLayers.Geometry.MultiPoint.prototype.initialize.apply(this,arguments);},getLength:function(){var length=0.0;if(this.components&&(this.components.length>1)){for(var i=1;i<this.components.length;i++){length+=this.components[i-1].distanceTo(this.components[i]);}} | |
| 829 | -return length;},CLASS_NAME:"OpenLayers.Geometry.Curve"});OpenLayers.Geometry.LineString=OpenLayers.Class.create();OpenLayers.Geometry.LineString.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry.Curve,{initialize:function(points){OpenLayers.Geometry.Curve.prototype.initialize.apply(this,arguments);},removeComponent:function(point){if(this.components&&(this.components.length>2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);}},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Geometry.LinearRing=OpenLayers.Class.create();OpenLayers.Geometry.LinearRing.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(points){OpenLayers.Geometry.LineString.prototype.initialize.apply(this,arguments);},addComponent:function(point,index){var added=false;var lastPoint=this.components[this.components.length-1];OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,[lastPoint]);if(index!=null||!point.equals(lastPoint)){added=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments);} | |
| 830 | -var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint.clone()]);return added;},removeComponent:function(point){if(this.components.length>4){var lastPoint=this.components[this.components.length-1];OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,[lastPoint]);OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint.clone()]);}},getArea:function(){var area=0.0;if(this.components&&(this.components.length>2)){var sum=0.0;for(var i=0;i<this.components.length-1;i++){var b=this.components[i];var c=this.components[i+1];sum+=(b.x+c.x)*(c.y-b.y);} | |
| 831 | -area=-sum/2.0;} | |
| 832 | -return area;},CLASS_NAME:"OpenLayers.Geometry.LinearRing"});OpenLayers.Handler.Path=OpenLayers.Class.create();OpenLayers.Handler.Path.prototype=OpenLayers.Class.inherit(OpenLayers.Handler.Point,{line:null,freehand:false,freehandToggle:'shiftKey',initialize:function(control,callbacks,options){OpenLayers.Handler.Point.prototype.initialize.apply(this,arguments);},createFeature:function(){this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString());this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point());},destroyFeature:function(){this.line.destroy();this.point.destroy();},addPoint:function(){this.line.geometry.addComponent(this.point.geometry.clone(),this.line.geometry.components.length);this.callback("point",[this.point.geometry]);},freehandMode:function(evt){return(this.freehandToggle&&evt[this.freehandToggle])?!this.freehand:this.freehand;},modifyFeature:function(){var index=this.line.geometry.components.length-1;this.line.geometry.components[index].x=this.point.geometry.x;this.line.geometry.components[index].y=this.point.geometry.y;},drawFeature:function(){this.layer.drawFeature(this.line,this.style);this.layer.drawFeature(this.point,this.style);},geometryClone:function(){return this.line.geometry.clone();},mousedown:function(evt){if(this.lastDown&&this.lastDown.equals(evt.xy)){return false;} | |
| 833 | -if(this.lastDown==null){this.createFeature();} | |
| 834 | -this.mouseDown=true;this.lastDown=evt.xy;var lonlat=this.control.map.getLonLatFromPixel(evt.xy);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;if((this.lastUp==null)||!this.lastUp.equals(evt.xy)){this.addPoint();} | |
| 835 | -this.drawFeature();this.drawing=true;return false;},mousemove:function(evt){if(this.drawing){var lonlat=this.map.getLonLatFromPixel(evt.xy);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;if(this.mouseDown&&this.freehandMode(evt)){this.addPoint();}else{this.modifyFeature();} | |
| 836 | -this.drawFeature();} | |
| 837 | -return true;},mouseup:function(evt){this.mouseDown=false;if(this.drawing){if(this.freehandMode(evt)){this.finalize();}else{if(this.lastUp==null){this.addPoint();} | |
| 838 | -this.lastUp=evt.xy;} | |
| 839 | -return false;} | |
| 840 | -return true;},dblclick:function(evt){if(!this.freehandMode(evt)){var index=this.line.geometry.components.length-1;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.finalize();} | |
| 841 | -return false;},CLASS_NAME:"OpenLayers.Handler.Path"});OpenLayers.Handler.Polygon=OpenLayers.Class.create();OpenLayers.Handler.Polygon.prototype=OpenLayers.Class.inherit(OpenLayers.Handler.Path,{polygon:null,initialize:function(control,callbacks,options){OpenLayers.Handler.Path.prototype.initialize.apply(this,arguments);},createFeature:function(){this.polygon=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon());this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LinearRing());this.polygon.geometry.addComponent(this.line.geometry);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point());},destroyFeature:function(){this.polygon.destroy();this.point.destroy();},modifyFeature:function(){var index=this.line.geometry.components.length-2;this.line.geometry.components[index].x=this.point.geometry.x;this.line.geometry.components[index].y=this.point.geometry.y;},drawFeature:function(){this.layer.drawFeature(this.polygon,this.style);this.layer.drawFeature(this.point,this.style);},geometryClone:function(){return this.polygon.geometry.clone();},dblclick:function(evt){if(!this.freehandMode(evt)){var index=this.line.geometry.components.length-2;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.finalize();} | |
| 842 | -return false;},CLASS_NAME:"OpenLayers.Handler.Polygon"}); | |
| 843 | 0 | \ No newline at end of file |
pacotes/openlayers/build/README.txt
| ... | ... | @@ -1,14 +0,0 @@ |
| 1 | - | |
| 2 | -## HowTo: Build & deploy "Shrunk" Single File Library version of OpenLayers ## | |
| 3 | - | |
| 4 | - * Build: | |
| 5 | - | |
| 6 | - cd build | |
| 7 | - ./build.sh | |
| 8 | - cd .. | |
| 9 | - | |
| 10 | - * Upload the result to the server: e.g. | |
| 11 | - | |
| 12 | - scp build/OpenLayers.js openlayers@openlayers.org:openlayers.org/htdocs/code/ | |
| 13 | - | |
| 14 | - |
pacotes/openlayers/build/build.py
| ... | ... | @@ -1,27 +0,0 @@ |
| 1 | -#!/usr/bin/env python | |
| 2 | - | |
| 3 | -import sys | |
| 4 | -sys.path.append("../tools") | |
| 5 | - | |
| 6 | -import jsmin, mergejs | |
| 7 | - | |
| 8 | -sourceDirectory = "../lib" | |
| 9 | -configFilename = "library.cfg" | |
| 10 | -outputFilename = "OpenLayers.js" | |
| 11 | - | |
| 12 | -if len(sys.argv) > 1: | |
| 13 | - configFilename = sys.argv[1] + ".cfg" | |
| 14 | -if len(sys.argv) > 2: | |
| 15 | - outputFilename = sys.argv[2] | |
| 16 | - | |
| 17 | -print "Merging libraries." | |
| 18 | -merged = mergejs.run(sourceDirectory, None, configFilename) | |
| 19 | -print "Compressing." | |
| 20 | -minimized = jsmin.jsmin(merged) | |
| 21 | -print "Adding license file." | |
| 22 | -minimized = file("license.txt").read() + minimized | |
| 23 | - | |
| 24 | -print "Writing to %s." % outputFilename | |
| 25 | -file(outputFilename, "w").write(minimized) | |
| 26 | - | |
| 27 | -print "Done." |
pacotes/openlayers/build/build.sh
| ... | ... | @@ -1,40 +0,0 @@ |
| 1 | -#!/bin/sh | |
| 2 | - | |
| 3 | -# | |
| 4 | -# Script to build compressed single file version of OpenLayers library | |
| 5 | -# | |
| 6 | - | |
| 7 | -OUTPUT_FILENAME=OpenLayers.js | |
| 8 | -TMP_OUTPUT_FILENAME=tmp.${OUTPUT_FILENAME} | |
| 9 | - | |
| 10 | -TOOLS_DIR=../tools | |
| 11 | - | |
| 12 | -CFG_FILENAME=library.cfg | |
| 13 | - | |
| 14 | -SRC_DIR=../lib | |
| 15 | - | |
| 16 | -CMD_MERGE_JS=${TOOLS_DIR}/mergejs.py | |
| 17 | - | |
| 18 | -CMD_SHRINKSAFE=${TOOLS_DIR}/shrinksafe.py | |
| 19 | -CMD_JSMIN=${TOOLS_DIR}/jsmin.py | |
| 20 | - | |
| 21 | -LICENSE_HEADER_FILENAME=license.txt | |
| 22 | - | |
| 23 | - | |
| 24 | -## Generate "fat" single file library version | |
| 25 | -${CMD_MERGE_JS} -c ${CFG_FILENAME} ${TMP_OUTPUT_FILENAME} ${SRC_DIR} | |
| 26 | - | |
| 27 | - | |
| 28 | -## Compress ("shrink") the single file library version | |
| 29 | - | |
| 30 | -echo | |
| 31 | -echo Shrinking and post-processing... | |
| 32 | -# (We also append the license header here.) | |
| 33 | -cat ${LICENSE_HEADER_FILENAME} > ${OUTPUT_FILENAME} | |
| 34 | -${CMD_JSMIN} <${TMP_OUTPUT_FILENAME} >> ${OUTPUT_FILENAME} | |
| 35 | - | |
| 36 | -echo Cleaning up... | |
| 37 | -rm $TMP_OUTPUT_FILENAME | |
| 38 | - | |
| 39 | -echo | |
| 40 | -echo Done. |
pacotes/openlayers/build/buildUncompressed.py
| ... | ... | @@ -1,25 +0,0 @@ |
| 1 | -#!/usr/bin/env python | |
| 2 | - | |
| 3 | -import sys | |
| 4 | -sys.path.append("../tools") | |
| 5 | - | |
| 6 | -import jsmin, mergejs | |
| 7 | - | |
| 8 | -sourceDirectory = "../lib" | |
| 9 | -configFilename = "library.cfg" | |
| 10 | -outputFilename = "OpenLayers.js" | |
| 11 | - | |
| 12 | -if len(sys.argv) > 1: | |
| 13 | - configFilename = sys.argv[1] + ".cfg" | |
| 14 | -if len(sys.argv) > 2: | |
| 15 | - outputFilename = sys.argv[2] | |
| 16 | - | |
| 17 | -print "Merging libraries." | |
| 18 | -merged = mergejs.run(sourceDirectory, None, configFilename) | |
| 19 | -print "Adding license file." | |
| 20 | -merged = file("license.txt").read() + merged | |
| 21 | - | |
| 22 | -print "Writing to %s." % outputFilename | |
| 23 | -file(outputFilename, "w").write(merged) | |
| 24 | - | |
| 25 | -print "Done." |
pacotes/openlayers/build/docs.sh
| ... | ... | @@ -1,39 +0,0 @@ |
| 1 | -#!/bin/sh | |
| 2 | - | |
| 3 | -rm ../doc/reference.html | |
| 4 | -CLASSES="Map Layer Layer.Image Layer.HTTPRequest Layer.Grid Layer.WMS Layer.KaMap Layer.EventPane Layer.Google Layer.VirtualEarth Layer.Markers Layer.Text Layer.GeoRSS Layer.Boxes Layer.TMS Icon Marker Marker.Box Tile Tile.Image Tile.WFS Control Control.LayerSwitcher Control.MouseDefaults Control.MousePosition Control.MouseToolbar Control.OverviewMap Control.PanZoom Control.PanZoomBar Control.Permalink Control.Scale LonLat Size Pixel Bounds Util Ajax" | |
| 5 | -echo "<html> | |
| 6 | - <head> | |
| 7 | - <title>OpenLayers Class Reference Documentation</title> | |
| 8 | - <style type='text/css'> | |
| 9 | - .type { background-color: #ddd } | |
| 10 | - td { border: black solid 1px; padding: 3px; } | |
| 11 | - table { border-collapse: collapse; margin: 5px 10px; } | |
| 12 | - .classref { margin-left: 20px; } | |
| 13 | - div.index { float:left; width: 300px; } | |
| 14 | - </style> | |
| 15 | - </head> | |
| 16 | - <body>" >> ../doc/reference.html | |
| 17 | - | |
| 18 | -for i in $CLASSES; do | |
| 19 | -echo "<div class='index'><a href='#OpenLayers.$i'>OpenLayers.$i</a></div>" >> ../doc/reference.html | |
| 20 | -done | |
| 21 | - | |
| 22 | -echo "<br style='clear:both' />" >> ../doc/reference.html | |
| 23 | - | |
| 24 | -for i in $CLASSES; do | |
| 25 | -cat ../doc/$i.txt | \ | |
| 26 | -perl -pe 's!^(.*?) -- (.*?) -- (.*?)$! <tr><td>$1</td><td>$2</td><td>$3</td></tr>!g; | |
| 27 | - s!^( \* )?(.*?) -- (.*?)$! <tr><td>$2</td><td>$3</td></tr>!g; | |
| 28 | - s!^ \* (.*)$! </table>\n\n<h3>$1</h3>\n <table>!; | |
| 29 | - s!{OpenLayers.(.*?)\|(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">\2</a>!g; | |
| 30 | - s!{OpenLayers.(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">OpenLayers.$1</a>!; | |
| 31 | - s!{([A-Za-z]+?)\|(.+?)}!<span class="type" title="$1">\2<\/span>!g; | |
| 32 | - s!{([A-Za-z]+?)}!<span class="type" title="$1">$1<\/span>!g; | |
| 33 | - s!^\* (.*)$!</table>\n<h2>$1</h2>\n<table>!; | |
| 34 | - s!^OpenLayers\.(.*)$!<h1><a name="OpenLayers.$1">OpenLayers.$1</a></h1><div class="classref">!' \ | |
| 35 | ->> ../doc/reference.html | |
| 36 | -echo '</table></div>' >> ../doc/reference.html | |
| 37 | -done | |
| 38 | -echo " </body> | |
| 39 | -</html>" >> ../doc/reference.html |
pacotes/openlayers/build/full.cfg
pacotes/openlayers/build/library.cfg
| ... | ... | @@ -1,47 +0,0 @@ |
| 1 | -[first] | |
| 2 | -OpenLayers/SingleFile.js | |
| 3 | -OpenLayers.js | |
| 4 | -OpenLayers/BaseTypes.js | |
| 5 | -OpenLayers/Util.js | |
| 6 | -Rico/Corner.js | |
| 7 | - | |
| 8 | -[last] | |
| 9 | - | |
| 10 | -[include] | |
| 11 | - | |
| 12 | -[exclude] | |
| 13 | -OpenLayers/Format/GeoRSS.js | |
| 14 | -OpenLayers/Format/GML.js | |
| 15 | -OpenLayers/Format/WKT.js | |
| 16 | -OpenLayers/Format/KML.js | |
| 17 | -OpenLayers/Format/WFS.js | |
| 18 | -OpenLayers/Format.js | |
| 19 | -OpenLayers/Handler/Path.js | |
| 20 | -OpenLayers/Handler/Point.js | |
| 21 | -OpenLayers/Handler/Polygon.js | |
| 22 | -OpenLayers/Handler/Select.js | |
| 23 | -OpenLayers/Geometry/Collection.js | |
| 24 | -OpenLayers/Geometry/Curve.js | |
| 25 | -OpenLayers/Geometry/LinearRing.js | |
| 26 | -OpenLayers/Geometry/LineString.js | |
| 27 | -OpenLayers/Geometry/MultiLineString.js | |
| 28 | -OpenLayers/Geometry/MultiPoint.js | |
| 29 | -OpenLayers/Geometry/MultiPolygon.js | |
| 30 | -OpenLayers/Geometry/Point.js | |
| 31 | -OpenLayers/Geometry/Polygon.js | |
| 32 | -OpenLayers/Geometry/Rectangle.js | |
| 33 | -OpenLayers/Geometry/Surface.js | |
| 34 | -OpenLayers/Geometry.js | |
| 35 | -OpenLayers/Layer/GML.js | |
| 36 | -OpenLayers/Layer/Vector.js | |
| 37 | -OpenLayers/Control/DrawFeature.js | |
| 38 | -OpenLayers/Control/EditingToolbar.js | |
| 39 | -OpenLayers/Control/SelectFeature.js | |
| 40 | -OpenLayers/Feature/Vector.js | |
| 41 | -OpenLayers/Renderer | |
| 42 | -OpenLayers/Renderer/Elements.js | |
| 43 | -OpenLayers/Renderer/SVG.js | |
| 44 | -OpenLayers/Renderer/VML.js | |
| 45 | -OpenLayers/Renderer.js | |
| 46 | - | |
| 47 | - |
pacotes/openlayers/build/license.txt
| ... | ... | @@ -1,45 +0,0 @@ |
| 1 | -/* | |
| 2 | - | |
| 3 | - OpenLayers.js -- OpenLayers Map Viewer Library | |
| 4 | - | |
| 5 | - Copyright 2005-2006 MetaCarta, Inc., released under the BSD license. | |
| 6 | - Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt | |
| 7 | - for the full text of the license. | |
| 8 | - | |
| 9 | - Includes compressed code under the following licenses: | |
| 10 | - | |
| 11 | - (For uncompressed versions of the code used please see the | |
| 12 | - OpenLayers SVN repository: <http://openlayers.org/>) | |
| 13 | - | |
| 14 | -*/ | |
| 15 | - | |
| 16 | -/* Contains portions of Prototype.js: | |
| 17 | - * | |
| 18 | - * Prototype JavaScript framework, version 1.4.0 | |
| 19 | - * (c) 2005 Sam Stephenson <sam@conio.net> | |
| 20 | - * | |
| 21 | - * Prototype is freely distributable under the terms of an MIT-style license. | |
| 22 | - * For details, see the Prototype web site: http://prototype.conio.net/ | |
| 23 | - * | |
| 24 | -/*--------------------------------------------------------------------------*/ | |
| 25 | - | |
| 26 | -/** | |
| 27 | -* | |
| 28 | -* Contains portions of Rico <http://openrico.org/> | |
| 29 | -* | |
| 30 | -* Copyright 2005 Sabre Airline Solutions | |
| 31 | -* | |
| 32 | -* Licensed under the Apache License, Version 2.0 (the "License"); you | |
| 33 | -* may not use this file except in compliance with the License. You | |
| 34 | -* may obtain a copy of the License at | |
| 35 | -* | |
| 36 | -* http://www.apache.org/licenses/LICENSE-2.0 | |
| 37 | -* | |
| 38 | -* Unless required by applicable law or agreed to in writing, software | |
| 39 | -* distributed under the License is distributed on an "AS IS" BASIS, | |
| 40 | -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | |
| 41 | -* implied. See the License for the specific language governing | |
| 42 | -* permissions and limitations under the License. | |
| 43 | -* | |
| 44 | -**/ | |
| 45 | - |
pacotes/openlayers/build/lite.cfg
| ... | ... | @@ -1,20 +0,0 @@ |
| 1 | -[first] | |
| 2 | -OpenLayers/SingleFile.js | |
| 3 | -OpenLayers.js | |
| 4 | -OpenLayers/BaseTypes.js | |
| 5 | -OpenLayers/Util.js | |
| 6 | - | |
| 7 | -[last] | |
| 8 | - | |
| 9 | -[include] | |
| 10 | -OpenLayers/Events.js | |
| 11 | -OpenLayers/Map.js | |
| 12 | -OpenLayers/Layer.js | |
| 13 | -OpenLayers/Layer/Grid.js | |
| 14 | -OpenLayers/Layer/HTTPRequest.js | |
| 15 | -OpenLayers/Layer/WMS.js | |
| 16 | -OpenLayers/Layer/WMS/Untiled.js | |
| 17 | -OpenLayers/Tile.js | |
| 18 | -OpenLayers/Tile/Image.js | |
| 19 | - | |
| 20 | -[exclude] |
pacotes/openlayers/doc/Ajax.txt
| ... | ... | @@ -1,9 +0,0 @@ |
| 1 | -OpenLayers contains a number of helper functions for working with AJAX. | |
| 2 | - | |
| 3 | -* Methods | |
| 4 | - OpenLayers.loadURL({String|uri}, {String|params}, {Object|caller}, {function|onComplete}, {function|onFailure}) -- none -- This function sends an XMLHTTPRequest to a remote site, specified by URI, with the params string given as the params argument. Caller is bound as 'this' to the function specified by either onComplete or onFailure. | |
| 5 | - OpenLayers.parseXMLString({String|text}) -- {AJAXResponse} -- Accepts a block of text, and creates a DOM response document from the text. | |
| 6 | - | |
| 7 | -* Parameters | |
| 8 | - OpenLayers.ProxyHost -- When initiating an AJAX request, any URL that is absolute is prefixed with OpenLayers.ProxyHost. The ProxyHost is designed to accept a URL and return the content, in an effort to work around cross-browser security restrictions. This defaults to null, but if you wish to access content from another domain that Javascript would restrict access to, you must set this to be the URL which will accept a URL encoded version of the passed URL and return the content at that URL. An example is available as proxy.txt in the examples/ directory. | |
| 9 | - |
pacotes/openlayers/doc/Bounds.txt
| ... | ... | @@ -1,21 +0,0 @@ |
| 1 | -OpenLayers.Bounds | |
| 2 | - | |
| 3 | -This class represents a bounding box. Data stores as left, bottom, right, top floats. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Bounds(left, bottom, right, top) -- Create new Bounds. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - clone() -- {OpenLayers.Bounds} -- Return copy of the current bounds. | |
| 10 | - toString() -- {String} -- Return bounds as string. | |
| 11 | - toBBOX() -- {String} -- Return bounds as simple string, usable for WMS. | |
| 12 | - getWidth() -- {float} -- Return width of bounds. | |
| 13 | - getHeight() -- {float} -- Return height of bounds. | |
| 14 | - getSize() -- {OpenLayers.Size} -- Return size of bounds. | |
| 15 | - getCenterPixel() -- {OpenLayers.Pixel} -- Return center of bounds as pixel. | |
| 16 | - getCenterLonLat() -- {OpenLayers.LonLat} -- Return center of bounds as LonLat. | |
| 17 | - equals({OpenLayers.Bounds|bounds}) -- {Boolean} -- whether or not the bounds are equivilant. | |
| 18 | - add({float|x}, {float|y}) -- {OpenLayers.Bounds} -- Shift bounds by x and y. | |
| 19 | - contains({float|x}, {float|y}, {Boolean|inclusive}) -- {Boolean} -- Return Whether or not the passed-in coordinates are within this bounds | |
| 20 | - containsBounds({OpenLayers.Bounds|bounds}, {Boolean|partial}, {Boolean|inclusive}) -- {Boolean} -- Returns whether or not the passed-in OpenLayers.Bounds object is contained within this bounds. partial indicates whether bounds must be contained or only overlap. Inclusive determines whether border is included. | |
| 21 | - determineQuadrant({OpenLayers.LonLat|lonlat}) -- {String} -- Determine which quadrant the LonLat is in. Returns combination of "b" or "t" and "l" or "r". |
pacotes/openlayers/doc/Control.LayerSwitcher.txt
| ... | ... | @@ -1,14 +0,0 @@ |
| 1 | -OpenLayers.Control.LayerSwitcher | |
| 2 | - | |
| 3 | -This control will by default display a small image in the upper right corner of the map. When clicked, this image expands into a control which allows one to select between multiple types of layers, seperated into two types: Base Layers and Overlays. Only one base layer can be selected at a time, and is enforced by a radio button control being used. Multiple overlays can be selected at once, and a checkbox control is visible for this functionality. | |
| 4 | -* Constructor | |
| 5 | - OpenLayers.Control.LayerSwitcher({Object|options}?) -- Creates a new control. | |
| 6 | - | |
| 7 | -* Methods | |
| 8 | - maximizeControl() -- none -- Expand the layer switcher control. | |
| 9 | - minimizeControl() -- none -- Close the layer switcher control. | |
| 10 | - | |
| 11 | -* Parameters | |
| 12 | - position -- (inherited from {OpenLayers.Control}) {OpenLayers.Pixel} to use as the top-left corner of the control div, relative to the map area. | |
| 13 | - activeColor -- The color to use for the background of the layer switcher div. | |
| 14 | - ascending -- Ascending determines whether layers are added to the layer switcher in ascending or descending order. If ascending is true, the lowest layer is appended to the list first. If ascending is false, the lowest layer is at the very bottom of the LayerSwitcher. Default is true. |
pacotes/openlayers/doc/Control.MouseDefaults.txt
| ... | ... | @@ -1,19 +0,0 @@ |
| 1 | -OpenLayers.Control.MouseDefaults | |
| 2 | - | |
| 3 | -Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseDefaults, replacing the functions whose behavior you wish to change. | |
| 4 | - | |
| 5 | - | |
| 6 | -* Constructor | |
| 7 | - OpenLayers.Control() -- Creates a new control. No options available. | |
| 8 | - | |
| 9 | -* Methods | |
| 10 | - defaultClick -- none -- This event takes place when a click event occurs on the map. | |
| 11 | - defaultDblClick -- none -- This event re-centers the map on the clicked location. | |
| 12 | - defaultMouseDown -- none -- This event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead. | |
| 13 | - defaultMouseMove -- none -- If a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor. | |
| 14 | - defaultMouseUp -- none -- This function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled. | |
| 15 | - defaultMouseOut -- none -- This calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped. | |
| 16 | - defaultWheelUp -- none -- Zooms in one level. Called by onWheelEvent | |
| 17 | - defaultWheelDown -- none -- Zooms out one level. Called by onWheelEvent. | |
| 18 | - onWheelEvent -- none -- catches the map wheel event, and handles it, zooming appropriately. | |
| 19 | - |
pacotes/openlayers/doc/Control.MousePosition.txt
| ... | ... | @@ -1,32 +0,0 @@ |
| 1 | -OpenLayers.Control.MousePosition | |
| 2 | - | |
| 3 | -A small control which displays the Longitude and Latitude of the current mouse position, by defualt in the lower right of the map viewport. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Control.MousePosition({Object|options}) -- Creates a new MousePosition control. | |
| 7 | - | |
| 8 | - | |
| 9 | -* Parameters | |
| 10 | - | |
| 11 | - element -- if not null, div in which to display the MousePosition | |
| 12 | - prefix -- html to precede the longitude value (default: '') | |
| 13 | - separator -- html to separate the longitude and latitude values (default: '<br />') | |
| 14 | - suffix -- html to follow the latitude value (default: '') | |
| 15 | - numdigits -- number of digits to the right of the decimal (default: 5) | |
| 16 | - granularity -- Don't refresh display if mouse has moved more than this (default: 10) | |
| 17 | - | |
| 18 | -prefix, separator, and suffix are used to format the lon/lat values. | |
| 19 | - | |
| 20 | -With: | |
| 21 | - prefix = 'Lon: ' | |
| 22 | - suffix = '<br />Lat: ' | |
| 23 | - suffix = '' | |
| 24 | - nudigits = 3 | |
| 25 | -Lon/Lat is displayed as: | |
| 26 | - Lon: 95.123 | |
| 27 | - Lat: 35.456 | |
| 28 | - | |
| 29 | -If the mouse has never been over the map, Lon/Lat will equal 0/0. If the mouse is over the map, Lon/Lat will equal the current mouse position. If the mouse has been moved off the map, Lon/Lat will equal the value displayed at the time the mouse was moved off the map. | |
| 30 | - | |
| 31 | -If the mouse is moving slowly, the Lon/Lat will refresh continuously. If the mouse is moving rapidly, the refresh of Lon/Lat will be suspended until the mouse has slowed down or stopped. (Trying to update the Lon/Lat value while the mouse is in rapid movemement makes the movement of the mouse unacceptably jerky.) | |
| 32 | - |
pacotes/openlayers/doc/Control.MouseToolbar.txt
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -OpenLayers.Control.MouseToolbar | |
| 2 | - | |
| 3 | -Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseToolbar, replacing the functions whose behavior you wish to change. Additionally, a toolbar of images can be clicked to start events, as well as using the keyboard shortcuts. Note that if you wish to use the MouseToolbar, you *must* add a 'controls' option to the map constructor, otherwise you will have both MouseDefaults and MouseToolbar on the map, which will not work. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Control.MouseToolbar({OpenLayers.Pixel|position}, {String|direction}) -- Creates a new control. The direction of the control can be either "vertical" or "horizontal". The default is vertical. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - defaultClick -- none -- This event takes place when a click event occurs on the map. | |
| 10 | - defaultDblClick -- none -- This event re-centers the map on the clicked location. | |
| 11 | - defaultMouseDown -- none -- This event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead. | |
| 12 | - defaultMouseMove -- none -- If a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor. | |
| 13 | - defaultMouseUp -- none -- This function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled. | |
| 14 | - defaultMouseOut -- none -- This calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped. | |
| 15 | - |
pacotes/openlayers/doc/Control.OverviewMap.txt
| ... | ... | @@ -1,38 +0,0 @@ |
| 1 | -OpenLayers.Control.OverviewMap | |
| 2 | - | |
| 3 | -This control provides a locator or overview map linked to another map. By default, the overview map shows up in the lower right of the main map and can be expdaned with the '+' button. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Control.OverviewMap(opts?) -- Creates a new overview map. The opts variable is an object with various options, as described in the options section below. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | -isSuitableOverview() -- {Boolean} -- Determines if the overview map is suitable given the extent and resolution of the main map. | |
| 10 | -getRectPxBounds() -- {OpenLayers.Bounds|bounds} -- An OpenLayers.Bounds which is the extent rectangle's pixel bounds (relative to the parent element). | |
| 11 | -setRectPxBounds({OpenLayers.Bounds|bounds}) -- none -- Set extent rectangle pixel bounds. | |
| 12 | -getRectBoundsFromMapBounds({OpenLayers.Bounds|lonLatBounds}) -- {OpenLayers.Bounds|bounds} -- An OpenLayers.Bounds which is the passed-in map lon/lat extent translated into pixel bounds for the overview map. | |
| 13 | -getMapBoundsFromRectBounds({OpenLayers.Bounds|pxBounds]}) -- {OpenLayers.Bounds|bounds} -- An OpenLayers.Bounds which is the passed-in overview rect bounds translated into lon/lat bounds for the overview map. | |
| 14 | -getLonLatFromOverviewPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat|lonlat} -- An OpenLayers.LonLat which is the passed-in overview map OpenLayers.Pixel translated into lon/lat by the overview map. | |
| 15 | -getOverviewPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel|pixel} -- An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into overview map pixels | |
| 16 | - | |
| 17 | - | |
| 18 | -* Events | |
| 19 | - * Rectangle events | |
| 20 | -They are defined on OverviewMap.rectEvents | |
| 21 | - | |
| 22 | - mouseover -- rectangle is moused over | |
| 23 | - mouseout -- rectangle is no longer mousedout | |
| 24 | - mousemove -- mouse moves inside rectangle | |
| 25 | - mousedown -- mouse button is pressed over the rectangle. | |
| 26 | - mouseup -- mouse button is released over the rectangle. | |
| 27 | - click -- mouse clicked | |
| 28 | - dblclick -- mouse double clicked | |
| 29 | - | |
| 30 | - * Map events | |
| 31 | - They are defined on OverviewMap.mapDivEvents | |
| 32 | - | |
| 33 | - click -- mouse clicked | |
| 34 | - | |
| 35 | -* Options: | |
| 36 | - * minRatio -- The ratio of the overview map resolution to the main map resolution at which to zoom farther out on the overview map. | |
| 37 | - * maxRatio -- The ratio of the overview map resolution to the main map resolution at which to zoom farther in on the overview map. | |
| 38 | - * layers -- Ordered list of layers in the overview map. If none, then the map base layer is used. |
pacotes/openlayers/doc/Control.PanZoom.txt
| ... | ... | @@ -1,9 +0,0 @@ |
| 1 | -OpenLayers.Control.PanZoom | |
| 2 | - | |
| 3 | -Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and one button which zooms to the max extent of the map. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Control.PanZoom({Object|options}) -- Creates a new panzoom control. | |
| 7 | - | |
| 8 | -* Parameters | |
| 9 | - slideFactor -- Number of pixels by which to slide the map when a pan arrow is clicked. |
pacotes/openlayers/doc/Control.PanZoomBar.txt
| ... | ... | @@ -1,6 +0,0 @@ |
| 1 | -OpenLayers.Control.PanZoomBar | |
| 2 | - | |
| 3 | -Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and a bar on which a slider can be moved to zoom in or out by multiple stops at once. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Control.PanZoomBar() -- Creates a new panzoombar control. |
pacotes/openlayers/doc/Control.Permalink.txt
| ... | ... | @@ -1,6 +0,0 @@ |
| 1 | -OpenLayers.Control.Permalink | |
| 2 | - | |
| 3 | -A small control which updates a "Permalink" to the map every time the viewport changes. This allows users to copy a link to a specfic map view. By default, it places itself in the lower right corner of the map. This control must be added to the map after a baselayer has been set. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Control.Scale({DOMElement|element}?, {String|base}) -- Creates a new permalink control. The DOMElement is used, if passed, as the element on which the 'href' is set. If you prefer to put this link on an element outside of the map, set this element to an anchor element to have its href updated when the map moves. If you wish to make the link go to some other URL (for example, an editing interface rather than the current URL), the 'base' property can be used, to which the ?lat=&lon=&zoom= will be appended after the map has moved. |
pacotes/openlayers/doc/Control.Scale.txt
| ... | ... | @@ -1,6 +0,0 @@ |
| 1 | -OpenLayers.Control.Scale | |
| 2 | - | |
| 3 | -A small control which displays an informative scale value, a la "1:50K" , by defualt in the lower right of the map viewport. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Control.Scale({DOMElement|element}?) -- Creates a new scale control. The DOMElement is used, if passed, to put the scale inside -- this allows you to have the scale displayed in some location outside the map. |
pacotes/openlayers/doc/Control.txt
| ... | ... | @@ -1,9 +0,0 @@ |
| 1 | -OpenLayers.Control | |
| 2 | - | |
| 3 | -Base class from which controls are derived. Controls are elements of the map used to control things like zoom, layer status, or to provide information to the user about the status of the map, such as scale or copyright information. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Control({Object|options}?) -- Creates a new control. The options here are used to control parameters of the control. The base control defines only "position", which is designed to be an {OpenLayers.Pixel} which is the top-left of the location of the control relative to the map div. | |
| 7 | - | |
| 8 | -* Parameters | |
| 9 | - position -- {OpenLayers.Pixel} to use as the top-left corner of the control div, relative to the map area. |
pacotes/openlayers/doc/Icon.txt
| ... | ... | @@ -1,9 +0,0 @@ |
| 1 | -OpenLayers.Icon | |
| 2 | - | |
| 3 | -Icon is used as the visual representation of a Marker. Creating such a representation requres up to three parts: An Icon URL, a size, and an offset. The icon URL is a pointer to an image to use as an icon. The size is the size of the image, as an {OpenLayers.Size} object, and the offset is the position of the top left corner of the image in pixels, relative to the latitude and longitude of the Marker. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Icon({String|url}, {OpenLayers.Size|size}, {OpenLayers.Pixel|offset}) -- creates a new icon. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - clone() -- {OpenLayers.Icon} -- Create an exact copy of the icon. |
pacotes/openlayers/doc/Layer.Boxes.txt
pacotes/openlayers/doc/Layer.EventPane.txt
| ... | ... | @@ -1,6 +0,0 @@ |
| 1 | -OpenLayers.Layer.EventPane | |
| 2 | - | |
| 3 | -Designed to act as a super-class for layers which need OpenLayers to intercept click events. Google Maps and Microsoft Virtual Earth both use this functionality, in order to allow for actions like the rubber-band-zoom/zoombox functionality. This Layer is not designed to be used on its own, but instead to act as an intermediary between the user and layers which have their own click handlers. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Layer.EventPane(name, options) -- Only designed to be used by subclasses. |
pacotes/openlayers/doc/Layer.GeoRSS.txt
| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | -OpenLayers.Layer.GeoRSS | |
| 2 | - | |
| 3 | -GeoRSS layer. Pass a name and location of a GeoRSS file on the web, and a marker will be added to the map for each item in the GeoRSS feed. Uses OpenLayers.loadURL to load the XML, parses the data, and adds markers to the map. The GeoRSS layer supports 1.0 and 2.0 in IE and Firefox, and supports 2.0 in Safari. (Ticket #111 explains the reason for this difference.) | |
| 4 | - | |
| 5 | - | |
| 6 | -* Constructor | |
| 7 | - OpenLayers.Layer.GeoRSS(name, url) -- Name and location of GeoRSS XML file. | |
| 8 | - | |
| 9 | -* Methods | |
| 10 | - parseData(ajaxResponse) -- none -- Callback for the loadURL call. This function parses the XML for the GeoRSS feed, creating markers for the data and adding a popup to each marker. It populates an array of features as 'this.features'. | |
| 11 | - markerClick(Event) -- none -- Action to perform when a marker is clicked. | |
| 12 | - clearFeatures() -- none -- Removes all features and markers from the map. |
pacotes/openlayers/doc/Layer.Google.txt
| ... | ... | @@ -1,16 +0,0 @@ |
| 1 | -OpenLayers.Layer.Google | |
| 2 | - | |
| 3 | -The Google Layer in OpenLayers allows you to include Google Maps functionality in your OpenLayers maps. In order to use the Google Layer, you must first obtain an API key for Google Maps, and include the Google Maps API script in your page. Once you have done this, | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Layer.Google(name, options?) -- Constructor for Google layer. Accepts name and options. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - getOLLonLatFromGLatLng(GLonLat) -- {OpenLayers.LonLat} -- Convert from GLatLon to OpenLayers LonLat | |
| 10 | - getGLatLngFromOLLonLat({OpenLayers.LonLat|lonlat}) -- GLatLon -- Convert From OpenLayers LonLat to GLatLon | |
| 11 | - getOLPixelFromGPoint(GPoint) -- {OpenLayers.Pixel} -- Convert from GPoint to OpenLayers.Pixel | |
| 12 | - getGPointFromOLPixel({OpenLayers.Pixel|pixel}) -- GPoint -- Create GPoint from OpenLayers Pixel. | |
| 13 | - | |
| 14 | -* Parameters | |
| 15 | - type -- one of G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, used to choose the type of map to display. (See <a href="http://www.google.com/apis/maps/documentation/reference.html#GMapType">GMapType in the Google documentation</a> for more.) | |
| 16 | - |
pacotes/openlayers/doc/Layer.Grid.txt
| ... | ... | @@ -1,31 +0,0 @@ |
| 1 | -OpenLayers.Layer.Grid | |
| 2 | - | |
| 3 | -The Grid layer is the base layer for almost all image layers. This is a subclass of HTTPRequest. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Layer.Grid(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - getGridBounds() -- {OpenLayers.Bounds} -- return geographic extent of the grid of tiles. | |
| 10 | - _initTiles() -- none -- Used to initialize the tile grid, creating image elements as neccesary and filling them with the correct images. | |
| 11 | - spiralTileLoad() -- none -- Called from _initTiles. Rotates through the grid filling in the images for the grid. | |
| 12 | - clone() -- {OpenLayers.Layer.Grid} -- create a clone of the layer. Subclassed from {OpenLayers.Layer}. | |
| 13 | - setMap(map) -- none -- Set the map property of the layer. Also set the parameters which are inherited from the map. This is also where the tileSize is retrieved from the map. Subclassed from {OpenLayers.Layer}. | |
| 14 | - moveTo({OpenLayers.Bounds|bounds}, {Boolean|zoomChanged}) -- none -- Not implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location. Subclassed from {OpenLayers.Layer}. | |
| 15 | - getResolution() -- {float} -- Return the current resolution of the map, in units/pixel. Subclassed from {OpenLayers.Layer}. | |
| 16 | - getExtent() -- {OpenLayers.Bounds} -- Return the geographic extent of the current map viewport. Subclassed from {OpenLayers.Layer}. | |
| 17 | - getZoomForExtent({OpenLayers.Bounds|bounds}) -- {Integer} -- return the integer zoom which most closely matches the passed bounds. Subclassed from {OpenLayers.Layer}. | |
| 18 | - getLonLatFromViewPortPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the layer. Subclassed from {OpenLayers.Layer}. | |
| 19 | - getViewPortPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels. Subclassed from {OpenLayers.Layer}. | |
| 20 | - | |
| 21 | -* Parameters | |
| 22 | - buffer -- Default 2. Number of tiles around the central map area which OpenLayers will preload so that dragging goes more smoothly. | |
| 23 | - * Subclassed from OpenLayers.Layer | |
| 24 | - isBaseLayer -- This determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false. | |
| 25 | - projection -- SRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 26 | - maxExtent -- an OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 27 | - maxResolution -- The number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 28 | - maxZoomLevel -- The maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 29 | - minScale -- The scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 30 | - maxScale -- The scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 31 | - units -- The units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map. |
pacotes/openlayers/doc/Layer.HTTPRequest.txt
| ... | ... | @@ -1,13 +0,0 @@ |
| 1 | -OpenLayers.Layer.HTTPRequest | |
| 2 | - | |
| 3 | -Sublass of Layer used for services which require initiating multiple HTTPRequests. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Layer.HTTPRequest(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - initResolutions() -- none -- Based on the current minScale/maxScale/maxResolution/numZoomLevel/scales/resolutions parameters, initializes an array of 'zoom levels' as this.resolutions, which are then used as an index into when zooming. | |
| 10 | - getFullRequestString(newParams) -- {String} -- Returns the full request string for a combination of the defaults on this layer and the parameters passed via newParams. | |
| 11 | - | |
| 12 | -* Options | |
| 13 | - reproject -- If reproject is true, then the layer will alter the bounding boxes of its tiles to be based on the geographic location of the pixel bounds in the base layer. This is important for reprojecting WMS tiles onto something like Google Maps. Tile locations are calculated, and then when creating the tile request, the bounding box is adjusted to match the bounding box of the base layer at that location. |
pacotes/openlayers/doc/Layer.Image.txt
| ... | ... | @@ -1,9 +0,0 @@ |
| 1 | -OpenLayers.Layer.Image | |
| 2 | - | |
| 3 | -The Image Layer allows you to load a single image and use it as a layer in your | |
| 4 | -map. | |
| 5 | - | |
| 6 | - | |
| 7 | -* Constructor | |
| 8 | - OpenLayers.Layer(name, url, {OpenLayers.Bounds|bounds}, {OpenLayers.Size|size}, {options}) -- Image Layer constructor requires a name, URL of the image, geographic bounds of the image, pixel size of the image, and an optional options parameter. | |
| 9 | - |
pacotes/openlayers/doc/Layer.KaMap.txt
| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | -OpenLayers.Layer.KaMap | |
| 2 | - | |
| 3 | -ka-Map is a Mapserver wrapper which performs caching and works around many of the deficiencies with tiling when using Mapserver as a WMS client. | |
| 4 | - | |
| 5 | -* Construtor | |
| 6 | - OpenLayers.Layer.KaMap(name, url, params, options) -- URL is the url of the tile.php for KaMap. | |
| 7 | - |
pacotes/openlayers/doc/Layer.Markers.txt
| ... | ... | @@ -1,13 +0,0 @@ |
| 1 | -OpenLayers.Layer.Markers | |
| 2 | - | |
| 3 | -The base class for all vector drawing, The OpenLayers.Layer.Markers layer is the primary way to get annotations into your map. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Layer.Markers(name, options) -- Name and options for layer. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - addMarker({OpenLayers.Marker|Marker}) -- none -- Adds a marker to the layer, sets the map object on the marker, and calls drawMarker on the marker. | |
| 10 | - removeMarker({OpenLayers.Marker|Marker}) -- none -- Remove the marker from the layer and map. | |
| 11 | - clearMarkers() -- none -- Remove all markers from the layer with removeMarker. | |
| 12 | - redraw() -- none -- Redraw all markers. Used so that markers can change their position when a base layer changes. | |
| 13 | - drawMarker -- none -- Call marker.draw(px), which passes the Pixel of the latitude/longitude in the map viewport to the marker. adds the marker to the div, and marks the marker as drawn. |
pacotes/openlayers/doc/Layer.TMS.txt
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -OpenLayers.Layer.TMS | |
| 2 | - | |
| 3 | -The TMS layer allows one to connect to a TMS -- Tiled Map Service -- server to obtain images. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Layer.TMS(name, url, options) -- URL is the base URL to the layer. Options is a set of options, extending the parameters of the layer. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - getURL({OpenLayers.Bounds|bounds}) -- {String} -- Returns a TMS URL for the given bounds based on the properties of the layer. | |
| 10 | - All other methods are inherited from {OpenLayers.Layer.Grid} | |
| 11 | - | |
| 12 | -* Options | |
| 13 | - tileOrigin -- The tileOrigin option will allow you to set your tileOrigin to something other than the lower left extent of your map. | |
| 14 | - layername -- Name of the layer in the TMS request. | |
| 15 | - type -- The extension images have. |
pacotes/openlayers/doc/Layer.Text.txt
| ... | ... | @@ -1,10 +0,0 @@ |
| 1 | -OpenLayers.Layer.Text | |
| 2 | - | |
| 3 | -Subclass of Markers layer which retrieves CSV file from the web, and parses content to create markers and popups. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Layer.Text(name, options) -- Pass in name, and set location: 'URL of CSV file' in the options hash. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - parseData(ajaxRequest) -- none -- Parses returned CSV file. | |
| 10 | - |
pacotes/openlayers/doc/Layer.VirtualEarth.txt
| ... | ... | @@ -1,14 +0,0 @@ |
| 1 | -OpenLayers.Layer.VirtualEarth | |
| 2 | - | |
| 3 | -The Virtual Earth Layer in OpenLayers allows you to include Virtual Earth Maps in your OpenLayers maps. In order to use the Virtual Earth Layer, you must first include the Virtual Earth API script in your page. Once you have done this, simply add the layer to your map. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Layer.VirtualEarth(name) -- Constructor for Virtual Earth layer. Accepts name. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - getOLLonLatFromVELatLng(VELatLon) -- {OpenLayers.LonLat} -- Convert from VELatLon to OpenLayers LonLat | |
| 10 | - getVELatLngFromOLLonLat({OpenLayers.LonLat|lonlat}) -- VELatLon -- Convert From OpenLayers LonLat to VELatLon | |
| 11 | - getOLPixelFromVEPoint(Msn.VE.Pixel) -- {OpenLayers.Pixel} -- Convert from VEPoint to OpenLayers.Pixel | |
| 12 | - getGPointFromOLPixel({OpenLayers.Pixel|pixel}) -- Msn.VE.Pixel -- Create Msvn.VE.Pixel from OpenLayers Pixel. | |
| 13 | - | |
| 14 | - |
pacotes/openlayers/doc/Layer.WMS.txt
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -OpenLayers.Layer.WMS | |
| 2 | - | |
| 3 | -The WMS layer allows one to connect to a WMS server to obtain images. Params are available as a hash on the layer object, however, all keys are upper-cased automatically for maximum compatibility with WMS servers, so a parameter which is set as 'layers' will be uppercased to LAYERS. Where 'layer' is your Javscript variable for the layer, layer.params.LAYERS is the value of the layers param as set by the constructor. | |
| 4 | - | |
| 5 | -If you wish to change params, you should use mergeNewParams, rather than accessing the parameters directly. | |
| 6 | - | |
| 7 | -* Constructor | |
| 8 | - OpenLayers.Layer.WMS(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer. | |
| 9 | - | |
| 10 | -* Methods | |
| 11 | - getURL({OpenLayers.Bounds|bounds}) -- {String} -- Returns a WMS URL for the given bounds based on the properties of the layer. | |
| 12 | - All other methods are inherited from {OpenLayers.Layer.Grid} | |
| 13 | - | |
| 14 | -* Options | |
| 15 | - isBaseLayer -- WMS layers default to being base layers unless one of their parameters is 'transparent':'true'. |
pacotes/openlayers/doc/Layer.txt
| ... | ... | @@ -1,40 +0,0 @@ |
| 1 | -OpenLayers.Layer | |
| 2 | - | |
| 3 | -Layers are the most important and central aspect of OpenLayers. They are the | |
| 4 | -core functionality for the software: Everything that ends up on the map comes | |
| 5 | -from a layer. The base layer class is designed to be subclassed by any number | |
| 6 | -of different layers. | |
| 7 | - | |
| 8 | -* Constructor | |
| 9 | - OpenLayers.Layer(name, options) -- All layers have a name as their first param. This name is used to display the layer in the LayerSwitcher, and for other purposes. The options parameter is used to replace any parameters of the Layer which need to be different. | |
| 10 | - | |
| 11 | -* Methods | |
| 12 | - clone() -- {OpenLayers.Layer} -- create a clone of the layer. | |
| 13 | - setName({String|name}) -- none -- Set the name of the layer to something different. | |
| 14 | - moveTo({OpenLayers.Bounds|bounds}, {Boolean|zoomChanged}) -- none -- Not implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location. | |
| 15 | - setMap(map) -- none -- Set the map property of the layer. Also set the parameters which are inherited from the map. | |
| 16 | - getVisibility() -- {Boolean} -- Return true or false based on visibility of the layer. | |
| 17 | - setVisibility({Boolean|visible}) -- none -- Set the layer visibility, and trigger the appropriate events. | |
| 18 | - getResolution() -- {float} -- Return the current resolution of the map, in units/pixel. | |
| 19 | - getExtent() -- {OpenLayers.Bounds} -- Return the geographic extent of the current map viewport. | |
| 20 | - getZoomForExtent({OpenLayers.Bounds|bounds}) -- {Integer} -- return the integer zoom which most closely matches the passed bounds. | |
| 21 | - getLonLatFromViewPortPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the laye | |
| 22 | - getViewPortPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels | |
| 23 | - addOptions({options})) -- none -- Change the options on the layer. This is the supported way to change properties of the layer. | |
| 24 | - | |
| 25 | -* Parameters | |
| 26 | - displayOutsideMaxExtent -- Determine whether images or data are loaded outside the maxExtent. Default is false. | |
| 27 | - isBaseLayer -- This determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false. | |
| 28 | - projection -- SRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 29 | - maxExtent -- an OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 30 | - maxResolution -- The number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 31 | - maxZoomLevel -- The maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 32 | - minScale -- The scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 33 | - maxScale -- The scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 34 | - units -- The units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map. | |
| 35 | - | |
| 36 | - | |
| 37 | - | |
| 38 | - | |
| 39 | - | |
| 40 | - |
pacotes/openlayers/doc/LonLat.txt
| ... | ... | @@ -1,13 +0,0 @@ |
| 1 | -OpenLayers.LonLat | |
| 2 | - | |
| 3 | -This class represents a geographic coordinate pair, either projected or unprojected. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.LonLat({float|lon}, {float|lat}) -- Create LonLat. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - toString() -- {String} -- Converts to human readable string. | |
| 10 | - toShortString() -- {String} -- Converts to short human readable string. | |
| 11 | - clone() -- {OpenLayers.Size} -- Returns a copy of the pixel. | |
| 12 | - equals({OpenLayers.LonLat|ll}) -- {Boolean} -- Compares two LonLats. | |
| 13 | - add({int|lon}, {int|lat}) -- {OpenLayers.LonLat} -- add x and y to the current coordinates. |
pacotes/openlayers/doc/Map.txt
| ... | ... | @@ -1,77 +0,0 @@ |
| 1 | -OpenLayers.Map | |
| 2 | - | |
| 3 | -Instantiate class {OpenLayers.Map} in order to create a map. This is the central class in the API. Everything else is auxiliary. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Map(container, opts?) -- Creates a new map inside of the given HTML container, which is typically a DIV element. The opts variable is an object with various options, as described in the options section below. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - * Layer Management | |
| 10 | - addLayer({OpenLayers.Layer|layer}) -- none -- adds a layer to the list currently set for the map. | |
| 11 | - addLayers([ {OpenLayers.Layer|layer}, {OpenLayers.Layer|layer} ]) -- none -- Adds multiple layers to a map. | |
| 12 | - removeLayer({OpenLayers.Layer|layer}) -- none -- Remove a layer from the map. | |
| 13 | - setBaseLayer({OpenLayers.Layer|layer}) -- none -- Sets a new base layer for the map. The provided layer should have already been added to the map. Changing the base layer causes all other base layers to be turned off, and all overlays to reproject themselves. | |
| 14 | - | |
| 15 | - * Control Management | |
| 16 | - addControl({OpenLayers.Control|control}) -- none -- Adds a control to the map. | |
| 17 | - | |
| 18 | - * Popup Management | |
| 19 | - addPopup({OpenLayers.Popup|popup}, {Boolean|exclusive}) -- none -- adds a popup to the map. If exclusive is set to true, then all other popups are closed first. | |
| 20 | - removePopup({OpenLayers.Popup|popup}) -- none -- removes an existing popup from the map. | |
| 21 | - | |
| 22 | - * Center management | |
| 23 | - setCenter({OpenLayers.LonLat|lonlat}, {int|zoom}) -- none -- Set the center point of the map. This then moves all the layers to the new center location as well, using each layer's 'moveTo' function. The 'zoom' is an integer from 0 to maxZoomLevel. | |
| 24 | - pan({Integer|dx}, {Integer|dy}) -- none -- Allows user to pan by a value of screen pixels | |
| 25 | - | |
| 26 | - * Zoom Management | |
| 27 | - zoomTo({int|zoom}) -- none -- zoom to the given zoom level. | |
| 28 | - zoomIn() -- none -- zoom in one level. | |
| 29 | - zoomOut() -- none -- zoom out one level. | |
| 30 | - zoomToExtent({OpenLayers.Bounds|bounds}) -- none -- Set the map such that the bounds fits within the current viewport area. | |
| 31 | - zoomToMaxExtent() -- none -- Zoom such that the entire bounds of the map is contained in the viewport. | |
| 32 | - zoomToScale({float}) -- none -- Zoom as close to the given scale as possible. Scale can be given as a ratio (1/24000) or as the denominator of the scale value (24000). zoomToScale will find the zoom level which most closely fits the requested scale and set that as the current zoom level. | |
| 33 | - | |
| 34 | - * Current Map Information | |
| 35 | - getLonLatFromPixel({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns OpenLayers.LonLat corresponding to the given OpenLayers.Pixel, translated into lon/lat by the current base layer | |
| 36 | - getPixelFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns OpenLayers.Pixel corresponding to the given OpenLayers.LonLat, translated by the current base layer | |
| 37 | - getCenter() -- {OpenLayers.LonLat} -- Returns a LonLat for the current center of the map | |
| 38 | - getZoom() -- {Integer} -- Returns the current zoom level as an integer | |
| 39 | - getExtent() -- {OpenLayers.Bounds} -- Returns a Bounds object which represents the geographic bounds of the current viewPort. | |
| 40 | - getSize() -- {OpenLayers.Pixel} -- Returns the pixel size of the current map window. | |
| 41 | - getTileSize() -- {OpenLayers.Size} -- Returns tile size currently set for map. | |
| 42 | - getResolution() -- {float} -- Returns the current resolution (units/pixel) of the map | |
| 43 | - getZoomForExtent({OpenLayers.Bounds|bounds}) -- Zoom level in which the given bounds will fit -- zooming to this level and setting the center of the map in the center of the bounds will always fit the given bounds in the map. | |
| 44 | - | |
| 45 | - * Default Map Information | |
| 46 | - getMaxResolution() -- {float} -- returns The Map's Maximum Resolution, the units/pixel at zoom level 0. The default is 1.40625, to match the approximate MaxResolution used by the commercial providers. | |
| 47 | - getMaxExtent() -- {OpenLayers.Bounds} -- Return the max extent of the current base layer as defined on the layer. The default maxExtent for OpenLayers is -180,-90,180,90 | |
| 48 | - getMaxZoomLevel() -- {int} -- Returns the maximum zoom level that can be reached in the map for the current base layer | |
| 49 | - getMinZoomLevel() -- {int} -- Returns the minimum zoom level that can be reached in the map for the current base layer | |
| 50 | - | |
| 51 | -* Events | |
| 52 | - addlayer -- a layer is added to the map | |
| 53 | - removelayer -- a layer is removed from the map | |
| 54 | - changelayer -- a layer has some property of it, typically visibility, changed. | |
| 55 | - changebaselayer -- the current base layer changes | |
| 56 | - movestart -- start of a movement in the map | |
| 57 | - move -- end of movement in a map. this happens while te mouse is dragging as well as for all other events. | |
| 58 | - moveend -- end of movement in a map, but does not happen when the 'dragging' flag is set, as is the case when the move event is in the middle of a drag action. | |
| 59 | - zoomend -- end of a zoom action | |
| 60 | - mouseover -- map is moused over | |
| 61 | - mouseout -- map is no longer mousedout | |
| 62 | - mousemove -- mouse moves inside map | |
| 63 | - dragstart -- drag action starts | |
| 64 | - dragend -- drag action ends | |
| 65 | - | |
| 66 | -* Options: | |
| 67 | - * controls -- an array of control objects to be added to the map. The default is [new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.PanZoom()] | |
| 68 | - * projection -- used by WMS layers, should be an SRS identifier. | |
| 69 | - * maxZoomLevel -- The number of zoom levels to use in the map. | |
| 70 | - * maxExtent -- {OpenLayers.Bounds} to be used as the maximum extent of a map. The center of the map can not leave the maxExtent of the map when dragging. | |
| 71 | - * maxResolution -- The units/pixel measurement at zoom level 0. Default is 1.40625 | |
| 72 | - * resolutions -- An array of resolutions to be used as an index when zooming. Overrides maxZoomLevel and maxResolution if present. | |
| 73 | - * minScale -- The smallest scale value. minScale is preferred over maxResolution, if present. | |
| 74 | - * maxScale -- The maximum scale the map should include. Overrides maxZoomLevel if present. | |
| 75 | - * units -- The units of the map. Defaults to degrees. Neccesary when using scale in any way. | |
| 76 | - * scales -- An array of scale values. Overrides maxResolution, maxZoomLevel, resolutions, and min/max scale if present. | |
| 77 | - |
pacotes/openlayers/doc/Marker.Box.txt
| ... | ... | @@ -1,10 +0,0 @@ |
| 1 | -OpenLayers.Marker.Box | |
| 2 | - | |
| 3 | -A different kind of Marker, designed to be added to a Boxes layer instead of a Markers layer. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Marker.Box({OpenLayers.Bounds|bounds}, borderColor, borderWidth) -- Set up a box. Defaults are red, with a width of 2. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - setBorder(color, width) -- sets properties of border color and width. | |
| 10 | - |
pacotes/openlayers/doc/Marker.txt
| ... | ... | @@ -1,15 +0,0 @@ |
| 1 | -OpenLayers.Marker | |
| 2 | - | |
| 3 | -Instantiate class {OpenLayers.Marker} in order to create a marker. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Marker({OpenLayers.LonLat|lonlat}, {OpenLayers.Icon|icon}? ) -- Creates a new marker object. This object must be added to a Marker layer and will then be displayed. The icon can be left null -- if this is the case, then the default OpenLayers icon will be used. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - onScreen() -- {boolean} -- Returns whether or not the marker is currently visible on screen. | |
| 10 | - inflate({float}) -- none -- Changes the size of the Icon by a factor of the passed float. | |
| 11 | - display({string}) -- none -- Sets the style.display property of the Icon. | |
| 12 | - | |
| 13 | -* Events | |
| 14 | - Standard browser events are available. | |
| 15 | - |
pacotes/openlayers/doc/Pixel.txt
| ... | ... | @@ -1,13 +0,0 @@ |
| 1 | -OpenLayers.Pixel | |
| 2 | - | |
| 3 | -This class represents a screen coordinate in x and y coordinates. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Pixel({float|x}, {float|y}) -- Create Pixel. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - toString() -- {String} -- Converts to human readable string. | |
| 10 | - clone() -- {OpenLayers.Pixel} -- Returns a copy of the pixel. | |
| 11 | - equals({OpenLayers.Pixel|px}) -- {Boolean} -- Tests for equivilance. | |
| 12 | - add({int|x}, {int|y}) -- {OpenLayers.Pixel} -- add x and y to the current coordinates. | |
| 13 | - offset({OpenLayers.Pixel|pixel}) -- {OpenLayers.Pixel} -- Add pixels together. |
pacotes/openlayers/doc/Size.txt
| ... | ... | @@ -1,11 +0,0 @@ |
| 1 | -OpenLayers.Size | |
| 2 | - | |
| 3 | -This class represents a width/height pair. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Size({float|h}, {float|w}) -- Create Size. | |
| 7 | - | |
| 8 | -* Methods | |
| 9 | - toString() -- {String} -- Converts to human readable string. | |
| 10 | - clone() -- {OpenLayers.Size} -- Returns a copy of the pixel. | |
| 11 | - add({int|x}, {int|y}) -- {OpenLayers.Size} -- add x and y to the current coordinates. |
pacotes/openlayers/doc/Tile.Image.txt
| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | -OpenLayers.Tile.Image | |
| 2 | - | |
| 3 | -The image tile is designed to hold images for all types of layers, from WMS to KaMap to WorldWind. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Tile.Image({OpenLayers.Layer|layer}, {OpenLayers.Pixel|position}, {OpenLayers.Bounds|bounds}, {String|url}, {OpenLayers.Size|size}) -- Create a new tile, with properties passed. | |
| 7 | - |
pacotes/openlayers/doc/Tile.WFS.txt
| ... | ... | @@ -1,6 +0,0 @@ |
| 1 | -OpenLayers.Tile.WFS | |
| 2 | - | |
| 3 | -The WFS tile allows you to load any number of WFS URLs into a single tile. | |
| 4 | - | |
| 5 | -* Constructor | |
| 6 | - OpenLayers.Tile.WFS({OpenLayers.Layer|layer}, {OpenLayers.Pixel|position}, {OpenLayers.Bounds|bounds}, {String|urls}, {OpenLayers.Size|size}) -- Create a new tile, with properties passed. The major difference between this tile and other tiles is what it does with results: The WFS tile is designed to parse XML responses, and create features for each item in the response. |
pacotes/openlayers/doc/Tile.txt
| ... | ... | @@ -1,10 +0,0 @@ |
| 1 | -OpenLayers.Tile | |
| 2 | - | |
| 3 | -This is a class designed to designate a single tile, however | |
| 4 | -it is explicitly designed to do relatively little. Tiles store information | |
| 5 | -about themselves -- such as the URL that they are related to, and their | |
| 6 | -size - but do not add themselves to the layer div automatically, for | |
| 7 | -example. | |
| 8 | - | |
| 9 | -* Constructor | |
| 10 | - OpenLayers.Tile({OpenLayers.Layer|layer}, {OpenLayers.Pixel|position}, {OpenLayers.Bounds|bounds}, {String|url}, {OpenLayers.Size|size}) -- Create a new tile, with properties passed. |
pacotes/openlayers/doc/Util.txt
| ... | ... | @@ -1,8 +0,0 @@ |
| 1 | -OpenLayers.Util | |
| 2 | - | |
| 3 | -Utility class. Stores a bunch of methods and settings that don't fit anywhere else. | |
| 4 | - | |
| 5 | -* Options | |
| 6 | - | |
| 7 | - OpenLayers.Util.onImageLoadErrorColor -- A string to set img.style.backgroundColor to if the onerror event fires for the image (useful for 500 errors from WMS, for example). | |
| 8 | - OpenLayers.ImgPath -- A string to be used as the base for images for controls and the like. Should end with '/'. |
pacotes/openlayers/doc/authors.txt
| ... | ... | @@ -1,25 +0,0 @@ |
| 1 | -OpenLayers contributors: | |
| 2 | -Howard Butler | |
| 3 | -Bertil Chaupis | |
| 4 | -John Cole | |
| 5 | -Jeff Dege | |
| 6 | -Schuyler Erle | |
| 7 | -Christian López Espínola | |
| 8 | -John Frank | |
| 9 | -Sean Gilles | |
| 10 | -Pierre Giraud | |
| 11 | -Andreas Hocevar | |
| 12 | -Philip Lindsay | |
| 13 | -Corey Puffault | |
| 14 | -Tim Schaub | |
| 15 | -Christopher Schmidt | |
| 16 | -Cameron Shorter | |
| 17 | -Paul Spencer | |
| 18 | -James Stembridge | |
| 19 | -Erik Uzureau | |
| 20 | -Bill Woodall | |
| 21 | -Steve Woodbridge | |
| 22 | - | |
| 23 | - | |
| 24 | -OpenLayers is graciously supported by MetaCarta, Inc. | |
| 25 | -<http://www.metacarta.com>. |
pacotes/openlayers/doc/customization
| ... | ... | @@ -1,49 +0,0 @@ |
| 1 | -Customizing OpenLayers | |
| 2 | -====================== | |
| 3 | - | |
| 4 | -OpenLayers is designed to fit many needs -- fitting in alongside all kinds of | |
| 5 | -various applications which are currently in use. | |
| 6 | - | |
| 7 | -Currently, OpenLayers supports a 'theme' option when creating a map. This | |
| 8 | -theme option allows you to specify the location of a CSS theme which should | |
| 9 | -be included. | |
| 10 | - | |
| 11 | -A default theme is available as an example in the theme/ directory: the setup | |
| 12 | -is: | |
| 13 | - | |
| 14 | - * theme/ | |
| 15 | - * theme/default/ | |
| 16 | - * theme/default/style.css | |
| 17 | - * theme/default/img/ | |
| 18 | - | |
| 19 | -Currently, the OpenLayers code does not support class names, and therefore, | |
| 20 | -it is not possible to control many aspects of OpenLayers code with CSS | |
| 21 | -classes. However, with this framework in place, we expect to invest time | |
| 22 | -to make existing features and new features use the CSS theming framework | |
| 23 | -where apropriate. | |
| 24 | - | |
| 25 | - | |
| 26 | -Class Naming | |
| 27 | -============ | |
| 28 | -Elements should have class names which are descriptive of the Javascript | |
| 29 | -class from which they come. For example, the main layer switcher element | |
| 30 | -in the OpenLayers.Control.LayerSwitcher would be classed: | |
| 31 | - | |
| 32 | - olControlLayerSwitcher | |
| 33 | - | |
| 34 | -This would allow users to add to their style.css class in their theme, | |
| 35 | -changing, for example: | |
| 36 | - | |
| 37 | -:: | |
| 38 | - | |
| 39 | - .olControlLayerSwitcher input { | |
| 40 | - width:10px; | |
| 41 | - } | |
| 42 | - | |
| 43 | -Sub elements of a particular control can add to the class name: | |
| 44 | - | |
| 45 | -:: | |
| 46 | - | |
| 47 | - .olControlLayerSwitcherBaseLabel { | |
| 48 | - color: red; | |
| 49 | - } |
pacotes/openlayers/doc/readme.txt
pacotes/openlayers/doc/reference.html
| ... | ... | @@ -1,840 +0,0 @@ |
| 1 | -<html> | |
| 2 | - <head> | |
| 3 | - <title>OpenLayers Class Reference Documentation</title> | |
| 4 | - <style type='text/css'> | |
| 5 | - .type { background-color: #ddd } | |
| 6 | - td { border: black solid 1px; padding: 3px; } | |
| 7 | - table { border-collapse: collapse; margin: 5px 10px; } | |
| 8 | - .classref { margin-left: 20px; } | |
| 9 | - div.index { float:left; width: 300px; } | |
| 10 | - </style> | |
| 11 | - </head> | |
| 12 | - <body> | |
| 13 | -<div class='index'><a href='#OpenLayers.Map'>OpenLayers.Map</a></div> | |
| 14 | -<div class='index'><a href='#OpenLayers.Layer'>OpenLayers.Layer</a></div> | |
| 15 | -<div class='index'><a href='#OpenLayers.Layer.Image'>OpenLayers.Layer.Image</a></div> | |
| 16 | -<div class='index'><a href='#OpenLayers.Layer.HTTPRequest'>OpenLayers.Layer.HTTPRequest</a></div> | |
| 17 | -<div class='index'><a href='#OpenLayers.Layer.Grid'>OpenLayers.Layer.Grid</a></div> | |
| 18 | -<div class='index'><a href='#OpenLayers.Layer.WMS'>OpenLayers.Layer.WMS</a></div> | |
| 19 | -<div class='index'><a href='#OpenLayers.Layer.KaMap'>OpenLayers.Layer.KaMap</a></div> | |
| 20 | -<div class='index'><a href='#OpenLayers.Layer.EventPane'>OpenLayers.Layer.EventPane</a></div> | |
| 21 | -<div class='index'><a href='#OpenLayers.Layer.Google'>OpenLayers.Layer.Google</a></div> | |
| 22 | -<div class='index'><a href='#OpenLayers.Layer.VirtualEarth'>OpenLayers.Layer.VirtualEarth</a></div> | |
| 23 | -<div class='index'><a href='#OpenLayers.Layer.Markers'>OpenLayers.Layer.Markers</a></div> | |
| 24 | -<div class='index'><a href='#OpenLayers.Layer.Text'>OpenLayers.Layer.Text</a></div> | |
| 25 | -<div class='index'><a href='#OpenLayers.Layer.GeoRSS'>OpenLayers.Layer.GeoRSS</a></div> | |
| 26 | -<div class='index'><a href='#OpenLayers.Layer.Boxes'>OpenLayers.Layer.Boxes</a></div> | |
| 27 | -<div class='index'><a href='#OpenLayers.Layer.TMS'>OpenLayers.Layer.TMS</a></div> | |
| 28 | -<div class='index'><a href='#OpenLayers.Icon'>OpenLayers.Icon</a></div> | |
| 29 | -<div class='index'><a href='#OpenLayers.Marker'>OpenLayers.Marker</a></div> | |
| 30 | -<div class='index'><a href='#OpenLayers.Marker.Box'>OpenLayers.Marker.Box</a></div> | |
| 31 | -<div class='index'><a href='#OpenLayers.Tile'>OpenLayers.Tile</a></div> | |
| 32 | -<div class='index'><a href='#OpenLayers.Tile.Image'>OpenLayers.Tile.Image</a></div> | |
| 33 | -<div class='index'><a href='#OpenLayers.Tile.WFS'>OpenLayers.Tile.WFS</a></div> | |
| 34 | -<div class='index'><a href='#OpenLayers.Control'>OpenLayers.Control</a></div> | |
| 35 | -<div class='index'><a href='#OpenLayers.Control.LayerSwitcher'>OpenLayers.Control.LayerSwitcher</a></div> | |
| 36 | -<div class='index'><a href='#OpenLayers.Control.MouseDefaults'>OpenLayers.Control.MouseDefaults</a></div> | |
| 37 | -<div class='index'><a href='#OpenLayers.Control.MousePosition'>OpenLayers.Control.MousePosition</a></div> | |
| 38 | -<div class='index'><a href='#OpenLayers.Control.MouseToolbar'>OpenLayers.Control.MouseToolbar</a></div> | |
| 39 | -<div class='index'><a href='#OpenLayers.Control.OverviewMap'>OpenLayers.Control.OverviewMap</a></div> | |
| 40 | -<div class='index'><a href='#OpenLayers.Control.PanZoom'>OpenLayers.Control.PanZoom</a></div> | |
| 41 | -<div class='index'><a href='#OpenLayers.Control.PanZoomBar'>OpenLayers.Control.PanZoomBar</a></div> | |
| 42 | -<div class='index'><a href='#OpenLayers.Control.Permalink'>OpenLayers.Control.Permalink</a></div> | |
| 43 | -<div class='index'><a href='#OpenLayers.Control.Scale'>OpenLayers.Control.Scale</a></div> | |
| 44 | -<div class='index'><a href='#OpenLayers.LonLat'>OpenLayers.LonLat</a></div> | |
| 45 | -<div class='index'><a href='#OpenLayers.Size'>OpenLayers.Size</a></div> | |
| 46 | -<div class='index'><a href='#OpenLayers.Pixel'>OpenLayers.Pixel</a></div> | |
| 47 | -<div class='index'><a href='#OpenLayers.Bounds'>OpenLayers.Bounds</a></div> | |
| 48 | -<div class='index'><a href='#OpenLayers.Util'>OpenLayers.Util</a></div> | |
| 49 | -<div class='index'><a href='#OpenLayers.Ajax'>OpenLayers.Ajax</a></div> | |
| 50 | -<br style='clear:both' /> | |
| 51 | -<h1><a name="OpenLayers.Map">OpenLayers.Map</a></h1><div class="classref"> | |
| 52 | - | |
| 53 | -Instantiate class <a href="#OpenLayers.Map" title="OpenLayers.Map">OpenLayers.Map</a> in order to create a map. This is the central class in the API. Everything else is auxiliary. | |
| 54 | - | |
| 55 | -</table> | |
| 56 | -<h2>Constructor</h2> | |
| 57 | -<table> | |
| 58 | - <tr><td> OpenLayers.Map(container, opts?)</td><td>Creates a new map inside of the given HTML container, which is typically a DIV element. The opts variable is an object with various options, as described in the options section below.</td></tr> | |
| 59 | - | |
| 60 | -</table> | |
| 61 | -<h2>Methods</h2> | |
| 62 | -<table> | |
| 63 | - </table> | |
| 64 | - | |
| 65 | -<h3>Layer Management </h3> | |
| 66 | - <table> | |
| 67 | - <tr><td> addLayer(<a href="#OpenLayers.Layer" title="OpenLayers.Layer">layer</a>)</td><td>none</td><td>adds a layer to the list currently set for the map. </td></tr> | |
| 68 | - <tr><td> addLayers([ <a href="#OpenLayers.Layer" title="OpenLayers.Layer">layer</a>, <a href="#OpenLayers.Layer" title="OpenLayers.Layer">layer</a> ])</td><td>none</td><td>Adds multiple layers to a map.</td></tr> | |
| 69 | - <tr><td> removeLayer(<a href="#OpenLayers.Layer" title="OpenLayers.Layer">layer</a>)</td><td>none</td><td>Remove a layer from the map.</td></tr> | |
| 70 | - <tr><td> setBaseLayer(<a href="#OpenLayers.Layer" title="OpenLayers.Layer">layer</a>)</td><td>none</td><td>Sets a new base layer for the map. The provided layer should have already been added to the map. Changing the base layer causes all other base layers to be turned off, and all overlays to reproject themselves. </td></tr> | |
| 71 | - | |
| 72 | - </table> | |
| 73 | - | |
| 74 | -<h3>Control Management</h3> | |
| 75 | - <table> | |
| 76 | - <tr><td> addControl(<a href="#OpenLayers.Control" title="OpenLayers.Control">control</a>)</td><td>none</td><td>Adds a control to the map.</td></tr> | |
| 77 | - | |
| 78 | - </table> | |
| 79 | - | |
| 80 | -<h3>Popup Management</h3> | |
| 81 | - <table> | |
| 82 | - <tr><td> addPopup(<a href="#OpenLayers.Popup" title="OpenLayers.Popup">popup</a>, <span class="type" title="Boolean">exclusive</span>)</td><td>none</td><td>adds a popup to the map. If exclusive is set to true, then all other popups are closed first.</td></tr> | |
| 83 | - <tr><td> removePopup(<a href="#OpenLayers.Popup" title="OpenLayers.Popup">popup</a>)</td><td>none</td><td>removes an existing popup from the map.</td></tr> | |
| 84 | - | |
| 85 | - </table> | |
| 86 | - | |
| 87 | -<h3>Center management</h3> | |
| 88 | - <table> | |
| 89 | - <tr><td> setCenter(<a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">lonlat</a>, <span class="type" title="int">zoom</span>)</td><td>none</td><td>Set the center point of the map. This then moves all the layers to the new center location as well, using each layer's 'moveTo' function. The 'zoom' is an integer from 0 to maxZoomLevel.</td></tr> | |
| 90 | - <tr><td> pan(<span class="type" title="Integer">dx</span>, <span class="type" title="Integer">dy</span>)</td><td>none</td><td>Allows user to pan by a value of screen pixels</td></tr> | |
| 91 | - | |
| 92 | - </table> | |
| 93 | - | |
| 94 | -<h3>Zoom Management</h3> | |
| 95 | - <table> | |
| 96 | - <tr><td> zoomTo(<span class="type" title="int">zoom</span>)</td><td>none</td><td>zoom to the given zoom level.</td></tr> | |
| 97 | - <tr><td> zoomIn()</td><td>none</td><td>zoom in one level.</td></tr> | |
| 98 | - <tr><td> zoomOut()</td><td>none</td><td>zoom out one level.</td></tr> | |
| 99 | - <tr><td> zoomToExtent(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>)</td><td>none</td><td>Set the map such that the bounds fits within the current viewport area.</td></tr> | |
| 100 | - <tr><td> zoomToMaxExtent()</td><td>none</td><td>Zoom such that the entire bounds of the map is contained in the viewport.</td></tr> | |
| 101 | - <tr><td> zoomToScale(<span class="type" title="float">float</span>)</td><td>none</td><td>Zoom as close to the given scale as possible. Scale can be given as a ratio (1/24000) or as the denominator of the scale value (24000). zoomToScale will find the zoom level which most closely fits the requested scale and set that as the current zoom level.</td></tr> | |
| 102 | - | |
| 103 | - </table> | |
| 104 | - | |
| 105 | -<h3>Current Map Information</h3> | |
| 106 | - <table> | |
| 107 | - <tr><td> getLonLatFromPixel(<a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">pixel</a>)</td><td><a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">OpenLayers.LonLat</a></td><td>Returns OpenLayers.LonLat corresponding to the given OpenLayers.Pixel, translated into lon/lat by the current base layer</td></tr> | |
| 108 | - <tr><td> getPixelFromLonLat(<a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">lonlat</a>)</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a></td><td>Returns OpenLayers.Pixel corresponding to the given OpenLayers.LonLat, translated by the current base layer </td></tr> | |
| 109 | - <tr><td> getCenter()</td><td><a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">OpenLayers.LonLat</a></td><td>Returns a LonLat for the current center of the map</td></tr> | |
| 110 | - <tr><td> getZoom()</td><td><span class="type" title="Integer">Integer</span></td><td>Returns the current zoom level as an integer</td></tr> | |
| 111 | - <tr><td> getExtent()</td><td><a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">OpenLayers.Bounds</a></td><td>Returns a Bounds object which represents the geographic bounds of the current viewPort. </td></tr> | |
| 112 | - <tr><td> getSize()</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a></td><td>Returns the pixel size of the current map window.</td></tr> | |
| 113 | - <tr><td> getTileSize()</td><td><a href="#OpenLayers.Size" title="OpenLayers.Size">OpenLayers.Size</a></td><td>Returns tile size currently set for map.</td></tr> | |
| 114 | - <tr><td> getResolution()</td><td><span class="type" title="float">float</span></td><td>Returns the current resolution (units/pixel) of the map</td></tr> | |
| 115 | - <tr><td> getZoomForExtent(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>)</td><td>Zoom level in which the given bounds will fit</td><td>zooming to this level and setting the center of the map in the center of the bounds will always fit the given bounds in the map.</td></tr> | |
| 116 | - | |
| 117 | - </table> | |
| 118 | - | |
| 119 | -<h3>Default Map Information </h3> | |
| 120 | - <table> | |
| 121 | - <tr><td> getMaxResolution()</td><td><span class="type" title="float">float</span></td><td>returns The Map's Maximum Resolution, the units/pixel at zoom level 0. The default is 1.40625, to match the approximate MaxResolution used by the commercial providers. </td></tr> | |
| 122 | - <tr><td> getMaxExtent()</td><td><a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">OpenLayers.Bounds</a></td><td>Return the max extent of the current base layer as defined on the layer. The default maxExtent for OpenLayers is -180,-90,180,90</td></tr> | |
| 123 | - <tr><td> getMaxZoomLevel()</td><td><span class="type" title="int">int</span></td><td>Returns the maximum zoom level that can be reached in the map for the current base layer</td></tr> | |
| 124 | - <tr><td> getMinZoomLevel()</td><td><span class="type" title="int">int</span></td><td>Returns the minimum zoom level that can be reached in the map for the current base layer</td></tr> | |
| 125 | - | |
| 126 | -</table> | |
| 127 | -<h2>Events</h2> | |
| 128 | -<table> | |
| 129 | - <tr><td> addlayer</td><td>a layer is added to the map</td></tr> | |
| 130 | - <tr><td> removelayer</td><td>a layer is removed from the map</td></tr> | |
| 131 | - <tr><td> changelayer</td><td>a layer has some property of it, typically visibility, changed.</td></tr> | |
| 132 | - <tr><td> changebaselayer</td><td>the current base layer changes</td></tr> | |
| 133 | - <tr><td> movestart</td><td>start of a movement in the map </td></tr> | |
| 134 | - <tr><td> move</td><td>end of movement in a map. this happens while te mouse is dragging as well as for all other events.</td></tr> | |
| 135 | - <tr><td> moveend</td><td>end of movement in a map, but does not happen when the 'dragging' flag is set, as is the case when the move event is in the middle of a drag action. </td></tr> | |
| 136 | - <tr><td> zoomend</td><td>end of a zoom action</td></tr> | |
| 137 | - <tr><td> mouseover</td><td>map is moused over</td></tr> | |
| 138 | - <tr><td> mouseout</td><td>map is no longer mousedout</td></tr> | |
| 139 | - <tr><td> mousemove</td><td>mouse moves inside map</td></tr> | |
| 140 | - <tr><td> dragstart</td><td>drag action starts</td></tr> | |
| 141 | - <tr><td> dragend</td><td>drag action ends</td></tr> | |
| 142 | - | |
| 143 | -</table> | |
| 144 | -<h2>Options:</h2> | |
| 145 | -<table> | |
| 146 | - <tr><td>controls</td><td>an array of control objects to be added to the map. The default is [new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.PanZoom()] </td></tr> | |
| 147 | - <tr><td>projection</td><td>used by WMS layers, should be an SRS identifier.</td></tr> | |
| 148 | - <tr><td>maxZoomLevel</td><td>The number of zoom levels to use in the map.</td></tr> | |
| 149 | - <tr><td>maxExtent</td><td><a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">OpenLayers.Bounds</a> to be used as the maximum extent of a map. The center of the map can not leave the maxExtent of the map when dragging.</td></tr> | |
| 150 | - <tr><td>maxResolution</td><td>The units/pixel measurement at zoom level 0. Default is 1.40625</td></tr> | |
| 151 | - <tr><td>resolutions</td><td>An array of resolutions to be used as an index when zooming. Overrides maxZoomLevel and maxResolution if present.</td></tr> | |
| 152 | - <tr><td>minScale</td><td>The smallest scale value. minScale is preferred over maxResolution, if present.</td></tr> | |
| 153 | - <tr><td>maxScale</td><td>The maximum scale the map should include. Overrides maxZoomLevel if present.</td></tr> | |
| 154 | - <tr><td>units</td><td>The units of the map. Defaults to degrees. Neccesary when using scale in any way.</td></tr> | |
| 155 | - <tr><td>scales</td><td>An array of scale values. Overrides maxResolution, maxZoomLevel, resolutions, and min/max scale if present.</td></tr> | |
| 156 | - | |
| 157 | -</table></div> | |
| 158 | -<h1><a name="OpenLayers.Layer">OpenLayers.Layer</a></h1><div class="classref"> | |
| 159 | - | |
| 160 | -Layers are the most important and central aspect of OpenLayers. They are the | |
| 161 | -core functionality for the software: Everything that ends up on the map comes | |
| 162 | -from a layer. The base layer class is designed to be subclassed by any number | |
| 163 | -of different layers. | |
| 164 | - | |
| 165 | -</table> | |
| 166 | -<h2>Constructor</h2> | |
| 167 | -<table> | |
| 168 | - <tr><td> OpenLayers.Layer(name, options)</td><td>All layers have a name as their first param. This name is used to display the layer in the LayerSwitcher, and for other purposes. The options parameter is used to replace any parameters of the Layer which need to be different.</td></tr> | |
| 169 | - | |
| 170 | -</table> | |
| 171 | -<h2>Methods</h2> | |
| 172 | -<table> | |
| 173 | - <tr><td> clone()</td><td><a href="#OpenLayers.Layer" title="OpenLayers.Layer">OpenLayers.Layer</a></td><td>create a clone of the layer.</td></tr> | |
| 174 | - <tr><td> setName(<span class="type" title="String">name</span>)</td><td>none</td><td>Set the name of the layer to something different.</td></tr> | |
| 175 | - <tr><td> moveTo(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>, <span class="type" title="Boolean">zoomChanged</span>)</td><td>none</td><td>Not implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location.</td></tr> | |
| 176 | - <tr><td> setMap(map)</td><td>none</td><td>Set the map property of the layer. Also set the parameters which are inherited from the map.</td></tr> | |
| 177 | - <tr><td> getVisibility()</td><td><span class="type" title="Boolean">Boolean</span></td><td>Return true or false based on visibility of the layer.</td></tr> | |
| 178 | - <tr><td> setVisibility(<span class="type" title="Boolean">visible</span>)</td><td>none</td><td>Set the layer visibility, and trigger the appropriate events.</td></tr> | |
| 179 | - <tr><td> getResolution()</td><td><span class="type" title="float">float</span></td><td>Return the current resolution of the map, in units/pixel.</td></tr> | |
| 180 | - <tr><td> getExtent()</td><td><a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">OpenLayers.Bounds</a></td><td>Return the geographic extent of the current map viewport.</td></tr> | |
| 181 | - <tr><td> getZoomForExtent(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>)</td><td><span class="type" title="Integer">Integer</span></td><td>return the integer zoom which most closely matches the passed bounds.</td></tr> | |
| 182 | - <tr><td> getLonLatFromViewPortPx(<a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">pixel</a>)</td><td><a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">OpenLayers.LonLat</a></td><td>Returns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the laye</td></tr> | |
| 183 | - <tr><td> getViewPortPxFromLonLat(<a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">lonlat</a>)</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a></td><td>Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels</td></tr> | |
| 184 | - <tr><td> addOptions(<span class="type" title="options">options</span>))</td><td>none</td><td>Change the options on the layer. This is the supported way to change properties of the layer. </td></tr> | |
| 185 | - | |
| 186 | -</table> | |
| 187 | -<h2>Parameters</h2> | |
| 188 | -<table> | |
| 189 | - <tr><td> displayOutsideMaxExtent</td><td>Determine whether images or data are loaded outside the maxExtent. Default is false.</td></tr> | |
| 190 | - <tr><td> isBaseLayer</td><td>This determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false.</td></tr> | |
| 191 | - <tr><td> projection</td><td>SRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 192 | - <tr><td> maxExtent</td><td>an OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 193 | - <tr><td> maxResolution</td><td>The number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 194 | - <tr><td> maxZoomLevel</td><td>The maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 195 | - <tr><td> minScale</td><td>The scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 196 | - <tr><td> maxScale</td><td>The scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 197 | - <tr><td> units</td><td>The units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 198 | - | |
| 199 | - | |
| 200 | - | |
| 201 | - | |
| 202 | - | |
| 203 | - | |
| 204 | -</table></div> | |
| 205 | -<h1><a name="OpenLayers.Layer.Image">OpenLayers.Layer.Image</a></h1><div class="classref"> | |
| 206 | - | |
| 207 | -The Image Layer allows you to load a single image and use it as a layer in your | |
| 208 | -map. | |
| 209 | - | |
| 210 | - | |
| 211 | -</table> | |
| 212 | -<h2>Constructor</h2> | |
| 213 | -<table> | |
| 214 | - <tr><td> OpenLayers.Layer(name, url, <a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>, <a href="#OpenLayers.Size" title="OpenLayers.Size">size</a>, <span class="type" title="options">options</span>)</td><td>Image Layer constructor requires a name, URL of the image, geographic bounds of the image, pixel size of the image, and an optional options parameter. </td></tr> | |
| 215 | - | |
| 216 | -</table></div> | |
| 217 | -<h1><a name="OpenLayers.Layer.HTTPRequest">OpenLayers.Layer.HTTPRequest</a></h1><div class="classref"> | |
| 218 | - | |
| 219 | -Sublass of Layer used for services which require initiating multiple HTTPRequests. | |
| 220 | - | |
| 221 | -</table> | |
| 222 | -<h2>Constructor</h2> | |
| 223 | -<table> | |
| 224 | - <tr><td> OpenLayers.Layer.HTTPRequest(name, url, params, options)</td><td>URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.</td></tr> | |
| 225 | - | |
| 226 | -</table> | |
| 227 | -<h2>Methods</h2> | |
| 228 | -<table> | |
| 229 | - <tr><td> initResolutions()</td><td>none</td><td>Based on the current minScale/maxScale/maxResolution/numZoomLevel/scales/resolutions parameters, initializes an array of 'zoom levels' as this.resolutions, which are then used as an index into when zooming.</td></tr> | |
| 230 | - <tr><td> getFullRequestString(newParams)</td><td><span class="type" title="String">String</span></td><td>Returns the full request string for a combination of the defaults on this layer and the parameters passed via newParams.</td></tr> | |
| 231 | - | |
| 232 | -</table> | |
| 233 | -<h2>Options</h2> | |
| 234 | -<table> | |
| 235 | - <tr><td> reproject</td><td>If reproject is true, then the layer will alter the bounding boxes of its tiles to be based on the geographic location of the pixel bounds in the base layer. This is important for reprojecting WMS tiles onto something like Google Maps. Tile locations are calculated, and then when creating the tile request, the bounding box is adjusted to match the bounding box of the base layer at that location. </td></tr> | |
| 236 | -</table></div> | |
| 237 | -<h1><a name="OpenLayers.Layer.Grid">OpenLayers.Layer.Grid</a></h1><div class="classref"> | |
| 238 | - | |
| 239 | -The Grid layer is the base layer for almost all image layers. This is a subclass of HTTPRequest. | |
| 240 | - | |
| 241 | -</table> | |
| 242 | -<h2>Constructor</h2> | |
| 243 | -<table> | |
| 244 | - <tr><td> OpenLayers.Layer.Grid(name, url, params, options)</td><td>URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.</td></tr> | |
| 245 | - | |
| 246 | -</table> | |
| 247 | -<h2>Methods</h2> | |
| 248 | -<table> | |
| 249 | - <tr><td> getGridBounds()</td><td><a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">OpenLayers.Bounds</a></td><td>return geographic extent of the grid of tiles.</td></tr> | |
| 250 | - <tr><td> _initTiles()</td><td>none</td><td>Used to initialize the tile grid, creating image elements as neccesary and filling them with the correct images.</td></tr> | |
| 251 | - <tr><td> spiralTileLoad()</td><td>none</td><td>Called from _initTiles. Rotates through the grid filling in the images for the grid.</td></tr> | |
| 252 | - <tr><td> clone()</td><td><a href="#OpenLayers.Layer.Grid" title="OpenLayers.Layer.Grid">OpenLayers.Layer.Grid</a></td><td>create a clone of the layer. Subclassed from {OpenLayers.Layer}.</td></tr> | |
| 253 | - <tr><td> setMap(map)</td><td>none</td><td>Set the map property of the layer. Also set the parameters which are inherited from the map. This is also where the tileSize is retrieved from the map. Subclassed from <a href="#OpenLayers.Layer" title="OpenLayers.Layer">OpenLayers.Layer</a>.</td></tr> | |
| 254 | - <tr><td> moveTo(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>, <span class="type" title="Boolean">zoomChanged</span>)</td><td>none</td><td>Not implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location. Subclassed from <a href="#OpenLayers.Layer" title="OpenLayers.Layer">OpenLayers.Layer</a>.</td></tr> | |
| 255 | - <tr><td> getResolution()</td><td><span class="type" title="float">float</span></td><td>Return the current resolution of the map, in units/pixel. Subclassed from <a href="#OpenLayers.Layer" title="OpenLayers.Layer">OpenLayers.Layer</a>.</td></tr> | |
| 256 | - <tr><td> getExtent()</td><td><a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">OpenLayers.Bounds</a></td><td>Return the geographic extent of the current map viewport. Subclassed from {OpenLayers.Layer}.</td></tr> | |
| 257 | - <tr><td> getZoomForExtent(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>)</td><td><span class="type" title="Integer">Integer</span></td><td>return the integer zoom which most closely matches the passed bounds. Subclassed from <a href="#OpenLayers.Layer" title="OpenLayers.Layer">OpenLayers.Layer</a>.</td></tr> | |
| 258 | - <tr><td> getLonLatFromViewPortPx(<a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">pixel</a>)</td><td><a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">OpenLayers.LonLat</a></td><td>Returns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the layer. Subclassed from {OpenLayers.Layer}.</td></tr> | |
| 259 | - <tr><td> getViewPortPxFromLonLat(<a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">lonlat</a>)</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a></td><td>Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels. Subclassed from {OpenLayers.Layer}.</td></tr> | |
| 260 | - | |
| 261 | -</table> | |
| 262 | -<h2>Parameters</h2> | |
| 263 | -<table> | |
| 264 | - <tr><td> buffer</td><td>Default 2. Number of tiles around the central map area which OpenLayers will preload so that dragging goes more smoothly.</td></tr> | |
| 265 | - </table> | |
| 266 | - | |
| 267 | -<h3>Subclassed from OpenLayers.Layer</h3> | |
| 268 | - <table> | |
| 269 | - <tr><td> isBaseLayer</td><td>This determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false.</td></tr> | |
| 270 | - <tr><td> projection</td><td>SRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 271 | - <tr><td> maxExtent</td><td>an OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 272 | - <tr><td> maxResolution</td><td>The number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 273 | - <tr><td> maxZoomLevel</td><td>The maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 274 | - <tr><td> minScale</td><td>The scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 275 | - <tr><td> maxScale</td><td>The scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 276 | - <tr><td> units</td><td>The units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map.</td></tr> | |
| 277 | -</table></div> | |
| 278 | -<h1><a name="OpenLayers.Layer.WMS">OpenLayers.Layer.WMS</a></h1><div class="classref"> | |
| 279 | - | |
| 280 | -The WMS layer allows one to connect to a WMS server to obtain images. Params are available as a hash on the layer object, however, all keys are upper-cased automatically for maximum compatibility with WMS servers, so a parameter which is set as 'layers' will be uppercased to LAYERS. Where 'layer' is your Javscript variable for the layer, layer.params.LAYERS is the value of the layers param as set by the constructor. | |
| 281 | - | |
| 282 | -If you wish to change params, you should use mergeNewParams, rather than accessing the parameters directly. | |
| 283 | - | |
| 284 | -</table> | |
| 285 | -<h2>Constructor</h2> | |
| 286 | -<table> | |
| 287 | - <tr><td> OpenLayers.Layer.WMS(name, url, params, options)</td><td>URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.</td></tr> | |
| 288 | - | |
| 289 | -</table> | |
| 290 | -<h2>Methods</h2> | |
| 291 | -<table> | |
| 292 | - <tr><td> getURL(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>)</td><td><span class="type" title="String">String</span></td><td>Returns a WMS URL for the given bounds based on the properties of the layer.</td></tr> | |
| 293 | - All other methods are inherited from <a href="#OpenLayers.Layer.Grid" title="OpenLayers.Layer.Grid">OpenLayers.Layer.Grid</a> | |
| 294 | - | |
| 295 | -</table> | |
| 296 | -<h2>Options </h2> | |
| 297 | -<table> | |
| 298 | - <tr><td> isBaseLayer</td><td>WMS layers default to being base layers unless one of their parameters is 'transparent':'true'.</td></tr> | |
| 299 | -</table></div> | |
| 300 | -<h1><a name="OpenLayers.Layer.KaMap">OpenLayers.Layer.KaMap</a></h1><div class="classref"> | |
| 301 | - | |
| 302 | -ka-Map is a Mapserver wrapper which performs caching and works around many of the deficiencies with tiling when using Mapserver as a WMS client. | |
| 303 | - | |
| 304 | -</table> | |
| 305 | -<h2>Construtor</h2> | |
| 306 | -<table> | |
| 307 | - <tr><td> OpenLayers.Layer.KaMap(name, url, params, options)</td><td>URL is the url of the tile.php for KaMap.</td></tr> | |
| 308 | - | |
| 309 | -</table></div> | |
| 310 | -<h1><a name="OpenLayers.Layer.EventPane">OpenLayers.Layer.EventPane</a></h1><div class="classref"> | |
| 311 | - | |
| 312 | -Designed to act as a super-class for layers which need OpenLayers to intercept click events. Google Maps and Microsoft Virtual Earth both use this functionality, in order to allow for actions like the rubber-band-zoom/zoombox functionality. This Layer is not designed to be used on its own, but instead to act as an intermediary between the user and layers which have their own click handlers. | |
| 313 | - | |
| 314 | -</table> | |
| 315 | -<h2>Constructor</h2> | |
| 316 | -<table> | |
| 317 | - <tr><td> OpenLayers.Layer.EventPane(name, options)</td><td>Only designed to be used by subclasses.</td></tr> | |
| 318 | -</table></div> | |
| 319 | -<h1><a name="OpenLayers.Layer.Google">OpenLayers.Layer.Google</a></h1><div class="classref"> | |
| 320 | - | |
| 321 | -The Google Layer in OpenLayers allows you to include Google Maps functionality in your OpenLayers maps. In order to use the Google Layer, you must first obtain an API key for Google Maps, and include the Google Maps API script in your page. Once you have done this, | |
| 322 | - | |
| 323 | -</table> | |
| 324 | -<h2>Constructor</h2> | |
| 325 | -<table> | |
| 326 | - <tr><td> OpenLayers.Layer.Google(name, options?)</td><td>Constructor for Google layer. Accepts name and options.</td></tr> | |
| 327 | - | |
| 328 | -</table> | |
| 329 | -<h2>Methods</h2> | |
| 330 | -<table> | |
| 331 | - <tr><td> getOLLonLatFromGLatLng(GLonLat)</td><td><a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">OpenLayers.LonLat</a></td><td>Convert from GLatLon to OpenLayers LonLat</td></tr> | |
| 332 | - <tr><td> getGLatLngFromOLLonLat(<a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">lonlat</a>)</td><td>GLatLon</td><td>Convert From OpenLayers LonLat to GLatLon</td></tr> | |
| 333 | - <tr><td> getOLPixelFromGPoint(GPoint)</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a></td><td>Convert from GPoint to OpenLayers.Pixel</td></tr> | |
| 334 | - <tr><td> getGPointFromOLPixel(<a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">pixel</a>)</td><td>GPoint</td><td>Create GPoint from OpenLayers Pixel.</td></tr> | |
| 335 | - | |
| 336 | -</table> | |
| 337 | -<h2>Parameters</h2> | |
| 338 | -<table> | |
| 339 | - <tr><td> type</td><td>one of G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, used to choose the type of map to display. (See <a href="http://www.google.com/apis/maps/documentation/reference.html#GMapType">GMapType in the Google documentation</a> for more.)</td></tr> | |
| 340 | - | |
| 341 | -</table></div> | |
| 342 | -<h1><a name="OpenLayers.Layer.VirtualEarth">OpenLayers.Layer.VirtualEarth</a></h1><div class="classref"> | |
| 343 | - | |
| 344 | -The Virtual Earth Layer in OpenLayers allows you to include Virtual Earth Maps in your OpenLayers maps. In order to use the Virtual Earth Layer, you must first include the Virtual Earth API script in your page. Once you have done this, simply add the layer to your map. | |
| 345 | - | |
| 346 | -</table> | |
| 347 | -<h2>Constructor</h2> | |
| 348 | -<table> | |
| 349 | - <tr><td> OpenLayers.Layer.VirtualEarth(name)</td><td>Constructor for Virtual Earth layer. Accepts name.</td></tr> | |
| 350 | - | |
| 351 | -</table> | |
| 352 | -<h2>Methods</h2> | |
| 353 | -<table> | |
| 354 | - <tr><td> getOLLonLatFromVELatLng(VELatLon)</td><td><a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">OpenLayers.LonLat</a></td><td>Convert from VELatLon to OpenLayers LonLat</td></tr> | |
| 355 | - <tr><td> getVELatLngFromOLLonLat(<a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">lonlat</a>)</td><td>VELatLon</td><td>Convert From OpenLayers LonLat to VELatLon</td></tr> | |
| 356 | - <tr><td> getOLPixelFromVEPoint(Msn.VE.Pixel)</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a></td><td>Convert from VEPoint to OpenLayers.Pixel</td></tr> | |
| 357 | - <tr><td> getGPointFromOLPixel(<a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">pixel</a>)</td><td>Msn.VE.Pixel</td><td>Create Msvn.VE.Pixel from OpenLayers Pixel.</td></tr> | |
| 358 | - | |
| 359 | - | |
| 360 | -</table></div> | |
| 361 | -<h1><a name="OpenLayers.Layer.Markers">OpenLayers.Layer.Markers</a></h1><div class="classref"> | |
| 362 | - | |
| 363 | -The base class for all vector drawing, The OpenLayers.Layer.Markers layer is the primary way to get annotations into your map. | |
| 364 | - | |
| 365 | -</table> | |
| 366 | -<h2>Constructor</h2> | |
| 367 | -<table> | |
| 368 | - <tr><td> OpenLayers.Layer.Markers(name, options)</td><td>Name and options for layer.</td></tr> | |
| 369 | - | |
| 370 | -</table> | |
| 371 | -<h2>Methods</h2> | |
| 372 | -<table> | |
| 373 | - <tr><td> addMarker(<a href="#OpenLayers.Marker" title="OpenLayers.Marker">Marker</a>)</td><td>none</td><td>Adds a marker to the layer, sets the map object on the marker, and calls drawMarker on the marker.</td></tr> | |
| 374 | - <tr><td> removeMarker(<a href="#OpenLayers.Marker" title="OpenLayers.Marker">Marker</a>)</td><td>none</td><td>Remove the marker from the layer and map.</td></tr> | |
| 375 | - <tr><td> clearMarkers()</td><td>none</td><td>Remove all markers from the layer with removeMarker.</td></tr> | |
| 376 | - <tr><td> redraw()</td><td>none</td><td>Redraw all markers. Used so that markers can change their position when a base layer changes.</td></tr> | |
| 377 | - <tr><td> drawMarker</td><td>none</td><td>Call marker.draw(px), which passes the Pixel of the latitude/longitude in the map viewport to the marker. adds the marker to the div, and marks the marker as drawn.</td></tr> | |
| 378 | -</table></div> | |
| 379 | -<h1><a name="OpenLayers.Layer.Text">OpenLayers.Layer.Text</a></h1><div class="classref"> | |
| 380 | - | |
| 381 | -Subclass of Markers layer which retrieves CSV file from the web, and parses content to create markers and popups. | |
| 382 | - | |
| 383 | -</table> | |
| 384 | -<h2>Constructor</h2> | |
| 385 | -<table> | |
| 386 | - <tr><td> OpenLayers.Layer.Text(name, options)</td><td>Pass in name, and set location: 'URL of CSV file' in the options hash.</td></tr> | |
| 387 | - | |
| 388 | -</table> | |
| 389 | -<h2>Methods</h2> | |
| 390 | -<table> | |
| 391 | - <tr><td> parseData(ajaxRequest)</td><td>none</td><td>Parses returned CSV file. </td></tr> | |
| 392 | - | |
| 393 | -</table></div> | |
| 394 | -<h1><a name="OpenLayers.Layer.GeoRSS">OpenLayers.Layer.GeoRSS</a></h1><div class="classref"> | |
| 395 | - | |
| 396 | -GeoRSS layer. Pass a name and location of a GeoRSS file on the web, and a marker will be added to the map for each item in the GeoRSS feed. Uses OpenLayers.loadURL to load the XML, parses the data, and adds markers to the map. The GeoRSS layer supports 1.0 and 2.0 in IE and Firefox, and supports 2.0 in Safari. (Ticket #111 explains the reason for this difference.) | |
| 397 | - | |
| 398 | - | |
| 399 | -</table> | |
| 400 | -<h2>Constructor</h2> | |
| 401 | -<table> | |
| 402 | - <tr><td> OpenLayers.Layer.GeoRSS(name, url)</td><td>Name and location of GeoRSS XML file.</td></tr> | |
| 403 | - | |
| 404 | -</table> | |
| 405 | -<h2>Methods</h2> | |
| 406 | -<table> | |
| 407 | - <tr><td> parseData(ajaxResponse)</td><td>none</td><td>Callback for the loadURL call. This function parses the XML for the GeoRSS feed, creating markers for the data and adding a popup to each marker. It populates an array of features as 'this.features'.</td></tr> | |
| 408 | - <tr><td> markerClick(Event)</td><td>none</td><td>Action to perform when a marker is clicked.</td></tr> | |
| 409 | - <tr><td> clearFeatures()</td><td>none</td><td>Removes all features and markers from the map.</td></tr> | |
| 410 | -</table></div> | |
| 411 | -<h1><a name="OpenLayers.Layer.Boxes">OpenLayers.Layer.Boxes</a></h1><div class="classref"> | |
| 412 | - | |
| 413 | -A subclass of the markers layer, this layer draws boxes using div elements | |
| 414 | -instead of icons using images. | |
| 415 | - | |
| 416 | -</table> | |
| 417 | -<h2>Constructor</h2> | |
| 418 | -<table> | |
| 419 | - <tr><td> OpenLayers.Layer.Boxes(name, options)</td><td>Same as OpenLayers.Layer.Markers.</td></tr> | |
| 420 | -</table></div> | |
| 421 | -<h1><a name="OpenLayers.Layer.TMS">OpenLayers.Layer.TMS</a></h1><div class="classref"> | |
| 422 | - | |
| 423 | - <tr><td>The TMS layer allows one to connect to a TMS</td><td>Tiled Map Service</td><td>server to obtain images. </td></tr> | |
| 424 | - | |
| 425 | -</table> | |
| 426 | -<h2>Constructor</h2> | |
| 427 | -<table> | |
| 428 | - <tr><td> OpenLayers.Layer.TMS(name, url, options)</td><td>URL is the base URL to the layer. Options is a set of options, extending the parameters of the layer.</td></tr> | |
| 429 | - | |
| 430 | -</table> | |
| 431 | -<h2>Methods</h2> | |
| 432 | -<table> | |
| 433 | - <tr><td> getURL(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>)</td><td><span class="type" title="String">String</span></td><td>Returns a TMS URL for the given bounds based on the properties of the layer.</td></tr> | |
| 434 | - All other methods are inherited from <a href="#OpenLayers.Layer.Grid" title="OpenLayers.Layer.Grid">OpenLayers.Layer.Grid</a> | |
| 435 | - | |
| 436 | -</table> | |
| 437 | -<h2>Options </h2> | |
| 438 | -<table> | |
| 439 | - <tr><td> tileOrigin</td><td>The tileOrigin option will allow you to set your tileOrigin to something other than the lower left extent of your map. </td></tr> | |
| 440 | - <tr><td> layername</td><td>Name of the layer in the TMS request.</td></tr> | |
| 441 | - <tr><td> type</td><td>The extension images have. </td></tr> | |
| 442 | -</table></div> | |
| 443 | -<h1><a name="OpenLayers.Icon">OpenLayers.Icon</a></h1><div class="classref"> | |
| 444 | - | |
| 445 | -Icon is used as the visual representation of a Marker. Creating such a representation requres up to three parts: An Icon URL, a size, and an offset. The icon URL is a pointer to an image to use as an icon. The size is the size of the image, as an <a href="#OpenLayers.Size" title="OpenLayers.Size">OpenLayers.Size</a> object, and the offset is the position of the top left corner of the image in pixels, relative to the latitude and longitude of the Marker. | |
| 446 | - | |
| 447 | -</table> | |
| 448 | -<h2>Constructor</h2> | |
| 449 | -<table> | |
| 450 | - <tr><td> OpenLayers.Icon(<span class="type" title="String">url</span>, <a href="#OpenLayers.Size" title="OpenLayers.Size">size</a>, <a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">offset</a>)</td><td>creates a new icon.</td></tr> | |
| 451 | - | |
| 452 | -</table> | |
| 453 | -<h2>Methods</h2> | |
| 454 | -<table> | |
| 455 | - <tr><td> clone()</td><td><a href="#OpenLayers.Icon" title="OpenLayers.Icon">OpenLayers.Icon</a></td><td>Create an exact copy of the icon.</td></tr> | |
| 456 | -</table></div> | |
| 457 | -<h1><a name="OpenLayers.Marker">OpenLayers.Marker</a></h1><div class="classref"> | |
| 458 | - | |
| 459 | -Instantiate class <a href="#OpenLayers.Marker" title="OpenLayers.Marker">OpenLayers.Marker</a> in order to create a marker. | |
| 460 | - | |
| 461 | -</table> | |
| 462 | -<h2>Constructor</h2> | |
| 463 | -<table> | |
| 464 | - <tr><td> OpenLayers.Marker(<a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">lonlat</a>, <a href="#OpenLayers.Icon" title="OpenLayers.Icon">icon</a>? )</td><td>Creates a new marker object. This object must be added to a Marker layer and will then be displayed. The icon can be left null</td><td>if this is the case, then the default OpenLayers icon will be used.</td></tr> | |
| 465 | - | |
| 466 | -</table> | |
| 467 | -<h2>Methods</h2> | |
| 468 | -<table> | |
| 469 | - <tr><td> onScreen()</td><td><span class="type" title="boolean">boolean</span></td><td>Returns whether or not the marker is currently visible on screen.</td></tr> | |
| 470 | - <tr><td> inflate(<span class="type" title="float">float</span>)</td><td>none</td><td>Changes the size of the Icon by a factor of the passed float.</td></tr> | |
| 471 | - <tr><td> display(<span class="type" title="string">string</span>)</td><td>none</td><td>Sets the style.display property of the Icon.</td></tr> | |
| 472 | - | |
| 473 | -</table> | |
| 474 | -<h2>Events</h2> | |
| 475 | -<table> | |
| 476 | - Standard browser events are available. | |
| 477 | - | |
| 478 | -</table></div> | |
| 479 | -<h1><a name="OpenLayers.Marker.Box">OpenLayers.Marker.Box</a></h1><div class="classref"> | |
| 480 | - | |
| 481 | -A different kind of Marker, designed to be added to a Boxes layer instead of a Markers layer. | |
| 482 | - | |
| 483 | -</table> | |
| 484 | -<h2>Constructor</h2> | |
| 485 | -<table> | |
| 486 | - <tr><td> OpenLayers.Marker.Box(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>, borderColor, borderWidth)</td><td>Set up a box. Defaults are red, with a width of 2.</td></tr> | |
| 487 | - | |
| 488 | -</table> | |
| 489 | -<h2>Methods</h2> | |
| 490 | -<table> | |
| 491 | - <tr><td> setBorder(color, width)</td><td>sets properties of border color and width.</td></tr> | |
| 492 | - | |
| 493 | -</table></div> | |
| 494 | -<h1><a name="OpenLayers.Tile">OpenLayers.Tile</a></h1><div class="classref"> | |
| 495 | - | |
| 496 | -This is a class designed to designate a single tile, however | |
| 497 | -it is explicitly designed to do relatively little. Tiles store information | |
| 498 | - <tr><td>about themselves</td><td>such as the URL that they are related to, and their </td></tr> | |
| 499 | -size - but do not add themselves to the layer div automatically, for | |
| 500 | -example. | |
| 501 | - | |
| 502 | -</table> | |
| 503 | -<h2>Constructor</h2> | |
| 504 | -<table> | |
| 505 | - <tr><td> OpenLayers.Tile(<a href="#OpenLayers.Layer" title="OpenLayers.Layer">layer</a>, <a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">position</a>, <a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>, <span class="type" title="String">url</span>, <a href="#OpenLayers.Size" title="OpenLayers.Size">size</a>)</td><td>Create a new tile, with properties passed.</td></tr> | |
| 506 | -</table></div> | |
| 507 | -<h1><a name="OpenLayers.Tile.Image">OpenLayers.Tile.Image</a></h1><div class="classref"> | |
| 508 | - | |
| 509 | -The image tile is designed to hold images for all types of layers, from WMS to KaMap to WorldWind. | |
| 510 | - | |
| 511 | -</table> | |
| 512 | -<h2>Constructor</h2> | |
| 513 | -<table> | |
| 514 | - <tr><td> OpenLayers.Tile.Image(<a href="#OpenLayers.Layer" title="OpenLayers.Layer">layer</a>, <a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">position</a>, <a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>, <span class="type" title="String">url</span>, <a href="#OpenLayers.Size" title="OpenLayers.Size">size</a>)</td><td>Create a new tile, with properties passed.</td></tr> | |
| 515 | - | |
| 516 | -</table></div> | |
| 517 | -<h1><a name="OpenLayers.Tile.WFS">OpenLayers.Tile.WFS</a></h1><div class="classref"> | |
| 518 | - | |
| 519 | -The WFS tile allows you to load any number of WFS URLs into a single tile. | |
| 520 | - | |
| 521 | -</table> | |
| 522 | -<h2>Constructor</h2> | |
| 523 | -<table> | |
| 524 | - <tr><td> OpenLayers.Tile.WFS(<a href="#OpenLayers.Layer" title="OpenLayers.Layer">layer</a>, <a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">position</a>, <a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>, <span class="type" title="String">urls</span>, <a href="#OpenLayers.Size" title="OpenLayers.Size">size</a>)</td><td>Create a new tile, with properties passed. The major difference between this tile and other tiles is what it does with results: The WFS tile is designed to parse XML responses, and create features for each item in the response. </td></tr> | |
| 525 | -</table></div> | |
| 526 | -<h1><a name="OpenLayers.Control">OpenLayers.Control</a></h1><div class="classref"> | |
| 527 | - | |
| 528 | -Base class from which controls are derived. Controls are elements of the map used to control things like zoom, layer status, or to provide information to the user about the status of the map, such as scale or copyright information. | |
| 529 | - | |
| 530 | -</table> | |
| 531 | -<h2>Constructor</h2> | |
| 532 | -<table> | |
| 533 | - <tr><td> OpenLayers.Control(<span class="type" title="Object">options</span>?)</td><td>Creates a new control. The options here are used to control parameters of the control. The base control defines only "position", which is designed to be an <a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a> which is the top-left of the location of the control relative to the map div. </td></tr> | |
| 534 | - | |
| 535 | -</table> | |
| 536 | -<h2>Parameters</h2> | |
| 537 | -<table> | |
| 538 | - <tr><td> position</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a> to use as the top-left corner of the control div, relative to the map area.</td></tr> | |
| 539 | -</table></div> | |
| 540 | -<h1><a name="OpenLayers.Control.LayerSwitcher">OpenLayers.Control.LayerSwitcher</a></h1><div class="classref"> | |
| 541 | - | |
| 542 | -This control will by default display a small image in the upper right corner of the map. When clicked, this image expands into a control which allows one to select between multiple types of layers, seperated into two types: Base Layers and Overlays. Only one base layer can be selected at a time, and is enforced by a radio button control being used. Multiple overlays can be selected at once, and a checkbox control is visible for this functionality. | |
| 543 | -</table> | |
| 544 | -<h2>Constructor</h2> | |
| 545 | -<table> | |
| 546 | - <tr><td> OpenLayers.Control.LayerSwitcher(<span class="type" title="Object">options</span>?)</td><td>Creates a new control.</td></tr> | |
| 547 | - | |
| 548 | -</table> | |
| 549 | -<h2>Methods</h2> | |
| 550 | -<table> | |
| 551 | - <tr><td> maximizeControl()</td><td>none</td><td>Expand the layer switcher control.</td></tr> | |
| 552 | - <tr><td> minimizeControl()</td><td>none</td><td>Close the layer switcher control.</td></tr> | |
| 553 | - | |
| 554 | -</table> | |
| 555 | -<h2>Parameters</h2> | |
| 556 | -<table> | |
| 557 | - <tr><td> position</td><td>(inherited from <a href="#OpenLayers.Control" title="OpenLayers.Control">OpenLayers.Control</a>) {OpenLayers.Pixel} to use as the top-left corner of the control div, relative to the map area.</td></tr> | |
| 558 | - <tr><td> activeColor</td><td>The color to use for the background of the layer switcher div.</td></tr> | |
| 559 | - <tr><td> ascending</td><td>Ascending determines whether layers are added to the layer switcher in ascending or descending order. If ascending is true, the lowest layer is appended to the list first. If ascending is false, the lowest layer is at the very bottom of the LayerSwitcher. Default is true. </td></tr> | |
| 560 | -</table></div> | |
| 561 | -<h1><a name="OpenLayers.Control.MouseDefaults">OpenLayers.Control.MouseDefaults</a></h1><div class="classref"> | |
| 562 | - | |
| 563 | -Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseDefaults, replacing the functions whose behavior you wish to change. | |
| 564 | - | |
| 565 | - | |
| 566 | -</table> | |
| 567 | -<h2>Constructor</h2> | |
| 568 | -<table> | |
| 569 | - <tr><td> OpenLayers.Control()</td><td>Creates a new control. No options available. </td></tr> | |
| 570 | - | |
| 571 | -</table> | |
| 572 | -<h2>Methods</h2> | |
| 573 | -<table> | |
| 574 | - <tr><td> defaultClick</td><td>none</td><td>This event takes place when a click event occurs on the map.</td></tr> | |
| 575 | - <tr><td> defaultDblClick</td><td>none</td><td>This event re-centers the map on the clicked location.</td></tr> | |
| 576 | - <tr><td> defaultMouseDown</td><td>none</td><td>This event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead.</td></tr> | |
| 577 | - <tr><td> defaultMouseMove</td><td>none</td><td>If a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor.</td></tr> | |
| 578 | - <tr><td> defaultMouseUp</td><td>none</td><td>This function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled.</td></tr> | |
| 579 | - <tr><td> defaultMouseOut</td><td>none</td><td>This calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped.</td></tr> | |
| 580 | - <tr><td> defaultWheelUp</td><td>none</td><td>Zooms in one level. Called by onWheelEvent</td></tr> | |
| 581 | - <tr><td> defaultWheelDown</td><td>none</td><td>Zooms out one level. Called by onWheelEvent.</td></tr> | |
| 582 | - <tr><td> onWheelEvent</td><td>none</td><td>catches the map wheel event, and handles it, zooming appropriately. </td></tr> | |
| 583 | - | |
| 584 | -</table></div> | |
| 585 | -<h1><a name="OpenLayers.Control.MousePosition">OpenLayers.Control.MousePosition</a></h1><div class="classref"> | |
| 586 | - | |
| 587 | -A small control which displays the Longitude and Latitude of the current mouse position, by defualt in the lower right of the map viewport. | |
| 588 | - | |
| 589 | -</table> | |
| 590 | -<h2>Constructor</h2> | |
| 591 | -<table> | |
| 592 | - <tr><td> OpenLayers.Control.MousePosition(<span class="type" title="Object">options</span>)</td><td>Creates a new MousePosition control.</td></tr> | |
| 593 | - | |
| 594 | - | |
| 595 | -</table> | |
| 596 | -<h2>Parameters</h2> | |
| 597 | -<table> | |
| 598 | - | |
| 599 | - <tr><td> element</td><td>if not null, div in which to display the MousePosition</td></tr> | |
| 600 | - <tr><td> prefix</td><td>html to precede the longitude value (default: '')</td></tr> | |
| 601 | - <tr><td> separator</td><td>html to separate the longitude and latitude values (default: '<br />')</td></tr> | |
| 602 | - <tr><td> suffix</td><td>html to follow the latitude value (default: '')</td></tr> | |
| 603 | - <tr><td> numdigits</td><td>number of digits to the right of the decimal (default: 5)</td></tr> | |
| 604 | - <tr><td> granularity</td><td>Don't refresh display if mouse has moved more than this (default: 10)</td></tr> | |
| 605 | - | |
| 606 | -prefix, separator, and suffix are used to format the lon/lat values. | |
| 607 | - | |
| 608 | -With: | |
| 609 | - prefix = 'Lon: ' | |
| 610 | - suffix = '<br />Lat: ' | |
| 611 | - suffix = '' | |
| 612 | - nudigits = 3 | |
| 613 | -Lon/Lat is displayed as: | |
| 614 | - Lon: 95.123 | |
| 615 | - Lat: 35.456 | |
| 616 | - | |
| 617 | -If the mouse has never been over the map, Lon/Lat will equal 0/0. If the mouse is over the map, Lon/Lat will equal the current mouse position. If the mouse has been moved off the map, Lon/Lat will equal the value displayed at the time the mouse was moved off the map. | |
| 618 | - | |
| 619 | -If the mouse is moving slowly, the Lon/Lat will refresh continuously. If the mouse is moving rapidly, the refresh of Lon/Lat will be suspended until the mouse has slowed down or stopped. (Trying to update the Lon/Lat value while the mouse is in rapid movemement makes the movement of the mouse unacceptably jerky.) | |
| 620 | - | |
| 621 | -</table></div> | |
| 622 | -<h1><a name="OpenLayers.Control.MouseToolbar">OpenLayers.Control.MouseToolbar</a></h1><div class="classref"> | |
| 623 | - | |
| 624 | -Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseToolbar, replacing the functions whose behavior you wish to change. Additionally, a toolbar of images can be clicked to start events, as well as using the keyboard shortcuts. Note that if you wish to use the MouseToolbar, you *must* add a 'controls' option to the map constructor, otherwise you will have both MouseDefaults and MouseToolbar on the map, which will not work. | |
| 625 | - | |
| 626 | -</table> | |
| 627 | -<h2>Constructor</h2> | |
| 628 | -<table> | |
| 629 | - <tr><td> OpenLayers.Control.MouseToolbar(<a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">position</a>, <span class="type" title="String">direction</span>)</td><td>Creates a new control. The direction of the control can be either "vertical" or "horizontal". The default is vertical.</td></tr> | |
| 630 | - | |
| 631 | -</table> | |
| 632 | -<h2>Methods</h2> | |
| 633 | -<table> | |
| 634 | - <tr><td> defaultClick</td><td>none</td><td>This event takes place when a click event occurs on the map.</td></tr> | |
| 635 | - <tr><td> defaultDblClick</td><td>none</td><td>This event re-centers the map on the clicked location.</td></tr> | |
| 636 | - <tr><td> defaultMouseDown</td><td>none</td><td>This event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead.</td></tr> | |
| 637 | - <tr><td> defaultMouseMove</td><td>none</td><td>If a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor.</td></tr> | |
| 638 | - <tr><td> defaultMouseUp</td><td>none</td><td>This function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled.</td></tr> | |
| 639 | - <tr><td> defaultMouseOut</td><td>none</td><td>This calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped.</td></tr> | |
| 640 | - | |
| 641 | -</table></div> | |
| 642 | -<h1><a name="OpenLayers.Control.OverviewMap ">OpenLayers.Control.OverviewMap </a></h1><div class="classref"> | |
| 643 | - | |
| 644 | -This control provides a locator or overview map linked to another map. By default, the overview map shows up in the lower right of the main map and can be expdaned with the '+' button. | |
| 645 | - | |
| 646 | -</table> | |
| 647 | -<h2>Constructor </h2> | |
| 648 | -<table> | |
| 649 | - <tr><td> OpenLayers.Control.OverviewMap(opts?)</td><td>Creates a new overview map. The opts variable is an object with various options, as described in the options section below. </td></tr> | |
| 650 | - | |
| 651 | -</table> | |
| 652 | -<h2>Methods </h2> | |
| 653 | -<table> | |
| 654 | - <tr><td>isSuitableOverview()</td><td><span class="type" title="Boolean">Boolean</span></td><td>Determines if the overview map is suitable given the extent and resolution of the main map. </td></tr> | |
| 655 | - <tr><td>getRectPxBounds()</td><td><a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a></td><td>An OpenLayers.Bounds which is the extent rectangle's pixel bounds (relative to the parent element). </td></tr> | |
| 656 | - <tr><td>setRectPxBounds(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>)</td><td>none</td><td>Set extent rectangle pixel bounds. </td></tr> | |
| 657 | - <tr><td>getRectBoundsFromMapBounds(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">lonLatBounds</a>)</td><td><a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a></td><td>An OpenLayers.Bounds which is the passed-in map lon/lat extent translated into pixel bounds for the overview map. </td></tr> | |
| 658 | - <tr><td>getMapBoundsFromRectBounds(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">pxBounds]</a>)</td><td><a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a></td><td>An OpenLayers.Bounds which is the passed-in overview rect bounds translated into lon/lat bounds for the overview map. </td></tr> | |
| 659 | - <tr><td>getLonLatFromOverviewPx(<a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">pixel</a>)</td><td><a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">lonlat</a></td><td>An OpenLayers.LonLat which is the passed-in overview map OpenLayers.Pixel translated into lon/lat by the overview map. </td></tr> | |
| 660 | - <tr><td>getOverviewPxFromLonLat(<a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">lonlat</a>)</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">pixel</a></td><td>An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into overview map pixels </td></tr> | |
| 661 | - | |
| 662 | - | |
| 663 | -</table> | |
| 664 | -<h2>Events </h2> | |
| 665 | -<table> | |
| 666 | - </table> | |
| 667 | - | |
| 668 | -<h3>Rectangle events </h3> | |
| 669 | - <table> | |
| 670 | -They are defined on OverviewMap.rectEvents | |
| 671 | - | |
| 672 | - <tr><td> mouseover</td><td>rectangle is moused over </td></tr> | |
| 673 | - <tr><td> mouseout</td><td>rectangle is no longer mousedout </td></tr> | |
| 674 | - <tr><td> mousemove</td><td>mouse moves inside rectangle </td></tr> | |
| 675 | - <tr><td> mousedown</td><td>mouse button is pressed over the rectangle. </td></tr> | |
| 676 | - <tr><td> mouseup</td><td>mouse button is released over the rectangle. </td></tr> | |
| 677 | - <tr><td> click</td><td>mouse clicked </td></tr> | |
| 678 | - <tr><td> dblclick</td><td>mouse double clicked </td></tr> | |
| 679 | - | |
| 680 | - </table> | |
| 681 | - | |
| 682 | -<h3>Map events </h3> | |
| 683 | - <table> | |
| 684 | - They are defined on OverviewMap.mapDivEvents | |
| 685 | - | |
| 686 | - <tr><td> click</td><td>mouse clicked </td></tr> | |
| 687 | - | |
| 688 | -</table> | |
| 689 | -<h2>Options: </h2> | |
| 690 | -<table> | |
| 691 | - <tr><td>minRatio</td><td>The ratio of the overview map resolution to the main map resolution at which to zoom farther out on the overview map. </td></tr> | |
| 692 | - <tr><td>maxRatio</td><td>The ratio of the overview map resolution to the main map resolution at which to zoom farther in on the overview map. </td></tr> | |
| 693 | - <tr><td>layers</td><td>Ordered list of layers in the overview map. If none, then the map base layer is used. </td></tr> | |
| 694 | -</table></div> | |
| 695 | -<h1><a name="OpenLayers.Control.PanZoom">OpenLayers.Control.PanZoom</a></h1><div class="classref"> | |
| 696 | - | |
| 697 | -Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and one button which zooms to the max extent of the map. | |
| 698 | - | |
| 699 | -</table> | |
| 700 | -<h2>Constructor</h2> | |
| 701 | -<table> | |
| 702 | - <tr><td> OpenLayers.Control.PanZoom(<span class="type" title="Object">options</span>)</td><td>Creates a new panzoom control.</td></tr> | |
| 703 | - | |
| 704 | -</table> | |
| 705 | -<h2>Parameters</h2> | |
| 706 | -<table> | |
| 707 | - <tr><td> slideFactor</td><td>Number of pixels by which to slide the map when a pan arrow is clicked.</td></tr> | |
| 708 | -</table></div> | |
| 709 | -<h1><a name="OpenLayers.Control.PanZoomBar">OpenLayers.Control.PanZoomBar</a></h1><div class="classref"> | |
| 710 | - | |
| 711 | -Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and a bar on which a slider can be moved to zoom in or out by multiple stops at once. | |
| 712 | - | |
| 713 | -</table> | |
| 714 | -<h2>Constructor</h2> | |
| 715 | -<table> | |
| 716 | - <tr><td> OpenLayers.Control.PanZoomBar()</td><td>Creates a new panzoombar control.</td></tr> | |
| 717 | -</table></div> | |
| 718 | -<h1><a name="OpenLayers.Control.Permalink">OpenLayers.Control.Permalink</a></h1><div class="classref"> | |
| 719 | - | |
| 720 | -A small control which updates a "Permalink" to the map every time the viewport changes. This allows users to copy a link to a specfic map view. By default, it places itself in the lower right corner of the map. This control must be added to the map after a baselayer has been set. | |
| 721 | - | |
| 722 | -</table> | |
| 723 | -<h2>Constructor</h2> | |
| 724 | -<table> | |
| 725 | - <tr><td> OpenLayers.Control.Scale(<span class="type" title="DOMElement">element</span>?, <span class="type" title="String">base</span>)</td><td>Creates a new permalink control. The DOMElement is used, if passed, as the element on which the 'href' is set. If you prefer to put this link on an element outside of the map, set this element to an anchor element to have its href updated when the map moves. If you wish to make the link go to some other URL (for example, an editing interface rather than the current URL), the 'base' property can be used, to which the ?lat=&lon=&zoom= will be appended after the map has moved.</td></tr> | |
| 726 | -</table></div> | |
| 727 | -<h1><a name="OpenLayers.Control.Scale">OpenLayers.Control.Scale</a></h1><div class="classref"> | |
| 728 | - | |
| 729 | -A small control which displays an informative scale value, a la "1:50K" , by defualt in the lower right of the map viewport. | |
| 730 | - | |
| 731 | -</table> | |
| 732 | -<h2>Constructor</h2> | |
| 733 | -<table> | |
| 734 | - <tr><td> OpenLayers.Control.Scale(<span class="type" title="DOMElement">element</span>?)</td><td>Creates a new scale control. The DOMElement is used, if passed, to put the scale inside</td><td>this allows you to have the scale displayed in some location outside the map. </td></tr> | |
| 735 | -</table></div> | |
| 736 | -<h1><a name="OpenLayers.LonLat">OpenLayers.LonLat</a></h1><div class="classref"> | |
| 737 | - | |
| 738 | -This class represents a geographic coordinate pair, either projected or unprojected. | |
| 739 | - | |
| 740 | -</table> | |
| 741 | -<h2>Constructor</h2> | |
| 742 | -<table> | |
| 743 | - <tr><td> OpenLayers.LonLat(<span class="type" title="float">lon</span>, <span class="type" title="float">lat</span>)</td><td>Create LonLat.</td></tr> | |
| 744 | - | |
| 745 | -</table> | |
| 746 | -<h2>Methods</h2> | |
| 747 | -<table> | |
| 748 | - <tr><td> toString()</td><td><span class="type" title="String">String</span></td><td>Converts to human readable string.</td></tr> | |
| 749 | - <tr><td> toShortString()</td><td><span class="type" title="String">String</span></td><td>Converts to short human readable string.</td></tr> | |
| 750 | - <tr><td> clone()</td><td><a href="#OpenLayers.Size" title="OpenLayers.Size">OpenLayers.Size</a></td><td>Returns a copy of the pixel.</td></tr> | |
| 751 | - <tr><td> equals(<a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">ll</a>)</td><td><span class="type" title="Boolean">Boolean</span></td><td>Compares two LonLats. </td></tr> | |
| 752 | - <tr><td> add(<span class="type" title="int">lon</span>, <span class="type" title="int">lat</span>)</td><td><a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">OpenLayers.LonLat</a></td><td>add x and y to the current coordinates.</td></tr> | |
| 753 | -</table></div> | |
| 754 | -<h1><a name="OpenLayers.Size">OpenLayers.Size</a></h1><div class="classref"> | |
| 755 | - | |
| 756 | -This class represents a width/height pair. | |
| 757 | - | |
| 758 | -</table> | |
| 759 | -<h2>Constructor</h2> | |
| 760 | -<table> | |
| 761 | - <tr><td> OpenLayers.Size(<span class="type" title="float">h</span>, <span class="type" title="float">w</span>)</td><td>Create Size.</td></tr> | |
| 762 | - | |
| 763 | -</table> | |
| 764 | -<h2>Methods</h2> | |
| 765 | -<table> | |
| 766 | - <tr><td> toString()</td><td><span class="type" title="String">String</span></td><td>Converts to human readable string.</td></tr> | |
| 767 | - <tr><td> clone()</td><td><a href="#OpenLayers.Size" title="OpenLayers.Size">OpenLayers.Size</a></td><td>Returns a copy of the pixel.</td></tr> | |
| 768 | - <tr><td> add(<span class="type" title="int">x</span>, <span class="type" title="int">y</span>)</td><td><a href="#OpenLayers.Size" title="OpenLayers.Size">OpenLayers.Size</a></td><td>add x and y to the current coordinates.</td></tr> | |
| 769 | -</table></div> | |
| 770 | -<h1><a name="OpenLayers.Pixel">OpenLayers.Pixel</a></h1><div class="classref"> | |
| 771 | - | |
| 772 | -This class represents a screen coordinate in x and y coordinates. | |
| 773 | - | |
| 774 | -</table> | |
| 775 | -<h2>Constructor</h2> | |
| 776 | -<table> | |
| 777 | - <tr><td> OpenLayers.Pixel(<span class="type" title="float">x</span>, <span class="type" title="float">y</span>)</td><td>Create Pixel.</td></tr> | |
| 778 | - | |
| 779 | -</table> | |
| 780 | -<h2>Methods</h2> | |
| 781 | -<table> | |
| 782 | - <tr><td> toString()</td><td><span class="type" title="String">String</span></td><td>Converts to human readable string.</td></tr> | |
| 783 | - <tr><td> clone()</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a></td><td>Returns a copy of the pixel.</td></tr> | |
| 784 | - <tr><td> equals(<a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">px</a>)</td><td><span class="type" title="Boolean">Boolean</span></td><td>Tests for equivilance.</td></tr> | |
| 785 | - <tr><td> add(<span class="type" title="int">x</span>, <span class="type" title="int">y</span>)</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a></td><td>add x and y to the current coordinates.</td></tr> | |
| 786 | - <tr><td> offset(<a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">pixel</a>)</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a></td><td>Add pixels together.</td></tr> | |
| 787 | -</table></div> | |
| 788 | -<h1><a name="OpenLayers.Bounds">OpenLayers.Bounds</a></h1><div class="classref"> | |
| 789 | - | |
| 790 | -This class represents a bounding box. Data stores as left, bottom, right, top floats. | |
| 791 | - | |
| 792 | -</table> | |
| 793 | -<h2>Constructor</h2> | |
| 794 | -<table> | |
| 795 | - <tr><td> OpenLayers.Bounds(left, bottom, right, top)</td><td>Create new Bounds.</td></tr> | |
| 796 | - | |
| 797 | -</table> | |
| 798 | -<h2>Methods</h2> | |
| 799 | -<table> | |
| 800 | - <tr><td> clone()</td><td><a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">OpenLayers.Bounds</a></td><td>Return copy of the current bounds.</td></tr> | |
| 801 | - <tr><td> toString()</td><td><span class="type" title="String">String</span></td><td>Return bounds as string. </td></tr> | |
| 802 | - <tr><td> toBBOX()</td><td><span class="type" title="String">String</span></td><td>Return bounds as simple string, usable for WMS.</td></tr> | |
| 803 | - <tr><td> getWidth()</td><td><span class="type" title="float">float</span></td><td>Return width of bounds.</td></tr> | |
| 804 | - <tr><td> getHeight()</td><td><span class="type" title="float">float</span></td><td>Return height of bounds.</td></tr> | |
| 805 | - <tr><td> getSize()</td><td><a href="#OpenLayers.Size" title="OpenLayers.Size">OpenLayers.Size</a></td><td>Return size of bounds.</td></tr> | |
| 806 | - <tr><td> getCenterPixel()</td><td><a href="#OpenLayers.Pixel" title="OpenLayers.Pixel">OpenLayers.Pixel</a></td><td>Return center of bounds as pixel.</td></tr> | |
| 807 | - <tr><td> getCenterLonLat()</td><td><a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">OpenLayers.LonLat</a></td><td>Return center of bounds as LonLat.</td></tr> | |
| 808 | - <tr><td> equals(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>)</td><td><span class="type" title="Boolean">Boolean</span></td><td>whether or not the bounds are equivilant.</td></tr> | |
| 809 | - <tr><td> add(<span class="type" title="float">x</span>, <span class="type" title="float">y</span>)</td><td><a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">OpenLayers.Bounds</a></td><td>Shift bounds by x and y. </td></tr> | |
| 810 | - <tr><td> contains(<span class="type" title="float">x</span>, <span class="type" title="float">y</span>, <span class="type" title="Boolean">inclusive</span>)</td><td><span class="type" title="Boolean">Boolean</span></td><td>Return Whether or not the passed-in coordinates are within this bounds </td></tr> | |
| 811 | - <tr><td> containsBounds(<a href="#OpenLayers.Bounds" title="OpenLayers.Bounds">bounds</a>, <span class="type" title="Boolean">partial</span>, <span class="type" title="Boolean">inclusive</span>)</td><td><span class="type" title="Boolean">Boolean</span></td><td>Returns whether or not the passed-in OpenLayers.Bounds object is contained within this bounds. partial indicates whether bounds must be contained or only overlap. Inclusive determines whether border is included.</td></tr> | |
| 812 | - <tr><td> determineQuadrant(<a href="#OpenLayers.LonLat" title="OpenLayers.LonLat">lonlat</a>)</td><td><span class="type" title="String">String</span></td><td>Determine which quadrant the LonLat is in. Returns combination of "b" or "t" and "l" or "r".</td></tr> | |
| 813 | -</table></div> | |
| 814 | -<h1><a name="OpenLayers.Util">OpenLayers.Util</a></h1><div class="classref"> | |
| 815 | - | |
| 816 | -Utility class. Stores a bunch of methods and settings that don't fit anywhere else. | |
| 817 | - | |
| 818 | -</table> | |
| 819 | -<h2>Options</h2> | |
| 820 | -<table> | |
| 821 | - | |
| 822 | - <tr><td> OpenLayers.Util.onImageLoadErrorColor</td><td>A string to set img.style.backgroundColor to if the onerror event fires for the image (useful for 500 errors from WMS, for example). </td></tr> | |
| 823 | - <tr><td> OpenLayers.ImgPath</td><td>A string to be used as the base for images for controls and the like. Should end with '/'. </td></tr> | |
| 824 | -</table></div> | |
| 825 | -OpenLayers contains a number of helper functions for working with AJAX. | |
| 826 | - | |
| 827 | -</table> | |
| 828 | -<h2>Methods</h2> | |
| 829 | -<table> | |
| 830 | - <tr><td> OpenLayers.loadURL(<span class="type" title="String">uri</span>, <span class="type" title="String">params</span>, <span class="type" title="Object">caller</span>, <span class="type" title="function">onComplete</span>, <span class="type" title="function">onFailure</span>)</td><td>none</td><td>This function sends an XMLHTTPRequest to a remote site, specified by URI, with the params string given as the params argument. Caller is bound as 'this' to the function specified by either onComplete or onFailure.</td></tr> | |
| 831 | - <tr><td> OpenLayers.parseXMLString(<span class="type" title="String">text</span>)</td><td><span class="type" title="AJAXResponse">AJAXResponse</span></td><td>Accepts a block of text, and creates a DOM response document from the text.</td></tr> | |
| 832 | - | |
| 833 | -</table> | |
| 834 | -<h2>Parameters</h2> | |
| 835 | -<table> | |
| 836 | - <tr><td> OpenLayers.ProxyHost</td><td>When initiating an AJAX request, any URL that is absolute is prefixed with OpenLayers.ProxyHost. The ProxyHost is designed to accept a URL and return the content, in an effort to work around cross-browser security restrictions. This defaults to null, but if you wish to access content from another domain that Javascript would restrict access to, you must set this to be the URL which will accept a URL encoded version of the passed URL and return the content at that URL. An example is available as proxy.txt in the examples/ directory.</td></tr> | |
| 837 | - | |
| 838 | -</table></div> | |
| 839 | - </body> | |
| 840 | -</html> |
pacotes/openlayers/examples/GMLParser.html
| ... | ... | @@ -1,33 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 800px; | |
| 6 | - height: 475px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - function parseData(req) { | |
| 13 | - g = new OpenLayers.Format.GML(); | |
| 14 | - html = "" | |
| 15 | - features = g.read(req.responseText); | |
| 16 | - for(var feat in features) { | |
| 17 | - html += "Feature: Geometry: "+ features[feat].geometry+","; | |
| 18 | - html += "<ul>"; | |
| 19 | - for (var j in features[feat].attributes) { | |
| 20 | - html += "<li>"+j+":"+features[feat].attributes[j]+"</li>"; | |
| 21 | - } | |
| 22 | - html += "</ul>" | |
| 23 | - } | |
| 24 | - document.body.innerHTML = html; | |
| 25 | - } | |
| 26 | - function load() { | |
| 27 | - OpenLayers.loadURL("gml/owls.xml", "", null, parseData); | |
| 28 | - } | |
| 29 | - </script> | |
| 30 | - </head> | |
| 31 | - <body onload="load()"> | |
| 32 | - </body> | |
| 33 | -</html> |
pacotes/openlayers/examples/KMLParser.html
| ... | ... | @@ -1,33 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 800px; | |
| 6 | - height: 475px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - function parseData(req) { | |
| 13 | - g = new OpenLayers.Format.KML(); | |
| 14 | - html = "" | |
| 15 | - features = g.read(req.responseText); | |
| 16 | - for(var feat in features) { | |
| 17 | - html += "Feature: Geometry: "+ features[feat].geometry+","; | |
| 18 | - html += "<ul>"; | |
| 19 | - for (var j in features[feat].attributes) { | |
| 20 | - html += "<li>"+j+":"+features[feat].attributes[j]+"</li>"; | |
| 21 | - } | |
| 22 | - html += "</ul>" | |
| 23 | - } | |
| 24 | - document.body.innerHTML = html; | |
| 25 | - } | |
| 26 | - function load() { | |
| 27 | - OpenLayers.loadURL("kml/mc-search.kml", "", null, parseData); | |
| 28 | - } | |
| 29 | - </script> | |
| 30 | - </head> | |
| 31 | - <body onload="load()"> | |
| 32 | - </body> | |
| 33 | -</html> |
pacotes/openlayers/examples/baseLayers.html
| ... | ... | @@ -1,83 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 100%; | |
| 6 | - height: 512px; | |
| 7 | - border: 1px solid black; | |
| 8 | - background-color: blue; | |
| 9 | - } | |
| 10 | - </style> | |
| 11 | - | |
| 12 | - <!-- this gmaps key generated for http://openlayers.org/dev/ --> | |
| 13 | - <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script> | |
| 14 | - <!-- Localhost key --> | |
| 15 | - <!-- <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTS6gjckBmeABOGXIUiOiZObZESPg'></script>--> | |
| 16 | - <script type="text/javascript" src="http://clients.multimap.com/API/maps/1.1/metacarta_04"></script> | |
| 17 | - <script src='http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js'></script> | |
| 18 | - <script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script> | |
| 19 | - <script src="../lib/OpenLayers.js"></script> | |
| 20 | - <script type="text/javascript"> | |
| 21 | - <!-- | |
| 22 | - var lon = 5; | |
| 23 | - var lat = 40; | |
| 24 | - var zoom = 5; | |
| 25 | - var map, markers; | |
| 26 | - var barcelona = new OpenLayers.LonLat(2.13134765625, | |
| 27 | - 41.37062534198901); | |
| 28 | - var madrid = new OpenLayers.LonLat(-3.6968994140625, | |
| 29 | - 40.428314208984375); | |
| 30 | - | |
| 31 | - function init(){ | |
| 32 | - map = new OpenLayers.Map( 'map' ); | |
| 33 | - | |
| 34 | - var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 35 | - "http://labs.metacarta.com/wms/vmap0", | |
| 36 | - {layers: 'basic'} ); | |
| 37 | - var google = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_MAP }); | |
| 38 | - var ve = new OpenLayers.Layer.VirtualEarth( "VE"); | |
| 39 | - var yahoo = new OpenLayers.Layer.Yahoo( "Yahoo"); | |
| 40 | - var mm = new OpenLayers.Layer.MultiMap( "MultiMap"); | |
| 41 | - | |
| 42 | - | |
| 43 | - map.addLayers([wms, google, ve, yahoo, mm]); | |
| 44 | - | |
| 45 | - markers = new OpenLayers.Layer.Markers("markers"); | |
| 46 | - map.addLayer(markers); | |
| 47 | - | |
| 48 | - map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); | |
| 49 | - map.addControl( new OpenLayers.Control.LayerSwitcher() ); | |
| 50 | - map.addControl( new OpenLayers.Control.MousePosition() ); | |
| 51 | - | |
| 52 | - } | |
| 53 | - | |
| 54 | - function add() { | |
| 55 | - var url = 'http://boston.openguides.org/markers/AQUA.png'; | |
| 56 | - var sz = new OpenLayers.Size(10, 17); | |
| 57 | - var calculateOffset = function(size) { | |
| 58 | - return new OpenLayers.Pixel(-(size.w/2), -size.h); | |
| 59 | - }; | |
| 60 | - var icon = new OpenLayers.Icon(url, sz, null, calculateOffset); | |
| 61 | - marker = new OpenLayers.Marker(barcelona, icon); | |
| 62 | - markers.addMarker(marker); | |
| 63 | - | |
| 64 | - marker = new OpenLayers.Marker(madrid, icon.clone()); | |
| 65 | - markers.addMarker(marker); | |
| 66 | - | |
| 67 | - } | |
| 68 | - | |
| 69 | - function remove() { | |
| 70 | - markers.removeMarker(marker); | |
| 71 | - } | |
| 72 | - | |
| 73 | - // --> | |
| 74 | - | |
| 75 | - </script> | |
| 76 | - </head> | |
| 77 | - <body onload="init()"> | |
| 78 | - <h1>OpenLayers With WMS, Google, VE Example</h1> | |
| 79 | - <div id="map"></div> | |
| 80 | - <div style="background-color:green" onclick="add()"> click to add a marker to the map</div> | |
| 81 | - <div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div> | |
| 82 | - </body> | |
| 83 | -</html> |
pacotes/openlayers/examples/boxes.html
| ... | ... | @@ -1,49 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 512px; | |
| 6 | - height: 512px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - box_extents = [ | |
| 14 | - [-10, 50, 5, 60], | |
| 15 | - [-75, 41, -71, 44], | |
| 16 | - [-122.6, 37.6, -122.3, 37.9], | |
| 17 | - [10, 10, 20, 20] | |
| 18 | - ]; | |
| 19 | - | |
| 20 | - function init(){ | |
| 21 | - var map = new OpenLayers.Map('map'); | |
| 22 | - | |
| 23 | - var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 24 | - "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} ); | |
| 25 | - | |
| 26 | - var boxes = new OpenLayers.Layer.Boxes( "Boxes" ); | |
| 27 | - | |
| 28 | - for (var i = 0; i < box_extents.length; i++) { | |
| 29 | - ext = box_extents[i]; | |
| 30 | - bounds = new OpenLayers.Bounds(ext[0], ext[1], ext[2], ext[3]); | |
| 31 | - box = new OpenLayers.Marker.Box(bounds); | |
| 32 | - box.events.register("click", box, function (e) { | |
| 33 | - this.setBorder("yellow"); | |
| 34 | - }); | |
| 35 | - boxes.addMarker(box); | |
| 36 | - } | |
| 37 | - | |
| 38 | - map.addLayers([ol_wms, boxes]); | |
| 39 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 40 | - map.zoomToMaxExtent(); | |
| 41 | - } | |
| 42 | - // --> | |
| 43 | - </script> | |
| 44 | - </head> | |
| 45 | - <body onload="init()"> | |
| 46 | - <h1>OpenLayers Example</h1> | |
| 47 | - <div id="map"></div> | |
| 48 | - </body> | |
| 49 | -</html> |
pacotes/openlayers/examples/canvas.html
| ... | ... | @@ -1,613 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 512px; | |
| 6 | - height: 512px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script> | |
| 11 | - <script src="../lib/OpenLayers.js"></script> | |
| 12 | - <script type="text/javascript"> | |
| 13 | - <!-- | |
| 14 | - var map, canvas; | |
| 15 | - var click; | |
| 16 | - function init(){ | |
| 17 | - map = new OpenLayers.Map('map'); | |
| 18 | - | |
| 19 | - var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 20 | - "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); | |
| 21 | - var g = new OpenLayers.Layer.Google("Google"); | |
| 22 | - canvas = new OpenLayers.Layer.Canvas("Canvas Layer"); | |
| 23 | - map.addLayers([ol_wms, g,canvas]); | |
| 24 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 25 | - // map.setCenter(new OpenLayers.LonLat(0, 0), 0); | |
| 26 | - map.zoomToMaxExtent(); | |
| 27 | - canvas.drawLine(new OpenLayers.LonLat(-71,42), new OpenLayers.LonLat(0,0)); | |
| 28 | - canvas.setStrokeColor("red"); | |
| 29 | - canvas.setStrokeWidth(5); | |
| 30 | - canvas.setAlpha(.5); | |
| 31 | - map.events.register("click", map, function(e) { | |
| 32 | - if (click) { | |
| 33 | - canvas.drawLine(click, this.getLonLatFromPixel(e.xy)); | |
| 34 | - click = null; | |
| 35 | - OpenLayers.Util.getElement('status').innerHTML = ""; | |
| 36 | - } | |
| 37 | - else { | |
| 38 | - click = this.getLonLatFromPixel(e.xy); | |
| 39 | - OpenLayers.Util.getElement('status').innerHTML = "Point 1 stored: "+click+". <a href='#' onclick='click=null;return false'>Reset</a>"; | |
| 40 | - } | |
| 41 | - }); | |
| 42 | - } | |
| 43 | - function drawIt() { | |
| 44 | - canvas.drawLine( | |
| 45 | - new OpenLayers.LonLat(parseFloat(OpenLayers.Util.getElement('lon1').value), parseFloat(OpenLayers.Util.getElement('lat1').value)), | |
| 46 | - new OpenLayers.LonLat(parseFloat(OpenLayers.Util.getElement('lon2').value), parseFloat(OpenLayers.Util.getElement('lat2').value)) | |
| 47 | - ); | |
| 48 | - } | |
| 49 | - // --> | |
| 50 | - </script> | |
| 51 | - </head> | |
| 52 | - <body onload="init()"> | |
| 53 | - <h1>OpenLayers Example</h1> | |
| 54 | - <div style="float:right"> | |
| 55 | - <br /> | |
| 56 | - Start Lon: <input type="text" id="lon1" /> | |
| 57 | - Start Lat: <input type="text" id="lat1" /><br /> | |
| 58 | - End Lon: <input type="text" id="lon2" /> | |
| 59 | - End Lat: <input type="text" id="lat2" /><br /> | |
| 60 | - <input type="submit" value="Add line" onclick="drawIt()" /> | |
| 61 | - <div id="status"></div> | |
| 62 | - <center> | |
| 63 | -<table border="1" cellpadding="0" cellspacing="1"> | |
| 64 | -<tbody> | |
| 65 | -<tr> | |
| 66 | -<td bgcolor="#000000"> | |
| 67 | -<font size="-3"> | |
| 68 | -<a href="#" onclick="canvas.setStrokeColor('#000000');return false"> </a> | |
| 69 | -</font> | |
| 70 | -</td> | |
| 71 | -<td bgcolor="#000033"> | |
| 72 | -<font size="-3"> | |
| 73 | -<a href="#" onclick="canvas.setStrokeColor('#000033');return false"> </a> | |
| 74 | -</font> | |
| 75 | -</td> | |
| 76 | -<td bgcolor="#000066"> | |
| 77 | -<font size="-3"> | |
| 78 | -<a href="#" onclick="canvas.setStrokeColor('#000066');return false"> </a> | |
| 79 | -</font> | |
| 80 | -</td> | |
| 81 | -<td bgcolor="#000099"> | |
| 82 | -<font size="-3"> | |
| 83 | -<a href="#" onclick="canvas.setStrokeColor('#000099');return false"> </a> | |
| 84 | -</font> | |
| 85 | -</td> | |
| 86 | -<td bgcolor="#0000cc"> | |
| 87 | -<font size="-3"> | |
| 88 | -<a href="#" onclick="canvas.setStrokeColor('#0000CC');return false"> </a> | |
| 89 | -</font> | |
| 90 | -</td> | |
| 91 | -<td bgcolor="#0000ff"> | |
| 92 | -<font size="-3"> | |
| 93 | -<a href="#" onclick="canvas.setStrokeColor('#0000FF');return false"> </a> | |
| 94 | -</font> | |
| 95 | -</td> | |
| 96 | -<td bgcolor="#330000"> | |
| 97 | -<font size="-3"> | |
| 98 | -<a href="#" onclick="canvas.setStrokeColor('#330000');return false"> </a> | |
| 99 | -</font> | |
| 100 | -</td> | |
| 101 | -<td bgcolor="#330033"> | |
| 102 | -<font size="-3"> | |
| 103 | -<a href="#" onclick="canvas.setStrokeColor('#330033');return false"> </a> | |
| 104 | -</font> | |
| 105 | -</td> | |
| 106 | -<td bgcolor="#330066"> | |
| 107 | -<font size="-3"> | |
| 108 | -<a href="#" onclick="canvas.setStrokeColor('#330066');return false"> </a> | |
| 109 | -</font> | |
| 110 | -</td> | |
| 111 | -<td bgcolor="#330099"> | |
| 112 | -<font size="-3"> | |
| 113 | -<a href="#" onclick="canvas.setStrokeColor('#330099');return false"> </a> | |
| 114 | -</font> | |
| 115 | -</td> | |
| 116 | -<td bgcolor="#3300cc"> | |
| 117 | -<font size="-3"> | |
| 118 | -<a href="#" onclick="canvas.setStrokeColor('#3300CC');return false"> </a> | |
| 119 | -</font> | |
| 120 | -</td> | |
| 121 | -<td bgcolor="#3300ff"> | |
| 122 | -<font size="-3"> | |
| 123 | -<a href="#" onclick="canvas.setStrokeColor('#3300FF');return false"> </a> | |
| 124 | -</font> | |
| 125 | -</td> | |
| 126 | -<td bgcolor="#660000"> | |
| 127 | -<font size="-3"> | |
| 128 | -<a href="#" onclick="canvas.setStrokeColor('#660000');return false"> </a> | |
| 129 | -</font> | |
| 130 | -</td> | |
| 131 | -<td bgcolor="#660033"> | |
| 132 | -<font size="-3"> | |
| 133 | -<a href="#" onclick="canvas.setStrokeColor('#660033');return false"> </a> | |
| 134 | -</font> | |
| 135 | -</td> | |
| 136 | -<td bgcolor="#660066"> | |
| 137 | -<font size="-3"> | |
| 138 | -<a href="#" onclick="canvas.setStrokeColor('#660066');return false"> </a> | |
| 139 | -</font> | |
| 140 | -</td> | |
| 141 | -<td bgcolor="#660099"> | |
| 142 | -<font size="-3"> | |
| 143 | -<a href="#" onclick="canvas.setStrokeColor('#660099');return false"> </a> | |
| 144 | -</font> | |
| 145 | -</td> | |
| 146 | -<td bgcolor="#6600cc"> | |
| 147 | -<font size="-3"> | |
| 148 | -<a href="#" onclick="canvas.setStrokeColor('#6600CC');return false"> </a> | |
| 149 | -</font> | |
| 150 | -</td> | |
| 151 | -<td bgcolor="#6600ff"> | |
| 152 | -<font size="-3"> | |
| 153 | -<a href="#" onclick="canvas.setStrokeColor('#6600FF');return false"> </a> | |
| 154 | -</font> | |
| 155 | -</td> | |
| 156 | -</tr> | |
| 157 | -<tr> | |
| 158 | -<td bgcolor="#990000"> | |
| 159 | -<font size="-3"> | |
| 160 | -<a href="#" onclick="canvas.setStrokeColor('#990000');return false"> </a> | |
| 161 | -</font> | |
| 162 | -</td> | |
| 163 | -<td bgcolor="#990033"> | |
| 164 | -<font size="-3"> | |
| 165 | -<a href="#" onclick="canvas.setStrokeColor('#990033');return false"> </a> | |
| 166 | -</font> | |
| 167 | -</td> | |
| 168 | -<td bgcolor="#990066"> | |
| 169 | -<font size="-3"> | |
| 170 | -<a href="#" onclick="canvas.setStrokeColor('#990066');return false"> </a> | |
| 171 | -</font> | |
| 172 | -</td> | |
| 173 | -<td bgcolor="#990099"> | |
| 174 | -<font size="-3"> | |
| 175 | -<a href="#" onclick="canvas.setStrokeColor('#990099');return false"> </a> | |
| 176 | -</font> | |
| 177 | -</td> | |
| 178 | -<td bgcolor="#9900cc"> | |
| 179 | -<font size="-3"> | |
| 180 | -<a href="#" onclick="canvas.setStrokeColor('#9900CC');return false"> </a> | |
| 181 | -</font> | |
| 182 | -</td> | |
| 183 | -<td bgcolor="#9900ff"> | |
| 184 | -<font size="-3"> | |
| 185 | -<a href="#" onclick="canvas.setStrokeColor('#9900FF');return false"> </a> | |
| 186 | -</font> | |
| 187 | -</td> | |
| 188 | -<td bgcolor="#cc0000"> | |
| 189 | -<font size="-3"> | |
| 190 | -<a href="#" onclick="canvas.setStrokeColor('#CC0000');return false"> </a> | |
| 191 | -</font> | |
| 192 | -</td> | |
| 193 | -<td bgcolor="#cc0033"> | |
| 194 | -<font size="-3"> | |
| 195 | -<a href="#" onclick="canvas.setStrokeColor('#CC0033');return false"> </a> | |
| 196 | -</font> | |
| 197 | -</td> | |
| 198 | -<td bgcolor="#cc0066"> | |
| 199 | -<font size="-3"> | |
| 200 | -<a href="#" onclick="canvas.setStrokeColor('#CC0066');return false"> </a> | |
| 201 | -</font> | |
| 202 | -</td> | |
| 203 | -<td bgcolor="#cc0099"> | |
| 204 | -<font size="-3"> | |
| 205 | -<a href="#" onclick="canvas.setStrokeColor('#CC0099');return false"> </a> | |
| 206 | -</font> | |
| 207 | -</td> | |
| 208 | -<td bgcolor="#cc00cc"> | |
| 209 | -<font size="-3"> | |
| 210 | -<a href="#" onclick="canvas.setStrokeColor('#CC00CC');return false"> </a> | |
| 211 | -</font> | |
| 212 | -</td> | |
| 213 | -<td bgcolor="#cc00ff"> | |
| 214 | -<font size="-3"> | |
| 215 | -<a href="#" onclick="canvas.setStrokeColor('#CC00FF');return false"> </a> | |
| 216 | -</font> | |
| 217 | -</td> | |
| 218 | -<td bgcolor="#ff0000"> | |
| 219 | -<font size="-3"> | |
| 220 | -<a href="#" onclick="canvas.setStrokeColor('#FF0000');return false"> </a> | |
| 221 | -</font> | |
| 222 | -</td> | |
| 223 | -<td bgcolor="#ff0033"> | |
| 224 | -<font size="-3"> | |
| 225 | -<a href="#" onclick="canvas.setStrokeColor('#FF0033');return false"> </a> | |
| 226 | -</font> | |
| 227 | -</td> | |
| 228 | -<td bgcolor="#ff0066"> | |
| 229 | -<font size="-3"> | |
| 230 | -<a href="#" onclick="canvas.setStrokeColor('#FF0066');return false"> </a> | |
| 231 | -</font> | |
| 232 | -</td> | |
| 233 | -<td bgcolor="#ff0099"> | |
| 234 | -<font size="-3"> | |
| 235 | -<a href="#" onclick="canvas.setStrokeColor('#FF0099');return false"> </a> | |
| 236 | -</font> | |
| 237 | -</td> | |
| 238 | -<td bgcolor="#ff00cc"> | |
| 239 | -<font size="-3"> | |
| 240 | -<a href="#" onclick="canvas.setStrokeColor('#FF00CC');return false"> </a> | |
| 241 | -</font> | |
| 242 | -</td> | |
| 243 | -<td bgcolor="#ff00ff"> | |
| 244 | -<font size="-3"> | |
| 245 | -<a href="#" onclick="canvas.setStrokeColor('#FF00FF');return false"> </a> | |
| 246 | -</font> | |
| 247 | -</td> | |
| 248 | -</tr> | |
| 249 | -<tr> | |
| 250 | -<td bgcolor="#003300"> | |
| 251 | -<font size="-3"> | |
| 252 | -<a href="#" onclick="canvas.setStrokeColor('#003300');return false"> </a> | |
| 253 | -</font> | |
| 254 | -</td> | |
| 255 | -<td bgcolor="#003333"> | |
| 256 | -<font size="-3"> | |
| 257 | -<a href="#" onclick="canvas.setStrokeColor('#003333');return false"> </a> | |
| 258 | -</font> | |
| 259 | -</td> | |
| 260 | -<td bgcolor="#003366"> | |
| 261 | -<font size="-3"> | |
| 262 | -<a href="#" onclick="canvas.setStrokeColor('#003366');return false"> </a> | |
| 263 | -</font> | |
| 264 | -</td> | |
| 265 | -<td bgcolor="#003399"> | |
| 266 | -<font size="-3"> | |
| 267 | -<a href="#" onclick="canvas.setStrokeColor('#003399');return false"> </a> | |
| 268 | -</font> | |
| 269 | -</td> | |
| 270 | -<td bgcolor="#0033cc"> | |
| 271 | -<font size="-3"> | |
| 272 | -<a href="#" onclick="canvas.setStrokeColor('#0033CC');return false"> </a> | |
| 273 | -</font> | |
| 274 | -</td> | |
| 275 | -<td bgcolor="#0033ff"> | |
| 276 | -<font size="-3"> | |
| 277 | -<a href="#" onclick="canvas.setStrokeColor('#0033FF');return false"> </a> | |
| 278 | -</font> | |
| 279 | -</td> | |
| 280 | -<td bgcolor="#333300"> | |
| 281 | -<font size="-3"> | |
| 282 | -<a href="#" onclick="canvas.setStrokeColor('#333300');return false"> </a> | |
| 283 | -</font> | |
| 284 | -</td> | |
| 285 | -<td bgcolor="#333333"> | |
| 286 | -<font size="-3"> | |
| 287 | -<a href="#" onclick="canvas.setStrokeColor('#333333');return false"> </a> | |
| 288 | -</font> | |
| 289 | -</td> | |
| 290 | -<td bgcolor="#333366"> | |
| 291 | -<font size="-3"> | |
| 292 | -<a href="#" onclick="canvas.setStrokeColor('#333366');return false"> </a> | |
| 293 | -</font> | |
| 294 | -</td> | |
| 295 | -<td bgcolor="#333399"> | |
| 296 | -<font size="-3"> | |
| 297 | -<a href="#" onclick="canvas.setStrokeColor('#333399');return false"> </a> | |
| 298 | -</font> | |
| 299 | -</td> | |
| 300 | -<td bgcolor="#3333cc"> | |
| 301 | -<font size="-3"> | |
| 302 | -<a href="#" onclick="canvas.setStrokeColor('#3333CC');return false"> </a> | |
| 303 | -</font> | |
| 304 | -</td> | |
| 305 | -<td bgcolor="#3333ff"> | |
| 306 | -<font size="-3"> | |
| 307 | -<a href="#" onclick="canvas.setStrokeColor('#3333FF');return false"> </a> | |
| 308 | -</font> | |
| 309 | -</td> | |
| 310 | -<td bgcolor="#663300"> | |
| 311 | -<font size="-3"> | |
| 312 | -<a href="#" onclick="canvas.setStrokeColor('#663300');return false"> </a> | |
| 313 | -</font> | |
| 314 | -</td> | |
| 315 | -<td bgcolor="#663333"> | |
| 316 | -<font size="-3"> | |
| 317 | -<a href="#" onclick="canvas.setStrokeColor('#663333');return false"> </a> | |
| 318 | -</font> | |
| 319 | -</td> | |
| 320 | -<td bgcolor="#663366"> | |
| 321 | -<font size="-3"> | |
| 322 | -<a href="#" onclick="canvas.setStrokeColor('#663366');return false"> </a> | |
| 323 | -</font> | |
| 324 | -</td> | |
| 325 | -<td bgcolor="#663399"> | |
| 326 | -<font size="-3"> | |
| 327 | -<a href="#" onclick="canvas.setStrokeColor('#663399');return false"> </a> | |
| 328 | -</font> | |
| 329 | -</td> | |
| 330 | -<td bgcolor="#6633cc"> | |
| 331 | -<font size="-3"> | |
| 332 | -<a href="#" onclick="canvas.setStrokeColor('#6633CC');return false"> </a> | |
| 333 | -</font> | |
| 334 | -</td> | |
| 335 | -<td bgcolor="#6633ff"> | |
| 336 | -<font size="-3"> | |
| 337 | -<a href="#" onclick="canvas.setStrokeColor('#6633FF');return false"> </a> | |
| 338 | -</font> | |
| 339 | -</td> | |
| 340 | -</tr> | |
| 341 | -<tr> | |
| 342 | -<td bgcolor="#993300"> | |
| 343 | -<font size="-3"> | |
| 344 | -<a href="#" onclick="canvas.setStrokeColor('#993300');return false"> </a> | |
| 345 | -</font> | |
| 346 | -</td> | |
| 347 | -<td bgcolor="#993333"> | |
| 348 | -<font size="-3"> | |
| 349 | -<a href="#" onclick="canvas.setStrokeColor('#993333');return false"> </a> | |
| 350 | -</font> | |
| 351 | -</td> | |
| 352 | -<td bgcolor="#993366"> | |
| 353 | -<font size="-3"> | |
| 354 | -<a href="#" onclick="canvas.setStrokeColor('#993366');return false"> </a> | |
| 355 | -</font> | |
| 356 | -</td> | |
| 357 | -<td bgcolor="#993399"> | |
| 358 | -<font size="-3"> | |
| 359 | -<a href="#" onclick="canvas.setStrokeColor('#993399');return false"> </a> | |
| 360 | -</font> | |
| 361 | -</td> | |
| 362 | -<td bgcolor="#9933cc"> | |
| 363 | -<font size="-3"> | |
| 364 | -<a href="#" onclick="canvas.setStrokeColor('#9933CC');return false"> </a> | |
| 365 | -</font> | |
| 366 | -</td> | |
| 367 | -<td bgcolor="#9933ff"> | |
| 368 | -<font size="-3"> | |
| 369 | -<a href="#" onclick="canvas.setStrokeColor('#9933FF');return false"> </a> | |
| 370 | -</font> | |
| 371 | -</td> | |
| 372 | -<td bgcolor="#cc3300"> | |
| 373 | -<font size="-3"> | |
| 374 | -<a href="#" onclick="canvas.setStrokeColor('#CC3300');return false"> </a> | |
| 375 | -</font> | |
| 376 | -</td> | |
| 377 | -<td bgcolor="#cc3333"> | |
| 378 | -<font size="-3"> | |
| 379 | -<a href="#" onclick="canvas.setStrokeColor('#CC3333');return false"> </a> | |
| 380 | -</font> | |
| 381 | -</td> | |
| 382 | -<td bgcolor="#cc33cc"> | |
| 383 | -<font size="-3"> | |
| 384 | -<a href="#" onclick="canvas.setStrokeColor('#CC33CC');return false"> </a> | |
| 385 | -</font> | |
| 386 | -</td> | |
| 387 | -<td bgcolor="#cc33ff"> | |
| 388 | -<font size="-3"> | |
| 389 | -<a href="#" onclick="canvas.setStrokeColor('#CC33FF');return false"> </a> | |
| 390 | -</font> | |
| 391 | -</td> | |
| 392 | -<td bgcolor="#ff3300"> | |
| 393 | -<font size="-3"> | |
| 394 | -<a href="#" onclick="canvas.setStrokeColor('#FF3300');return false"> </a> | |
| 395 | -</font> | |
| 396 | -</td> | |
| 397 | -<td bgcolor="#ff3333"> | |
| 398 | -<font size="-3"> | |
| 399 | -<a href="#" onclick="canvas.setStrokeColor('#FF3333');return false"> </a> | |
| 400 | -</font> | |
| 401 | -</td> | |
| 402 | -<td bgcolor="#ff3366"> | |
| 403 | -<font size="-3"> | |
| 404 | -<a href="#" onclick="canvas.setStrokeColor('#FF3366');return false"> </a> | |
| 405 | -</font> | |
| 406 | -</td> | |
| 407 | -<td bgcolor="#ff3399"> | |
| 408 | -<font size="-3"> | |
| 409 | -<a href="#" onclick="canvas.setStrokeColor('#FF3399');return false"> </a> | |
| 410 | -</font> | |
| 411 | -</td> | |
| 412 | -<td bgcolor="#ff33cc"> | |
| 413 | -<font size="-3"> | |
| 414 | -<a href="#" onclick="canvas.setStrokeColor('#FF33CC');return false"> </a> | |
| 415 | -</font> | |
| 416 | -</td> | |
| 417 | -<td bgcolor="#ff33ff"> | |
| 418 | -<font size="-3"> | |
| 419 | -<a href="#" onclick="canvas.setStrokeColor('#FF33FF');return false"> </a> | |
| 420 | -</font> | |
| 421 | -</td> | |
| 422 | -</tr> | |
| 423 | -<tr> | |
| 424 | -<td bgcolor="#006600"> | |
| 425 | -<font size="-3"> | |
| 426 | -<a href="#" onclick="canvas.setStrokeColor('#006600');return false"> </a> | |
| 427 | -</font> | |
| 428 | -</td> | |
| 429 | -<td bgcolor="#006633"> | |
| 430 | -<font size="-3"> | |
| 431 | -<a href="#" onclick="canvas.setStrokeColor('#006633');return false"> </a> | |
| 432 | -</font> | |
| 433 | -</td> | |
| 434 | -<td bgcolor="#006666"> | |
| 435 | -<font size="-3"> | |
| 436 | -<a href="#" onclick="canvas.setStrokeColor('#006666');return false"> </a> | |
| 437 | -</font> | |
| 438 | -</td> | |
| 439 | -<td bgcolor="#006699"> | |
| 440 | -<font size="-3"> | |
| 441 | -<a href="#" onclick="canvas.setStrokeColor('#006699');return false"> </a> | |
| 442 | -</font> | |
| 443 | -</td> | |
| 444 | -<td bgcolor="#0066cc"> | |
| 445 | -<font size="-3"> | |
| 446 | -<a href="#" onclick="canvas.setStrokeColor('#0066CC');return false"> </a> | |
| 447 | -</font> | |
| 448 | -</td> | |
| 449 | -<td bgcolor="#336699"> | |
| 450 | -<font size="-3"> | |
| 451 | -<a href="#" onclick="canvas.setStrokeColor('#336699');return false"> </a> | |
| 452 | -</font> | |
| 453 | -</td> | |
| 454 | -<td bgcolor="#3366cc"> | |
| 455 | -<font size="-3"> | |
| 456 | -<a href="#" onclick="canvas.setStrokeColor('#3366CC');return false"> </a> | |
| 457 | -</font> | |
| 458 | -</td> | |
| 459 | -<td bgcolor="#3366ff"> | |
| 460 | -<font size="-3"> | |
| 461 | -<a href="#" onclick="canvas.setStrokeColor('#3366FF');return false"> </a> | |
| 462 | -</font> | |
| 463 | -</td> | |
| 464 | -<td bgcolor="#666600"> | |
| 465 | -<font size="-3"> | |
| 466 | -<a href="#" onclick="canvas.setStrokeColor('#666600');return false"> </a> | |
| 467 | -</font> | |
| 468 | -</td> | |
| 469 | -<td bgcolor="#666633"> | |
| 470 | -<font size="-3"> | |
| 471 | -<a href="#" onclick="canvas.setStrokeColor('#666633');return false"> </a> | |
| 472 | -</font> | |
| 473 | -</td> | |
| 474 | -<td bgcolor="#666666"> | |
| 475 | -<font size="-3"> | |
| 476 | -<a href="#" onclick="canvas.setStrokeColor('#666666');return false"> </a> | |
| 477 | -</font> | |
| 478 | -</td> | |
| 479 | -<td bgcolor="#666699"> | |
| 480 | -<font size="-3"> | |
| 481 | -<a href="#" onclick="canvas.setStrokeColor('#666699');return false"> </a> | |
| 482 | -</font> | |
| 483 | -</td> | |
| 484 | -<td bgcolor="#6666cc"> | |
| 485 | -<font size="-3"> | |
| 486 | -<a href="#" onclick="canvas.setStrokeColor('#6666CC');return false"> </a> | |
| 487 | -</font> | |
| 488 | -</td> | |
| 489 | -<td bgcolor="#6666ff"> | |
| 490 | -<font size="-3"> | |
| 491 | -<a href="#" onclick="canvas.setStrokeColor('#6666FF');return false"> </a> | |
| 492 | -</font> | |
| 493 | -</td> | |
| 494 | -</tr> | |
| 495 | -<tr> | |
| 496 | -<td bgcolor="#996600"> | |
| 497 | -<font size="-3"> | |
| 498 | -<a href="#" onclick="canvas.setStrokeColor('#996600');return false"> </a> | |
| 499 | -</font> | |
| 500 | -</td> | |
| 501 | -<td bgcolor="#996633"> | |
| 502 | -<font size="-3"> | |
| 503 | -<a href="#" onclick="canvas.setStrokeColor('#996633');return false"> </a> | |
| 504 | -</font> | |
| 505 | -</td> | |
| 506 | -<td bgcolor="#9966ff"> | |
| 507 | -<font size="-3"> | |
| 508 | -<a href="#" onclick="canvas.setStrokeColor('#9966FF');return false"> </a> | |
| 509 | -</font> | |
| 510 | -</td> | |
| 511 | -<td bgcolor="#cc6600"> | |
| 512 | -<font size="-3"> | |
| 513 | -<a href="#" onclick="canvas.setStrokeColor('#CC6600');return false"> </a> | |
| 514 | -</font> | |
| 515 | -</td> | |
| 516 | -<td bgcolor="#cc6633"> | |
| 517 | -<font size="-3"> | |
| 518 | -<a href="#" onclick="canvas.setStrokeColor('#CC6633');return false"> </a> | |
| 519 | -</font> | |
| 520 | -</td> | |
| 521 | -<td bgcolor="#cc6666"> | |
| 522 | -<font size="-3"> | |
| 523 | -<a href="#" onclick="canvas.setStrokeColor('#CC6666');return false"> </a> | |
| 524 | -</font> | |
| 525 | -</td> | |
| 526 | -<td bgcolor="#cc6699"> | |
| 527 | -<font size="-3"> | |
| 528 | -<a href="#" onclick="canvas.setStrokeColor('#CC6699');return false"> </a> | |
| 529 | -</font> | |
| 530 | -</td> | |
| 531 | -<td bgcolor="#cc66cc"> | |
| 532 | -<font size="-3"> | |
| 533 | -<a href="#" onclick="canvas.setStrokeColor('#CC66CC');return false"> </a> | |
| 534 | -</font> | |
| 535 | -</td> | |
| 536 | -<td bgcolor="#cc66ff"> | |
| 537 | -<font size="-3"> | |
| 538 | -<a href="#" onclick="canvas.setStrokeColor('#CC66FF');return false"> </a> | |
| 539 | -</font> | |
| 540 | -</td> | |
| 541 | -<td bgcolor="#ff6600"> | |
| 542 | -<font size="-3"> | |
| 543 | -<a href="#" onclick="canvas.setStrokeColor('#FF6600');return false"> </a> | |
| 544 | -</font> | |
| 545 | -</td> | |
| 546 | -<td bgcolor="#ff6633"> | |
| 547 | -<font size="-3"> | |
| 548 | -<a href="#" onclick="canvas.setStrokeColor('#FF6633');return false"> </a> | |
| 549 | -</font> | |
| 550 | -</td> | |
| 551 | -</tr> | |
| 552 | -<tr> | |
| 553 | -<td bgcolor="#009900"> | |
| 554 | -<font size="-3"> | |
| 555 | -<a href="#" onclick="canvas.setStrokeColor('#009900');return false"> </a> | |
| 556 | -</font> | |
| 557 | -</td> | |
| 558 | -<td bgcolor="#009933"> | |
| 559 | -<font size="-3"> | |
| 560 | -<a href="#" onclick="canvas.setStrokeColor('#009933');return false"> </a> | |
| 561 | -</font> | |
| 562 | -</td> | |
| 563 | -<td bgcolor="#009966"> | |
| 564 | -<font size="-3"> | |
| 565 | -<a href="#" onclick="canvas.setStrokeColor('#009966');return false"> </a> | |
| 566 | -</font> | |
| 567 | -</td> | |
| 568 | -<td bgcolor="#009999"> | |
| 569 | -<font size="-3"> | |
| 570 | -<a href="#" onclick="canvas.setStrokeColor('#009999');return false"> </a> | |
| 571 | -</font> | |
| 572 | -</td> | |
| 573 | -<td bgcolor="#0099cc"> | |
| 574 | -<font size="-3"> | |
| 575 | -<a href="#" onclick="canvas.setStrokeColor('#0099CC');return false"> </a> | |
| 576 | -</font> | |
| 577 | -</td> | |
| 578 | -<td bgcolor="#0099ff"> | |
| 579 | -<font size="-3"> | |
| 580 | -<a href="#" onclick="canvas.setStrokeColor('#0099FF');return false"> </a> | |
| 581 | -</font> | |
| 582 | -</td> | |
| 583 | -<td bgcolor="#339900"> | |
| 584 | -<font size="-3"> | |
| 585 | -<a href="#" onclick="canvas.setStrokeColor('#339900');return false"> </a> | |
| 586 | -</font> | |
| 587 | -</td> | |
| 588 | -<td bgcolor="#339933"> | |
| 589 | -<font size="-3"> | |
| 590 | -<a href="#" onclick="canvas.setStrokeColor('#339933');return false"> </a> | |
| 591 | -</font> | |
| 592 | -</td> | |
| 593 | -<td bgcolor="#339966"> | |
| 594 | -<font size="-3"> | |
| 595 | -<a href="#" onclick="canvas.setStrokeColor('#339966');return false"> </a> | |
| 596 | -</font> | |
| 597 | -</td> | |
| 598 | -<td bgcolor="#339999"> | |
| 599 | -<font size="-3"> | |
| 600 | -<a href="#" onclick="canvas.setStrokeColor('#339999');return false"> </a> | |
| 601 | -</font> | |
| 602 | -</td> | |
| 603 | -<td bgcolor="#3399cc"> | |
| 604 | -<font size="-3"> | |
| 605 | -<a href="#" onclick="canvas.setStrokeColor('#3399CC');return false"> </a> | |
| 606 | -</font> | |
| 607 | -</td> | |
| 608 | -</tr> | |
| 609 | -</table> | |
| 610 | - </div> | |
| 611 | - <div id="map"></div> | |
| 612 | - </body> | |
| 613 | -</html> |
pacotes/openlayers/examples/ciesin.html
| ... | ... | @@ -1,40 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 512px; | |
| 6 | - height: 512px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - function init(){ | |
| 14 | - var map = new OpenLayers.Map('map'); | |
| 15 | - | |
| 16 | - var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 17 | - "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} ); | |
| 18 | - | |
| 19 | - var jpl_wms = new OpenLayers.Layer.WMS( "Population Density 2000", | |
| 20 | - "http://beta.sedac.ciesin.columbia.edu/mapserver/wms/gpw2000", | |
| 21 | - {layers: "gpw"}); | |
| 22 | - var cie_wms = new OpenLayers.Layer.WMS( "Human Footprint", | |
| 23 | - "http://beta.sedac.ciesin.columbia.edu/mapserver/wms/hfoot", | |
| 24 | - {layers: "hfoot"}); | |
| 25 | - | |
| 26 | - jpl_wms.setVisibility(false); | |
| 27 | - | |
| 28 | - map.addLayers([ol_wms, jpl_wms, cie_wms]); | |
| 29 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 30 | - // map.setCenter(new OpenLayers.LonLat(0, 0), 0); | |
| 31 | - map.zoomToMaxExtent(); | |
| 32 | - } | |
| 33 | - // --> | |
| 34 | - </script> | |
| 35 | - </head> | |
| 36 | - <body onload="init()"> | |
| 37 | - <h1>OpenLayers Example</h1> | |
| 38 | - <div id="map"></div> | |
| 39 | - </body> | |
| 40 | -</html> |
pacotes/openlayers/examples/click.html
| ... | ... | @@ -1,42 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 512px; | |
| 6 | - height: 512px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - function init(){ | |
| 14 | - var map = new OpenLayers.Map('map'); | |
| 15 | - | |
| 16 | - var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 17 | - "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} ); | |
| 18 | - | |
| 19 | - var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", | |
| 20 | - "http://wms.jpl.nasa.gov/wms.cgi", | |
| 21 | - {layers: "modis,global_mosaic"}); | |
| 22 | - | |
| 23 | - jpl_wms.setVisibility(false); | |
| 24 | - | |
| 25 | - map.addLayers([ol_wms, jpl_wms]); | |
| 26 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 27 | - // map.setCenter(new OpenLayers.LonLat(0, 0), 0); | |
| 28 | - map.zoomToMaxExtent(); | |
| 29 | - map.events.register("click", map, function(e) { | |
| 30 | - var lonlat = map.getLonLatFromViewPortPx(e.xy); | |
| 31 | - alert("You clicked near " + lonlat.lat + " N, " + | |
| 32 | - + lonlat.lon + " E"); | |
| 33 | - }); | |
| 34 | - } | |
| 35 | - // --> | |
| 36 | - </script> | |
| 37 | - </head> | |
| 38 | - <body onload="init()"> | |
| 39 | - <h1>OpenLayers Example</h1> | |
| 40 | - <div id="map"></div> | |
| 41 | - </body> | |
| 42 | -</html> |
pacotes/openlayers/examples/controls.html
| ... | ... | @@ -1,53 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 512px; | |
| 6 | - height: 512px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - function init(){ | |
| 14 | - var map = new OpenLayers.Map('map', { controls: [] }); | |
| 15 | - | |
| 16 | - map.addControl(new OpenLayers.Control.PanZoomBar()); | |
| 17 | - map.addControl(new OpenLayers.Control.MouseToolbar()); | |
| 18 | - map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false})); | |
| 19 | - map.addControl(new OpenLayers.Control.Permalink()); | |
| 20 | - map.addControl(new OpenLayers.Control.Permalink('permalink')); | |
| 21 | - map.addControl(new OpenLayers.Control.MousePosition()); | |
| 22 | - map.addControl(new OpenLayers.Control.OverviewMap()); | |
| 23 | - map.addControl(new OpenLayers.Control.KeyboardDefaults()); | |
| 24 | - | |
| 25 | - var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 26 | - "http://labs.metacarta.com/wms/vmap0", | |
| 27 | - {layers: 'basic'} ); | |
| 28 | - | |
| 29 | - var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", | |
| 30 | - "http://wms.jpl.nasa.gov/wms.cgi", | |
| 31 | - {layers: "modis,global_mosaic"}); | |
| 32 | - | |
| 33 | - var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo", | |
| 34 | - "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap", | |
| 35 | - {layers: "bathymetry,land_fn,park,drain_fn,drainage," + | |
| 36 | - "prov_bound,fedlimit,rail,road,popplace", | |
| 37 | - transparent: "true", format: "image/png" }); | |
| 38 | - | |
| 39 | - jpl_wms.setVisibility(false); | |
| 40 | - dm_wms.setVisibility(false); | |
| 41 | - | |
| 42 | - map.addLayers([ol_wms, jpl_wms, dm_wms]); | |
| 43 | - if (!map.getCenter()) map.zoomToMaxExtent(); | |
| 44 | - } | |
| 45 | - // --> | |
| 46 | - </script> | |
| 47 | - </head> | |
| 48 | - <body onload="init()"> | |
| 49 | - <h1>OpenLayers Example</h1> | |
| 50 | - <a style="float:right" href="" id="permalink">Permalink</a> | |
| 51 | - <div id="map"></div> | |
| 52 | - </body> | |
| 53 | -</html> |
pacotes/openlayers/examples/custom-control.html
| ... | ... | @@ -1,49 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 800px; | |
| 6 | - height: 475px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - var lon = 5; | |
| 14 | - var lat = 40; | |
| 15 | - var zoom = 5; | |
| 16 | - var map, layer; | |
| 17 | - | |
| 18 | - function init(){ | |
| 19 | - map = new OpenLayers.Map( $('map') ); | |
| 20 | - layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 21 | - "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); | |
| 22 | - | |
| 23 | - var control = new OpenLayers.Control(); | |
| 24 | - OpenLayers.Util.extend(control, { | |
| 25 | - draw: function () { | |
| 26 | - // this Handler.Box will intercept the shift-mousedown | |
| 27 | - // before Control.MouseDefault gets to see it | |
| 28 | - this.box = new OpenLayers.Handler.Box( control, | |
| 29 | - {"done": this.notice}, | |
| 30 | - {keyMask: OpenLayers.Handler.MOD_SHIFT}); | |
| 31 | - this.box.activate(); | |
| 32 | - }, | |
| 33 | - | |
| 34 | - notice: function (bounds) { | |
| 35 | - alert(bounds); | |
| 36 | - } | |
| 37 | - }); | |
| 38 | - | |
| 39 | - map.addLayer(layer); | |
| 40 | - map.addControl(control); | |
| 41 | - map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); | |
| 42 | - } | |
| 43 | - // --> | |
| 44 | - </script> | |
| 45 | - </head> | |
| 46 | - <body onload="init()"> | |
| 47 | - <div id="map"></div> | |
| 48 | - </body> | |
| 49 | -</html> |
pacotes/openlayers/examples/custom-style.html
| ... | ... | @@ -1,53 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> | |
| 4 | - <style type="text/css"> | |
| 5 | - #map { | |
| 6 | - width: 500px; | |
| 7 | - height: 350px; | |
| 8 | - border: 1px solid gray; | |
| 9 | - } | |
| 10 | - p { | |
| 11 | - width: 500px; | |
| 12 | - } | |
| 13 | - div.olControlMousePosition { | |
| 14 | - font-family: Verdana; | |
| 15 | - font-size: 0.5em; | |
| 16 | - color: red; | |
| 17 | - } | |
| 18 | - </style> | |
| 19 | - <script src="../lib/OpenLayers.js"></script> | |
| 20 | - <script type="text/javascript"> | |
| 21 | - <!-- | |
| 22 | - var lon = 5; | |
| 23 | - var lat = 40; | |
| 24 | - var zoom = 5; | |
| 25 | - var map, layer; | |
| 26 | - | |
| 27 | - function init(){ | |
| 28 | - var options = {theme: null}; | |
| 29 | - map = new OpenLayers.Map('map', options); | |
| 30 | - layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 31 | - "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); | |
| 32 | - | |
| 33 | - map.addControl(new OpenLayers.Control.MousePosition()); | |
| 34 | - map.addLayer(layer); | |
| 35 | - map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); | |
| 36 | - } | |
| 37 | - // --> | |
| 38 | - </script> | |
| 39 | - </head> | |
| 40 | - <body onload="init()"> | |
| 41 | - <div id="map"></div> | |
| 42 | - <p>If you care to modify the style of any OpenLayers element, include | |
| 43 | - the default stylesheet as a link and declare any style modifications | |
| 44 | - below that link. These style declarations can be in other linked | |
| 45 | - stylesheets or in style tags. In addition, construct your map with | |
| 46 | - options that include {theme: null}. This will disable the default | |
| 47 | - method of loading the stylesheet and allow you to declare style rules | |
| 48 | - in your own linked stylesheets or style tags.</p> | |
| 49 | - <p>This example shows how to declare the font family, size, and color | |
| 50 | - for the mouse position. Note that only the style keys that you want to | |
| 51 | - modify (change from the default) need to be specified.</p> | |
| 52 | - </body> | |
| 53 | -</html> |
pacotes/openlayers/examples/doubleSetCenter.html
| ... | ... | @@ -1,17 +0,0 @@ |
| 1 | -<html> | |
| 2 | -<head> | |
| 3 | -<script src="../lib/OpenLayers.js"></script> | |
| 4 | -</head> | |
| 5 | -<body> | |
| 6 | - <div style="width:100%; height:100%" id="map"></div> | |
| 7 | - <script defer="defer" type="text/javascript"> | |
| 8 | - var map = new OpenLayers.Map('map'); | |
| 9 | - var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 10 | - "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); | |
| 11 | - map.addLayer(wms); | |
| 12 | - map.setCenter(new OpenLayers.LonLat(100,10)); | |
| 13 | - map.setCenter(new OpenLayers.LonLat(1,1)); | |
| 14 | - </script> | |
| 15 | -</body> | |
| 16 | -</html> | |
| 17 | - |
pacotes/openlayers/examples/draw-feature.html
| ... | ... | @@ -1,96 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 512px; | |
| 6 | - height: 350px; | |
| 7 | - border: 1px solid gray; | |
| 8 | - } | |
| 9 | - #controlToggle li { | |
| 10 | - list-style: none; | |
| 11 | - } | |
| 12 | - p { | |
| 13 | - width: 512px; | |
| 14 | - } | |
| 15 | - </style> | |
| 16 | - <script src="../lib/OpenLayers.js"></script> | |
| 17 | - <script type="text/javascript"> | |
| 18 | - <!-- | |
| 19 | - var map, drawControls; | |
| 20 | - OpenLayers.Util.onImageLoadErrorColor = "transparent"; | |
| 21 | - function init(){ | |
| 22 | - map = new OpenLayers.Map('map'); | |
| 23 | - | |
| 24 | - var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 25 | - "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); | |
| 26 | - | |
| 27 | - var pointLayer = new OpenLayers.Layer.Vector("Point Layer"); | |
| 28 | - var lineLayer = new OpenLayers.Layer.Vector("Line Layer"); | |
| 29 | - var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); | |
| 30 | - | |
| 31 | - map.addLayers([wmsLayer, pointLayer, lineLayer, polygonLayer]); | |
| 32 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 33 | - map.addControl(new OpenLayers.Control.MousePosition()); | |
| 34 | - | |
| 35 | - var options = {handlerOptions: {freehand: true}}; | |
| 36 | - drawControls = { | |
| 37 | - point: new OpenLayers.Control.DrawFeature(pointLayer, | |
| 38 | - OpenLayers.Handler.Point), | |
| 39 | - line: new OpenLayers.Control.DrawFeature(lineLayer, | |
| 40 | - OpenLayers.Handler.Path, options), | |
| 41 | - polygon: new OpenLayers.Control.DrawFeature(polygonLayer, | |
| 42 | - OpenLayers.Handler.Polygon, options) | |
| 43 | - }; | |
| 44 | - | |
| 45 | - for(var key in drawControls) { | |
| 46 | - map.addControl(drawControls[key]); | |
| 47 | - } | |
| 48 | - | |
| 49 | - map.setCenter(new OpenLayers.LonLat(0, 0), 3); | |
| 50 | - | |
| 51 | - document.getElementById('noneToggle').checked = true; | |
| 52 | - } | |
| 53 | - | |
| 54 | - function toggleControl(element) { | |
| 55 | - for(key in drawControls) { | |
| 56 | - var control = drawControls[key]; | |
| 57 | - if(element.value == key && element.checked) { | |
| 58 | - control.activate(); | |
| 59 | - } else { | |
| 60 | - control.deactivate(); | |
| 61 | - } | |
| 62 | - } | |
| 63 | - } | |
| 64 | - // --> | |
| 65 | - </script> | |
| 66 | - </head> | |
| 67 | - <body onload="init()"> | |
| 68 | - <h1>OpenLayers Draw Feature Example</h1> | |
| 69 | - <div id="map"></div> | |
| 70 | - <ul id="controlToggle"> | |
| 71 | - <li> | |
| 72 | - <input type="radio" name="type" value="none" id="noneToggle" | |
| 73 | - onclick="toggleControl(this);" checked="checked" /> | |
| 74 | - <label for="noneToggle">navigate</label> | |
| 75 | - </li> | |
| 76 | - <li> | |
| 77 | - <input type="radio" name="type" value="point" id="pointToggle" onclick="toggleControl(this);" /> | |
| 78 | - <label for="pointToggle">draw point</label> | |
| 79 | - </li> | |
| 80 | - <li> | |
| 81 | - <input type="radio" name="type" value="line" id="lineToggle" onclick="toggleControl(this);" /> | |
| 82 | - <label for="lineToggle">draw line</label> | |
| 83 | - </li> | |
| 84 | - <li> | |
| 85 | - <input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);" /> | |
| 86 | - <label for="polygonToggle">draw polygon</label> | |
| 87 | - </li> | |
| 88 | - </ul> | |
| 89 | - <p>Feature digitizing is in freehand mode by default. In freehand mode, the mouse is treated as a pen. | |
| 90 | - Drawing begins on mouse down, continues with every mouse move, and ends with mouse up.</p> | |
| 91 | - <p>To turn freehand mode off, hold down the shift key while digitizing. With freehand mode off, one | |
| 92 | - vertex is added with each click and double-clicks finish drawing. Freehand mode can be toggled on and off | |
| 93 | - at any time while drawing.</p> | |
| 94 | - | |
| 95 | - </body> | |
| 96 | -</html> |
pacotes/openlayers/examples/editingtoolbar.html
| ... | ... | @@ -1,40 +0,0 @@ |
| 1 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| 2 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 3 | - <head> | |
| 4 | - <style type="text/css"> | |
| 5 | - #map { | |
| 6 | - width: 800px; | |
| 7 | - height: 475px; | |
| 8 | - border: 1px solid black; | |
| 9 | - } | |
| 10 | - </style> | |
| 11 | - <script src="../lib/OpenLayers.js"></script> | |
| 12 | - <script src="../lib/Firebug/debug.js"></script> | |
| 13 | - <script type="text/javascript"> | |
| 14 | - <!-- | |
| 15 | - var lon = 5; | |
| 16 | - var lat = 40; | |
| 17 | - var zoom = 5; | |
| 18 | - var map, layer; | |
| 19 | - | |
| 20 | - function init(){ | |
| 21 | - map = new OpenLayers.Map( 'map', { controls: [] } ); | |
| 22 | - layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 23 | - "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); | |
| 24 | - map.addLayer(layer); | |
| 25 | - | |
| 26 | - vlayer = new OpenLayers.Layer.Vector( "Editable" ); | |
| 27 | - map.addLayer(vlayer); | |
| 28 | - map.addControl(new OpenLayers.Control.PanZoomBar()); | |
| 29 | - map.addControl(new OpenLayers.Control.EditingToolbar(vlayer)); | |
| 30 | - | |
| 31 | - map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); | |
| 32 | - } | |
| 33 | - // --> | |
| 34 | - </script> | |
| 35 | - </head> | |
| 36 | - <body onload="init()"> | |
| 37 | - <div id="panel"></div> | |
| 38 | - <div id="map"></div> | |
| 39 | - </body> | |
| 40 | -</html> |
pacotes/openlayers/examples/example.html
| ... | ... | @@ -1,51 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 512px; | |
| 6 | - height: 512px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - function init(){ | |
| 14 | - var map = new OpenLayers.Map('map'); | |
| 15 | - | |
| 16 | - var options = { | |
| 17 | - resolutions: [1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.00137329101] | |
| 18 | - }; | |
| 19 | - | |
| 20 | - var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 21 | - "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, | |
| 22 | - options); | |
| 23 | - | |
| 24 | - var options2 = { | |
| 25 | - resolutions: [0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.00137329101] | |
| 26 | - }; | |
| 27 | - var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", | |
| 28 | - "http://wms.jpl.nasa.gov/wms.cgi", | |
| 29 | - {layers: "modis,global_mosaic"}, options2); | |
| 30 | - | |
| 31 | - var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo", | |
| 32 | - "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap", | |
| 33 | - {layers: "bathymetry,land_fn,park,drain_fn,drainage," + | |
| 34 | - "prov_bound,fedlimit,rail,road,popplace", | |
| 35 | - transparent: "true", format: "image/png"}, | |
| 36 | - {minResolution: 0.17578125, | |
| 37 | - maxResolution: 0.703125}); | |
| 38 | - | |
| 39 | - map.addLayers([ol_wms, jpl_wms, dm_wms]); | |
| 40 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 41 | - // map.setCenter(new OpenLayers.LonLat(0, 0), 0); | |
| 42 | - map.zoomToMaxExtent(); | |
| 43 | - } | |
| 44 | - // --> | |
| 45 | - </script> | |
| 46 | - </head> | |
| 47 | - <body onload="init()"> | |
| 48 | - <h1>OpenLayers Example</h1> | |
| 49 | - <div id="map"></div> | |
| 50 | - </body> | |
| 51 | -</html> |
pacotes/openlayers/examples/freemap.html
| ... | ... | @@ -1,49 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - | |
| 4 | - <style type="text/css"> | |
| 5 | - body { | |
| 6 | - border: 0px; | |
| 7 | - margin: 0px; | |
| 8 | - padding: 0px; | |
| 9 | - } | |
| 10 | - #map { | |
| 11 | - width: 100%; | |
| 12 | - height: 100%; | |
| 13 | - border: 0px; | |
| 14 | - padding: 0px; | |
| 15 | - } | |
| 16 | - </style> | |
| 17 | - | |
| 18 | - <script src="../lib/OpenLayers.js"></script> | |
| 19 | - <script type="text/javascript"> | |
| 20 | - <!-- | |
| 21 | - var lat = 900863; | |
| 22 | - var lon = 235829; | |
| 23 | - var zoom = 6; | |
| 24 | - var map, layer; | |
| 25 | - | |
| 26 | - function init(){ | |
| 27 | - map = new OpenLayers.Map( 'map' ); | |
| 28 | - var basemap = new OpenLayers.Layer.WMS( "Boston", | |
| 29 | - "http://boston.freemap.in/cgi-bin/mapserv?", | |
| 30 | - {map: '/www/freemap.in/boston/map/gmaps.map', layers: 'border,water,roads,rapid_transit,buildings', format: 'png', 'transparent': 'off'}, | |
| 31 | - // These are the important parts for creating a non-epsg:4326 | |
| 32 | - // map: Maxextent is the boundary of the map/tile loading area, | |
| 33 | - // maxResolution is the units/pixel at the highest zoom, and | |
| 34 | - // projection is the projection to be used in WMS/WFS Requests. | |
| 35 | - {maxExtent: new OpenLayers.Bounds(33861, 717605, 330846, 1019656), maxResolution: 296985/1024, projection:"EPSG:2805" } ); | |
| 36 | - | |
| 37 | - map.addLayer(basemap); | |
| 38 | - | |
| 39 | - map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); | |
| 40 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 41 | - } | |
| 42 | -// --> | |
| 43 | - </script> | |
| 44 | - </head> | |
| 45 | - | |
| 46 | -<body onload="init()"> | |
| 47 | - <div id="map"></div> | |
| 48 | -</body> | |
| 49 | -</html> |
pacotes/openlayers/examples/fullScreen.html
| ... | ... | @@ -1,40 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 100%; | |
| 6 | - height: 100%; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - function init(){ | |
| 14 | - var map = new OpenLayers.Map('map'); | |
| 15 | - | |
| 16 | - var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 17 | - "http://labs.metacarta.com:80/wms/vmap0?", {layers: 'basic'}); | |
| 18 | - | |
| 19 | - var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", | |
| 20 | - "http://wms.jpl.nasa.gov/wms.cgi", | |
| 21 | - {layers: "modis,global_mosaic"}); | |
| 22 | - | |
| 23 | - var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo", | |
| 24 | - "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap", | |
| 25 | - {layers: "bathymetry,land_fn,park,drain_fn,drainage," + | |
| 26 | - "prov_bound,fedlimit,rail,road,popplace", | |
| 27 | - transparent: "true", format: "image/png" }); | |
| 28 | - | |
| 29 | - map.addLayers([ol_wms, jpl_wms, dm_wms]); | |
| 30 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 31 | - // map.setCenter(new OpenLayers.LonLat(0, 0), 0); | |
| 32 | - map.zoomToMaxExtent(); | |
| 33 | - } | |
| 34 | - // --> | |
| 35 | - </script> | |
| 36 | - </head> | |
| 37 | - <body onload="init()"> | |
| 38 | - <div id="map"></div> | |
| 39 | - </body> | |
| 40 | -</html> |
pacotes/openlayers/examples/georss-serialize.html
| ... | ... | @@ -1,50 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 45%; | |
| 6 | - height: 350px; | |
| 7 | - border: 1px solid gray; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - var map, drawControl, g; | |
| 14 | - function serialize(feature) { | |
| 15 | - feature.attributes = {}; | |
| 16 | - var name = prompt("Title for feature?"); | |
| 17 | - feature.attributes['title'] = name; | |
| 18 | - s = new XMLSerializer(); | |
| 19 | - var data = g.write(feature.layer.features); | |
| 20 | - $("gml").value = s.serializeToString(data); | |
| 21 | - } | |
| 22 | - function init(){ | |
| 23 | - g = new OpenLayers.Format.GeoRSS(); | |
| 24 | - map = new OpenLayers.Map('map'); | |
| 25 | - | |
| 26 | - var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 27 | - "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); | |
| 28 | - | |
| 29 | - var pointLayer = new OpenLayers.Layer.Vector("Point Layer"); | |
| 30 | - pointLayer.onFeatureInsert = serialize; | |
| 31 | - | |
| 32 | - map.addLayers([wmsLayer, pointLayer]); | |
| 33 | - map.addControl(new OpenLayers.Control.EditingToolbar(pointLayer)); | |
| 34 | - map.addControl(new OpenLayers.Control.MousePosition()); | |
| 35 | - | |
| 36 | - | |
| 37 | - map.setCenter(new OpenLayers.LonLat(0, 0), 3); | |
| 38 | - } | |
| 39 | - | |
| 40 | - // --> | |
| 41 | - </script> | |
| 42 | - </head> | |
| 43 | - <body onload="init()"> | |
| 44 | - <h1>OpenLayers Draw Point Example</h1> | |
| 45 | - <div style="float:right;width:50%"> | |
| 46 | - <textarea id="gml" style="width:100%" rows="30"></textarea> | |
| 47 | - </div> | |
| 48 | - <div id="map"></div> | |
| 49 | - </body> | |
| 50 | -</html> |
pacotes/openlayers/examples/georss.html
| ... | ... | @@ -1,43 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 800px; | |
| 6 | - height: 400px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - var map, layer; | |
| 14 | - | |
| 15 | - OpenLayers.ProxyHost = "/proxy/?url="; | |
| 16 | - function init(){ | |
| 17 | - map = new OpenLayers.Map('map', {maxResolution:'auto'}); | |
| 18 | - layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 19 | - "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); | |
| 20 | - map.addLayer(layer); | |
| 21 | - map.setCenter(new OpenLayers.LonLat(0, 0), 0); | |
| 22 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 23 | - } | |
| 24 | - function addUrl() { | |
| 25 | - var urlObj = OpenLayers.Util.getElement('url'); | |
| 26 | - var value = urlObj.value; | |
| 27 | - var parts = value.split("/"); | |
| 28 | - var newl = new OpenLayers.Layer.GeoRSS( parts[parts.length-1], value); | |
| 29 | - map.addLayer(newl); | |
| 30 | - urlObj.value = ""; | |
| 31 | - } | |
| 32 | - // --> | |
| 33 | - </script> | |
| 34 | - </head> | |
| 35 | - <body onload="init()"> | |
| 36 | - <h1>GeoRSS in OpenLayers</h1> | |
| 37 | - <p style="font-size:.9em;">This demo uses the OpenLayers GeoRSS parser, which supports GeoRSS Simple and W3C GeoRSS. Only points are currently supported. <a href="http://trac.openlayers.org/wiki/HowToDownload">Get the code!</a></p> | |
| 38 | - <form onsubmit="return false;"> | |
| 39 | - GeoRSS URL: <input type="text" id="url" size="50" /><input type="submit" onclick="addUrl(); return false;" value="Load Feed" onsubmit="addUrl(); return false;" /> | |
| 40 | - </form> | |
| 41 | - <div id="map"></div> | |
| 42 | - </body> | |
| 43 | -</html> |
pacotes/openlayers/examples/georss.xml
| ... | ... | @@ -1,378 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/css" href="/css/rss.css" ?> | |
| 2 | - | |
| 3 | -<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
| 4 | - xmlns="http://purl.org/rss/1.0/" | |
| 5 | - xmlns:dc="http://purl.org/dc/elements/1.1/" | |
| 6 | - xmlns:georss="http://www.georss.org/georss"> | |
| 7 | -<docs>This is an RSS file. Copy the URL into your aggregator of choice. If you don't know what this means and want to learn more, please see: <span>http://platial.typepad.com/news/2006/04/really_simple_t.html</span> for more info.</docs><channel rdf:about="http://platial.com"> | |
| 8 | -<link>http://platial.com</link> | |
| 9 | -<title>Crschmidt's Places At Platial</title> | |
| 10 | -<description></description> | |
| 11 | -<items> | |
| 12 | -<rdf:Seq> | |
| 13 | -<rdf:li resource="http://platial.com/place/90306"/> | |
| 14 | -<rdf:li resource="http://platial.com/place/67230"/> | |
| 15 | -<rdf:li resource="http://platial.com/place/65645"/> | |
| 16 | -<rdf:li resource="http://platial.com/place/62200"/> | |
| 17 | -<rdf:li resource="http://platial.com/place/28232"/> | |
| 18 | -<rdf:li resource="http://platial.com/place/43666"/> | |
| 19 | -<rdf:li resource="http://platial.com/place/28394"/> | |
| 20 | -<rdf:li resource="http://platial.com/place/28251"/> | |
| 21 | -<rdf:li resource="http://platial.com/place/28392"/> | |
| 22 | -<rdf:li resource="http://platial.com/place/28391"/> | |
| 23 | -<rdf:li resource="http://platial.com/place/28231"/> | |
| 24 | -<rdf:li resource="http://platial.com/place/28393"/> | |
| 25 | -<rdf:li resource="http://platial.com/place/31685"/> | |
| 26 | -<rdf:li resource="http://platial.com/place/28596"/> | |
| 27 | -<rdf:li resource="http://platial.com/place/28595"/> | |
| 28 | -<rdf:li resource="http://platial.com/place/28594"/> | |
| 29 | -<rdf:li resource="http://platial.com/place/28593"/> | |
| 30 | -<rdf:li resource="http://platial.com/place/28592"/> | |
| 31 | -<rdf:li resource="http://platial.com/place/28591"/> | |
| 32 | -<rdf:li resource="http://platial.com/place/28590"/> | |
| 33 | -<rdf:li resource="http://platial.com/place/28589"/> | |
| 34 | -<rdf:li resource="http://platial.com/place/28588"/> | |
| 35 | -<rdf:li resource="http://platial.com/place/28587"/> | |
| 36 | -<rdf:li resource="http://platial.com/place/28586"/> | |
| 37 | -<rdf:li resource="http://platial.com/place/28585"/> | |
| 38 | -<rdf:li resource="http://platial.com/place/28584"/> | |
| 39 | -<rdf:li resource="http://platial.com/place/28583"/> | |
| 40 | -<rdf:li resource="http://platial.com/place/28582"/> | |
| 41 | -<rdf:li resource="http://platial.com/place/28581"/> | |
| 42 | -<rdf:li resource="http://platial.com/place/28580"/> | |
| 43 | -<rdf:li resource="http://platial.com/place/28579"/> | |
| 44 | -<rdf:li resource="http://platial.com/place/28578"/> | |
| 45 | -<rdf:li resource="http://platial.com/place/28577"/> | |
| 46 | -<rdf:li resource="http://platial.com/place/28576"/> | |
| 47 | -<rdf:li resource="http://platial.com/place/28575"/> | |
| 48 | -<rdf:li resource="http://platial.com/place/28574"/> | |
| 49 | -<rdf:li resource="http://platial.com/place/28573"/> | |
| 50 | -<rdf:li resource="http://platial.com/place/28572"/> | |
| 51 | -<rdf:li resource="http://platial.com/place/28571"/> | |
| 52 | -<rdf:li resource="http://platial.com/place/28570"/> | |
| 53 | -</rdf:Seq> | |
| 54 | -</items> | |
| 55 | -</channel> | |
| 56 | -<item rdf:about="http://platial.com/place/90306"> | |
| 57 | -<link>http://platial.com/place/90306</link> | |
| 58 | -<title>Knitting Room</title> | |
| 59 | -<description><![CDATA[This little shop is jammed full. Yarn, yarn everywhere. They make the most of every possible nook and cranny. I like this place also because they have a lot of different kinds of knitting needles in all different sizes. Also, the people who work here are younger and hipper than in the other stores I go to. I reccomend buying supplies here and then knitting your way through a good documentary at the Capitol Theater across the street.<br/>Address: 2 lake St, Arlington, MA <br/>Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats<br /><br /><a href="http://platial.com/place/90306">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/90306">Grab this on Platial</a> ]]></description> | |
| 60 | -<georss:point>42.405696 -71.142197</georss:point> | |
| 61 | -<dc:creator>crschmidt</dc:creator> | |
| 62 | -<dc:date>2006-06-08T17:35:01.942452+00:00</dc:date> | |
| 63 | -</item> | |
| 64 | -<item rdf:about="http://platial.com/place/67230"> | |
| 65 | -<link>http://platial.com/place/67230</link> | |
| 66 | -<title>Knitting Room</title> | |
| 67 | -<description><![CDATA[This little shop is jammed full. Yarn, yarn everywhere. They make the most of every possible nook and cranny. I like this place also because they have a lot of different kinds of knitting needles in all different sizes. Also, the people who work here are younger and hipper than in the other stores I go to. I reccomend buying supplies here and then knitting your way through a good documentary at the Capitol Theater across the street.<br/>Address: 2 lake St, Arlington, MA <br/>Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats<br /><br /><a href="http://platial.com/place/67230">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/67230">Grab this on Platial</a> ]]></description> | |
| 68 | -<georss:point>42.405524 -71.142273</georss:point> | |
| 69 | -<dc:creator>crschmidt</dc:creator> | |
| 70 | -<dc:date>2006-04-24T11:35:26.733857+00:00</dc:date> | |
| 71 | -</item> | |
| 72 | -<item rdf:about="http://platial.com/place/65645"> | |
| 73 | -<link>http://platial.com/place/65645</link> | |
| 74 | -<title>â ¢¢â¢Â£ËøÅ</title> | |
| 75 | -<description><![CDATA[ijeª£âµËËî<br/>Address: 151 Erie St., Cambridge, MA<br/>Tags: platial graffiti<br /><br /><a href="http://platial.com/place/65645">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/65645">Grab this on Platial</a> ]]></description> | |
| 76 | -<georss:point>42.352455 -71.110210</georss:point> | |
| 77 | -<dc:creator>crschmidt</dc:creator> | |
| 78 | -<dc:date>2006-04-20T08:56:12.696224+00:00</dc:date> | |
| 79 | -</item> | |
| 80 | -<item rdf:about="http://platial.com/place/62200"> | |
| 81 | -<link>http://platial.com/place/62200</link> | |
| 82 | -<title>Allen Hall</title> | |
| 83 | -<description><![CDATA[My dorm at UIUC.<br/>Address: 1301 W Gregory Dr, Urbana, IL<br/>Tags: dorm, uiuc, college<br/><a href="http://platial.com/place/62200"><img src="http://platial.comhttp://static.flickr.com/4/8576450_0d59cc2531_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/62200">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/62200">Grab this on Platial</a> ]]></description> | |
| 84 | -<georss:point>40.104172 -88.220623</georss:point> | |
| 85 | -<dc:creator>crschmidt</dc:creator> | |
| 86 | -<dc:date>2006-04-14T08:01:01.872873+00:00</dc:date> | |
| 87 | -</item> | |
| 88 | -<item rdf:about="http://platial.com/place/28232"> | |
| 89 | -<link>http://platial.com/place/28232</link> | |
| 90 | -<title>Bagby Hot Springs, OR</title> | |
| 91 | -<description><![CDATA[Hot spring, temperature: 136 degress F, 58 degress C. However, the area around the springs are not exactly well looked upon by people who know the place. | |
| 92 | - | |
| 93 | -<br/>Tags: 20s, rosalie, romance, childhood, hike, camping, soak, relax, beautiful, hot springs, bathhouse, favorite, popular, crowded, organized, honeymoon tub, plumbing made from hollowed out trees, hot springs, mt hood, notorious car break in spot, rash, bacteria<br /><br /><a href="http://platial.com/place/28232">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28232">Grab this on Platial</a> ]]></description> | |
| 94 | -<georss:point>44.936000 -122.173000</georss:point> | |
| 95 | -<dc:creator>crschmidt</dc:creator> | |
| 96 | -<dc:date>2006-01-03T23:10:18.553063+00:00</dc:date> | |
| 97 | -</item> | |
| 98 | -<item rdf:about="http://platial.com/place/43666"> | |
| 99 | -<link>http://platial.com/place/43666</link> | |
| 100 | -<title>Shooting Location for "The Field of Dreams" Film</title> | |
| 101 | -<description><![CDATA[1989's Field of Dreams was a Best Picture Academy Award nominee, and the baseball field in the cornfield still stands today, and has become quite a tourist destination. Games are occasionally played at the field, re-enacting professional baseball at the turn of the 20th Century.<br/>Address: Dyersville, Iowa<br/>Tags: iowa, baseball, movie locations, field of dreams, kevin costner, costner, dyersville, kinsella, james earl jones, chicago black sox, shoeless joe, joe jackson, famous farms, film, movie, cinema, shooting location<br /><br /><a href="http://platial.com/place/43666">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/43666">Grab this on Platial</a> ]]></description> | |
| 102 | -<georss:point>42.481213 -91.111679</georss:point> | |
| 103 | -<dc:creator>echinodermata</dc:creator> | |
| 104 | -<dc:date>2006-03-23T11:40:17.654061+00:00</dc:date> | |
| 105 | -</item> | |
| 106 | -<item rdf:about="http://platial.com/place/28394"> | |
| 107 | -<link>http://platial.com/place/28394</link> | |
| 108 | -<title>Moffetts (Bonneville) Hot Springs, WA</title> | |
| 109 | -<description><![CDATA[Hot spring, temperature: 97 degress F, 36 degress C<br/>Tags: soak, hot springs, relax, nature<br /><br /><a href="http://platial.com/place/28394">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28394">Grab this on Platial</a> ]]></description> | |
| 110 | -<georss:point>45.658000 -121.962000</georss:point> | |
| 111 | -<dc:creator>crschmidt</dc:creator> | |
| 112 | -<dc:date>2006-01-03T23:16:27.329816+00:00</dc:date> | |
| 113 | -</item> | |
| 114 | -<item rdf:about="http://platial.com/place/28251"> | |
| 115 | -<link>http://platial.com/place/28251</link> | |
| 116 | -<title>Austin Hot Springs, OR</title> | |
| 117 | -<description><![CDATA[Hot spring, temperature: 186 degress F, 86 degress C<br/>Tags: soak, hot springs, relax, nature, popular, crowded<br /><br /><a href="http://platial.com/place/28251">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28251">Grab this on Platial</a> ]]></description> | |
| 118 | -<georss:point>45.021000 -122.009000</georss:point> | |
| 119 | -<dc:creator>crschmidt</dc:creator> | |
| 120 | -<dc:date>2006-01-03T23:11:04.489886+00:00</dc:date> | |
| 121 | -</item> | |
| 122 | -<item rdf:about="http://platial.com/place/28392"> | |
| 123 | -<link>http://platial.com/place/28392</link> | |
| 124 | -<title>Rock Creek Hot Springs, WA</title> | |
| 125 | -<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br/>Tags: soak, hot springs, relax, nature<br /><br /><a href="http://platial.com/place/28392">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28392">Grab this on Platial</a> ]]></description> | |
| 126 | -<georss:point>45.723000 -121.927000</georss:point> | |
| 127 | -<dc:creator>crschmidt</dc:creator> | |
| 128 | -<dc:date>2006-01-03T23:16:22.636855+00:00</dc:date> | |
| 129 | -</item> | |
| 130 | -<item rdf:about="http://platial.com/place/28391"> | |
| 131 | -<link>http://platial.com/place/28391</link> | |
| 132 | -<title>St. Martins (Wind River) Hot Springs, WA</title> | |
| 133 | -<description><![CDATA[Hot spring, temperature: 120 degress F, 49 degress C<br/>Tags: hot springs, soak, relax, nature, wonderful<br /><br /><a href="http://platial.com/place/28391">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28391">Grab this on Platial</a> ]]></description> | |
| 134 | -<georss:point>45.728000 -121.800000</georss:point> | |
| 135 | -<dc:creator>crschmidt</dc:creator> | |
| 136 | -<dc:date>2006-01-03T23:16:20.383244+00:00</dc:date> | |
| 137 | -</item> | |
| 138 | -<item rdf:about="http://platial.com/place/28231"> | |
| 139 | -<link>http://platial.com/place/28231</link> | |
| 140 | -<title>Breitenbush Hot Springs, OR</title> | |
| 141 | -<description><![CDATA[Hot spring, temperature: 198 degress F, 92 degress C<br/>Tags: hot springs, resort, relax, nature, beautiful, http:www.breitenbush.com, soaking<br /><br /><a href="http://platial.com/place/28231">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28231">Grab this on Platial</a> ]]></description> | |
| 142 | -<georss:point>44.782000 -121.975000</georss:point> | |
| 143 | -<dc:creator>crschmidt</dc:creator> | |
| 144 | -<dc:date>2006-01-03T23:10:16.529195+00:00</dc:date> | |
| 145 | -</item> | |
| 146 | -<item rdf:about="http://platial.com/place/28393"> | |
| 147 | -<link>http://platial.com/place/28393</link> | |
| 148 | -<title>Collins Hot Springs, WA</title> | |
| 149 | -<description><![CDATA[Hot spring, temperature: 122 degress F, 50 degress C<br/>Tags: portland, nice, hot springs, soak<br /><br /><a href="http://platial.com/place/28393">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28393">Grab this on Platial</a> ]]></description> | |
| 150 | -<georss:point>45.701000 -121.728000</georss:point> | |
| 151 | -<dc:creator>crschmidt</dc:creator> | |
| 152 | -<dc:date>2006-01-03T23:16:24.648745+00:00</dc:date> | |
| 153 | -</item> | |
| 154 | -<item rdf:about="http://platial.com/place/31685"> | |
| 155 | -<link>http://platial.com/place/31685</link> | |
| 156 | -<title>Darwin's Ltd.</title> | |
| 157 | -<description><![CDATA[Nice little coffee shop/cafe, free Wifi, close enough to walk from Harvard Square.<br/>Address: 148 Mount Auburn St, Cambridge, MA<br/>Tags: coffee, beer, sandwiches, freewifi<br/><a href="http://platial.com/place/31685"><img src="http://platial.comhttp://static.flickr.com/38/84885937_74fd3d1025_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/31685">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/31685">Grab this on Platial</a> ]]></description> | |
| 158 | -<georss:point>42.373974 -71.125053</georss:point> | |
| 159 | -<dc:creator>crschmidt</dc:creator> | |
| 160 | -<dc:date>2006-01-10T09:24:08.152985+00:00</dc:date> | |
| 161 | -</item> | |
| 162 | -<item rdf:about="http://platial.com/place/28596"> | |
| 163 | -<link>http://platial.com/place/28596</link> | |
| 164 | -<title>Huckleberry Hot Springs, WY</title> | |
| 165 | -<description><![CDATA[Hot spring, temperature: Boiling degress F, Boiling degress C<br /><br /><a href="http://platial.com/place/28596">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28596">Grab this on Platial</a> ]]></description> | |
| 166 | -<georss:point>44.115000 -110.684000</georss:point> | |
| 167 | -<dc:creator>crschmidt</dc:creator> | |
| 168 | -<dc:date>2006-01-03T23:24:32.283094+00:00</dc:date> | |
| 169 | -</item> | |
| 170 | -<item rdf:about="http://platial.com/place/28595"> | |
| 171 | -<link>http://platial.com/place/28595</link> | |
| 172 | -<title>South Entrance Hot Springs, WY</title> | |
| 173 | -<description><![CDATA[Hot spring, temperature: 156 degress F, 69 degress C<br/><a href="http://platial.com/place/28595"><img src="http://platial.comhttp://static.flickr.com/52/130989872_f1457f68b5_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/28595">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28595">Grab this on Platial</a> ]]></description> | |
| 174 | -<georss:point>44.142000 -110.656000</georss:point> | |
| 175 | -<dc:creator>crschmidt</dc:creator> | |
| 176 | -<dc:date>2006-01-03T23:24:30.279497+00:00</dc:date> | |
| 177 | -</item> | |
| 178 | -<item rdf:about="http://platial.com/place/28594"> | |
| 179 | -<link>http://platial.com/place/28594</link> | |
| 180 | -<title>Crawfish Creek Hot Springs, WY</title> | |
| 181 | -<description><![CDATA[Hot spring, temperature: 136 degress F, 58 degress C<br/><a href="http://platial.com/place/28594"><img src="http://platial.comhttp://static.flickr.com/52/128312256_d6a879924c_s.jpg"/></a><br/><br /><br /><a href="http://platial.com/place/28594">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28594">Grab this on Platial</a> ]]></description> | |
| 182 | -<georss:point>44.157000 -110.699000</georss:point> | |
| 183 | -<dc:creator>crschmidt</dc:creator> | |
| 184 | -<dc:date>2006-01-03T23:24:28.280271+00:00</dc:date> | |
| 185 | -</item> | |
| 186 | -<item rdf:about="http://platial.com/place/28593"> | |
| 187 | -<link>http://platial.com/place/28593</link> | |
| 188 | -<title>Crawfish Creek Hot Springs, WY</title> | |
| 189 | -<description><![CDATA[Hot spring, temperature: 138 degress F, 59 degress C<br /><br /><a href="http://platial.com/place/28593">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28593">Grab this on Platial</a> ]]></description> | |
| 190 | -<georss:point>44.165000 -110.723000</georss:point> | |
| 191 | -<dc:creator>crschmidt</dc:creator> | |
| 192 | -<dc:date>2006-01-03T23:24:20.364077+00:00</dc:date> | |
| 193 | -</item> | |
| 194 | -<item rdf:about="http://platial.com/place/28592"> | |
| 195 | -<link>http://platial.com/place/28592</link> | |
| 196 | -<title>Snake Hot Springs, WY</title> | |
| 197 | -<description><![CDATA[Hot spring, temperature: 136 degress F, 58 degress C<br /><br /><a href="http://platial.com/place/28592">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28592">Grab this on Platial</a> ]]></description> | |
| 198 | -<georss:point>44.169000 -110.583000</georss:point> | |
| 199 | -<dc:creator>crschmidt</dc:creator> | |
| 200 | -<dc:date>2006-01-03T23:24:12.234974+00:00</dc:date> | |
| 201 | -</item> | |
| 202 | -<item rdf:about="http://platial.com/place/28591"> | |
| 203 | -<link>http://platial.com/place/28591</link> | |
| 204 | -<title>Hot Springs, WY</title> | |
| 205 | -<description><![CDATA[Hot spring, temperature: 142 degress F, 61 degress C<br /><br /><a href="http://platial.com/place/28591">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28591">Grab this on Platial</a> ]]></description> | |
| 206 | -<georss:point>44.187000 -110.726000</georss:point> | |
| 207 | -<dc:creator>crschmidt</dc:creator> | |
| 208 | -<dc:date>2006-01-03T23:24:10.027857+00:00</dc:date> | |
| 209 | -</item> | |
| 210 | -<item rdf:about="http://platial.com/place/28590"> | |
| 211 | -<link>http://platial.com/place/28590</link> | |
| 212 | -<title>Hot Springs on Upper Snake River, WY</title> | |
| 213 | -<description><![CDATA[Hot spring, temperature: 167 degress F, 75 degress C<br /><br /><a href="http://platial.com/place/28590">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28590">Grab this on Platial</a> ]]></description> | |
| 214 | -<georss:point>44.204000 -110.486000</georss:point> | |
| 215 | -<dc:creator>crschmidt</dc:creator> | |
| 216 | -<dc:date>2006-01-03T23:24:07.79658+00:00</dc:date> | |
| 217 | -</item> | |
| 218 | -<item rdf:about="http://platial.com/place/28589"> | |
| 219 | -<link>http://platial.com/place/28589</link> | |
| 220 | -<title>Hot Springs on lewis Lake, WY</title> | |
| 221 | -<description><![CDATA[Hot spring, temperature: 154 degress F, 68 degress C<br /><br /><a href="http://platial.com/place/28589">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28589">Grab this on Platial</a> ]]></description> | |
| 222 | -<georss:point>44.276000 -110.636000</georss:point> | |
| 223 | -<dc:creator>crschmidt</dc:creator> | |
| 224 | -<dc:date>2006-01-03T23:24:05.683418+00:00</dc:date> | |
| 225 | -</item> | |
| 226 | -<item rdf:about="http://platial.com/place/28588"> | |
| 227 | -<link>http://platial.com/place/28588</link> | |
| 228 | -<title>Rustic Geyser, WY</title> | |
| 229 | -<description><![CDATA[Hot spring, temperature: 199 degress F, 93 degress C<br /><br /><a href="http://platial.com/place/28588">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28588">Grab this on Platial</a> ]]></description> | |
| 230 | -<georss:point>44.282000 -110.506000</georss:point> | |
| 231 | -<dc:creator>crschmidt</dc:creator> | |
| 232 | -<dc:date>2006-01-03T23:24:03.66329+00:00</dc:date> | |
| 233 | -</item> | |
| 234 | -<item rdf:about="http://platial.com/place/28587"> | |
| 235 | -<link>http://platial.com/place/28587</link> | |
| 236 | -<title>Bechler River Hot Springs, WY</title> | |
| 237 | -<description><![CDATA[Hot spring, temperature: 194 degress F, 90 degress C<br /><br /><a href="http://platial.com/place/28587">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28587">Grab this on Platial</a> ]]></description> | |
| 238 | -<georss:point>44.285000 -110.900000</georss:point> | |
| 239 | -<dc:creator>crschmidt</dc:creator> | |
| 240 | -<dc:date>2006-01-03T23:24:01.611442+00:00</dc:date> | |
| 241 | -</item> | |
| 242 | -<item rdf:about="http://platial.com/place/28586"> | |
| 243 | -<link>http://platial.com/place/28586</link> | |
| 244 | -<title>Hot Springs, WY</title> | |
| 245 | -<description><![CDATA[Hot spring, temperature: Boiling degress F, 201 degress C<br /><br /><a href="http://platial.com/place/28586">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28586">Grab this on Platial</a> ]]></description> | |
| 246 | -<georss:point>44.290000 -110.504000</georss:point> | |
| 247 | -<dc:creator>crschmidt</dc:creator> | |
| 248 | -<dc:date>2006-01-03T23:23:59.658699+00:00</dc:date> | |
| 249 | -</item> | |
| 250 | -<item rdf:about="http://platial.com/place/28585"> | |
| 251 | -<link>http://platial.com/place/28585</link> | |
| 252 | -<title>Heart Lake Geyser Basin, WY</title> | |
| 253 | -<description><![CDATA[Hot spring, temperature: Middle Group degress F, 174 degress C<br /><br /><a href="http://platial.com/place/28585">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28585">Grab this on Platial</a> ]]></description> | |
| 254 | -<georss:point>44.299000 -110.517000</georss:point> | |
| 255 | -<dc:creator>crschmidt</dc:creator> | |
| 256 | -<dc:date>2006-01-03T23:23:57.181801+00:00</dc:date> | |
| 257 | -</item> | |
| 258 | -<item rdf:about="http://platial.com/place/28584"> | |
| 259 | -<link>http://platial.com/place/28584</link> | |
| 260 | -<title>Hot Springs, WY</title> | |
| 261 | -<description><![CDATA[Hot spring, temperature: Boiling degress F, 201 degress C<br /><br /><a href="http://platial.com/place/28584">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28584">Grab this on Platial</a> ]]></description> | |
| 262 | -<georss:point>44.307000 -110.526000</georss:point> | |
| 263 | -<dc:creator>crschmidt</dc:creator> | |
| 264 | -<dc:date>2006-01-03T23:23:55.240485+00:00</dc:date> | |
| 265 | -</item> | |
| 266 | -<item rdf:about="http://platial.com/place/28583"> | |
| 267 | -<link>http://platial.com/place/28583</link> | |
| 268 | -<title>Hot Springs on lewis Lake, WY</title> | |
| 269 | -<description><![CDATA[Hot spring, temperature: 199 degress F, 93 degress C<br /><br /><a href="http://platial.com/place/28583">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28583">Grab this on Platial</a> ]]></description> | |
| 270 | -<georss:point>44.309000 -110.654000</georss:point> | |
| 271 | -<dc:creator>crschmidt</dc:creator> | |
| 272 | -<dc:date>2006-01-03T23:23:53.22295+00:00</dc:date> | |
| 273 | -</item> | |
| 274 | -<item rdf:about="http://platial.com/place/28582"> | |
| 275 | -<link>http://platial.com/place/28582</link> | |
| 276 | -<title>Shoshone Geyser Basin, WY</title> | |
| 277 | -<description><![CDATA[Hot spring, temperature: 203 degress F, 95 degress C<br /><br /><a href="http://platial.com/place/28582">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28582">Grab this on Platial</a> ]]></description> | |
| 278 | -<georss:point>44.354000 -110.800000</georss:point> | |
| 279 | -<dc:creator>crschmidt</dc:creator> | |
| 280 | -<dc:date>2006-01-03T23:23:51.179049+00:00</dc:date> | |
| 281 | -</item> | |
| 282 | -<item rdf:about="http://platial.com/place/28581"> | |
| 283 | -<link>http://platial.com/place/28581</link> | |
| 284 | -<title>Hot Springs on Continental Divide, WY</title> | |
| 285 | -<description><![CDATA[Hot spring, temperature: 189 degress F, 87 degress C<br /><br /><a href="http://platial.com/place/28581">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28581">Grab this on Platial</a> ]]></description> | |
| 286 | -<georss:point>44.401000 -110.936000</georss:point> | |
| 287 | -<dc:creator>crschmidt</dc:creator> | |
| 288 | -<dc:date>2006-01-03T23:23:49.077176+00:00</dc:date> | |
| 289 | -</item> | |
| 290 | -<item rdf:about="http://platial.com/place/28580"> | |
| 291 | -<link>http://platial.com/place/28580</link> | |
| 292 | -<title>Hot Springs on Upper Firehole River, WY</title> | |
| 293 | -<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br /><br /><a href="http://platial.com/place/28580">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28580">Grab this on Platial</a> ]]></description> | |
| 294 | -<georss:point>44.404000 -110.824000</georss:point> | |
| 295 | -<dc:creator>crschmidt</dc:creator> | |
| 296 | -<dc:date>2006-01-03T23:23:47.054664+00:00</dc:date> | |
| 297 | -</item> | |
| 298 | -<item rdf:about="http://platial.com/place/28579"> | |
| 299 | -<link>http://platial.com/place/28579</link> | |
| 300 | -<title>Summit Lake Hot Springs, WY</title> | |
| 301 | -<description><![CDATA[Hot spring, temperature: 162 degress F, 72 degress C<br /><br /><a href="http://platial.com/place/28579">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28579">Grab this on Platial</a> ]]></description> | |
| 302 | -<georss:point>44.410000 -110.953000</georss:point> | |
| 303 | -<dc:creator>crschmidt</dc:creator> | |
| 304 | -<dc:date>2006-01-03T23:23:45.039394+00:00</dc:date> | |
| 305 | -</item> | |
| 306 | -<item rdf:about="http://platial.com/place/28578"> | |
| 307 | -<link>http://platial.com/place/28578</link> | |
| 308 | -<title>Lone Star Geyser Basin, WY</title> | |
| 309 | -<description><![CDATA[Hot spring, temperature: Footbridge degress F, 183 degress C<br /><br /><a href="http://platial.com/place/28578">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28578">Grab this on Platial</a> ]]></description> | |
| 310 | -<georss:point>44.414000 -110.817000</georss:point> | |
| 311 | -<dc:creator>crschmidt</dc:creator> | |
| 312 | -<dc:date>2006-01-03T23:23:42.938808+00:00</dc:date> | |
| 313 | -</item> | |
| 314 | -<item rdf:about="http://platial.com/place/28577"> | |
| 315 | -<link>http://platial.com/place/28577</link> | |
| 316 | -<title>West. Thumb Geyser Basin, WY</title> | |
| 317 | -<description><![CDATA[Hot spring, temperature: 203 degress F, 95 degress C<br /><br /><a href="http://platial.com/place/28577">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28577">Grab this on Platial</a> ]]></description> | |
| 318 | -<georss:point>44.417000 -110.570000</georss:point> | |
| 319 | -<dc:creator>crschmidt</dc:creator> | |
| 320 | -<dc:date>2006-01-03T23:23:40.90238+00:00</dc:date> | |
| 321 | -</item> | |
| 322 | -<item rdf:about="http://platial.com/place/28576"> | |
| 323 | -<link>http://platial.com/place/28576</link> | |
| 324 | -<title>Lone Star Geyser, WY</title> | |
| 325 | -<description><![CDATA[Hot spring, temperature: 199 degress F, 93 degress C<br /><br /><a href="http://platial.com/place/28576">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28576">Grab this on Platial</a> ]]></description> | |
| 326 | -<georss:point>44.418000 -110.805000</georss:point> | |
| 327 | -<dc:creator>crschmidt</dc:creator> | |
| 328 | -<dc:date>2006-01-03T23:23:38.844625+00:00</dc:date> | |
| 329 | -</item> | |
| 330 | -<item rdf:about="http://platial.com/place/28575"> | |
| 331 | -<link>http://platial.com/place/28575</link> | |
| 332 | -<title>Smoke Jumper Hot Springs, WY</title> | |
| 333 | -<description><![CDATA[Hot spring, temperature: 198 degress F, 92 degress C<br /><br /><a href="http://platial.com/place/28575">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28575">Grab this on Platial</a> ]]></description> | |
| 334 | -<georss:point>44.421000 -110.952000</georss:point> | |
| 335 | -<dc:creator>crschmidt</dc:creator> | |
| 336 | -<dc:date>2006-01-03T23:23:36.818513+00:00</dc:date> | |
| 337 | -</item> | |
| 338 | -<item rdf:about="http://platial.com/place/28574"> | |
| 339 | -<link>http://platial.com/place/28574</link> | |
| 340 | -<title>West. Thumb Geyser Basin, WY</title> | |
| 341 | -<description><![CDATA[Hot spring, temperature: 196 degress F, 91 degress C<br /><br /><a href="http://platial.com/place/28574">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28574">Grab this on Platial</a> ]]></description> | |
| 342 | -<georss:point>44.422000 -110.574000</georss:point> | |
| 343 | -<dc:creator>crschmidt</dc:creator> | |
| 344 | -<dc:date>2006-01-03T23:23:34.767729+00:00</dc:date> | |
| 345 | -</item> | |
| 346 | -<item rdf:about="http://platial.com/place/28573"> | |
| 347 | -<link>http://platial.com/place/28573</link> | |
| 348 | -<title>Potts Hot Spring Basin, WY</title> | |
| 349 | -<description><![CDATA[Hot spring, temperature: 203 degress F, 95 degress C<br /><br /><a href="http://platial.com/place/28573">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28573">Grab this on Platial</a> ]]></description> | |
| 350 | -<georss:point>44.433000 -110.581000</georss:point> | |
| 351 | -<dc:creator>crschmidt</dc:creator> | |
| 352 | -<dc:date>2006-01-03T23:23:32.749915+00:00</dc:date> | |
| 353 | -</item> | |
| 354 | -<item rdf:about="http://platial.com/place/28572"> | |
| 355 | -<link>http://platial.com/place/28572</link> | |
| 356 | -<title>Hot Springs, WY</title> | |
| 357 | -<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br /><br /><a href="http://platial.com/place/28572">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28572">Grab this on Platial</a> ]]></description> | |
| 358 | -<georss:point>44.433000 -110.813000</georss:point> | |
| 359 | -<dc:creator>crschmidt</dc:creator> | |
| 360 | -<dc:date>2006-01-03T23:23:30.829745+00:00</dc:date> | |
| 361 | -</item> | |
| 362 | -<item rdf:about="http://platial.com/place/28571"> | |
| 363 | -<link>http://platial.com/place/28571</link> | |
| 364 | -<title>Hot Springs on Continental Divide, WY</title> | |
| 365 | -<description><![CDATA[Hot spring, temperature: Hot degress F, Hot degress C<br /><br /><a href="http://platial.com/place/28571">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28571">Grab this on Platial</a> ]]></description> | |
| 366 | -<georss:point>44.438000 -110.977000</georss:point> | |
| 367 | -<dc:creator>crschmidt</dc:creator> | |
| 368 | -<dc:date>2006-01-03T23:23:28.730401+00:00</dc:date> | |
| 369 | -</item> | |
| 370 | -<item rdf:about="http://platial.com/place/28570"> | |
| 371 | -<link>http://platial.com/place/28570</link> | |
| 372 | -<title>SouthEastern Group, WY</title> | |
| 373 | -<description><![CDATA[Hot spring, temperature: 198 degress F, 92 degress C<br /><br /><a href="http://platial.com/place/28570">Map this on Platial</a><br /> <a href="http://platial.com/place_grab/28570">Grab this on Platial</a> ]]></description> | |
| 374 | -<georss:point>44.459000 -110.817000</georss:point> | |
| 375 | -<dc:creator>crschmidt</dc:creator> | |
| 376 | -<dc:date>2006-01-03T23:23:26.706763+00:00</dc:date> | |
| 377 | -</item> | |
| 378 | -</rdf:RDF> | |
| 379 | 0 | \ No newline at end of file |
pacotes/openlayers/examples/getfeatureinfo.html
| ... | ... | @@ -1,47 +0,0 @@ |
| 1 | -<html> | |
| 2 | -<head> | |
| 3 | -<script src="../lib/OpenLayers.js"></script> | |
| 4 | -<style type="text/css"> | |
| 5 | -ul, li { padding-left: 0px; margin-left: 0px; } | |
| 6 | -</style> | |
| 7 | -<title>World Map Query</title> | |
| 8 | -</head> | |
| 9 | -<body> | |
| 10 | - <a id='permalink' href="">Permalink</a><br /> | |
| 11 | - <div style="float:right;width:28%"> | |
| 12 | - <h1 style="font-size:1.3em;">CIA Factbook</h1> | |
| 13 | - <p style='font-size:.8em;'>Click a country to see statistics about the country below.</p> | |
| 14 | - <div id="nodeList"> | |
| 15 | - </div> | |
| 16 | - </div> | |
| 17 | - <div id="map" style="width:70%; height:90%"></div> | |
| 18 | - <script defer="defer" type="text/javascript"> | |
| 19 | - OpenLayers.ProxyHost = "/dev/examples/proxy.cgi?url="; | |
| 20 | - var map = new OpenLayers.Map('map', {'maxResolution':'auto'}); | |
| 21 | - | |
| 22 | - var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 23 | - "http://world.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/world/map/factbook.map", {'layers': 'factbook'} ); | |
| 24 | - map.addLayer(wms); | |
| 25 | - map.addControl(new OpenLayers.Control.Permalink('permalink')); | |
| 26 | - map.zoomToMaxExtent(); | |
| 27 | - map.events.register('click', map, function (e) { | |
| 28 | - OpenLayers.Util.getElement('nodeList').innerHTML = "Loading... please wait..."; | |
| 29 | - var url = wms.getFullRequestString({ | |
| 30 | - REQUEST: "GetFeatureInfo", | |
| 31 | - EXCEPTIONS: "application/vnd.ogc.se_xml", | |
| 32 | - BBOX: wms.map.getExtent().toBBOX(), | |
| 33 | - X: e.xy.x, | |
| 34 | - Y: e.xy.y, | |
| 35 | - INFO_FORMAT: 'text/html', | |
| 36 | - QUERY_LAYERS: wms.params.LAYERS, | |
| 37 | - WIDTH: wms.map.size.w, | |
| 38 | - HEIGHT: wms.map.size.h}); | |
| 39 | - OpenLayers.loadURL(url, '', this, setHTML); | |
| 40 | - Event.stop(e); | |
| 41 | - }); | |
| 42 | - function setHTML(response) { | |
| 43 | - OpenLayers.Util.getElement('nodeList').innerHTML = response.responseText; | |
| 44 | - } | |
| 45 | - </script> | |
| 46 | -</body> | |
| 47 | -</html> |
pacotes/openlayers/examples/gml-layer.html
| ... | ... | @@ -1,32 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 800px; | |
| 6 | - height: 475px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - var lon = 5; | |
| 14 | - var lat = 40; | |
| 15 | - var zoom = 5; | |
| 16 | - var map, layer; | |
| 17 | - | |
| 18 | - function init(){ | |
| 19 | - map = new OpenLayers.Map( $('map') ); | |
| 20 | - layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 21 | - "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); | |
| 22 | - map.addLayer(layer); | |
| 23 | - map.zoomToExtent(new OpenLayers.Bounds(-3.922119,44.335327,4.866943,49.553833)); | |
| 24 | - map.addLayer(new OpenLayers.Layer.GML("GML", "gml/polygon.xml")); | |
| 25 | - } | |
| 26 | - // --> | |
| 27 | - </script> | |
| 28 | - </head> | |
| 29 | - <body onload="init()"> | |
| 30 | - <div id="map"></div> | |
| 31 | - </body> | |
| 32 | -</html> |
pacotes/openlayers/examples/gml-serialize.html
| ... | ... | @@ -1,86 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 512px; | |
| 6 | - height: 350px; | |
| 7 | - border: 1px solid gray; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - var map, drawControl, g; | |
| 14 | - function serialize(feature) { | |
| 15 | - feature.attributes = {}; | |
| 16 | - var name = prompt("Name for feature?"); | |
| 17 | - feature.attributes['name'] = name; | |
| 18 | - s = new XMLSerializer(); | |
| 19 | - var data = g.write(feature.layer.features); | |
| 20 | - $("gml").value = s.serializeToString(data); | |
| 21 | - } | |
| 22 | - function init(){ | |
| 23 | - g = new OpenLayers.Format.GML(); | |
| 24 | - map = new OpenLayers.Map('map'); | |
| 25 | - | |
| 26 | - var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 27 | - "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); | |
| 28 | - | |
| 29 | - var pointLayer = new OpenLayers.Layer.Vector("Point Layer"); | |
| 30 | - pointLayer.onFeatureInsert = serialize; | |
| 31 | - | |
| 32 | - map.addLayers([wmsLayer, pointLayer]); | |
| 33 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 34 | - map.addControl(new OpenLayers.Control.MousePosition()); | |
| 35 | - | |
| 36 | - drawControls = { | |
| 37 | - point: new OpenLayers.Control.DrawFeature(pointLayer, | |
| 38 | - OpenLayers.Handler.Point), | |
| 39 | - line: new OpenLayers.Control.DrawFeature(pointLayer, | |
| 40 | - OpenLayers.Handler.Path) | |
| 41 | - }; | |
| 42 | - | |
| 43 | - for(var key in drawControls) { | |
| 44 | - map.addControl(drawControls[key]); | |
| 45 | - } | |
| 46 | - | |
| 47 | - map.setCenter(new OpenLayers.LonLat(0, 0), 3); | |
| 48 | - } | |
| 49 | - | |
| 50 | - function toggleControl(element) { | |
| 51 | - for(key in drawControls) { | |
| 52 | - var control = drawControls[key]; | |
| 53 | - if(element.value == key && element.checked) { | |
| 54 | - control.activate(); | |
| 55 | - } else { | |
| 56 | - control.deactivate(); | |
| 57 | - } | |
| 58 | - } | |
| 59 | - } | |
| 60 | - // --> | |
| 61 | - </script> | |
| 62 | - </head> | |
| 63 | - <body onload="init()"> | |
| 64 | - <h1>OpenLayers Draw Point Example</h1> | |
| 65 | - <div style="float:right"> | |
| 66 | - <ul id="controlToggle"> | |
| 67 | - <li> | |
| 68 | - <input type="radio" name="type" value="none" id="noneToggle" | |
| 69 | - onclick="toggleControl(this);" checked="checked" /> | |
| 70 | - <label for="noneToggle">navigate</label> | |
| 71 | - </li> | |
| 72 | - <li> | |
| 73 | - <input type="radio" name="type" value="point" id="pointToggle" onclick="toggleControl(this);" /> | |
| 74 | - <label for="pointToggle">draw point</label> | |
| 75 | - </li> | |
| 76 | - <li> | |
| 77 | - <input type="radio" name="type" value="line" id="lineToggle" onclick="toggleControl(this);" /> | |
| 78 | - <label for="lineToggle">draw line</label> | |
| 79 | - </li> | |
| 80 | - </ul> | |
| 81 | - <p>Check the box to draw points. Uncheck to navigate normally.</p> | |
| 82 | - <textarea id="gml" cols="80" rows="30"></textarea> | |
| 83 | - </div> | |
| 84 | - <div id="map"></div> | |
| 85 | - </body> | |
| 86 | -</html> |
pacotes/openlayers/examples/gml/line.xml
| ... | ... | @@ -1,42 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="ISO-8859-1"?> | |
| 2 | -<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=line&OUTPUTFORMAT=XMLSCHEMA"> | |
| 3 | - <gml:boundedBy> | |
| 4 | - <gml:Box srsName="EPSG:4326"> | |
| 5 | - <gml:coordinates>-3.924027,46.037889 2.193186,47.897181</gml:coordinates> | |
| 6 | - </gml:Box> | |
| 7 | - </gml:boundedBy> | |
| 8 | - <gml:featureMember> | |
| 9 | - <ms:line fid="1"> | |
| 10 | - <gml:boundedBy> | |
| 11 | - <gml:Box srsName="EPSG:4326"> | |
| 12 | - <gml:coordinates>-0.631235,46.037889 2.193186,46.704963</gml:coordinates> | |
| 13 | - </gml:Box> | |
| 14 | - </gml:boundedBy> | |
| 15 | - <ms:msGeometry> | |
| 16 | - <gml:LineString srsName="EPSG:4326"> | |
| 17 | - <gml:coordinates>-0.631235,46.307557 -0.262215,46.577225 0.106805,46.477874 0.220349,46.293364 0.475824,46.406909 0.887424,46.350136 1.029354,46.563032 1.213864,46.648191 1.526112,46.421102 1.795780,46.066275 2.108028,46.037889 2.178993,46.250785 2.193186,46.492067 2.193186,46.492067 2.051255,46.704963 2.051255,46.704963 </gml:coordinates> | |
| 18 | - </gml:LineString> | |
| 19 | - </ms:msGeometry> | |
| 20 | - <ms:ogc_fid>1</ms:ogc_fid> | |
| 21 | - <ms:name/> | |
| 22 | - <ms:id>0</ms:id> | |
| 23 | - </ms:line> | |
| 24 | - </gml:featureMember> | |
| 25 | - <gml:featureMember> | |
| 26 | - <ms:line fid="2"> | |
| 27 | - <gml:boundedBy> | |
| 28 | - <gml:Box srsName="EPSG:4326"> | |
| 29 | - <gml:coordinates>-3.924027,46.279171 -1.127992,47.897181</gml:coordinates> | |
| 30 | - </gml:Box> | |
| 31 | - </gml:boundedBy> | |
| 32 | - <ms:msGeometry> | |
| 33 | - <gml:LineString srsName="EPSG:4326"> | |
| 34 | - <gml:coordinates>-1.127992,46.279171 -1.369275,46.364329 -1.624750,46.406909 -1.866032,46.492067 -1.993770,46.704963 -2.178280,46.846894 -1.979577,47.059790 -2.164087,47.144948 -2.135700,47.215914 -2.093121,47.357844 -2.277631,47.258493 -2.391176,47.301072 -2.490527,47.315265 -2.476334,47.443003 -2.575686,47.599127 -2.703423,47.542354 -2.873740,47.471389 -3.285339,47.670092 -3.597587,47.769443 -3.824676,47.840409 -3.924027,47.897181 </gml:coordinates> | |
| 35 | - </gml:LineString> | |
| 36 | - </ms:msGeometry> | |
| 37 | - <ms:ogc_fid>2</ms:ogc_fid> | |
| 38 | - <ms:name/> | |
| 39 | - <ms:id>0</ms:id> | |
| 40 | - </ms:line> | |
| 41 | - </gml:featureMember> | |
| 42 | -</wfs:FeatureCollection> | |
| 43 | 0 | \ No newline at end of file |
pacotes/openlayers/examples/gml/multipoint.xml
| ... | ... | @@ -1,70 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="ISO-8859-1"?> | |
| 2 | -<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=multipoint&OUTPUTFORMAT=XMLSCHEMA"> | |
| 3 | - <gml:boundedBy> | |
| 4 | - <gml:Box srsName="EPSG:4326"> | |
| 5 | - <gml:coordinates>0.490018,45.001795 3.016384,45.839186</gml:coordinates> | |
| 6 | - </gml:Box> | |
| 7 | - </gml:boundedBy> | |
| 8 | - <gml:featureMember> | |
| 9 | - <ms:multipoint fid="1"> | |
| 10 | - <gml:boundedBy> | |
| 11 | - <gml:Box srsName="EPSG:4326"> | |
| 12 | - <gml:coordinates>0.930003,45.001795 3.016384,45.541131</gml:coordinates> | |
| 13 | - </gml:Box> | |
| 14 | - </gml:boundedBy> | |
| 15 | - <ms:msGeometry> | |
| 16 | - <gml:MultiPoint srsName="EPSG:4326"> | |
| 17 | - <gml:pointMember> | |
| 18 | - <gml:Point> | |
| 19 | - <gml:coordinates>2.079641,45.001795</gml:coordinates> | |
| 20 | - </gml:Point> | |
| 21 | - </gml:pointMember> | |
| 22 | - <gml:pointMember> | |
| 23 | - <gml:Point> | |
| 24 | - <gml:coordinates>2.718330,45.541131</gml:coordinates> | |
| 25 | - </gml:Point> | |
| 26 | - </gml:pointMember> | |
| 27 | - <gml:pointMember> | |
| 28 | - <gml:Point> | |
| 29 | - <gml:coordinates>3.016384,45.143725</gml:coordinates> | |
| 30 | - </gml:Point> | |
| 31 | - </gml:pointMember> | |
| 32 | - <gml:pointMember> | |
| 33 | - <gml:Point> | |
| 34 | - <gml:coordinates>0.930003,45.001795</gml:coordinates> | |
| 35 | - </gml:Point> | |
| 36 | - </gml:pointMember> | |
| 37 | - </gml:MultiPoint> | |
| 38 | - </ms:msGeometry> | |
| 39 | - <ms:ogc_fid>1</ms:ogc_fid> | |
| 40 | - <ms:name>4 points</ms:name> | |
| 41 | - <ms:id>1</ms:id> | |
| 42 | - </ms:multipoint> | |
| 43 | - </gml:featureMember> | |
| 44 | - <gml:featureMember> | |
| 45 | - <ms:multipoint fid="2"> | |
| 46 | - <gml:boundedBy> | |
| 47 | - <gml:Box srsName="EPSG:4326"> | |
| 48 | - <gml:coordinates>0.490018,45.654676 1.157092,45.839186</gml:coordinates> | |
| 49 | - </gml:Box> | |
| 50 | - </gml:boundedBy> | |
| 51 | - <ms:msGeometry> | |
| 52 | - <gml:MultiPoint srsName="EPSG:4326"> | |
| 53 | - <gml:pointMember> | |
| 54 | - <gml:Point> | |
| 55 | - <gml:coordinates>0.490018,45.654676</gml:coordinates> | |
| 56 | - </gml:Point> | |
| 57 | - </gml:pointMember> | |
| 58 | - <gml:pointMember> | |
| 59 | - <gml:Point> | |
| 60 | - <gml:coordinates>1.157092,45.839186</gml:coordinates> | |
| 61 | - </gml:Point> | |
| 62 | - </gml:pointMember> | |
| 63 | - </gml:MultiPoint> | |
| 64 | - </ms:msGeometry> | |
| 65 | - <ms:ogc_fid>2</ms:ogc_fid> | |
| 66 | - <ms:name>2 points</ms:name> | |
| 67 | - <ms:id>2</ms:id> | |
| 68 | - </ms:multipoint> | |
| 69 | - </gml:featureMember> | |
| 70 | -</wfs:FeatureCollection> | |
| 71 | 0 | \ No newline at end of file |
pacotes/openlayers/examples/gml/multipolygon.xml
| ... | ... | @@ -1,106 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="ISO-8859-1"?> | |
| 2 | -<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=multipolygon&OUTPUTFORMAT=XMLSCHEMA"> | |
| 3 | - <gml:boundedBy> | |
| 4 | - <gml:Box srsName="EPSG:4326"> | |
| 5 | - <gml:coordinates>-1.738295,46.307557 3.754424,47.244300</gml:coordinates> | |
| 6 | - </gml:Box> | |
| 7 | - </gml:boundedBy> | |
| 8 | - <gml:featureMember> | |
| 9 | - <ms:multipolygon fid="1"> | |
| 10 | - <gml:boundedBy> | |
| 11 | - <gml:Box srsName="EPSG:4326"> | |
| 12 | - <gml:coordinates>-1.738295,46.605612 1.767394,47.244300</gml:coordinates> | |
| 13 | - </gml:Box> | |
| 14 | - </gml:boundedBy> | |
| 15 | - <ms:msGeometry> | |
| 16 | - <gml:MultiPolygon srsName="EPSG:4326"> | |
| 17 | - <gml:polygonMember> | |
| 18 | - <gml:Polygon> | |
| 19 | - <gml:outerBoundaryIs> | |
| 20 | - <gml:LinearRing> | |
| 21 | - <gml:coordinates>1.313216,46.690770 1.000968,46.861087 0.887424,47.059790 1.142899,47.244300 1.355795,47.244300 1.554498,47.017211 1.710622,47.059790 1.767394,46.747542 1.313216,46.690770 1.313216,46.690770 </gml:coordinates> | |
| 22 | - </gml:LinearRing> | |
| 23 | - </gml:outerBoundaryIs> | |
| 24 | - </gml:Polygon> | |
| 25 | - </gml:polygonMember> | |
| 26 | - <gml:polygonMember> | |
| 27 | - <gml:Polygon> | |
| 28 | - <gml:outerBoundaryIs> | |
| 29 | - <gml:LinearRing> | |
| 30 | - <gml:coordinates>0.731300,46.605612 -0.191250,46.704963 -0.191250,46.846894 0.177770,46.988824 0.447438,46.960438 0.589369,46.804315 0.688721,46.832701 0.731300,46.605612 0.731300,46.605612 </gml:coordinates> | |
| 31 | - </gml:LinearRing> | |
| 32 | - </gml:outerBoundaryIs> | |
| 33 | - </gml:Polygon> | |
| 34 | - </gml:polygonMember> | |
| 35 | - <gml:polygonMember> | |
| 36 | - <gml:Polygon> | |
| 37 | - <gml:outerBoundaryIs> | |
| 38 | - <gml:LinearRing> | |
| 39 | - <gml:coordinates>-1.610557,46.733349 -1.184765,46.704963 -1.198958,46.704963 -0.943483,46.619805 -0.915096,46.818508 -0.659621,46.775928 -0.688007,47.017211 -0.943483,47.003018 -1.127992,47.088176 -1.397661,47.102369 -1.624750,47.073983 -1.738295,46.917859 -1.610557,46.733349 </gml:coordinates> | |
| 40 | - </gml:LinearRing> | |
| 41 | - </gml:outerBoundaryIs> | |
| 42 | - </gml:Polygon> | |
| 43 | - </gml:polygonMember> | |
| 44 | - </gml:MultiPolygon> | |
| 45 | - </ms:msGeometry> | |
| 46 | - <ms:ogc_fid>1</ms:ogc_fid> | |
| 47 | - <ms:name>My first Multipolygon</ms:name> | |
| 48 | - <ms:id>0</ms:id> | |
| 49 | - </ms:multipolygon> | |
| 50 | - </gml:featureMember> | |
| 51 | - <gml:featureMember> | |
| 52 | - <ms:multipolygon fid="2"> | |
| 53 | - <gml:boundedBy> | |
| 54 | - <gml:Box srsName="EPSG:4326"> | |
| 55 | - <gml:coordinates>2.789295,46.392716 3.754424,46.903666</gml:coordinates> | |
| 56 | - </gml:Box> | |
| 57 | - </gml:boundedBy> | |
| 58 | - <ms:msGeometry> | |
| 59 | - <gml:Polygon srsName="EPSG:4326"> | |
| 60 | - <gml:outerBoundaryIs> | |
| 61 | - <gml:LinearRing> | |
| 62 | - <gml:coordinates>2.959612,46.392716 2.789295,46.775928 3.172508,46.903666 3.498949,46.903666 3.498949,46.662384 3.754424,46.563032 2.959612,46.392716 </gml:coordinates> | |
| 63 | - </gml:LinearRing> | |
| 64 | - </gml:outerBoundaryIs> | |
| 65 | - </gml:Polygon> | |
| 66 | - </ms:msGeometry> | |
| 67 | - <ms:ogc_fid>2</ms:ogc_fid> | |
| 68 | - <ms:name>My second Multipolygon</ms:name> | |
| 69 | - <ms:id>0</ms:id> | |
| 70 | - </ms:multipolygon> | |
| 71 | - </gml:featureMember> | |
| 72 | - <gml:featureMember> | |
| 73 | - <ms:multipolygon fid="3"> | |
| 74 | - <gml:boundedBy> | |
| 75 | - <gml:Box srsName="EPSG:4326"> | |
| 76 | - <gml:coordinates>2.207379,46.307557 2.803488,47.045597</gml:coordinates> | |
| 77 | - </gml:Box> | |
| 78 | - </gml:boundedBy> | |
| 79 | - <ms:msGeometry> | |
| 80 | - <gml:MultiPolygon srsName="EPSG:4326"> | |
| 81 | - <gml:polygonMember> | |
| 82 | - <gml:Polygon> | |
| 83 | - <gml:outerBoundaryIs> | |
| 84 | - <gml:LinearRing> | |
| 85 | - <gml:coordinates>2.292538,46.804315 2.207379,47.017211 2.391889,47.045597 2.562206,46.832701 2.292538,46.804315 </gml:coordinates> | |
| 86 | - </gml:LinearRing> | |
| 87 | - </gml:outerBoundaryIs> | |
| 88 | - </gml:Polygon> | |
| 89 | - </gml:polygonMember> | |
| 90 | - <gml:polygonMember> | |
| 91 | - <gml:Polygon> | |
| 92 | - <gml:outerBoundaryIs> | |
| 93 | - <gml:LinearRing> | |
| 94 | - <gml:coordinates>2.789295,46.307557 2.789295,46.307557 2.803488,46.506260 2.618978,46.676577 2.349310,46.633998 2.448661,46.392716 2.789295,46.307557 </gml:coordinates> | |
| 95 | - </gml:LinearRing> | |
| 96 | - </gml:outerBoundaryIs> | |
| 97 | - </gml:Polygon> | |
| 98 | - </gml:polygonMember> | |
| 99 | - </gml:MultiPolygon> | |
| 100 | - </ms:msGeometry> | |
| 101 | - <ms:ogc_fid>3</ms:ogc_fid> | |
| 102 | - <ms:name>My third Multipolygon</ms:name> | |
| 103 | - <ms:id>0</ms:id> | |
| 104 | - </ms:multipolygon> | |
| 105 | - </gml:featureMember> | |
| 106 | -</wfs:FeatureCollection> | |
| 107 | 0 | \ No newline at end of file |
pacotes/openlayers/examples/gml/owls.xml
| ... | ... | @@ -1,156 +0,0 @@ |
| 1 | -<?xml version='1.0' encoding="ISO-8859-1" ?> | |
| 2 | -<wfs:FeatureCollection | |
| 3 | - xmlns:bsc="http://www.bsc-eoc.org/bsc" | |
| 4 | - xmlns:wfs="http://www.opengis.net/wfs" | |
| 5 | - xmlns:gml="http://www.opengis.net/gml" | |
| 6 | - xmlns:ogc="http://www.opengis.net/ogc" | |
| 7 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 8 | - xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengeospatial.net//wfs/1.0.0/WFS-basic.xsd | |
| 9 | - http://www.bsc-eoc.org/bsc http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=OWLS&OUTPUTFORMAT=XMLSCHEMA"> | |
| 10 | - <gml:boundedBy> | |
| 11 | - <gml:Box srsName="EPSG:4326"> | |
| 12 | - <gml:coordinates>-89.817223,45.005555 -74.755001,51.701388</gml:coordinates> | |
| 13 | - </gml:Box> | |
| 14 | - </gml:boundedBy> | |
| 15 | - <gml:featureMember><bsc:OWLS> | |
| 16 | - <gml:boundedBy> | |
| 17 | - <gml:Box srsName="EPSG:4326"> | |
| 18 | - <gml:coordinates>-79.771668,45.891110 -79.771668,45.891110</gml:coordinates> | |
| 19 | - </gml:Box> | |
| 20 | - </gml:boundedBy> | |
| 21 | - <bsc:msGeometry> | |
| 22 | - <gml:Point srsName="EPSG:4326"> | |
| 23 | - <gml:coordinates>-79.771668,45.891110</gml:coordinates> | |
| 24 | - </gml:Point> | |
| 25 | - </bsc:msGeometry> | |
| 26 | - </bsc:OWLS> | |
| 27 | - </gml:featureMember> | |
| 28 | - <gml:featureMember> | |
| 29 | - <bsc:OWLS> | |
| 30 | - <gml:boundedBy> | |
| 31 | - <gml:Box srsName="EPSG:4326"> | |
| 32 | - <gml:coordinates>-83.755834,46.365277 -83.755834,46.365277</gml:coordinates> | |
| 33 | - </gml:Box> | |
| 34 | - </gml:boundedBy> | |
| 35 | - <bsc:owlname>owl</bsc:owlname> | |
| 36 | - <bsc:msGeometry> | |
| 37 | - <gml:Point srsName="EPSG:4326"> | |
| 38 | - <gml:coordinates>-83.755834,46.365277</gml:coordinates> | |
| 39 | - </gml:Point> | |
| 40 | - </bsc:msGeometry> | |
| 41 | - </bsc:OWLS> | |
| 42 | - </gml:featureMember> | |
| 43 | - <gml:featureMember> | |
| 44 | - <bsc:OWLS> | |
| 45 | - <gml:boundedBy> | |
| 46 | - <gml:Box srsName="EPSG:4326"> | |
| 47 | - <gml:coordinates>-83.808612,46.175277 -83.808612,46.175277</gml:coordinates> | |
| 48 | - </gml:Box> | |
| 49 | - </gml:boundedBy> | |
| 50 | - <bsc:msGeometry> | |
| 51 | - <gml:Point srsName="EPSG:4326"> | |
| 52 | - <gml:coordinates>-83.808612,46.175277</gml:coordinates> | |
| 53 | - </gml:Point> | |
| 54 | - </bsc:msGeometry> | |
| 55 | - </bsc:OWLS> | |
| 56 | - </gml:featureMember> | |
| 57 | - <gml:featureMember> | |
| 58 | - <bsc:OWLS> | |
| 59 | - <gml:boundedBy> | |
| 60 | - <gml:Box srsName="EPSG:4326"> | |
| 61 | - <gml:coordinates>-84.111112,46.309166 -84.111112,46.309166</gml:coordinates> | |
| 62 | - </gml:Box> | |
| 63 | - </gml:boundedBy> | |
| 64 | - <bsc:msGeometry> | |
| 65 | - <gml:Point srsName="EPSG:4326"> | |
| 66 | - <gml:coordinates>-84.111112,46.309166</gml:coordinates> | |
| 67 | - </gml:Point> | |
| 68 | - </bsc:msGeometry> | |
| 69 | - </bsc:OWLS> | |
| 70 | - </gml:featureMember> | |
| 71 | - <gml:featureMember> | |
| 72 | - <bsc:OWLS> | |
| 73 | - <gml:boundedBy> | |
| 74 | - <gml:Box srsName="EPSG:4326"> | |
| 75 | - <gml:coordinates>-83.678612,46.821110 -83.678612,46.821110</gml:coordinates> | |
| 76 | - </gml:Box> | |
| 77 | - </gml:boundedBy> | |
| 78 | - <bsc:msGeometry> | |
| 79 | - <gml:Point srsName="EPSG:4326"> | |
| 80 | - <gml:coordinates>-83.678612,46.821110</gml:coordinates> | |
| 81 | - </gml:Point> | |
| 82 | - </bsc:msGeometry> | |
| 83 | - </bsc:OWLS> | |
| 84 | - </gml:featureMember> | |
| 85 | - <gml:featureMember> | |
| 86 | - <bsc:OWLS> | |
| 87 | - <gml:boundedBy> | |
| 88 | - <gml:Box srsName="EPSG:4326"> | |
| 89 | - <gml:coordinates>-83.664445,46.518888 -83.664445,46.518888</gml:coordinates> | |
| 90 | - </gml:Box> | |
| 91 | - </gml:boundedBy> | |
| 92 | - <bsc:msGeometry> | |
| 93 | - <gml:Point srsName="EPSG:4326"> | |
| 94 | - <gml:coordinates>-83.664445,46.518888</gml:coordinates> | |
| 95 | - </gml:Point> | |
| 96 | - </bsc:msGeometry> | |
| 97 | - </bsc:OWLS> | |
| 98 | - </gml:featureMember> | |
| 99 | - <gml:featureMember> | |
| 100 | - <bsc:OWLS> | |
| 101 | - <gml:boundedBy> | |
| 102 | - <gml:Box srsName="EPSG:4326"> | |
| 103 | - <gml:coordinates>-80.613334,46.730277 -80.613334,46.730277</gml:coordinates> | |
| 104 | - </gml:Box> | |
| 105 | - </gml:boundedBy> | |
| 106 | - <bsc:msGeometry> | |
| 107 | - <gml:Point srsName="EPSG:4326"> | |
| 108 | - <gml:coordinates>-80.613334,46.730277</gml:coordinates> | |
| 109 | - </gml:Point> | |
| 110 | - </bsc:msGeometry> | |
| 111 | - </bsc:OWLS> | |
| 112 | - </gml:featureMember> | |
| 113 | - <gml:featureMember> | |
| 114 | - <bsc:OWLS> | |
| 115 | - <gml:boundedBy> | |
| 116 | - <gml:Box srsName="EPSG:4326"> | |
| 117 | - <gml:coordinates>-79.676946,45.428054 -79.676946,45.428054</gml:coordinates> | |
| 118 | - </gml:Box> | |
| 119 | - </gml:boundedBy> | |
| 120 | - <bsc:msGeometry> | |
| 121 | - <gml:Point srsName="EPSG:4326"> | |
| 122 | - <gml:coordinates>-79.676946,45.428054</gml:coordinates> | |
| 123 | - </gml:Point> | |
| 124 | - </bsc:msGeometry> | |
| 125 | - </bsc:OWLS> | |
| 126 | - </gml:featureMember> | |
| 127 | - <gml:featureMember> | |
| 128 | - <bsc:OWLS> | |
| 129 | - <gml:boundedBy> | |
| 130 | - <gml:Box srsName="EPSG:4326"> | |
| 131 | - <gml:coordinates>-83.853056,46.236944 -83.853056,46.236944</gml:coordinates> | |
| 132 | - </gml:Box> | |
| 133 | - </gml:boundedBy> | |
| 134 | - <bsc:msGeometry> | |
| 135 | - <gml:Point srsName="EPSG:4326"> | |
| 136 | - <gml:coordinates>-83.853056,46.236944</gml:coordinates> | |
| 137 | - </gml:Point> | |
| 138 | - </bsc:msGeometry> | |
| 139 | - </bsc:OWLS> | |
| 140 | - </gml:featureMember> | |
| 141 | - <gml:featureMember> | |
| 142 | - <bsc:OWLS> | |
| 143 | - <gml:boundedBy> | |
| 144 | - <gml:Box srsName="EPSG:4326"> | |
| 145 | - <gml:coordinates>-82.289167,45.896388 -82.289167,45.896388</gml:coordinates> | |
| 146 | - </gml:Box> | |
| 147 | - </gml:boundedBy> | |
| 148 | - <bsc:msGeometry> | |
| 149 | - <gml:Point srsName="EPSG:4326"> | |
| 150 | - <gml:coordinates>-82.289167,45.896388</gml:coordinates> | |
| 151 | - </gml:Point> | |
| 152 | - </bsc:msGeometry> | |
| 153 | - </bsc:OWLS> | |
| 154 | - </gml:featureMember> | |
| 155 | -</wfs:FeatureCollection> | |
| 156 | - |
pacotes/openlayers/examples/gml/point.xml
| ... | ... | @@ -1,42 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="ISO-8859-1"?> | |
| 2 | -<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=point&OUTPUTFORMAT=XMLSCHEMA"> | |
| 3 | - <gml:boundedBy> | |
| 4 | - <gml:Box srsName="EPSG:4326"> | |
| 5 | - <gml:coordinates>-0.608315,44.857522 -0.021418,45.477577</gml:coordinates> | |
| 6 | - </gml:Box> | |
| 7 | - </gml:boundedBy> | |
| 8 | - <gml:featureMember> | |
| 9 | - <ms:point fid="1"> | |
| 10 | - <gml:boundedBy> | |
| 11 | - <gml:Box srsName="EPSG:4326"> | |
| 12 | - <gml:coordinates>-0.608315,44.857522 -0.608315,44.857522</gml:coordinates> | |
| 13 | - </gml:Box> | |
| 14 | - </gml:boundedBy> | |
| 15 | - <ms:msGeometry> | |
| 16 | - <gml:Point srsName="EPSG:4326"> | |
| 17 | - <gml:coordinates>-0.608315,44.857522</gml:coordinates> | |
| 18 | - </gml:Point> | |
| 19 | - </ms:msGeometry> | |
| 20 | - <ms:ogc_fid>1</ms:ogc_fid> | |
| 21 | - <ms:name>Bordeaux</ms:name> | |
| 22 | - <ms:id>124</ms:id> | |
| 23 | - </ms:point> | |
| 24 | - </gml:featureMember> | |
| 25 | - <gml:featureMember> | |
| 26 | - <ms:point fid="2"> | |
| 27 | - <gml:boundedBy> | |
| 28 | - <gml:Box srsName="EPSG:4326"> | |
| 29 | - <gml:coordinates>-0.021418,45.477577 -0.021418,45.477577</gml:coordinates> | |
| 30 | - </gml:Box> | |
| 31 | - </gml:boundedBy> | |
| 32 | - <ms:msGeometry> | |
| 33 | - <gml:Point srsName="EPSG:4326"> | |
| 34 | - <gml:coordinates>-0.021418,45.477577</gml:coordinates> | |
| 35 | - </gml:Point> | |
| 36 | - </ms:msGeometry> | |
| 37 | - <ms:ogc_fid>2</ms:ogc_fid> | |
| 38 | - <ms:name>Barbezieux</ms:name> | |
| 39 | - <ms:id>0</ms:id> | |
| 40 | - </ms:point> | |
| 41 | - </gml:featureMember> | |
| 42 | -</wfs:FeatureCollection> | |
| 43 | 0 | \ No newline at end of file |
pacotes/openlayers/examples/gml/polygon.xml
| ... | ... | @@ -1,89 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="ISO-8859-1"?> | |
| 2 | -<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=polygon&OUTPUTFORMAT=XMLSCHEMA"> | |
| 3 | - <gml:boundedBy> | |
| 4 | - <gml:Box srsName="EPSG:4326"> | |
| 5 | - <gml:coordinates>-0.768746,47.003018 3.002191,47.925567</gml:coordinates> | |
| 6 | - </gml:Box> | |
| 7 | - </gml:boundedBy> | |
| 8 | - <gml:featureMember> | |
| 9 | - <ms:polygon fid="1"> | |
| 10 | - <gml:boundedBy> | |
| 11 | - <gml:Box srsName="EPSG:4326"> | |
| 12 | - <gml:coordinates>-0.768746,47.003018 0.532597,47.925567</gml:coordinates> | |
| 13 | - </gml:Box> | |
| 14 | - </gml:boundedBy> | |
| 15 | - <ms:msGeometry> | |
| 16 | - <gml:MultiPolygon srsName="EPSG:4326"> | |
| 17 | - <gml:polygonMember> | |
| 18 | - <gml:Polygon> | |
| 19 | - <gml:outerBoundaryIs> | |
| 20 | - <gml:LinearRing> | |
| 21 | - <gml:coordinates>-0.318987,47.003018 -0.768746,47.358268 -0.574463,47.684285 -0.347374,47.854602 -0.006740,47.925567 0.135191,47.726864 0.149384,47.599127 0.419052,47.670092 0.532597,47.428810 0.305508,47.443003 0.475824,47.144948 0.064225,47.201721 -0.318987,47.003018 </gml:coordinates> | |
| 22 | - </gml:LinearRing> | |
| 23 | - </gml:outerBoundaryIs> | |
| 24 | - <gml:innerBoundaryIs> | |
| 25 | - <gml:LinearRing> | |
| 26 | - <gml:coordinates>-0.035126,47.485582 -0.035126,47.485582 -0.049319,47.641706 -0.233829,47.655899 -0.375760,47.457196 -0.276408,47.286879 -0.035126,47.485582 </gml:coordinates> | |
| 27 | - </gml:LinearRing> | |
| 28 | - </gml:innerBoundaryIs> | |
| 29 | - </gml:Polygon> | |
| 30 | - </gml:polygonMember> | |
| 31 | - </gml:MultiPolygon> | |
| 32 | - </ms:msGeometry> | |
| 33 | - <ms:ogc_fid>1</ms:ogc_fid> | |
| 34 | - <ms:name>My Polygon with hole</ms:name> | |
| 35 | - <ms:id>0</ms:id> | |
| 36 | - </ms:polygon> | |
| 37 | - </gml:featureMember> | |
| 38 | - <gml:featureMember> | |
| 39 | - <ms:polygon fid="2"> | |
| 40 | - <gml:boundedBy> | |
| 41 | - <gml:Box srsName="EPSG:4326"> | |
| 42 | - <gml:coordinates>1.511919,47.088176 3.002191,47.882988</gml:coordinates> | |
| 43 | - </gml:Box> | |
| 44 | - </gml:boundedBy> | |
| 45 | - <ms:msGeometry> | |
| 46 | - <gml:Polygon srsName="EPSG:4326"> | |
| 47 | - <gml:outerBoundaryIs> | |
| 48 | - <gml:LinearRing> | |
| 49 | - <gml:coordinates>1.625463,47.357844 1.511919,47.741057 1.880938,47.882988 2.420275,47.797830 2.789295,47.485582 3.002191,47.457196 2.874453,47.088176 2.178993,47.343651 1.625463,47.357844 </gml:coordinates> | |
| 50 | - </gml:LinearRing> | |
| 51 | - </gml:outerBoundaryIs> | |
| 52 | - </gml:Polygon> | |
| 53 | - </ms:msGeometry> | |
| 54 | - <ms:ogc_fid>2</ms:ogc_fid> | |
| 55 | - <ms:name>My simple Polygon</ms:name> | |
| 56 | - <ms:id>0</ms:id> | |
| 57 | - </ms:polygon> | |
| 58 | - </gml:featureMember> | |
| 59 | - <gml:featureMember> | |
| 60 | - <ms:polygon fid="3"> | |
| 61 | - <gml:boundedBy> | |
| 62 | - <gml:Box srsName="EPSG:4326"> | |
| 63 | - <gml:coordinates>0.000000,45.000000 2.000000,47.000000</gml:coordinates> | |
| 64 | - </gml:Box> | |
| 65 | - </gml:boundedBy> | |
| 66 | - <ms:msGeometry> | |
| 67 | - <gml:MultiPolygon srsName="EPSG:4326"> | |
| 68 | - <gml:polygonMember> | |
| 69 | - <gml:Polygon> | |
| 70 | - <gml:outerBoundaryIs> | |
| 71 | - <gml:LinearRing> | |
| 72 | - <gml:coordinates>0.000000,45.000000 2.000000,45.000000 2.000000,47.000000 0.000000,47.000000 0.000000,45.000000 </gml:coordinates> | |
| 73 | - </gml:LinearRing> | |
| 74 | - </gml:outerBoundaryIs> | |
| 75 | - <gml:innerBoundaryIs> | |
| 76 | - <gml:LinearRing> | |
| 77 | - <gml:coordinates>0.500000,45.500000 1.500000,45.500000 1.500000,46.500000 0.500000,46.500000 0.500000,45.500000 </gml:coordinates> | |
| 78 | - </gml:LinearRing> | |
| 79 | - </gml:innerBoundaryIs> | |
| 80 | - </gml:Polygon> | |
| 81 | - </gml:polygonMember> | |
| 82 | - </gml:MultiPolygon> | |
| 83 | - </ms:msGeometry> | |
| 84 | - <ms:ogc_fid>3</ms:ogc_fid> | |
| 85 | - <ms:name>my polygon with hole</ms:name> | |
| 86 | - <ms:id>3</ms:id> | |
| 87 | - </ms:polygon> | |
| 88 | - </gml:featureMember> | |
| 89 | -</wfs:FeatureCollection> | |
| 90 | 0 | \ No newline at end of file |
pacotes/openlayers/examples/google.html
| ... | ... | @@ -1,85 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 100%; | |
| 6 | - height: 512px; | |
| 7 | - border: 1px solid black; | |
| 8 | - background-color: red; | |
| 9 | - } | |
| 10 | - </style> | |
| 11 | - | |
| 12 | - <!-- this gmaps key generated for http://openlayers.org/dev/ --> | |
| 13 | - <!--<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>--> | |
| 14 | - <!-- Localhost key --> | |
| 15 | - <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTS6gjckBmeABOGXIUiOiZObZESPg'></script> | |
| 16 | - <script src="../lib/OpenLayers.js"></script> | |
| 17 | - <script type="text/javascript"> | |
| 18 | - <!-- | |
| 19 | - var lon = -54; | |
| 20 | - var lat = -20; | |
| 21 | - var zoom = 17; | |
| 22 | - var map, layer; | |
| 23 | - | |
| 24 | - function init(){ | |
| 25 | - map = new OpenLayers.Map( 'map' , | |
| 26 | - { controls: [new OpenLayers.Control.MouseDefaults()] , 'numZoomLevels':20}); | |
| 27 | - | |
| 28 | - var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} ); | |
| 29 | - | |
| 30 | - | |
| 31 | - map.addLayers([satellite]); | |
| 32 | - layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 33 | - "http://labs.metacarta.com/wms/vmap0", {layers: 'basic', 'transparent':true}, | |
| 34 | - {isBaseLayer: false} ); | |
| 35 | - layer.setVisibility(false); | |
| 36 | - layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 37 | - "http://labs.metacarta.com/wms/vmap0", {layers: 'basic', 'transparent':true}, | |
| 38 | - {isBaseLayer: false} ); | |
| 39 | - layer.setVisibility(false); | |
| 40 | - map.addLayer(layer); | |
| 41 | - | |
| 42 | - //var twms = new OpenLayers.Layer.WMS( "World Map","http://world.freemap.in/cgi-bin/mapserv?",{map: '/www/freemap.in/world/map/factbooktrans.map', transparent:'true',layers: 'factbook', 'format':'png'} ); | |
| 43 | - var twms = new OpenLayers.Layer.WMS( "TIs", | |
| 44 | - "http://mapas.mma.gov.br/i3geo/ogc.php?tema=indi&", | |
| 45 | - {layers: 'indi', transparent:'true','format':'png'} ); | |
| 46 | - | |
| 47 | - map.addLayer(twms); | |
| 48 | - markers = new OpenLayers.Layer.Markers("markers"); | |
| 49 | - map.addLayer(markers); | |
| 50 | - | |
| 51 | - map.setCenter(new OpenLayers.LonLat(-54,-20), 3); | |
| 52 | - map.addControl( new OpenLayers.Control.LayerSwitcher() ); | |
| 53 | - map.addControl( new OpenLayers.Control.PanZoomBar() ); | |
| 54 | - | |
| 55 | - } | |
| 56 | - | |
| 57 | - function add() { | |
| 58 | - | |
| 59 | - var url = 'http://boston.openguides.org/markers/AQUA.png'; | |
| 60 | - var sz = new OpenLayers.Size(10, 17); | |
| 61 | - var calculateOffset = function(size) { | |
| 62 | - return new OpenLayers.Pixel(-(size.w/2), -size.h); | |
| 63 | - }; | |
| 64 | - var icon = new OpenLayers.Icon(url, sz, null, calculateOffset); | |
| 65 | - var barcelona = new OpenLayers.LonLat(2.13134765625, | |
| 66 | - 41.37062534198901); | |
| 67 | - marker = new OpenLayers.Marker(barcelona, icon); | |
| 68 | - markers.addMarker(marker); | |
| 69 | - } | |
| 70 | - | |
| 71 | - function remove() { | |
| 72 | - markers.removeMarker(marker); | |
| 73 | - } | |
| 74 | - | |
| 75 | - // --> | |
| 76 | - | |
| 77 | - </script> | |
| 78 | - </head> | |
| 79 | - <body onload="init()"> | |
| 80 | - <h1>OpenLayers With Google Layer Example</h1> | |
| 81 | - <div id="map"></div> | |
| 82 | - <div style="background-color:green" onclick="add()"> click to add a marker to the map</div> | |
| 83 | - <div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div> | |
| 84 | - </body> | |
| 85 | -</html> |
pacotes/openlayers/examples/gutter.html
| ... | ... | @@ -1,49 +0,0 @@ |
| 1 | -<html> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 500px; | |
| 6 | - height: 300px; | |
| 7 | - border: 1px solid gray; | |
| 8 | - } | |
| 9 | - p.caption { | |
| 10 | - width: 500px; | |
| 11 | - } | |
| 12 | - </style> | |
| 13 | - <script src="../lib/OpenLayers.js"></script> | |
| 14 | - <script type="text/javascript"> | |
| 15 | - <!-- | |
| 16 | - OpenLayers.IMAGE_RELOAD_ATTEMPTS = 2; | |
| 17 | - var map; | |
| 18 | - window.onload = function() { | |
| 19 | - options = {maxExtent: new OpenLayers.Bounds(-73.5295, 41.2318, | |
| 20 | - -69.9097, 42.8883), | |
| 21 | - maxResolution: 0.0003} | |
| 22 | - map = new OpenLayers.Map('map', options); | |
| 23 | - var roads15 = new OpenLayers.Layer.WMS( "Roads (15px gutter)", | |
| 24 | - "http://boston.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/boston/map/gmaps.map&", | |
| 25 | - {layers: 'roads_200_40'}, | |
| 26 | - {gutter: 15}); | |
| 27 | - var roads = new OpenLayers.Layer.WMS( "Roads (no gutter)", | |
| 28 | - "http://boston.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/boston/map/gmaps.map&", | |
| 29 | - {layers: 'roads_200_40'}); | |
| 30 | - map.addLayers([roads, roads15]); | |
| 31 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 32 | - map.setCenter(new OpenLayers.LonLat(-71.848, 42.2), 0); | |
| 33 | - } | |
| 34 | - // --> | |
| 35 | - </script> | |
| 36 | - </head> | |
| 37 | - <body> | |
| 38 | - <h1>OpenLayers Gutter Example</h1> | |
| 39 | - <div id="map"></div> | |
| 40 | - <p class="caption"> | |
| 41 | - When you render tiles with certain types of symbols, there are artifacts | |
| 42 | - at tile edges that make symbology not look continuous. In the center of | |
| 43 | - the above map (when it first loads), the large orange road is split | |
| 44 | - vertically by a tile. Open the layer switcher and change to the layer | |
| 45 | - with a 15 pixel gutter to see how the symbology looks nicer. | |
| 46 | - </p> | |
| 47 | - | |
| 48 | - </body> | |
| 49 | -</html> |
pacotes/openlayers/examples/image-layer.html
| ... | ... | @@ -1,52 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - p { | |
| 5 | - width: 512px; | |
| 6 | - } | |
| 7 | - #map { | |
| 8 | - width: 512px; | |
| 9 | - height: 256px; | |
| 10 | - border: 1px solid gray; | |
| 11 | - } | |
| 12 | - </style> | |
| 13 | - <script src="../lib/OpenLayers.js"></script> | |
| 14 | - <script type="text/javascript"> | |
| 15 | - <!-- | |
| 16 | - var map; | |
| 17 | - function init(){ | |
| 18 | - map = new OpenLayers.Map('map'); | |
| 19 | - | |
| 20 | - var options = {numZoomLevels: 3}; | |
| 21 | - | |
| 22 | - var graphic = new OpenLayers.Layer.Image( | |
| 23 | - 'City Lights', | |
| 24 | - 'http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif', | |
| 25 | - new OpenLayers.Bounds(-180, -88.759, 180, 88.759), | |
| 26 | - new OpenLayers.Size(580, 288), | |
| 27 | - options); | |
| 28 | - | |
| 29 | - var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", | |
| 30 | - "http://wms.jpl.nasa.gov/wms.cgi", | |
| 31 | - {layers: "modis,global_mosaic"}, options); | |
| 32 | - | |
| 33 | - map.addLayers([graphic, jpl_wms]); | |
| 34 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 35 | - map.zoomToMaxExtent(); | |
| 36 | - } | |
| 37 | - // --> | |
| 38 | - </script> | |
| 39 | - </head> | |
| 40 | - <body onload="init()"> | |
| 41 | - <h1>OpenLayers Image Layer Example</h1> | |
| 42 | - <div id="map"></div> | |
| 43 | - <p> | |
| 44 | - The "City Lights" layer above is created from a single web accessible | |
| 45 | - image. If you construct it without any resolution related options, | |
| 46 | - the layer will be given a single resolution based on the extent/size. | |
| 47 | - Otherwise, it behaves much like a regular layer. This is primarily | |
| 48 | - intended to be used in an overview map - where another layer type | |
| 49 | - might not make a good overview. | |
| 50 | - </p> | |
| 51 | - </body> | |
| 52 | -</html> |
pacotes/openlayers/examples/kamap.html
| ... | ... | @@ -1,39 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 800px; | |
| 6 | - height: 475px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - function init(){ | |
| 14 | - var map = new OpenLayers.Map('map'); | |
| 15 | - | |
| 16 | - var ol_wms = new OpenLayers.Layer.WMS( "World Map", | |
| 17 | - "http://labs.metacarta.com/wms/vmap0?", | |
| 18 | - {layers: 'basic'} ); | |
| 19 | - | |
| 20 | - var jpl_wms = new OpenLayers.Layer.KaMap( "Satellite", | |
| 21 | - "http://www.openlayers.org/world/index.php", {g: "satellite", map: "world"}); | |
| 22 | - var dm_wms = new OpenLayers.Layer.WMS( "Canada", | |
| 23 | - "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap", | |
| 24 | - {layers: "bathymetry,land_fn,park,drain_fn,drainage," + | |
| 25 | - "prov_bound,fedlimit,rail,road,popplace", | |
| 26 | - transparent: "true", format: "image/png" }); | |
| 27 | - | |
| 28 | - map.addLayers([ol_wms, jpl_wms, dm_wms]); | |
| 29 | - map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
| 30 | - map.zoomToMaxExtent(); | |
| 31 | - } | |
| 32 | - // --> | |
| 33 | - </script> | |
| 34 | - </head> | |
| 35 | - <body onload="init()"> | |
| 36 | - <h1>OpenLayers Example</h1> | |
| 37 | - <div id="map"></div> | |
| 38 | - </body> | |
| 39 | -</html> |
pacotes/openlayers/examples/kamap.txt
| ... | ... | @@ -1,508 +0,0 @@ |
| 1 | -<?php | |
| 2 | -/* | |
| 3 | - | |
| 4 | -This is a PHP file to be used as a backend for a ka-Map layer. It requires | |
| 5 | -PHP with Mapscript and libgd modules installed. The top of the file | |
| 6 | -is a configuration section: please edit the variables in this configuration | |
| 7 | -section to meet your needs, then rename this file to tile.php or something | |
| 8 | -similar and put it in a web accessible directory. More information | |
| 9 | -on the OpenLayers ka-Map layer is available from: | |
| 10 | - | |
| 11 | - http://trac.openlayers.org/wiki/OpenLayers.Layer.KaMap | |
| 12 | - | |
| 13 | -*/ | |
| 14 | -/********************************************************************** | |
| 15 | - * | |
| 16 | - * $Id: tile.php,v 1.33 2006/02/07 03:19:55 pspencer Exp $ | |
| 17 | - * | |
| 18 | - * purpose: a simple phpmapscript-based tile renderer that implements | |
| 19 | - * rudimentary caching for reasonable efficiency. Note the | |
| 20 | - * cache never shrinks in this version so your disk could | |
| 21 | - * easily fill up! | |
| 22 | - * | |
| 23 | - * author: Paul Spencer (pspencer@dmsolutions.ca) | |
| 24 | - * | |
| 25 | - * modifications by Daniel Morissette (dmorissette@dmsolutions.ca) | |
| 26 | - * | |
| 27 | - * Modified by Christopher Schmidt for OpenLayers redistribution. | |
| 28 | - * | |
| 29 | - ********************************************************************** | |
| 30 | - * | |
| 31 | - * Copyright (c) 2005, DM Solutions Group Inc. | |
| 32 | - * | |
| 33 | - * Permission is hereby granted, free of charge, to any person obtaining a | |
| 34 | - * copy of this software and associated documentation files (the "Software"), | |
| 35 | - * to deal in the Software without restriction, including without limitation | |
| 36 | - * the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| 37 | - * and/or sell copies of the Software, and to permit persons to whom the | |
| 38 | - * Software is furnished to do so, subject to the following conditions: | |
| 39 | - * | |
| 40 | - * The above copyright notice and this permission notice shall be included | |
| 41 | - * in all copies or substantial portions of the Software. | |
| 42 | - * | |
| 43 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 44 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 45 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |
| 46 | - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 47 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 48 | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 49 | - * DEALINGS IN THE SOFTWARE. | |
| 50 | - * | |
| 51 | - **********************************************************************/ | |
| 52 | - | |
| 53 | - | |
| 54 | -/****************************************************************************** | |
| 55 | - * basic system configuration | |
| 56 | - * | |
| 57 | - * kaMap! uses PHP/MapScript and the PHP GD extension to | |
| 58 | - * render tiles, and uses PHP/MapScript to generate initialization parameters | |
| 59 | - * a legend, and a keymap from the selected map file. | |
| 60 | - * | |
| 61 | - * Make sure to set the correct module names for your PHP extensions. | |
| 62 | - * | |
| 63 | - * WINDOWS USERS: you will likely need to use php_gd2.dll instead of php_gd.dll | |
| 64 | - */ | |
| 65 | -$szPHPMapScriptModule = 'php_mapscript.'.PHP_SHLIB_SUFFIX; | |
| 66 | -$szPHPGDModule = 'php_gd.'.PHP_SHLIB_SUFFIX; | |
| 67 | - | |
| 68 | -/****************************************************************************** | |
| 69 | - * tile generation parameters | |
| 70 | - * | |
| 71 | - * kaMap! generates tiles to load in the client application by first rendering | |
| 72 | - * larger areas from the map file and then slicing them up into smaller tiles. | |
| 73 | - * This approach reduces the overhead of loading PHP/MapScript and PHP GD and | |
| 74 | - * drawing the map file. These larger areas are referred to as metaTiles in | |
| 75 | - * the code. You can set the size of both the small tiles and the metaTiles | |
| 76 | - * here. A reasonable size for the small tiles seems to be 200 pixels square. | |
| 77 | - * Smaller tiles seem to cause problems in client browsers by causing too many | |
| 78 | - * images to be created and thus slowing performance of live dragging. Larger | |
| 79 | - * tiles take longer to download to the client and are inefficient. | |
| 80 | - * | |
| 81 | - * The number of smaller tiles that form a metaTile can also be configured. | |
| 82 | - * This parameter allows tuning of the tile generator to ensure optimal | |
| 83 | - * performance and for label placement. MapServer will produce labels only | |
| 84 | - * within a rendered area. If the area is too small then features may be | |
| 85 | - * labelled multiple times. If the area is too large, it may exceed MapServer,s | |
| 86 | - * maximum map size (by default 2000x2000) or be too resource-intensive on the | |
| 87 | - * server, ultimately reducing performance. | |
| 88 | - */ | |
| 89 | -$tileWidth = 256; | |
| 90 | -$tileHeight = 256; | |
| 91 | -$metaWidth = 5; | |
| 92 | -$metaHeight = 5; | |
| 93 | -/* $metaBuffer = Buffer size in pixels to add around metatiles to avoid | |
| 94 | - * rendering issues along the edge of the map image | |
| 95 | - */ | |
| 96 | -$metaBuffer = 10; | |
| 97 | - | |
| 98 | -/****************************************************************************** | |
| 99 | - * in-image debugging information - tile location, outlines etc. | |
| 100 | - * to use this, you need to remove images from your cache first. This also | |
| 101 | - * affects the meta tiles - if debug is on, they are not deleted. | |
| 102 | - */ | |
| 103 | -$bDebug = false; | |
| 104 | - | |
| 105 | -/****************************************************************************** | |
| 106 | - * aszMapFiles - an array of map files available to the application. How this | |
| 107 | - * is used is determined by the application. Each map file is entered into | |
| 108 | - * this array as a key->value pair. | |
| 109 | - * | |
| 110 | - * The key is the name to be used by the tile caching system to store cached | |
| 111 | - * tiles within the base cache directory. This key should be a single word | |
| 112 | - * that uniquely identifies the map. | |
| 113 | - * | |
| 114 | - * The value associated with each key is an array of three values. The first | |
| 115 | - * value is a human-readable name to be presented to the user (should the | |
| 116 | - * application choose to do so) and the second value is the path to the map | |
| 117 | - * file. It is assumed that the map file is fully configured for use with | |
| 118 | - * MapServer/MapScript as no error checking or setting of values is done. The | |
| 119 | - * third value is an array of scale values for zooming. | |
| 120 | - */ | |
| 121 | - | |
| 122 | -$aszMapFiles = array( | |
| 123 | - "world" => array( "World", "/path/to/your/mapfile", | |
| 124 | - array( 10000 ), # in openlayers, the scale array doesn't matter. | |
| 125 | - "PNG24") | |
| 126 | - | |
| 127 | -/* Add more elements to this array to offer multiple mapfiles */ | |
| 128 | - | |
| 129 | -); | |
| 130 | - | |
| 131 | -/****************************************************************************** | |
| 132 | - * figure out which map file to use and set up the necessary variables for | |
| 133 | - * the rest of the code to use. This does need to be done on every page load | |
| 134 | - * unfortunately. | |
| 135 | - * | |
| 136 | - * szMap should be set to the default map file to use but can change if | |
| 137 | - * this script is called with map=<mapname>. | |
| 138 | - */ | |
| 139 | -$szMap = 'world'; | |
| 140 | - | |
| 141 | -/****************************************************************************** | |
| 142 | - * kaMap! caching | |
| 143 | - * | |
| 144 | - * this is the directory within which kaMap! will create its tile cache. The | |
| 145 | - * directory does NOT have to be web-accessible, but it must be writable by the | |
| 146 | - * web-server-user and allow creation of both directories AND files. | |
| 147 | - * | |
| 148 | - * the tile caching system will create a separate subdirectory within the base | |
| 149 | - * cache directory for each map file. Within the cache directory for each map | |
| 150 | - * file, directories will be created for each group of layers. Within the group | |
| 151 | - * directories, directories will be created at each of the configured scales | |
| 152 | - * for the application (see mapfile configuration above.) | |
| 153 | - */ | |
| 154 | -$szBaseCacheDir = "/var/cache/kamap/"; | |
| 155 | - | |
| 156 | -/***** END OF CONFIGURABLE STUFF - unless you know what you are doing *****/ | |
| 157 | -/***** *****/ | |
| 158 | -/***** *****/ | |
| 159 | -/***** *****/ | |
| 160 | -/***** END OF CONFIGURABLE STUFF - unless you know what you are doing *****/ | |
| 161 | - | |
| 162 | -if (isset($_REQUEST['map']) && isset($aszMapFiles[$_REQUEST['map']])) | |
| 163 | -{ | |
| 164 | - $szMap = $_REQUEST['map']; | |
| 165 | -} | |
| 166 | - | |
| 167 | -$szMapCacheDir = $szBaseCacheDir.$szMap."/"; | |
| 168 | -$szMapName = $aszMapFiles[$szMap][0]; | |
| 169 | -$szMapFile = $aszMapFiles[$szMap][1]; | |
| 170 | -$anScales = $aszMapFiles[$szMap][2]; | |
| 171 | -setOutputFormat($aszMapFiles[$szMap][3]); | |
| 172 | -/****************************************************************************** | |
| 173 | - * output format of the map and resulting tiles | |
| 174 | - * | |
| 175 | - * The output format used with MapServer can greatly affect appearance and | |
| 176 | - * performance. It is recommended to use an 8 bit format such as PNG | |
| 177 | - * | |
| 178 | - * NOTE: the tile caching code in tile.php is not configurable here. It | |
| 179 | - * currently assumes that it is outputting 8bit PNG files. If you change to | |
| 180 | - * PNG24 here then you will need to update tile.php to use the gd function | |
| 181 | - * imagecreatetruecolor. If you change the output format to jpeg then | |
| 182 | - * you would need to change imagepng() to imagejpeg(). A nice enhancement | |
| 183 | - * would be to make that fully configurable from here. | |
| 184 | - */ | |
| 185 | -function setOutputFormat($szFormat) | |
| 186 | -{ | |
| 187 | - switch($szFormat) { | |
| 188 | - case "PNG24": | |
| 189 | - $GLOBALS['szMapImageFormat'] = 'PNG24'; //mapscript format name | |
| 190 | - $GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng"; // appropriate GD function | |
| 191 | - $GLOBALS['szImageExtension'] = '.png'; //file extension | |
| 192 | - $GLOBALS['szImageCreateFunction'] = "imagecreatetruecolor"; //or imagecreatetruecolor if PNG24 ... | |
| 193 | - $GLOBALS['szImageOutputFunction'] = "imagepng"; //or imagegif, imagejpeg ... | |
| 194 | - $GLOBALS['szImageHeader'] = 'image/png'; //the content-type of the image | |
| 195 | - break; | |
| 196 | - case "GIF": | |
| 197 | - $GLOBALS['szMapImageFormat'] = 'GIF'; //mapscript format name | |
| 198 | - $GLOBALS['szMapImageCreateFunction'] = "imagecreatefromgif"; // appropriate GD function | |
| 199 | - $GLOBALS['szImageExtension'] = '.gif'; //file extension | |
| 200 | - $GLOBALS['szImageCreateFunction'] = "imagecreate"; //or imagecreatetruecolor if PNG24 ... | |
| 201 | - $GLOBALS['szImageOutputFunction'] = "imagegif"; //or imagegif, imagejpeg ... | |
| 202 | - $GLOBALS['szImageHeader'] = 'image/gif'; //the content-type of the image | |
| 203 | - break; | |
| 204 | - case "JPEG": | |
| 205 | - $GLOBALS['szMapImageFormat'] = 'JPEG'; //mapscript format name | |
| 206 | - $GLOBALS['szMapImageCreateFunction'] = "imagecreatefromjpeg"; // appropriate GD function | |
| 207 | - $GLOBALS['szImageExtension'] = '.jpg'; //file extension | |
| 208 | - $GLOBALS['szImageCreateFunction'] = "imagecreatetruecolor"; //or imagecreatetruecolor if PNG24 ... | |
| 209 | - $GLOBALS['szImageOutputFunction'] = "imagejpeg"; //or imagegif, imagejpeg ... | |
| 210 | - $GLOBALS['szImageHeader'] = 'image/jpeg'; //the content-type of the image | |
| 211 | - break; | |
| 212 | - case "PNG": | |
| 213 | - $GLOBALS['szMapImageFormat'] = 'PNG'; //mapscript format name | |
| 214 | - $GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng"; // appropriate GD function | |
| 215 | - $GLOBALS['szImageExtension'] = '.png'; //file extension | |
| 216 | - $GLOBALS['szImageCreateFunction'] = "imagecreate"; //or imagecreatetruecolor if PNG24 ... | |
| 217 | - $GLOBALS['szImageOutputFunction'] = "imagepng"; //or imagegif, imagejpeg ... | |
| 218 | - $GLOBALS['szImageHeader'] = 'image/png'; //the content-type of the image | |
| 219 | - break; | |
| 220 | - case "DITHERED": | |
| 221 | - case "PNG8": | |
| 222 | - $GLOBALS['szMapImageFormat'] = 'dithered'; | |
| 223 | - $GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng"; | |
| 224 | - $GLOBALS['szImageExtension'] = '.png'; | |
| 225 | - $GLOBALS['szImageCreateFunction'] = "imagecreate"; | |
| 226 | - $GLOBALS['szImageOutputFunction'] = "imagepng"; | |
| 227 | - $GLOBALS['szImageHeader'] = 'image/png'; | |
| 228 | - break; | |
| 229 | - } | |
| 230 | -} | |
| 231 | - | |
| 232 | -/** | |
| 233 | - * create all directories in a directory tree - found on the php web site | |
| 234 | - * under the mkdir function ... | |
| 235 | - */ | |
| 236 | -function makeDirs($strPath, $mode = 0775) | |
| 237 | -{ | |
| 238 | - return is_dir($strPath) or ( makeDirs(dirname($strPath), $mode) and mkdir($strPath, $mode) ); | |
| 239 | -} | |
| 240 | - | |
| 241 | -/** | |
| 242 | - * This function replaces all special characters in the given string. | |
| 243 | - * | |
| 244 | - * @param szString string - The string to convert. | |
| 245 | - * | |
| 246 | - * @return string converted | |
| 247 | - */ | |
| 248 | -function normalizeString($szString) | |
| 249 | -{ | |
| 250 | - // Normalize string by replacing all special characters | |
| 251 | - // e.g. "http://my.host.com/cgi-bin/mywms?" | |
| 252 | - // becomes "http___my_host_com_cgi_bin_mywms_" | |
| 253 | - return preg_replace("/(\W)/", "_", $szString); | |
| 254 | -} | |
| 255 | - | |
| 256 | -/* bug 1253 - root permissions required to delete cached files */ | |
| 257 | -$orig_umask = umask(0); | |
| 258 | - | |
| 259 | -/* create the main cache directory if necessary */ | |
| 260 | -if (!@is_dir($szMapCacheDir)) | |
| 261 | - makeDirs($szMapCacheDir); | |
| 262 | - | |
| 263 | -/* get the various request parameters | |
| 264 | - * also need to make sure inputs are clean, especially those used to | |
| 265 | - * build paths and filenames | |
| 266 | - */ | |
| 267 | - /* | |
| 268 | - * the tile renderer accepts several parameters and returns a tile image from | |
| 269 | - * the cache, creating the tile only if necessary. | |
| 270 | - * | |
| 271 | - * all requests include the pixel location of the request at a certain scale | |
| 272 | - * and this script figures out the geographic location of the tile from the | |
| 273 | - * scale assuming that 0,0 in pixels is 0,0 in geographic units | |
| 274 | - * | |
| 275 | - * Request parameters are: | |
| 276 | - * | |
| 277 | - * map: the name of the map to use. This is handled by config.php. | |
| 278 | - * | |
| 279 | - * t: top pixel position | |
| 280 | - * l: left pixel position | |
| 281 | - * s: scale | |
| 282 | - * g: (optional) comma-delimited list of group names to draw | |
| 283 | - * layers: (optional) comma-delimited list of layers to draw | |
| 284 | - * force: optional. If set, force redraw of the meta tile. This was added to | |
| 285 | - * help with invalid images sometimes being generated. | |
| 286 | - * tileid: (optional) can be used instead of t+l to specify the tile coord., | |
| 287 | - * useful in regenerating the cache | |
| 288 | - */ | |
| 289 | - | |
| 290 | -$top = isset( $_REQUEST['t'] ) ? intval($_REQUEST['t']) : 0; | |
| 291 | -$left = isset( $_REQUEST['l'] ) ? intval($_REQUEST['l']) : 0; | |
| 292 | -$scale = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : $anScales[0]; | |
| 293 | -$bForce = isset($_REQUEST['force'])? true : false; | |
| 294 | -$groups = isset( $_REQUEST['g'] ) ? $_REQUEST['g'] : ""; | |
| 295 | -$layers = isset( $_REQUEST['layers'] ) ? $_REQUEST['layers'] : ""; | |
| 296 | - | |
| 297 | -// dynamic imageformat ---------------------------------------------- | |
| 298 | -//use the function in config.php to set the output format | |
| 299 | -if (isset($_REQUEST['i'])) | |
| 300 | - setOutputFormat( $_REQUEST['i'] ); | |
| 301 | -//---------------------------------------------------------------- | |
| 302 | - | |
| 303 | -/* tileid=t#####l#### can be used instead of t+l parameters. Useful in | |
| 304 | - * regenerating the cache for instance. | |
| 305 | - */ | |
| 306 | -if (isset( $_REQUEST['tileid']) && | |
| 307 | - preg_match("/t(-?\d+)l(-?\d+)/", $_REQUEST['tileid'], $aMatch) ) | |
| 308 | -{ | |
| 309 | - $top = intval($aMatch[1]); | |
| 310 | - $left = intval($aMatch[2]); | |
| 311 | -} | |
| 312 | - | |
| 313 | -/* Calculate the metatile's top-left corner coordinates. | |
| 314 | - * Include the $metaBuffer around the metatile to account for various | |
| 315 | - * rendering issues happening around the edge of a map | |
| 316 | - */ | |
| 317 | -$metaLeft = floor( ($left)/($tileWidth*$metaWidth) ) * $tileWidth * $metaWidth; | |
| 318 | -$metaTop = floor( ($top)/($tileHeight*$metaHeight) ) * $tileHeight *$metaHeight; | |
| 319 | -$szMetaTileId = "t".$metaTop."l".$metaLeft; | |
| 320 | -$metaLeft -= $metaBuffer; | |
| 321 | -$metaTop -= $metaBuffer; | |
| 322 | - | |
| 323 | -/* caching is done by scale value, then groups and layers and finally metatile | |
| 324 | - * and tile id. Create a new directory if necessary | |
| 325 | - */ | |
| 326 | -$szGroupDir = $groups != "" ? normalizeString($groups) : "def"; | |
| 327 | -$szLayerDir = $layers != "" ? normalizeString($layers) : "def"; | |
| 328 | - | |
| 329 | -$szCacheDir = $szMapCacheDir."/".$scale."/".$szGroupDir."/".$szLayerDir."/".$szMetaTileId; | |
| 330 | -if (!@is_dir($szCacheDir)) | |
| 331 | - makeDirs($szCacheDir); | |
| 332 | - | |
| 333 | -/* resolve cache hit - clear the os stat cache if necessary */ | |
| 334 | -$szTileId = "t".$top."l".$left; | |
| 335 | -$szCacheFile = $szCacheDir."/".$szTileId.$szImageExtension; | |
| 336 | -clearstatcache(); | |
| 337 | - | |
| 338 | -$szMetaDir = $szCacheDir."/meta"; | |
| 339 | -if (!@is_Dir($szMetaDir)) | |
| 340 | - makeDirs($szMetaDir); | |
| 341 | - | |
| 342 | -/* simple locking in case there are several requests for the same meta | |
| 343 | - tile at the same time - only draw it once to help with performance */ | |
| 344 | -$szLockFile = $szMetaDir."/lock_".$metaTop."_".$metaLeft; | |
| 345 | -$fpLockFile = fopen($szLockFile, "a+"); | |
| 346 | -clearstatcache(); | |
| 347 | -if (!file_exists($szCacheFile) || $bForce) | |
| 348 | -{ | |
| 349 | - flock($fpLockFile, LOCK_EX); | |
| 350 | - fwrite($fpLockFile, "."); | |
| 351 | - | |
| 352 | - //check once more to see if the cache file was created while waiting for | |
| 353 | - //the lock | |
| 354 | - clearstatcache(); | |
| 355 | - if (!file_exists($szCacheFile) || $bForce) | |
| 356 | - { | |
| 357 | - if (!extension_loaded('MapScript')) | |
| 358 | - { | |
| 359 | - dl( $szPHPMapScriptModule ); | |
| 360 | - } | |
| 361 | - if (!extension_loaded('gd')) | |
| 362 | - { | |
| 363 | - dl( $szPHPGDModule); | |
| 364 | - } | |
| 365 | - | |
| 366 | - if (!@is_Dir($szMetaDir)) | |
| 367 | - makeDirs($szMetaDir); | |
| 368 | - | |
| 369 | - $oMap = ms_newMapObj($szMapFile); | |
| 370 | - | |
| 371 | - /* Metatile width/height include 2x the metaBuffer value */ | |
| 372 | - $oMap->set('width', $tileWidth * $metaWidth + 2*$metaBuffer); | |
| 373 | - $oMap->set('height', $tileHeight * $metaHeight + 2*$metaBuffer); | |
| 374 | - | |
| 375 | - /* Tell MapServer to not render labels inside the metaBuffer area | |
| 376 | - * (new in 4.6) | |
| 377 | - * TODO: Until MapServer bugs 1353/1355 are resolved, we need to | |
| 378 | - * pass a negative value for "labelcache_map_edge_buffer" | |
| 379 | - */ | |
| 380 | - $oMap->setMetadata("labelcache_map_edge_buffer", -$metaBuffer); | |
| 381 | - | |
| 382 | - $inchesPerUnit = array(1, 12, 63360.0, 39.3701, 39370.1, 4374754); | |
| 383 | - $geoWidth = $scale/($oMap->resolution*$inchesPerUnit[$oMap->units]); | |
| 384 | - $geoHeight = $scale/($oMap->resolution*$inchesPerUnit[$oMap->units]); | |
| 385 | - | |
| 386 | - /* draw the metatile */ | |
| 387 | - $minx = $metaLeft * $geoWidth; | |
| 388 | - $maxx = $minx + $geoWidth * $oMap->width; | |
| 389 | - $maxy = -1 * $metaTop * $geoHeight; | |
| 390 | - $miny = $maxy - $geoHeight * $oMap->height; | |
| 391 | - | |
| 392 | - $nLayers = $oMap->numlayers; | |
| 393 | - $oMap->setExtent($minx,$miny,$maxx,$maxy); | |
| 394 | - $oMap->selectOutputFormat( $szMapImageFormat ); | |
| 395 | - $aszLayers = array(); | |
| 396 | - if ($groups || $layers) | |
| 397 | - { | |
| 398 | - /* Draw only specified layers instead of default from mapfile*/ | |
| 399 | - if ($layers) | |
| 400 | - { | |
| 401 | - $aszLayers = explode(",", $layers); | |
| 402 | - } | |
| 403 | - | |
| 404 | - if ($groups) | |
| 405 | - { | |
| 406 | - $aszGroups = explode(",", $groups); | |
| 407 | - } | |
| 408 | - | |
| 409 | - for($i=0;$i<$nLayers;$i++) | |
| 410 | - { | |
| 411 | - $oLayer = $oMap->getLayer($i); | |
| 412 | - if (($aszGroups && in_array($oLayer->group,$aszGroups)) || | |
| 413 | - ($aszLayers && in_array($oLayer->name,$aszLayers)) || | |
| 414 | - ($aszGroups && $oLayer->group == '' && | |
| 415 | - in_array( "__base__", $aszGroups))) | |
| 416 | - { | |
| 417 | - $oLayer->set("status", MS_ON ); | |
| 418 | - } | |
| 419 | - else | |
| 420 | - { | |
| 421 | - $oLayer->set("status", MS_OFF ); | |
| 422 | - } | |
| 423 | - } | |
| 424 | - //need transparency if groups or layers are used | |
| 425 | - $oMap->outputformat->set("transparent", MS_ON ); | |
| 426 | - } | |
| 427 | - else | |
| 428 | - { | |
| 429 | - $oMap->outputformat->set("transparent", MS_OFF ); | |
| 430 | - } | |
| 431 | - | |
| 432 | - | |
| 433 | - $szMetaImg = $szMetaDir."/t".$metaTop."l".$metaLeft.$szImageExtension; | |
| 434 | - $oImg = $oMap->draw(); | |
| 435 | - $oImg->saveImage($szMetaImg); | |
| 436 | - $oImg->free(); | |
| 437 | - eval("\$oGDImg = ".$szMapImageCreateFunction."('".$szMetaImg."');"); | |
| 438 | - if ($bDebug) | |
| 439 | - { | |
| 440 | - $blue = imagecolorallocate($oGDImg, 0, 0, 255); | |
| 441 | - imagerectangle($oGDImg, 0, 0, $tileWidth * $metaWidth - 1, $tileHeight * $metaHeight - 1, $blue ); | |
| 442 | - } | |
| 443 | - for($i=0;$i<$metaWidth;$i++) | |
| 444 | - { | |
| 445 | - for ($j=0;$j<$metaHeight;$j++) | |
| 446 | - { | |
| 447 | - eval("\$oTile = ".$szImageCreateFunction."( ".$tileWidth.",".$tileHeight." );"); | |
| 448 | - // Allocate BG color for the tile (in case the metatile has transparent BG) | |
| 449 | - $nTransparent = imagecolorallocate($oTile, $oMap->imagecolor->red, $oMap->imagecolor->green, $oMap->imagecolor->blue); | |
| 450 | - //if ($oMap->outputformat->transparent == MS_ON) | |
| 451 | - //{ | |
| 452 | - imagecolortransparent( $oTile,$nTransparent); | |
| 453 | - //} | |
| 454 | - $tileTop = $j*$tileHeight + $metaBuffer; | |
| 455 | - $tileLeft = $i*$tileWidth + $metaBuffer; | |
| 456 | - imagecopy( $oTile, $oGDImg, 0, 0, $tileLeft, $tileTop, $tileWidth, $tileHeight ); | |
| 457 | - /* debugging stuff */ | |
| 458 | - if ($bDebug) | |
| 459 | - { | |
| 460 | - $black = imagecolorallocate($oTile, 1, 1, 1); | |
| 461 | - $green = imagecolorallocate($oTile, 0, 128, 0 ); | |
| 462 | - $red = imagecolorallocate($oTile, 255, 0, 0); | |
| 463 | - imagerectangle( $oTile, 1, 1, $tileWidth-2, $tileHeight-2, $green ); | |
| 464 | - imageline( $oTile, 0, $tileHeight/2, $tileWidth-1, $tileHeight/2, $red); | |
| 465 | - imageline( $oTile, $tileWidth/2, 0, $tileWidth/2, $tileHeight-1, $red); | |
| 466 | - imagestring ( $oTile, 3, 10, 10, ($metaLeft+$tileLeft)." x ".($metaTop+$tileTop), $black ); | |
| 467 | - imagestring ( $oTile, 3, 10, 30, ($minx+$i*$geoWidth)." x ".($maxy - $j*$geoHeight), $black ); | |
| 468 | - } | |
| 469 | - $szTileImg = $szCacheDir."/t".($metaTop+$tileTop)."l".($metaLeft+$tileLeft).$szImageExtension; | |
| 470 | - eval("$szImageOutputFunction( \$oTile, '".$szTileImg."' );"); | |
| 471 | - imagedestroy($oTile); | |
| 472 | - $oTile = null; | |
| 473 | - } | |
| 474 | - } | |
| 475 | - if ($oGDImg != null) | |
| 476 | - { | |
| 477 | - imagedestroy($oGDImg); | |
| 478 | - $oGDImg = null; | |
| 479 | - } | |
| 480 | - if (!$bDebug) | |
| 481 | - { | |
| 482 | - unlink( $szMetaImg ); | |
| 483 | - } | |
| 484 | - } | |
| 485 | - //release the exclusive lock | |
| 486 | - flock($fpLockFile, LOCK_UN ); | |
| 487 | -} | |
| 488 | - | |
| 489 | -//acquire shared lock for reading to prevent a problem that could occur | |
| 490 | -//if a tile exists but is only partially generated. | |
| 491 | -flock($fpLockFile, LOCK_SH); | |
| 492 | - | |
| 493 | -$h = fopen($szCacheFile, "r"); | |
| 494 | -header("Content-Type: ".$szImageHeader); | |
| 495 | -header("Content-Length: " . filesize($szCacheFile)); | |
| 496 | -header("Expires: " . date( "D, d M Y H:i:s GMT", time() + 31536000 )); | |
| 497 | -header("Cache-Control: max-age=31536000, must-revalidate" ); | |
| 498 | -fpassthru($h); | |
| 499 | -fclose($h); | |
| 500 | - | |
| 501 | -//release lock | |
| 502 | -fclose($fpLockFile); | |
| 503 | - | |
| 504 | -/* bug 1253 - root permissions required to delete cached files */ | |
| 505 | -umask($orig_umask); | |
| 506 | - | |
| 507 | -exit; | |
| 508 | -?> |
pacotes/openlayers/examples/kml-layer-linestring.html
| ... | ... | @@ -1,32 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 800px; | |
| 6 | - height: 475px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - var lon = 5; | |
| 14 | - var lat = 40; | |
| 15 | - var zoom = 5; | |
| 16 | - var map, layer; | |
| 17 | - | |
| 18 | - function init(){ | |
| 19 | - map = new OpenLayers.Map( $('map') ); | |
| 20 | - layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 21 | - "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); | |
| 22 | - map.addLayer(layer); | |
| 23 | - map.addLayer(new OpenLayers.Layer.GML("KML", "kml/lines.kml", {format: OpenLayers.Format.KML})); | |
| 24 | - map.zoomToExtent(new OpenLayers.Bounds(-112.292744,36.068477,-112.22408,36.109246)); | |
| 25 | - } | |
| 26 | - // --> | |
| 27 | - </script> | |
| 28 | - </head> | |
| 29 | - <body onload="init()"> | |
| 30 | - <div id="map"></div> | |
| 31 | - </body> | |
| 32 | -</html> |
pacotes/openlayers/examples/kml-layer.html
| ... | ... | @@ -1,32 +0,0 @@ |
| 1 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 2 | - <head> | |
| 3 | - <style type="text/css"> | |
| 4 | - #map { | |
| 5 | - width: 800px; | |
| 6 | - height: 475px; | |
| 7 | - border: 1px solid black; | |
| 8 | - } | |
| 9 | - </style> | |
| 10 | - <script src="../lib/OpenLayers.js"></script> | |
| 11 | - <script type="text/javascript"> | |
| 12 | - <!-- | |
| 13 | - var lon = 5; | |
| 14 | - var lat = 40; | |
| 15 | - var zoom = 5; | |
| 16 | - var map, layer; | |
| 17 | - | |
| 18 | - function init(){ | |
| 19 | - map = new OpenLayers.Map( $('map') ); | |
| 20 | - layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", | |
| 21 | - "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); | |
| 22 | - map.addLayer(layer); | |
| 23 | - map.addLayer(new OpenLayers.Layer.GML("KML", "kml/mc-search.kml", {format: OpenLayers.Format.KML})); | |
| 24 | - map.zoomToMaxExtent(); | |
| 25 | - } | |
| 26 | - // --> | |
| 27 | - </script> | |
| 28 | - </head> | |
| 29 | - <body onload="init()"> | |
| 30 | - <div id="map"></div> | |
| 31 | - </body> | |
| 32 | -</html> |
pacotes/openlayers/examples/kml/lines.kml
| ... | ... | @@ -1,267 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<kml xmlns="http://earth.google.com/kml/2.0"> | |
| 3 | - <Document> | |
| 4 | - <name>KML Samples</name> | |
| 5 | - <open>1</open> | |
| 6 | - <description>Unleash your creativity with the help of these examples!</description> | |
| 7 | - <Style id="downArrowIcon"> | |
| 8 | - <IconStyle> | |
| 9 | - <Icon> | |
| 10 | - <href>http://maps.google.com/mapfiles/kml/pal4/icon28.png</href> | |
| 11 | - </Icon> | |
| 12 | - </IconStyle> | |
| 13 | - </Style> | |
| 14 | - <Style id="globeIcon"> | |
| 15 | - <IconStyle> | |
| 16 | - <Icon> | |
| 17 | - <href>http://maps.google.com/mapfiles/kml/pal3/icon19.png</href> | |
| 18 | - </Icon> | |
| 19 | - </IconStyle> | |
| 20 | - <LineStyle> | |
| 21 | - <width>2</width> | |
| 22 | - </LineStyle> | |
| 23 | - </Style> | |
| 24 | - <Style id="transPurpleLineGreenPoly"> | |
| 25 | - <LineStyle> | |
| 26 | - <color>7fff00ff</color> | |
| 27 | - <width>4</width> | |
| 28 | - </LineStyle> | |
| 29 | - <PolyStyle> | |
| 30 | - <color>7f00ff00</color> | |
| 31 | - </PolyStyle> | |
| 32 | - </Style> | |
| 33 | - <Style id="yellowLineGreenPoly"> | |
| 34 | - <LineStyle> | |
| 35 | - <color>7f00ffff</color> | |
| 36 | - <width>4</width> | |
| 37 | - </LineStyle> | |
| 38 | - <PolyStyle> | |
| 39 | - <color>7f00ff00</color> | |
| 40 | - </PolyStyle> | |
| 41 | - </Style> | |
| 42 | - <Style id="thickBlackLine"> | |
| 43 | - <LineStyle> | |
| 44 | - <color>87000000</color> | |
| 45 | - <width>10</width> | |
| 46 | - </LineStyle> | |
| 47 | - </Style> | |
| 48 | - <Style id="redLineBluePoly"> | |
| 49 | - <LineStyle> | |
| 50 | - <color>ff0000ff</color> | |
| 51 | - </LineStyle> | |
| 52 | - <PolyStyle> | |
| 53 | - <color>ffff0000</color> | |
| 54 | - </PolyStyle> | |
| 55 | - </Style> | |
| 56 | - <Style id="blueLineRedPoly"> | |
| 57 | - <LineStyle> | |
| 58 | - <color>ffff0000</color> | |
| 59 | - </LineStyle> | |
| 60 | - <PolyStyle> | |
| 61 | - <color>ff0000ff</color> | |
| 62 | - </PolyStyle> | |
| 63 | - </Style> | |
| 64 | - <Style id="transRedPoly"> | |
| 65 | - <LineStyle> | |
| 66 | - <width>1.5</width> | |
| 67 | - </LineStyle> | |
| 68 | - <PolyStyle> | |
| 69 | - <color>7d0000ff</color> | |
| 70 | - </PolyStyle> | |
| 71 | - </Style> | |
| 72 | - <Style id="transBluePoly"> | |
| 73 | - <LineStyle> | |
| 74 | - <width>1.5</width> | |
| 75 | - </LineStyle> | |
| 76 | - <PolyStyle> | |
| 77 | - <color>7dff0000</color> | |
| 78 | - </PolyStyle> | |
| 79 | - </Style> | |
| 80 | - <Style id="transGreenPoly"> | |
| 81 | - <LineStyle> | |
| 82 | - <width>1.5</width> | |
| 83 | - </LineStyle> | |
| 84 | - <PolyStyle> | |
| 85 | - <color>7d00ff00</color> | |
| 86 | - </PolyStyle> | |
| 87 | - </Style> | |
| 88 | - <Style id="transYellowPoly"> | |
| 89 | - <LineStyle> | |
| 90 | - <width>1.5</width> | |
| 91 | - </LineStyle> | |
| 92 | - <PolyStyle> | |
| 93 | - <color>7d00ffff</color> | |
| 94 | - </PolyStyle> | |
| 95 | - </Style> | |
| 96 | - <Style id="noDrivingDirections"> | |
| 97 | - <BalloonStyle> | |
| 98 | - <text><![CDATA[ | |
| 99 | - <b>$[name]</b> | |
| 100 | - <br /><br /> | |
| 101 | - $[description] | |
| 102 | - ]]></text> | |
| 103 | - </BalloonStyle> | |
| 104 | - </Style> | |
| 105 | - <Folder> | |
| 106 | - <name>Paths</name> | |
| 107 | - <visibility>0</visibility> | |
| 108 | - <description>Examples of paths. Note that the tessellate tag is by default | |
| 109 | - set to 0. If you want to create tessellated lines, they must be authored | |
| 110 | - (or edited) directly in KML.</description> | |
| 111 | - <Placemark> | |
| 112 | - <name>Tessellated</name> | |
| 113 | - <visibility>0</visibility> | |
| 114 | - <description><![CDATA[If the <tessellate> tag has a value of 1, the line will contour to the underlying terrain]]></description> | |
| 115 | - <LookAt> | |
| 116 | - <longitude>-112.0822680013139</longitude> | |
| 117 | - <latitude>36.09825589333556</latitude> | |
| 118 | - <altitude>0</altitude> | |
| 119 | - <range>2889.145007690472</range> | |
| 120 | - <tilt>62.04855796276328</tilt> | |
| 121 | - <heading>103.8120432044965</heading> | |
| 122 | - </LookAt> | |
| 123 | - <LineString> | |
| 124 | - <tessellate>1</tessellate> | |
| 125 | - <coordinates> -112.0814237830345,36.10677870477137,0 | |
| 126 | - -112.0870267752693,36.0905099328766,0 </coordinates> | |
| 127 | - </LineString> | |
| 128 | - </Placemark> | |
| 129 | - <Placemark> | |
| 130 | - <name>Untessellated</name> | |
| 131 | - <visibility>0</visibility> | |
| 132 | - <description><![CDATA[If the <tessellate> tag has a value of 0, the line follow a simple straight-line path from point to point]]></description> | |
| 133 | - <LookAt> | |
| 134 | - <longitude>-112.0822680013139</longitude> | |
| 135 | - <latitude>36.09825589333556</latitude> | |
| 136 | - <altitude>0</altitude> | |
| 137 | - <range>2889.145007690472</range> | |
| 138 | - <tilt>62.04855796276328</tilt> | |
| 139 | - <heading>103.8120432044965</heading> | |
| 140 | - </LookAt> | |
| 141 | - <LineString> | |
| 142 | - <tessellate>0</tessellate> | |
| 143 | - <coordinates> -112.080622229595,36.10673460007995,0 | |
| 144 | - -112.085242575315,36.09049598612422,0 </coordinates> | |
| 145 | - </LineString> | |
| 146 | - </Placemark> | |
| 147 | - <Placemark> | |
| 148 | - <name>Absolute</name> | |
| 149 | - <visibility>0</visibility> | |
| 150 | - <description>Transparent purple line</description> | |
| 151 | - <LookAt> | |
| 152 | - <longitude>-112.2719329043177</longitude> | |
| 153 | - <latitude>36.08890633450894</latitude> | |
| 154 | - <altitude>0</altitude> | |
| 155 | - <range>2569.386744398339</range> | |
| 156 | - <tilt>44.60763714063257</tilt> | |
| 157 | - <heading>-106.8161545998597</heading> | |
| 158 | - </LookAt> | |
| 159 | - <styleUrl>#transPurpleLineGreenPoly</styleUrl> | |
| 160 | - <LineString> | |
| 161 | - <tessellate>1</tessellate> | |
| 162 | - <altitudeMode>absolute</altitudeMode> | |
| 163 | - <coordinates> -112.265654928602,36.09447672602546,2357 | |
| 164 | - -112.2660384528238,36.09342608838671,2357 | |
| 165 | - -112.2668139013453,36.09251058776881,2357 | |
| 166 | - -112.2677826834445,36.09189827357996,2357 | |
| 167 | - -112.2688557510952,36.0913137941187,2357 | |
| 168 | - -112.2694810717219,36.0903677207521,2357 | |
| 169 | - -112.2695268555611,36.08932171487285,2357 | |
| 170 | - -112.2690144567276,36.08850916060472,2357 | |
| 171 | - -112.2681528815339,36.08753813597956,2357 | |
| 172 | - -112.2670588176031,36.08682685262568,2357 | |
| 173 | - -112.2657374587321,36.08646312301303,2357 </coordinates> | |
| 174 | - </LineString> | |
| 175 | - </Placemark> | |
| 176 | - <Placemark> | |
| 177 | - <name>Absolute Extruded</name> | |
| 178 | - <visibility>0</visibility> | |
| 179 | - <description>Transparent green wall with yellow outlines</description> | |
| 180 | - <LookAt> | |
| 181 | - <longitude>-112.2643334742529</longitude> | |
| 182 | - <latitude>36.08563154742419</latitude> | |
| 183 | - <altitude>0</altitude> | |
| 184 | - <range>4451.842204068102</range> | |
| 185 | - <tilt>44.61038665812578</tilt> | |
| 186 | - <heading>-125.7518698668815</heading> | |
| 187 | - </LookAt> | |
| 188 | - <styleUrl>#yellowLineGreenPoly</styleUrl> | |
| 189 | - <LineString> | |
| 190 | - <extrude>1</extrude> | |
| 191 | - <tessellate>1</tessellate> | |
| 192 | - <altitudeMode>absolute</altitudeMode> | |
| 193 | - <coordinates> -112.2550785337791,36.07954952145647,2357 | |
| 194 | - -112.2549277039738,36.08117083492122,2357 | |
| 195 | - -112.2552505069063,36.08260761307279,2357 | |
| 196 | - -112.2564540158376,36.08395660588506,2357 | |
| 197 | - -112.2580238976449,36.08511401044813,2357 | |
| 198 | - -112.2595218489022,36.08584355239394,2357 | |
| 199 | - -112.2608216347552,36.08612634548589,2357 | |
| 200 | - -112.262073428656,36.08626019085147,2357 | |
| 201 | - -112.2633204928495,36.08621519860091,2357 | |
| 202 | - -112.2644963846444,36.08627897945274,2357 | |
| 203 | - -112.2656969554589,36.08649599090644,2357 </coordinates> | |
| 204 | - </LineString> | |
| 205 | - </Placemark> | |
| 206 | - <Placemark> | |
| 207 | - <name>Relative</name> | |
| 208 | - <visibility>0</visibility> | |
| 209 | - <description>Black line (10 pixels wide), height tracks terrain</description> | |
| 210 | - <LookAt> | |
| 211 | - <longitude>-112.2580438551384</longitude> | |
| 212 | - <latitude>36.1072674824385</latitude> | |
| 213 | - <altitude>0</altitude> | |
| 214 | - <range>2927.61105910266</range> | |
| 215 | - <tilt>44.61324882043339</tilt> | |
| 216 | - <heading>4.947421249553717</heading> | |
| 217 | - </LookAt> | |
| 218 | - <styleUrl>#thickBlackLine</styleUrl> | |
| 219 | - <LineString> | |
| 220 | - <tessellate>1</tessellate> | |
| 221 | - <altitudeMode>relativeToGround</altitudeMode> | |
| 222 | - <coordinates> -112.2532845153347,36.09886943729116,645 | |
| 223 | - -112.2540466121145,36.09919570465255,645 | |
| 224 | - -112.254734666947,36.09984998366178,645 | |
| 225 | - -112.255493345654,36.10051310621746,645 | |
| 226 | - -112.2563157098468,36.10108441943419,645 | |
| 227 | - -112.2568033076439,36.10159722088088,645 | |
| 228 | - -112.257494011321,36.10204323542867,645 | |
| 229 | - -112.2584106072308,36.10229131995655,645 | |
| 230 | - -112.2596588987972,36.10240001286358,645 | |
| 231 | - -112.2610581199487,36.10213176873407,645 | |
| 232 | - -112.2626285262793,36.10157011437219,645 </coordinates> | |
| 233 | - </LineString> | |
| 234 | - </Placemark> | |
| 235 | - <Placemark> | |
| 236 | - <name>Relative Extruded</name> | |
| 237 | - <visibility>0</visibility> | |
| 238 | - <description>Opaque blue walls with red outline, height tracks terrain</description> | |
| 239 | - <LookAt> | |
| 240 | - <longitude>-112.2683594333433</longitude> | |
| 241 | - <latitude>36.09884362144909</latitude> | |
| 242 | - <altitude>0</altitude> | |
| 243 | - <range>2184.193522571467</range> | |
| 244 | - <tilt>44.60855445139561</tilt> | |
| 245 | - <heading>-72.24271551768405</heading> | |
| 246 | - </LookAt> | |
| 247 | - <styleUrl>#redLineBluePoly</styleUrl> | |
| 248 | - <LineString> | |
| 249 | - <extrude>1</extrude> | |
| 250 | - <tessellate>1</tessellate> | |
| 251 | - <altitudeMode>relativeToGround</altitudeMode> | |
| 252 | - <coordinates> -112.2656634181359,36.09445214722695,630 | |
| 253 | - -112.2652238941097,36.09520916122063,630 | |
| 254 | - -112.2645079986395,36.09580763864907,630 | |
| 255 | - -112.2638827428817,36.09628572284063,630 | |
| 256 | - -112.2635746835406,36.09679275951239,630 | |
| 257 | - -112.2635711822407,36.09740038871899,630 | |
| 258 | - -112.2640296531825,36.09804913435539,630 | |
| 259 | - -112.264327720538,36.09880337400301,630 | |
| 260 | - -112.2642436562271,36.09963644790288,630 | |
| 261 | - -112.2639148687042,36.10055381117246,630 | |
| 262 | - -112.2626894973474,36.10149062823369,630 </coordinates> | |
| 263 | - </LineString> | |
| 264 | - </Placemark> | |
| 265 | - </Folder> | |
| 266 | - </Document> | |
| 267 | -</kml> |
pacotes/openlayers/examples/kml/mc-search.kml
| ... | ... | @@ -1,332 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="iso-8859-1"?> | |
| 2 | -<kml xmlns="http://earth.google.com/kml/2.0"> | |
| 3 | -<Document> | |
| 4 | - <!--MetaCarta GTS v3.7.0, KML Search API v1.0.0--> | |
| 5 | - <name><![CDATA[MetaCarta: ]]></name> | |
| 6 | - <description><![CDATA[Labeling <b>28</b> locations. Of 27,281,538 total documents, <b>~26,900,000</b> documents match <i><no keywords></i> in this region.]]></description> | |
| 7 | - <visibility>1</visibility> | |
| 8 | -<LookAt> | |
| 9 | - <longitude>-82.575000</longitude> | |
| 10 | - <latitude>27.498610</latitude> | |
| 11 | - <range>6000000.0</range> | |
| 12 | - <tilt>0.0</tilt> | |
| 13 | - <heading>0.0</heading> | |
| 14 | -</LookAt> | |
| 15 | - <Style id="rel1.0"> | |
| 16 | - <IconStyle> | |
| 17 | - <Icon> | |
| 18 | - <href>http://developers.metacarta.com/img/symbols/mc1.0.png</href> | |
| 19 | - </Icon> | |
| 20 | - </IconStyle> | |
| 21 | - </Style> | |
| 22 | - <Style id="rel0.9"> | |
| 23 | - <IconStyle> | |
| 24 | - <Icon> | |
| 25 | - <href>http://developers.metacarta.com/img/symbols/mc0.9.png</href> | |
| 26 | - </Icon> | |
| 27 | - </IconStyle> | |
| 28 | - </Style> | |
| 29 | - <Style id="rel0.8"> | |
| 30 | - <IconStyle> | |
| 31 | - <Icon> | |
| 32 | - <href>http://developers.metacarta.com/img/symbols/mc0.8.png</href> | |
| 33 | - </Icon> | |
| 34 | - </IconStyle> | |
| 35 | - </Style> | |
| 36 | - <Style id="rel0.7"> | |
| 37 | - <IconStyle> | |
| 38 | - <Icon> | |
| 39 | - <href>http://developers.metacarta.com/img/symbols/mc0.7.png</href> | |
| 40 | - </Icon> | |
| 41 | - </IconStyle> | |
| 42 | - </Style> | |
| 43 | - <Style id="rel0.6"> | |
| 44 | - <IconStyle> | |
| 45 | - <Icon> | |
| 46 | - <href>http://developers.metacarta.com/img/symbols/mc0.6.png</href> | |
| 47 | - </Icon> | |
| 48 | - </IconStyle> | |
| 49 | - </Style> | |
| 50 | - <Style id="rel0.5"> | |
| 51 | - <IconStyle> | |
| 52 | - <Icon> | |
| 53 | - <href>http://developers.metacarta.com/img/symbols/mc0.5.png</href> | |
| 54 | - </Icon> | |
| 55 | - </IconStyle> | |
| 56 | - </Style> | |
| 57 | - <Style id="rel0.4"> | |
| 58 | - <IconStyle> | |
| 59 | - <Icon> | |
| 60 | - <href>http://developers.metacarta.com/img/symbols/mc0.4.png</href> | |
| 61 | - </Icon> | |
| 62 | - </IconStyle> | |
| 63 | - </Style> | |
| 64 | - <Style id="rel0.3"> | |
| 65 | - <IconStyle> | |
| 66 | - <Icon> | |
| 67 | - <href>http://developers.metacarta.com/img/symbols/mc0.3.png</href> | |
| 68 | - </Icon> | |
| 69 | - </IconStyle> | |
| 70 | - </Style> | |
| 71 | - <Style id="rel0.2"> | |
| 72 | - <IconStyle> | |
| 73 | - <Icon> | |
| 74 | - <href>http://developers.metacarta.com/img/symbols/mc0.2.png</href> | |
| 75 | - </Icon> | |
| 76 | - </IconStyle> | |
| 77 | - </Style> | |
| 78 | - <Style id="rel0.1"> | |
| 79 | - <IconStyle> | |
| 80 | - <Icon> | |
| 81 | - <href>http://developers.metacarta.com/img/symbols/mc0.1.png</href> | |
| 82 | - </Icon> | |
| 83 | - </IconStyle> | |
| 84 | - </Style> | |
| 85 | - <Style id="rel0.0"> | |
| 86 | - <IconStyle> | |
| 87 | - <Icon> | |
| 88 | - <href>http://developers.metacarta.com/img/symbols/mc0.0.png</href> | |
| 89 | - </Icon> | |
| 90 | - </IconStyle> | |
| 91 | - </Style> | |
| 92 | - | |
| 93 | -<Placemark> | |
| 94 | -<!-- OGM5MmVhYTI3MTRkNzY2NDQ5YzgzMjBkYzQ3M2Q1YzYsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzBfMTE2MzYyMjk0MV8xMTcyNjg1ODk5XzAwOjE4OjhiOjM4OjM2OjQ3LDE2NjI2ODQ=, 0.959452 --> | |
| 95 | -<name><![CDATA[Bradenton]]></name> | |
| 96 | -<description><![CDATA[<a href="http://www.fhp.state.fl.us/html/TroopF/Bradenton.html">FHP: Troop F Bradenton District</a><br>FHP: Troop F <font color="red">Bradenton</font> District Bradento<br>FHP: Troop F Bradenton District Bradenton District The Bradenton District is located at Troop F Headquarters and includes all of Manatee County. The Bradenton District ...<br><br>]]></description> | |
| 97 | -<styleUrl>#rel1.0</styleUrl> | |
| 98 | -<Point> | |
| 99 | - <coordinates>-82.575000, 27.498610</coordinates> | |
| 100 | -</Point> | |
| 101 | -</Placemark><Placemark> | |
| 102 | -<!-- N2M0OTk4NzMxMWFjOGQ1MzgwY2NmNzBlOWIzODg3OGYsdW1icm86MTYxMzlfMTE2OTg0MDM4MV8xMTY5ODQ1MDQ5XzAwOjE4OjhiOjNhOjcwOmZkLDE4NTQzNw==, 0.959452 --> | |
| 103 | -<name><![CDATA[Pezinok]]></name> | |
| 104 | -<description><![CDATA[<a href="http://en.wikipedia.org/wiki/Pezinok"> Pezinok</a><br><font color="red">Pezinok</font> Coor titl<br>Pezinok Coor title dm4616N1716Etype:cityregion:SK Infobox Slovak town image_coat_of_arms subject_name Pezinok slovak_region Bratislava Region slovak_district ...<br><br>]]></description> | |
| 105 | -<styleUrl>#rel1.0</styleUrl> | |
| 106 | -<Point> | |
| 107 | - <coordinates>17.266666, 48.283333</coordinates> | |
| 108 | -</Point> | |
| 109 | -</Placemark><Placemark> | |
| 110 | -<!-- MzE1OWQ0MTUwNTUzOGQxODBiNGYwZjU3MThmYzMwY2IsanVsaWEubWV0YWNhcnRhLmNvbToxNjAzNl8xMTYzNjM0MjI4XzExNjU5Nzk3MTVfMDA6MTg6OGI6MzU6MDA6ZGMsNzQ3MzQ2, 0.959452 --> | |
| 111 | -<name><![CDATA[Purcellville]]></name> | |
| 112 | -<description><![CDATA[<a href="http://www.loudoun.gov:80/compplan/purcellville.htm">Purcellville Urban Growth Area Management Plan</a><br><font color="red">Purcellville</font> Urban Growth Are<br>Purcellville Urban Growth Area Management Plan Skip Navigation Purcellville Urban Growth Area Management Plan Welcome to the Purcellville Urban Growth Area Management ...<br><br>]]></description> | |
| 113 | -<styleUrl>#rel1.0</styleUrl> | |
| 114 | -<Point> | |
| 115 | - <coordinates>-77.715000, 39.136670</coordinates> | |
| 116 | -</Point> | |
| 117 | -</Placemark><Placemark> | |
| 118 | -<!-- N2UxY2EwYzY0YzBhMTAzNTg1NWFkY2YzZWU2NjdhZWIsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSw5MzY1NDI=, 0.958984 --> | |
| 119 | -<name><![CDATA[Calaveras County]]></name> | |
| 120 | -<description><![CDATA[<a href="http://www.co.calaveras.ca.us:80/departments/pub_health/PHD_WNV.html">Calaveras County Public Health</a><br><font color="red">Calaveras County</font> Public Healt<br>Calaveras County Public Health County of Calaveras Public Health Department West Nile Virus (WNV) WNV is a disease that is spread to ...<br><br>]]></description> | |
| 121 | -<styleUrl>#rel1.0</styleUrl> | |
| 122 | -<Point> | |
| 123 | - <coordinates>-120.583330, 38.166670</coordinates> | |
| 124 | -</Point> | |
| 125 | -</Placemark><Placemark> | |
| 126 | -<!-- ZWFhZDJkYTk0MmNlMWU4Yzc1OWViODIyYzU5ZGE4ZDcsdW1icm86MTYxNDFfMTE2OTg0ODM4M18xMTY5ODUxMDgxXzAwOjE4OjhiOjNhOjcwOmZkLDUxNTIw, 0.958964 --> | |
| 127 | -<name><![CDATA[Kolkata]]></name> | |
| 128 | -<description><![CDATA[<a href="http://en.wikipedia.org/wiki/Kolkata_Film_Festival"> Kolkata Film Festival</a><br><font color="red">Kolkata</font> Film Festiva<br>Kolkata Film Festival '''Kolkata Film Festival''' is an annual international film festival held in Kolkata in the Indian state of West Bengal ...<br><br>]]></description> | |
| 129 | -<styleUrl>#rel1.0</styleUrl> | |
| 130 | -<Point> | |
| 131 | - <coordinates>88.369722, 22.569722</coordinates> | |
| 132 | -</Point> | |
| 133 | -</Placemark><Placemark> | |
| 134 | -<!-- ZDhiYjJhNTZlNmM1ZGU4YjAzOWZiNTc5NzAxM2RlNWYsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzJfMTE2MzY4NTU2MV8xMTcyNjg1OTAyXzAwOjE4OjhiOjM4OjM2OjQ3LDk2NTMxOA==, 0.958964 | |
| 135 | -ZDEwNjIwYTdjMjc2MmM4MDQ3NWNjYTY0ZWVjZDI4MjAsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzBfMTE2MzYyMjk0MV8xMTcyNjg1ODk5XzAwOjE4OjhiOjM4OjM2OjQ3LDMwNTU0OQ==, 0.958475 | |
| 136 | -YmVjMjRjZTYxZDJhYjMyYTE3MjY0YzNkNTg4ODMyYzIsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAwXzExNjM2MzI4MDhfMTE2NzM0NjY3Ml8wMDoxODo4YjozODozNjo3OSw4ODg2Mw==, 0.958475 --> | |
| 137 | -<name><![CDATA[South Yorkshire]]></name> | |
| 138 | -<description><![CDATA[<a href="http://www.southyorkshire.nhs.uk:80/strategy/index.htm">South Yorkshire Strategic Health Authority - Events - Deliver...</a><br><font color="red">South Yorkshire</font> Strategic Healt<br>South Yorkshire Strategic Health Authority - Events - Delivering Excellence event 12th June 2003 Welcome What's new Local services Performance --> Strategy Service redesign ...<br><br><a href="http://www.southyorkshire.nhs.uk:80/">South Yorkshire Strategic Health Authority - Welcome</a><br><font color="red">South Yorkshire</font> Strategic Healt<br>South Yorkshire Strategic Health Authority - Welcome --> Welcome What's new Local services Performance --> Strategy Service redesign Franchise plan Local delivery plan Structure ...<br><br><a href="http://www.southyorkshire.nhs.uk:80/index.html">South Yorkshire Strategic Health Authority - Welcome</a><br><font color="red">South Yorkshire</font> Strategic Healt<br>South Yorkshire Strategic Health Authority - Welcome --> Welcome What's new Local services Performance --> Strategy Service redesign Franchise plan Local delivery plan Structure ...<br><br>]]></description> | |
| 139 | -<styleUrl>#rel1.0</styleUrl> | |
| 140 | -<Point> | |
| 141 | - <coordinates>-1.250000, 53.450000</coordinates> | |
| 142 | -</Point> | |
| 143 | -</Placemark><Placemark> | |
| 144 | -<!-- MWE4NWQ2N2U4ZmI3MDk5MjNiNmJlYzE4NzMxOTdhOTIsanVsaWEubWV0YWNhcnRhLmNvbToxNjUyNF8xMTY5ODQzMzQ1XzExNjk4NDg2OTRfMDA6MTg6OGI6MzU6MDA6ZGMsNTI1OTcx, 0.958964 | |
| 145 | -ZDZjY2I2Mjk2OTNmMmVjMGJhMzY1NTIyMGEzZGZjYTQsanVsaWEubWV0YWNhcnRhLmNvbToxNjUwMl8xMTY5ODMwMDU5XzExNjk4MzU0MThfMDA6MTg6OGI6MzU6MDA6ZGMsMjMwNjQw, 0.958475 --> | |
| 146 | -<name><![CDATA[Gaithersburg]]></name> | |
| 147 | -<description><![CDATA[<a href="http://alert.gaithersburgmd.gov/faq.php">Frequently Asked Questions</a><br>What is Alert <font color="red">Gaithersburg</font>? What is an Aler<br>... email address password Lost password? Gaithersburg Home Alert Home New User Learn More FAQ Support Frequently Asked Questions What is Alert Gaithersburg? What is an Alert Gaithersburg account? How does Alert Gaithersburg work? Will my cell phone work? What is text messaging and ...<br><br><a href="http://alert.gaithersburgmd.gov/index.php?CCheck=1">Alert Gaithersburg</a><br>Alert <font color="red">Gaithersburg</font> USER LOGIN emai<br>Alert Gaithersburg USER LOGIN email address password Lost password? Gaithersburg Home Alert Home New User Learn More FAQ Support This application requires Javascript ...<br><br>]]></description> | |
| 148 | -<styleUrl>#rel1.0</styleUrl> | |
| 149 | -<Point> | |
| 150 | - <coordinates>-77.201670, 39.143330</coordinates> | |
| 151 | -</Point> | |
| 152 | -</Placemark><Placemark> | |
| 153 | -<!-- ZjQ4MDJjN2FiNzMxNjk3NzNkN2ZhNDQzZDk5OTkxYTgsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzJfMTE2MzY4NTU2MV8xMTcyNjg1OTAyXzAwOjE4OjhiOjM4OjM2OjQ3LDU4OTU1Mw==, 0.958964 --> | |
| 154 | -<name><![CDATA[Pocatello]]></name> | |
| 155 | -<description><![CDATA[<a href="http://www.idahoparks.org/about/permits/bannock_ski.html">Bannock</a><br>Cycle 404 S Arthur <font color="red">Pocatello</font> 232.3711 City o<br>Bannock Bannock County Gateway Cycle 404 S Arthur Pocatello 232.3711 City of Pocatello 902 Sherman St Pocatello 234.6237 ISU Outdoor Program Student Union Bldg Pocatello 236.3912 The ...<br><br>]]></description> | |
| 156 | -<styleUrl>#rel1.0</styleUrl> | |
| 157 | -<Point> | |
| 158 | - <coordinates>-112.444720, 42.871390</coordinates> | |
| 159 | -</Point> | |
| 160 | -</Placemark><Placemark> | |
| 161 | -<!-- MjY4NTdkZmI2NWU3YjFiNGY3MzExZTY5N2FlYTVhMGYsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzNfMTE2MzY5OTA3OF8xMTcyNjg1OTAyXzAwOjE4OjhiOjM4OjM2OjQ3LDMwNjE2, 0.958964 --> | |
| 162 | -<name><![CDATA[le Cambodge]]></name> | |
| 163 | -<description><![CDATA[<a href="http://www.who.int/www.who.int/mediacentre/news/releases/2004/pr46/fr/index.html">OMS | Avec 75 % des enfants protA©gA©s contre les parasites, ...</a><br>les parasites, <font color="red">le Cambodge</font> est le premier pay<br>OMS | Avec 75 % des enfants protA©gA©s contre les parasites, le Cambodge est le premier pays A atteindre l'objectif Ensemble de l'OMS Ce site seulement Page d'accueil OMS Pays ...<br><br>]]></description> | |
| 164 | -<styleUrl>#rel1.0</styleUrl> | |
| 165 | -<Point> | |
| 166 | - <coordinates>105.000000, 13.000000</coordinates> | |
| 167 | -</Point> | |
| 168 | -</Placemark><Placemark> | |
| 169 | -<!-- N2Y2NTdhYmM5MzExOTgwZDc1ODFiZTk2MDMyZmMxN2UsanVsaWEubWV0YWNhcnRhLmNvbToxNjQ5MV8xMTY5ODIzMzkxXzExNjk4MjkyMDJfMDA6MTg6OGI6MzU6MDA6ZGMsNDIyNTIw, 0.958964 --> | |
| 170 | -<name><![CDATA[firenze]]></name> | |
| 171 | -<description><![CDATA[<a href="http://groups.google.it:80/group/italia.firenze.discussioni/browse_thread/thread/39c8b8700af2691b/b53d680269651f65#b53d680269651f65">Google Gruppi : italia.firenze.discussioni</a><br>Gruppi : italia.<font color="red">firenze</font>.discussioni Hom<br>Google Gruppi : italia.firenze.discussioni Home page di Gruppi | Guida | Entra Web Immagini Gruppi Directory News altro » Ricerca avanzata nei Gruppi Preferenze Membri: Entra ...<br><br>]]></description> | |
| 172 | -<styleUrl>#rel1.0</styleUrl> | |
| 173 | -<Point> | |
| 174 | - <coordinates>11.250000, 43.766666</coordinates> | |
| 175 | -</Point> | |
| 176 | -</Placemark><Placemark> | |
| 177 | -<!-- YTU5NzdlYmNkNmUzYWM4MTQzODY4MjFiMmQ5OWQzMzIsanVsaWEubWV0YWNhcnRhLmNvbToxNjUxM18xMTY5ODM2NjAxXzExNjk4NDIzNzZfMDA6MTg6OGI6MzU6MDA6ZGMsNDU2NjYz, 0.958475 | |
| 178 | -ZDNlZTdjNTM1OTRhOTk5MDUyMjAzNzIwMGMxNGQ3NWMsa3VwYS5tZXRhY2FydGEuY29tOjE2MDE1XzExNjQ1MTMzODRfMTE2NzM0NjY3NV8wMDoxODo4YjozODozNjo3OSwyOTgyOTU=, 0.958964 | |
| 179 | -MDVhNjNkMGUxMzZlODMwNGRjNTViZGJhOTdiYWRmZjksanVsaWEubWV0YWNhcnRhLmNvbToxNjAzNl8xMTYzNjM0MjI4XzExNjU5Nzk3MTVfMDA6MTg6OGI6MzU6MDA6ZGMsMzk5MzY3, 0.958475 | |
| 180 | -OWEwOTE2NWYyZGM1ZDkwNTI3MWE0YzBhNjI3MTdlODUsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSw1MTY4MjU=, 0.958475 | |
| 181 | -MDEwNmJhOTFlMGFhM2Q0OTUxYmUxNTRlZTU4MjViYjEsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSw1MjI4MTk=, 0.958475 | |
| 182 | -Zjk1MzY0ZmQ0OTc5ODgwOTQ1MWVjYzM3ZTEzYjFhYTEsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSw0Njc3OTE=, 0.958475 | |
| 183 | -YjZmZWIzZTc5MGI5N2MwM2MyYTE5ZWM1NDk1MTdmZDUsanVsaWEubWV0YWNhcnRhLmNvbToxNjUwMl8xMTY5ODMwMDU5XzExNjk4MzU0MThfMDA6MTg6OGI6MzU6MDA6ZGMsMTkxMDcx, 0.958964 --> | |
| 184 | -<name><![CDATA[Fairfax County]]></name> | |
| 185 | -<description><![CDATA[<a href="http://www.fairfaxcounty.gov:80/demogrph/emplbut.htm">Employment Statistics & Information - Fairfax County, Virginia</a><br>Information - <font color="red">Fairfax County</font>, Virginia Busines<br>Employment Statistics & Information - Fairfax County, Virginia Business & Nonresidential Gross Floor Area Census Information & Other Government Agencies Economic Information Employment Information General Overview Glossary Housing Immigration ...<br><br><a href="http://www.fairfaxcounty.gov:80/contact/search.asp">Search Fairfax County Contacts - Fairfax County, Virginia</a><br>Search <font color="red">Fairfax County</font> Contacts - Fairfa<br>Search Fairfax County Contacts - Fairfax County, Virginia Search Fairfax County Contacts you are here : homepage > fairfax county contacts To search for an agency ...<br><br><a href="http://www.fairfaxcounty.gov:80/demogrph/othrbut.htm">Other Information - Fairfax County, Virginia</a><br>Information - <font color="red">Fairfax County</font>, Virginia Averag<br>Other Information - Fairfax County, Virginia Average Household Size Health Insurance Age Distribution Persons Speaking Languages Other than English Prior Place of Residence Educational Attainment ...<br><br><a href="http://www.fairfaxcounty.gov:80/demogrph/housebut.htm">Housing Information - Fairfax County, Virginia</a><br>Information - <font color="red">Fairfax County</font>, Virginia Busines<br>Housing Information - Fairfax County, Virginia Business & Nonresidential Gross Floor Area Census Information & Other Government Agencies Economic Information Employment Information General Overview Glossary Housing Immigration ...<br><br><a href="http://www.fairfaxcounty.gov:80/demogrph/popbut.htm">Population Information - Fairfax County, Virginia</a><br>Information - <font color="red">Fairfax County</font>, Virginia Busines<br>Population Information - Fairfax County, Virginia Business & Nonresidential Gross Floor Area Census Information & Other Government Agencies Economic Information Employment Information General Overview Glossary Housing Immigration ...<br><br><a href="http://www.fairfaxcounty.gov:80/business/services/">Business Services and Resources - Doing Business - Fairfax Co...</a><br>Doing Business - <font color="red">Fairfax County</font>, Virginia Busines<br>Business Services and Resources - Doing Business - Fairfax County, Virginia Business Services & Resources you are here : homepage > doing business > business services and resources Fairfax County has a diverse and ...<br><br><a href="http://www.fairfaxcounty.gov/contact/search.asp">Search Fairfax County Contacts - Fairfax County, Virginia</a><br>Search <font color="red">Fairfax County</font> Contacts - Fairfa<br>Search Fairfax County Contacts - Fairfax County, Virginia Search Fairfax County Contacts you are here : homepage > fairfax county contacts To search for an agency ...<br><br>]]></description> | |
| 186 | -<styleUrl>#rel1.0</styleUrl> | |
| 187 | -<Point> | |
| 188 | - <coordinates>-77.350000, 38.850000</coordinates> | |
| 189 | -</Point> | |
| 190 | -</Placemark><Placemark> | |
| 191 | -<!-- Mjg2NGM5N2YzNmYyNGFlZmQ0ZjE5N2Y4ZDBmNzFkMzIscGxhdmlzLm1ldGFjYXJ0YS5jb206MTY2NzNfMTE3MzU3NTg2MF8xMTczNTc4MTgwXzAwOjE4OjhiOjNhOjNkOjQwLDIyODM5NA==, 0.958964 --> | |
| 192 | -<name><![CDATA[Nassau Bahamas]]></name> | |
| 193 | -<description><![CDATA[<a href="http://topix.net/r/05j525XYQmo8VlBBUPUWa9G9bOa4kVTdx1LNqTqvWxejdQKhnOECcVfVuSMlxL3OXjYCfywPCSSyfl9UdTX6h1yipv285=2Fc6S3ylpt=2BXwfI1uhZS8L=2BM4gKSAUReNk868Hwh3guBbo1qfQ0=2B3LQrtt7d7LDiFk3qO1TN1RWjhlpU=3D">Nassau Bahamas Vacation » Crawfish Production Declines In The...</a><br><font color="red">Nassau Bahamas</font> Vacation » Crawfis<br>Nassau Bahamas Vacation » Crawfish Production Declines In The Bahamas Nassau Bahamas Vacation Crawfish Production Declines In The Bahamas June 15, 2006 ...<br><br>]]></description> | |
| 194 | -<styleUrl>#rel1.0</styleUrl> | |
| 195 | -<Point> | |
| 196 | - <coordinates>-77.350000, 25.083333</coordinates> | |
| 197 | -</Point> | |
| 198 | -</Placemark><Placemark> | |
| 199 | -<!-- OWNkOGUyZGEyNGJiODcxYWVmODUwMWE0MzcwY2MxMzksZWxiZS5tZXRhY2FydGEuY29tOjE2MDYzXzExNzI3ODU1NDNfMTE3Mjc5MzIyOF8wMDoxODo4YjozNzpmZDo1YSwxMzI1ODU=, 0.958964 --> | |
| 200 | -<name><![CDATA[Front Royal]]></name> | |
| 201 | -<description><![CDATA[<a href="https://yosemite.epa.gov/opei/ptrack.nsf/vRenewalViewPrintView/B72E7B83510A37AC8525718E0051F7C3">Membership Renewal Print/View</a><br>Application DuPont <font color="red">Front Royal</font> E.I. Du Pont d<br>Membership Renewal Print/View OMB No. 2010-0032 Expiration Date 08/30/06 Performance Track Membership Renewal Application DuPont Front Royal E.I. Du Pont de Nemours and Company, Inc. Member since 2002 A030029 Facility Contact    Name: Mr. James ...<br><br>]]></description> | |
| 202 | -<styleUrl>#rel1.0</styleUrl> | |
| 203 | -<Point> | |
| 204 | - <coordinates>-78.194720, 38.918060</coordinates> | |
| 205 | -</Point> | |
| 206 | -</Placemark><Placemark> | |
| 207 | -<!-- NTNjNzZkNWY4NzNmY2JlNTY2ZGRjNTRiYjU3N2IwNDEsanVsaWEubWV0YWNhcnRhLmNvbToxNjAzNl8xMTYzNjM0MjI4XzExNjU5Nzk3MTVfMDA6MTg6OGI6MzU6MDA6ZGMsMTU5MDI1, 0.957987 | |
| 208 | -N2FjZGY0YzM2ZTU4NzE1Y2Q2MGVmNmQ0ZjZkYjI3MjUsanVsaWEubWV0YWNhcnRhLmNvbToxNjAzNl8xMTYzNjM0MjI4XzExNjU5Nzk3MTVfMDA6MTg6OGI6MzU6MDA6ZGMsMzM2MTAz, 0.958475 --> | |
| 209 | -<name><![CDATA[WESTCHESTER COUNTY]]></name> | |
| 210 | -<description><![CDATA[<a href="http://schumer.senate.gov:80/SchumerWebsite/pressroom/press_releases/PR01140.html">SCHUMER, CLINTON SECURE $1.5 MILLION FOR NEW BUSES IN WESTCHE...</a><br>FOR NEW BUSES IN <font color="red">WESTCHESTER COUNTY</font> TOPICS Latest New<br>SCHUMER, CLINTON SECURE $1.5 MILLION FOR NEW BUSES IN WESTCHESTER COUNTY TOPICS Latest News Press Release Archive Special Reports Photo Downloads Schumer Around NY About Chuck | Senate Floor | Press Room | Services ...<br><br><a href="http://schumer.senate.gov:80/SchumerWebsite/pressroom/press_releases/PR01996.html">SCHUMER, CLINTON SECURE $3 MILLION FOR NEW BUSES IN WESTCHEST...</a><br>FOR NEW BUSES IN <font color="red">WESTCHESTER COUNTY</font> TOPICS Latest New<br>SCHUMER, CLINTON SECURE $3 MILLION FOR NEW BUSES IN WESTCHESTER COUNTY TOPICS Latest News Press Release Archive Special Reports Photo Downloads Schumer Around NY About Chuck | Senate Floor | Press Room | Services ...<br><br>]]></description> | |
| 211 | -<styleUrl>#rel1.0</styleUrl> | |
| 212 | -<Point> | |
| 213 | - <coordinates>-73.800000, 41.116670</coordinates> | |
| 214 | -</Point> | |
| 215 | -</Placemark><Placemark> | |
| 216 | -<!-- ZWQwMTUwYjI4N2ZlZTg4MmI4N2EyZTU5YjU1ZjlkMjMsa3VwYS5tZXRhY2FydGEuY29tOjE2OTI0XzExNzM1NzA1NzBfMTE3MzU3NTk0Nl8wMDoxODo4YjozODozNjo3OSwyODYzOTE=, 0.958475 | |
| 217 | -YzBlZGZhY2IxOGNkNmEyNzI3OWEwZTNkNjRhM2Q4MGYsanVsaWEubWV0YWNhcnRhLmNvbToxNjUwMl8xMTY5ODMwMDU5XzExNjk4MzU0MThfMDA6MTg6OGI6MzU6MDA6ZGMsNTQzMDk4, 0.957987 --> | |
| 218 | -<name><![CDATA[Oswego County]]></name> | |
| 219 | -<description><![CDATA[<a href="http://www.valleynewsonline.com:80/news/2004/0117/Oswego_News/">Restaurant makes donation to Friends of Oswego County Hospice</a><br>to Friends of <font color="red">Oswego County</font> Hospice Fulton, N<br>Restaurant makes donation to Friends of Oswego County Hospice Fulton, NY Front Page Viewpoints Hannibal News Phoenix News Oswego News Local News & Photos Obituaries Entertainment and Arts Church ...<br><br><a href="http://www.valleynewsonline.com:80/news/2004/0925/Local_News-Photos/030.html">Fund-raiser held for Oswego County Hospice</a><br>raiser held for <font color="red">Oswego County</font> Hospice Fulton, N<br>Fund-raiser held for Oswego County Hospice Fulton, NY Front Page Viewpoints Hannibal News Phoenix News Oswego News Local News & Photos Obituaries Entertainment and Arts Church ...<br><br>]]></description> | |
| 220 | -<styleUrl>#rel1.0</styleUrl> | |
| 221 | -<Point> | |
| 222 | - <coordinates>-76.150000, 43.450000</coordinates> | |
| 223 | -</Point> | |
| 224 | -</Placemark><Placemark> | |
| 225 | -<!-- NjE2OTE2N2U3ZDlmZGFkMTkzYWYzNjViZjQ2OGNlODcsa3VwYS5tZXRhY2FydGEuY29tOjE2NDI5XzExNjk4NzA4OTNfMTE2OTg3NjQyNl8wMDoxODo4YjozODozNjo3OSw1NzEzMzk=, 0.958475 --> | |
| 226 | -<name><![CDATA[Hood River Memorial Hospital]]></name> | |
| 227 | -<description><![CDATA[<a href="http://www.providence.org:80/hoodriver/foundation/default.htm">Providence Hood River Memorial Hospital Foundation</a><br>Providence <font color="red">Hood River Memorial Hospital</font> Foundatio<br>Providence Hood River Memorial Hospital Foundation Healthwise Medical Reference Library --> Home | Services | Physicians & Clinics | Education | Patient Information | News & Events | Foundation | Employment Site Search ...<br><br>]]></description> | |
| 228 | -<styleUrl>#rel1.0</styleUrl> | |
| 229 | -<Point> | |
| 230 | - <coordinates>-121.523610, 45.704720</coordinates> | |
| 231 | -</Point> | |
| 232 | -</Placemark><Placemark> | |
| 233 | -<!-- YTQwNjQwNzM4YTEzMzFiN2Q5YzExZTlkMWMxMGZmZTgsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzRfMTE2MzcxNDQ4OF8xMTcyNjg1OTAzXzAwOjE4OjhiOjM4OjM2OjQ3LDY2ODQzNA==, 0.958475 --> | |
| 234 | -<name><![CDATA[Leavenworth County]]></name> | |
| 235 | -<description><![CDATA[<a href="http://leavenworthcounty.redcross.org/PR17jan01.htm">ARC-Leavworth County: Press Release January 17, 2001</a><br>January 17, 2001 <font color="red">Leavenworth County</font> Chapter Return t<br>ARC-Leavworth County: Press Release January 17, 2001 Press Release January 17, 2001 Leavenworth County Chapter Return to Media Page APPLICATIONS FOR NEW GAS ASSISTANCE PROGRAM NOW AVAILABLE THROUGH THE AMERICAN RED CROSS LEAVENWORTH - The ...<br><br>]]></description> | |
| 236 | -<styleUrl>#rel1.0</styleUrl> | |
| 237 | -<Point> | |
| 238 | - <coordinates>-95.033330, 39.233330</coordinates> | |
| 239 | -</Point> | |
| 240 | -</Placemark><Placemark> | |
| 241 | -<!-- YzhhNTNkZDlmMzFhMDA2NGM4NzExNTNiMTIyYzg2MTUsdW1icm86MTY0ODlfMTE3MTk5Nzc3OV8xMTcyMDAwOTQwXzAwOjE4OjhiOjNhOjcwOmZkLDYwNTU4, 0.958475 --> | |
| 242 | -<name><![CDATA[Blancheville]]></name> | |
| 243 | -<description><![CDATA[<a href="http://en.wikipedia.org/wiki/Andelot-Blancheville"> Andelot-Blancheville</a><br>Andelot-<font color="red">Blancheville</font> French commun<br>Andelot-Blancheville French commune nomcommuneAndelot-Blancheville rA©gionChampagne-Ardenne dA©partementHaute-Marne arrondissementChaumont cantonCanton of Andelot-BlanchevilleAndelot-Blancheville insee52008 cp52700 maire mandat intercomm longitude05A° 17 ...<br><br>]]></description> | |
| 244 | -<styleUrl>#rel1.0</styleUrl> | |
| 245 | -<Point> | |
| 246 | - <coordinates>5.266666, 48.216666</coordinates> | |
| 247 | -</Point> | |
| 248 | -</Placemark><Placemark> | |
| 249 | -<!-- YTBlMTIwMTVhYTUyNTlkYTM5MDI3ZGQ2NDk2N2QzYzYsa3VwYS5tZXRhY2FydGEuY29tOjE2NDI5XzExNjk4NzA4OTNfMTE2OTg3NjQyNl8wMDoxODo4YjozODozNjo3OSwzMzUwMjM=, 0.958475 --> | |
| 250 | -<name><![CDATA[Platte City]]></name> | |
| 251 | -<description><![CDATA[<a href="http://www.plattecountylandmark.com:80/Article371.htm">The Landmark Newspaper - Platte County (Platte City wants str...</a><br>Platte County (<font color="red">Platte City</font> wants stree<br>The Landmark Newspaper - Platte County (Platte City wants street sweeping grant) Covering Platte County, Missouri Weekly Since 1865 Local News Between the Lines by Ivan Foley Off ...<br><br>]]></description> | |
| 252 | -<styleUrl>#rel1.0</styleUrl> | |
| 253 | -<Point> | |
| 254 | - <coordinates>-94.782220, 39.370280</coordinates> | |
| 255 | -</Point> | |
| 256 | -</Placemark><Placemark> | |
| 257 | -<!-- NzY0NTY1YzZjNzE5MTViYjU1NmNmMTJjYjc5NDdjMGEsanVsaWEubWV0YWNhcnRhLmNvbToxNjUxM18xMTY5ODM2NjAxXzExNjk4NDIzNzZfMDA6MTg6OGI6MzU6MDA6ZGMsNjA0NTE2, 0.958475 --> | |
| 258 | -<name><![CDATA[Macomb County]]></name> | |
| 259 | -<description><![CDATA[<a href="http://macombdaily.com:80/stories/080404/loc_antosk001.shtml">Macomb Daily : Sports : Retiring juvenile court worker an 'in...</a><br>an 'institution in <font color="red">Macomb County</font>' 08/04/04 SUBSCRIB<br>Macomb Daily : Sports : Retiring juvenile court worker an 'institution in Macomb County' 08/04/04 SUBSCRIBE TO SITE MENU: Select... HOME Local News State/Nation/World Sports Obituaries Election Center Newspaper In ...<br><br>]]></description> | |
| 260 | -<styleUrl>#rel1.0</styleUrl> | |
| 261 | -<Point> | |
| 262 | - <coordinates>-82.950000, 42.700000</coordinates> | |
| 263 | -</Point> | |
| 264 | -</Placemark><Placemark> | |
| 265 | -<!-- NzUxNjI3MGNjZjg4OTEzMGEwMDU4YzQ2ZTQ5ZjM3MjAsdW1icm86MTY0ODlfMTE3MTk5Nzc3OV8xMTcyMDAwOTQwXzAwOjE4OjhiOjNhOjcwOmZkLDE0NDIxMA==, 0.958475 --> | |
| 266 | -<name><![CDATA[Voronezh]]></name> | |
| 267 | -<description><![CDATA[<a href="http://en.wikipedia.org/wiki/FC_Fakel_Voronezh"> FC Fakel Voronezh</a><br>FC Fakel <font color="red">Voronezh</font> Football clu<br>FC Fakel Voronezh Football club infobox clubname Fakel image Club logo fullname Football Club Fakel Voronezh nickname founded 1947 ground Tsentralnyi Profsoyuz StadionTsentralnyi Profsoyuz ...<br><br>]]></description> | |
| 268 | -<styleUrl>#rel1.0</styleUrl> | |
| 269 | -<Point> | |
| 270 | - <coordinates>39.170000, 51.666388</coordinates> | |
| 271 | -</Point> | |
| 272 | -</Placemark><Placemark> | |
| 273 | -<!-- YzkxOWI2MmRkZjYzNGFmMzY5MmNkYmJmMzUwMDkwZjEsanVsaWEubWV0YWNhcnRhLmNvbToxNjUwMl8xMTY5ODMwMDU5XzExNjk4MzU0MThfMDA6MTg6OGI6MzU6MDA6ZGMsMTYyNjk1, 0.958475 --> | |
| 274 | -<name><![CDATA[Loudoun County]]></name> | |
| 275 | -<description><![CDATA[<a href="http://www.loudoun.gov/main/new.htm">What's New in Loudoun County</a><br>What's New in <font color="red">Loudoun County</font> Skip Navigatio<br>What's New in Loudoun County Skip Navigation What's New News Releases Loudoun County in the News New on the Loudoun County Website Job Announcements ...<br><br>]]></description> | |
| 276 | -<styleUrl>#rel1.0</styleUrl> | |
| 277 | -<Point> | |
| 278 | - <coordinates>-77.650000, 39.083330</coordinates> | |
| 279 | -</Point> | |
| 280 | -</Placemark><Placemark> | |
| 281 | -<!-- Yjc1NjQ5MjgwNTIzMTJhNjYxM2U3ZGJiYmZkNjQ4ZmEsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzBfMTE2MzYyMjk0MV8xMTcyNjg1ODk5XzAwOjE4OjhiOjM4OjM2OjQ3LDEyMjI2NTI=, 0.958027 | |
| 282 | -ZDYyZDRlMTRjYTU5ZmM0YjlhMDg4YWEzZGM4ZjUyNGUsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSwxODI2MTg=, 0.958027 --> | |
| 283 | -<name><![CDATA[San Joaquin County]]></name> | |
| 284 | -<description><![CDATA[<a href="http://www.oes.ca.gov/Operational/OESHome.nsf/PrintView/C4F1A8E5BF70A1D088256EAA00198EF3OpenDocument"> Levee Break San Joaquin County Levee Break and Fl...</a><br>Levee Break <font color="red">San Joaquin County</font> Levee Break an<br>Levee Break San Joaquin County Levee Break and Flooding The Governor's Office of Emergency Services activated the State Operations Center and the Inland ...<br><br><a href="http://www.oes.ca.gov:80/Operational/OESHome.nsf/PrintView/C4F1A8E5BF70A1D088256EAA00198EF3?OpenDocument"> Levee Break San Joaquin County Levee Break and Fl...</a><br>Levee Break <font color="red">San Joaquin County</font> Levee Break an<br>Levee Break San Joaquin County Levee Break and Flooding The Governor's Office of Emergency Services activated the State Operations Center and the Inland ...<br><br>]]></description> | |
| 285 | -<styleUrl>#rel1.0</styleUrl> | |
| 286 | -<Point> | |
| 287 | - <coordinates>-121.300000, 37.933330</coordinates> | |
| 288 | -</Point> | |
| 289 | -</Placemark><Placemark> | |
| 290 | -<!-- YTcwMjgxMzFhYjQ5NDdiMjkzZGM0ODkwODlkNjBiOTEsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAwXzExNjM2MzI4MDhfMTE2NzM0NjY3Ml8wMDoxODo4YjozODozNjo3OSw2MzM5NDk=, 0.957987 --> | |
| 291 | -<name><![CDATA[Gibellina]]></name> | |
| 292 | -<description><![CDATA[<a href="http://www.archidose.org:80/Apr00/041700.html">Cretto</a><br>Cretto Cretto <font color="red">Gibellina</font>, Sicily Italia<br>Cretto Cretto Gibellina, Sicily Italian artist Alberto Burri is known for a series of works titled Cretti , monochrome pieces composed of paste left to ...<br><br>]]></description> | |
| 293 | -<styleUrl>#rel1.0</styleUrl> | |
| 294 | -<Point> | |
| 295 | - <coordinates>12.966666, 37.783333</coordinates> | |
| 296 | -</Point> | |
| 297 | -</Placemark><Placemark> | |
| 298 | -<!-- N2MwN2NjOWI2ZDhjZjNlNDFhYzhjMjAwOGYzOWNmYzgsdW1icm86MTY0ODlfMTE3MTk5Nzc3OV8xMTcyMDAwOTQwXzAwOjE4OjhiOjNhOjcwOmZkLDQ0ODAz, 0.957987 --> | |
| 299 | -<name><![CDATA[Sunnhordland]]></name> | |
| 300 | -<description><![CDATA[<a href="http://en.wikipedia.org/wiki/Stord_Sunnhordland_F.K."> Stord Sunnhordland F.K.</a><br>Stord <font color="red">Sunnhordland</font> F.K. Infobo<br>Stord Sunnhordland F.K. Infobox Football club clubname Stord Sunnhordland F.K. image logo fullname Stord Sunnhordland Fotballklubb Norwegian nickname founded December 18 ...<br><br>]]></description> | |
| 301 | -<styleUrl>#rel1.0</styleUrl> | |
| 302 | -<Point> | |
| 303 | - <coordinates>5.500000, 59.916666</coordinates> | |
| 304 | -</Point> | |
| 305 | -</Placemark><Placemark> | |
| 306 | -<!-- YTYyNmE1ZjQ4NjQ0MTA0MGFlZTkyZGU2OWExOTM4ODgsZWxiZS5tZXRhY2FydGEuY29tOjE2MDM5XzExNjk3NzY4NjRfMTE2OTc4NjY1Nl8wMDoxODo4YjozNzpmZDo1YSwxNTM4MTQ5, 0.957987 --> | |
| 307 | -<name><![CDATA[Zagreb]]></name> | |
| 308 | -<description><![CDATA[<a href="http://www.rwe.de/generator.aspx/icw-aqua/beteiligungen/zagrebacke-odpadne-vode-doo/language=de/id=362866/zagrebacke-odpadne-vode-doo.html">RWE Aqua - Zentralklaranlage Zagreb (ZOV)</a><br>Zentralklaranlage <font color="red">Zagreb</font> (ZOV) Home Englis<br>RWE Aqua - Zentralklaranlage Zagreb (ZOV) Home English Suchen Produkte & Services Konzern Presse/News Investor Relations Info-Welt fur Privatkunden fur Geschaftskunden fur Stadtwerke/Versorger fur ...<br><br>]]></description> | |
| 309 | -<styleUrl>#rel1.0</styleUrl> | |
| 310 | -<Point> | |
| 311 | - <coordinates>16.000000, 45.800000</coordinates> | |
| 312 | -</Point> | |
| 313 | -</Placemark><Placemark> | |
| 314 | -<!-- NmZlOTJiY2YwNTQzNTQ0MGRkNjhkZGQ0Y2FiN2JiMzYsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSw3Mzc=, 0.957987 --> | |
| 315 | -<name><![CDATA[Burien]]></name> | |
| 316 | -<description><![CDATA[<a href="http://www.metrokc.gov:80/kcdot/news/2005/nr050310_burientc.htm">Open house features design ideas for new Burien Transit Center</a><br>ideas for new <font color="red">Burien</font> Transit Center DO<br>Open house features design ideas for new Burien Transit Center DOT Home What's Happening Transportation Today In the News Hot Topics Current Projects Inside Transportation on CTV Regional ...<br><br>]]></description> | |
| 317 | -<styleUrl>#rel1.0</styleUrl> | |
| 318 | -<Point> | |
| 319 | - <coordinates>-122.345560, 47.470560</coordinates> | |
| 320 | -</Point> | |
| 321 | -</Placemark><Placemark> | |
| 322 | -<!-- NzExYjkwZThmOTI4YzQ5OThkYzg5NzJiMmQ0N2JlZjksaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzBfMTE2MzYyMjk0MV8xMTcyNjg1ODk5XzAwOjE4OjhiOjM4OjM2OjQ3LDEyNjk2NjI=, 0.957987 --> | |
| 323 | -<name><![CDATA[Galveston County]]></name> | |
| 324 | -<description><![CDATA[<a href="http://galvestondailynews.com/mobile/index.lasso">The Daily News: Mobile Edition</a><br>Mobile Edition The <font color="red">Galveston County</font> Daily News - MOBIL<br>The Daily News: Mobile Edition The Galveston County Daily News - MOBILE EDITION - Today is Sunday, September 25, 2005 Buses return with tired, hot evacuees GALVESTON - Some complain about ...<br><br>]]></description> | |
| 325 | -<styleUrl>#rel1.0</styleUrl> | |
| 326 | -<Point> | |
| 327 | - <coordinates>-94.966670, 29.366670</coordinates> | |
| 328 | -</Point> | |
| 329 | -</Placemark> | |
| 330 | -</Document> | |
| 331 | -</kml> | |
| 332 | - |