[OpenLayers-Commits] r3632 - sandbox/tschaub/geojson/lib/OpenLayers/Format

commits at openlayers.org commits at openlayers.org
Fri Jul 6 17:18:57 EDT 2007


Author: tschaub
Date: 2007-07-06 17:18:53 -0400 (Fri, 06 Jul 2007)
New Revision: 3632

Modified:
   sandbox/tschaub/geojson/lib/OpenLayers/Format/GeoJSON.js
Log:
respect feature id - OpenLayers will store the feature id if one comes with the GeoJSON Feature

Modified: sandbox/tschaub/geojson/lib/OpenLayers/Format/GeoJSON.js
===================================================================
--- sandbox/tschaub/geojson/lib/OpenLayers/Format/GeoJSON.js	2007-07-06 20:32:22 UTC (rev 3631)
+++ sandbox/tschaub/geojson/lib/OpenLayers/Format/GeoJSON.js	2007-07-06 21:18:53 UTC (rev 3632)
@@ -200,6 +200,9 @@
             throw err;
         }
         feature = new OpenLayers.Feature.Vector(geometry, attributes);
+        if(obj.id) {
+            feature.id = obj.id;
+        }
         return feature;
     },
     



More information about the Commits mailing list