[OpenLayers-Commits] r1995 - sandbox/vector/lib/OpenLayers
commits at openlayers.org
commits at openlayers.org
Mon Dec 4 06:44:34 EST 2006
Author: pgiraud
Date: 2006-12-04 06:44:29 -0500 (Mon, 04 Dec 2006)
New Revision: 1995
Modified:
sandbox/vector/lib/OpenLayers/Feature.js
Log:
adds attribute reference to geometry components
Modified: sandbox/vector/lib/OpenLayers/Feature.js
===================================================================
--- sandbox/vector/lib/OpenLayers/Feature.js 2006-12-04 10:44:44 UTC (rev 1994)
+++ sandbox/vector/lib/OpenLayers/Feature.js 2006-12-04 11:44:29 UTC (rev 1995)
@@ -170,6 +170,16 @@
setGeometry: function(geometry) {
this.geometry = geometry;
this.geometry.feature = this;
+
+ // composite geometries (multipoints, etc...)
+ // TBD perhaps move this elsewhere
+ if (this.geometry.components) {
+ for (var i = 0; i < this.geometry.components.length; i++) {
+ this.geometry.components[i].feature = this;
+ }
+ }
+
+ // TBD manage polygon (geometry with linearRings)
},
/**
More information about the Commits
mailing list