Tabs patch from Erik, to change tabs to spaces so we don't have commit

conflicts later on.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2920 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-03-29 05:53:01 +00:00
parent 4bb320867b
commit 919af2ff90
18 changed files with 100 additions and 100 deletions

View File

@@ -3,24 +3,24 @@
<style type="text/css">
body {
border: 0px;
margin: 0px;
padding: 0px;
border: 0px;
margin: 0px;
padding: 0px;
}
#map {
width: 100%;
height: 100%;
border: 0px;
padding: 0px;
width: 100%;
height: 100%;
border: 0px;
padding: 0px;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lat = 900863;
var lon = 235829;
var zoom = 6;
var lat = 900863;
var lon = 235829;
var zoom = 6;
var map, layer;
function init(){

View File

@@ -6,9 +6,9 @@
<script src="../lib/OpenLayers.js" type="text/javascript"></script>
<style>
#map{
width:100%;
height:500px;
border:1px solid;
width:100%;
height:500px;
border:1px solid;
}
</style>
</head>
@@ -16,32 +16,32 @@
<div id="map"></div>
<script defer="defer" type="text/javascript">
var map = new OpenLayers.Map('map');
// my city
var constantina = new OpenLayers.LonLat(-5.6165,37.8623);
// my city
var constantina = new OpenLayers.LonLat(-5.6165,37.8623);
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
var nasa_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi", {layers: "modis,global_mosaic"} );
map.addLayers([
nasa_wms,
wms
]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
var options = {
map.addLayers([
nasa_wms,
wms
]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
var options = {
layers: [wms.clone()],
minRatio: 8,
maxRatio: 128
};
var overview = new OpenLayers.Control.OverviewMap(options);
map.addControl(overview);
map.setCenter(constantina, 4);
overview.maximizeControl();
var overview = new OpenLayers.Control.OverviewMap(options);
map.addControl(overview);
map.setCenter(constantina, 4);
overview.maximizeControl();
</script>
</body>
</html>

View File

@@ -21,7 +21,7 @@ var map,ia_wms;
"http://wms.jpl.nasa.gov/wms.cgi",
{layers: "modis,global_mosaic"});
ia_wms = new OpenLayers.Layer.WMS("Nexrad","http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?",{layers:"nexrad-n0r-wmst",transparent:true,format:'image/png',time:OpenLayers.Util.getElement('time').value});
ia_wms = new OpenLayers.Layer.WMS("Nexrad","http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?",{layers:"nexrad-n0r-wmst",transparent:true,format:'image/png',time:OpenLayers.Util.getElement('time').value});
jpl_wms.setVisibility(false);

View File

@@ -166,8 +166,8 @@ OpenLayers.Control.OverviewMap.prototype =
'click',
this.maximizeControl.bindAsEventListener(this));
OpenLayers.Event.observe(this.maximizeDiv,
'dblclick',
function(e) {
'dblclick',
function(e) {
OpenLayers.Event.stop(e);
});
this.div.appendChild(this.maximizeDiv);
@@ -186,8 +186,8 @@ OpenLayers.Control.OverviewMap.prototype =
'click',
this.minimizeControl.bindAsEventListener(this));
OpenLayers.Event.observe(this.minimizeDiv,
'dblclick',
function(e) {
'dblclick',
function(e) {
OpenLayers.Event.stop(e);
});
this.div.appendChild(this.minimizeDiv);

View File

@@ -180,24 +180,24 @@ OpenLayers.Format.GML.prototype =
* @param DOMElement xmlNode
*/
parseAttributes: function(xmlNode) {
var nodes = xmlNode.childNodes;
var nodes = xmlNode.childNodes;
var attributes = {};
for(var i = 0; i < nodes.length; i++) {
for(var i = 0; i < nodes.length; i++) {
var name = nodes[i].nodeName;
var value = OpenLayers.Util.getXmlNodeValue(nodes[i]);
var value = OpenLayers.Util.getXmlNodeValue(nodes[i]);
// Ignore Geometry attributes
// match ".//gml:pos|.//gml:posList|.//gml:coordinates"
if((name.search(":pos")!=-1)
||(name.search(":posList")!=-1)
||(name.search(":coordinates")!=-1)){
continue;
}
// Check for a leaf node
if((nodes[i].childNodes.length == 1 && nodes[i].childNodes[0].nodeName == "#text")
|| (nodes[i].childNodes.length == 0 && nodes[i].nodeName!="#text")) {
attributes[name] = value;
}
if((name.search(":pos")!=-1)
||(name.search(":posList")!=-1)
||(name.search(":coordinates")!=-1)){
continue;
}
// Check for a leaf node
if((nodes[i].childNodes.length == 1 && nodes[i].childNodes[0].nodeName == "#text")
|| (nodes[i].childNodes.length == 0 && nodes[i].nodeName!="#text")) {
attributes[name] = value;
}
OpenLayers.Util.extend(attributes, this.parseAttributes(nodes[i]))
}
return attributes;

View File

@@ -93,24 +93,24 @@ OpenLayers.Format.KML.prototype =
* @param DOMElement xmlNode
*/
parseAttributes: function(xmlNode) {
var nodes = xmlNode.childNodes;
var nodes = xmlNode.childNodes;
var attributes = {};
for(var i = 0; i < nodes.length; i++) {
for(var i = 0; i < nodes.length; i++) {
var name = nodes[i].nodeName;
var value = OpenLayers.Util.getXmlNodeValue(nodes[i]);
var value = OpenLayers.Util.getXmlNodeValue(nodes[i]);
// Ignore Geometry attributes
// match ".//gml:pos|.//gml:posList|.//gml:coordinates"
if((name.search(":pos")!=-1)
||(name.search(":posList")!=-1)
||(name.search(":coordinates")!=-1)){
continue;
}
// Check for a leaf node
if((nodes[i].childNodes.length == 1 && nodes[i].childNodes[0].nodeName == "#text")
|| (nodes[i].childNodes.length == 0 && nodes[i].nodeName!="#text")) {
attributes[name] = value;
}
if((name.search(":pos")!=-1)
||(name.search(":posList")!=-1)
||(name.search(":coordinates")!=-1)){
continue;
}
// Check for a leaf node
if((nodes[i].childNodes.length == 1 && nodes[i].childNodes[0].nodeName == "#text")
|| (nodes[i].childNodes.length == 0 && nodes[i].nodeName!="#text")) {
attributes[name] = value;
}
OpenLayers.Util.extend(attributes, this.parseAttributes(nodes[i]))
}
return attributes;

View File

@@ -126,8 +126,8 @@ OpenLayers.Geometry.prototype = {
var bounds = this.getBounds();
if ((bounds != null) && (lonlat != null)) {
var dX = (toleranceLon != null) ? toleranceLon : 0;
var dY = (toleranceLat != null) ? toleranceLat : 0;
var dX = (toleranceLon != null) ? toleranceLon : 0;
var dY = (toleranceLat != null) ? toleranceLat : 0;
var toleranceBounds =
new OpenLayers.Bounds(this.bounds.left - dX,

View File

@@ -20,8 +20,8 @@ OpenLayers.Geometry.LineString.prototype =
* @param {Array(OpenLayers.Geometry.Point)} points
*/
initialize: function(points) {
OpenLayers.Geometry.Curve.prototype.initialize.apply(this,
arguments);
OpenLayers.Geometry.Curve.prototype.initialize.apply(this,
arguments);
},
/**

View File

@@ -19,8 +19,8 @@ OpenLayers.Geometry.MultiLineString.prototype =
* @param {Array(OpenLayers.Geometry.LineString)} components
*/
initialize: function(components) {
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
arguments);
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
arguments);
},
/**

View File

@@ -19,8 +19,8 @@ OpenLayers.Geometry.MultiPoint.prototype =
* @param {Array(OpenLayers.Geometry.Point)} components
*/
initialize: function(components) {
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
arguments);
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
arguments);
},
/**

View File

@@ -19,8 +19,8 @@ OpenLayers.Geometry.MultiPolygon.prototype =
* @param {Array(OpenLayers.Geometry.Polygon)} components
*/
initialize: function(components) {
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
arguments);
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
arguments);
},
/**

View File

@@ -33,11 +33,11 @@ OpenLayers.Geometry.Point.prototype =
* @param {float} y
*/
initialize: function(x, y) {
OpenLayers.Geometry.prototype.initialize.apply(this, arguments);
OpenLayers.LonLat.prototype.initialize.apply(this, arguments);
this.x = this.lon;
this.y = this.lat;
OpenLayers.Geometry.prototype.initialize.apply(this, arguments);
OpenLayers.LonLat.prototype.initialize.apply(this, arguments);
this.x = this.lon;
this.y = this.lat;
},
/**
@@ -61,8 +61,8 @@ OpenLayers.Geometry.Point.prototype =
* @param {float} x
*/
setX: function(x) {
this.lon = x;
this.x = x;
this.lon = x;
this.x = x;
},
/**
@@ -71,22 +71,22 @@ OpenLayers.Geometry.Point.prototype =
* @param {float} y
*/
setY: function(y) {
this.lat = y;
this.y = y;
this.lat = y;
this.y = y;
},
/**
* @type float
*/
getX: function() {
return this.lon;
return this.lon;
},
/**
* @type float
*/
getY: function() {
return this.lat;
return this.lat;
},
/** Create a new Bounds based on the lon/lat
@@ -117,7 +117,7 @@ OpenLayers.Geometry.Point.prototype =
* @type String
*/
toString: function() {
return this.toShortString();
return this.toShortString();
},
/**

View File

@@ -22,8 +22,8 @@ OpenLayers.Geometry.Polygon.prototype =
* @param {Array(OpenLayers.Geometry.LinearRing)}
*/
initialize: function(components) {
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
arguments);
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
arguments);
},
/**

View File

@@ -64,10 +64,10 @@ OpenLayers.Layer.GML.prototype =
*/
moveTo:function(bounds, zoomChanged, minor) {
OpenLayers.Layer.Vector.prototype.moveTo.apply(this, arguments);
// Wait until initialisation is complete before loading GML
// otherwise we can get a race condition where the root HTML DOM is
// loaded after the GML is paited.
// See http://trac.openlayers.org/ticket/404
// Wait until initialisation is complete before loading GML
// otherwise we can get a race condition where the root HTML DOM is
// loaded after the GML is paited.
// See http://trac.openlayers.org/ticket/404
if(this.visibility && !this.loaded){
this.loadGML();
}

View File

@@ -97,7 +97,7 @@ OpenLayers.Layer.Image.prototype =
// If nothing to do with resolutions has been set, assume a single
// resolution determined by extent/size
if( this.options.maxResolution == null ) {
this.options.maxResolution = this.extent.getWidth() / this.size.w;
this.options.maxResolution = this.extent.getWidth() / this.size.w;
}
OpenLayers.Layer.prototype.setMap.apply(this, arguments);
},

View File

@@ -43,14 +43,14 @@ OpenLayers.Layer.MapServer.prototype =
}
},
/**
/**
* @param {Object} obj
*
* @returns A clone of this OpenLayers.Layer.MapServer
* @type OpenLayers.Layer.MapServer
*/
clone: function (obj) {
if (obj == null) {
if (obj == null) {
obj = new OpenLayers.Layer.MapServer(this.name,
this.url,
this.params,

View File

@@ -209,10 +209,10 @@ OpenLayers.Popup.prototype = {
this.div.style.width = this.size.w + "px";
this.div.style.height = this.size.h + "px";
}
if (this.contentDiv != null){
this.contentDiv.style.width = this.size.w + "px";
this.contentDiv.style.height = this.size.h + "px";
}
if (this.contentDiv != null){
this.contentDiv.style.width = this.size.w + "px";
this.contentDiv.style.height = this.size.h + "px";
}
},
/**

View File

@@ -84,11 +84,11 @@
t.eq(contentDiv.className, "olPopupContent", "correct content div className");
t.eq(contentDiv.id, "chicken_contentDiv", "correct content div id");
t.eq(contentDiv.style.width, "500px", "correct content div width");
t.eq(contentDiv.style.width, "500px", "correct content div width");
t.eq(contentDiv.style.height, "400px", "correct content div height");
t.eq(contentDiv.style.position, "relative", "correct content div position");
t.eq(contentDiv.style.overflow, "hidden", "correct content div overflow");
t.eq(contentDiv.innerHTML, content, "correct content div content");
t.eq(contentDiv.innerHTML, content, "correct content div content");
var bColor = popup.div.style.backgroundColor;
var goodColor = ( (bColor == color) || (bColor == hexColor));