Changeset 3096
- Timestamp:
- 04/26/07 09:31:46 (2 years ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Format/GML.js (modified) (6 diffs)
- trunk/openlayers/tests/Format/test_GML.html (added)
- trunk/openlayers/tests/list-tests.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Format/GML.js
r3043 r3096 85 85 var feature = new OpenLayers.Feature.Vector(); 86 86 87 if (xmlNode.firstChild.attributes && xmlNode.firstChild.attributes['fid']) {88 feature.fid = xmlNode.firstChild.attributes['fid'].nodeValue;89 }90 91 87 // match MultiPolygon 92 88 if (OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.gmlns, "gml", "MultiPolygon").length != 0) { 93 89 var multipolygon = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.gmlns, "gml", "MultiPolygon")[0]; 90 feature.fid = multipolygon.parentNode.parentNode.getAttribute('fid'); 91 94 92 geom = new OpenLayers.Geometry.MultiPolygon(); 95 93 var polygons = OpenLayers.Ajax.getElementsByTagNameNS(multipolygon, … … 105 103 var multilinestring = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, 106 104 this.gmlns, "gml", "MultiLineString")[0]; 105 feature.fid = multilinestring.parentNode.parentNode.getAttribute('fid'); 107 106 108 107 geom = new OpenLayers.Geometry.MultiLineString(); … … 123 122 var multiPoint = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, 124 123 this.gmlns, "gml", "MultiPoint")[0]; 124 feature.fid = multiPoint.parentNode.parentNode.getAttribute('fid'); 125 125 126 126 geom = new OpenLayers.Geometry.MultiPoint(); … … 139 139 var polygon = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, 140 140 this.gmlns, "gml", "Polygon")[0]; 141 feature.fid = polygon.parentNode.parentNode.getAttribute('fid'); 141 142 142 143 geom = this.parsePolygonNode(polygon); … … 147 148 var lineString = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, 148 149 this.gmlns, "gml", "LineString")[0]; 150 feature.fid = lineString.parentNode.parentNode.getAttribute('fid'); 151 149 152 p = this.parseCoords(lineString); 150 153 if (p.points) { … … 158 161 var point = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, 159 162 this.gmlns, "gml", "Point")[0]; 163 feature.fid = point.parentNode.parentNode.getAttribute('fid'); 160 164 161 165 p = this.parseCoords(point); trunk/openlayers/tests/list-tests.html
r3076 r3096 18 18 <li>Geometry/test_Surface.html</li> 19 19 <li>test_Format.html</li> 20 <li>Format/test_GML.html</li> 20 21 <li>Format/test_WKT.html</li> 21 22 <li>test_Icon.html</li>
