Pullup r2999:3087 for RC2.

svn merge trunk/openlayers/@2999 trunk/openlayers/@HEAD branches/openlayers/2.4/



git-svn-id: http://svn.openlayers.org/branches/openlayers/2.4@3088 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-04-20 01:10:43 +00:00
parent b6fb16153c
commit b5103eb8ce
58 changed files with 1399 additions and 503 deletions
+9 -57
View File
@@ -27,10 +27,10 @@ OpenLayers.Feature.Vector.prototype =
/** @type OpenLayers.Geometry */
geometry:null,
/** @type array */
attributes: {},
/** @type Object */
attributes: null,
/** @type strinng */
/** @type String */
state: null,
/** @type Object */
@@ -46,11 +46,12 @@ OpenLayers.Feature.Vector.prototype =
initialize: function(geometry, data, style) {
OpenLayers.Feature.prototype.initialize.apply(this, [null, null, data]);
this.lonlat = null;
this.setGeometry(geometry);
this.geometry = geometry;
this.state = null;
this.attributes = new Object();
if (data) {
OpenLayers.Util.extend(this.attributes, data);
}
this.attributes = OpenLayers.Util.extend(this.attributes, data);
}
this.style = style ? style : null;
},
@@ -125,56 +126,6 @@ OpenLayers.Feature.Vector.prototype =
return null;
},
/**
* Set a feature id to the feature
*
* @param {String} feature id to set
*/
setFid: function(fid) {
this.fid = fid;
},
/**
* Set a geometry to the feature
*
* @param {OpenLayers.Geometry} geometry to set
* @param {Boolean} recurse Recursively set feature (for components)
*/
setGeometry: function(geometry, recurse) {
if(geometry) {
this.geometry = geometry;
this.geometry.feature = this;
if (recurse != false) {
this._setGeometryFeatureReference(this.geometry, this);
}
}
},
/**
* Sets recursively the reference to the feature in the geometry
*
* @param {OpenLayers.Geometry}
* @param {OpenLayers.Feature}
*/
_setGeometryFeatureReference: function(geometry, feature) {
geometry.feature = feature;
if (geometry.components) {
for (var i = 0; i < geometry.components.length; i++) {
this._setGeometryFeatureReference(geometry.components[i], feature);
}
}
},
/**
* Adds attributes an attributes object to the feature.
* (should not be in geometry but in feature class)
*
* @param {Attributes} attributes
*/
setAttributes: function(attributes) {
this.attributes=attributes;
},
/**
* @param {OpenLayers.LonLat} lonlat
* @param {float} toleranceLon Optional tolerance in Geometric Coords
@@ -277,7 +228,8 @@ OpenLayers.Feature.Vector.style = {
pointRadius: 6,
hoverPointRadius: 1,
hoverPointUnit: "%",
pointerEvents: "visiblePainted"
pointerEvents: "visiblePainted",
cursor: "pointer"
},
'temporary': {
fillColor: "yellow",