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:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user