Set a FID on OSM features. Includes tests. Original patch by kleptog

(thx), r=me (Closes #1351


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6181 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-02-10 16:18:48 +00:00
parent c70fb21103
commit 03248296e7
2 changed files with 6 additions and 2 deletions

View File

@@ -131,6 +131,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, {
var feat = new OpenLayers.Feature.Vector(geometry,
ways[i].tags);
feat.osm_id = parseInt(ways[i].id);
feat.fid = "way." + feat.osm_id;
feat_list[i] = feat;
}
for (var node_id in nodes) {
@@ -156,6 +157,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, {
this.internalProjection);
}
feat.osm_id = parseInt(node_id);
feat.fid = "node." + feat.osm_id;
feat_list.push(feat);
}
// Memory cleanup