Hi list,<br><br>I'm showing some vector features on my map, which come from a GeoJson file.<br>In this GeoJson, features have an id, which is not a standard attribute ... for instance:<br>{<br> "type": "Feature",<br>
"id": "1",<br> "geometry": {<br> "type": "Point",<br> "coordinates": [613100, 2003000]<br> },<br> "properties": {<br>
"post80": "true",<br> "precise": "true"<br> }<br> }<br><br>As a result, OL features inherit this id as a "fid" property.<br> <br>
For some reason, I have to clone these features. <br>I was surprised to see that "fid" property is not copied (it becomes "null" in the cloned feature).<br> <br>The reason lies around line 100 in Vector.js : <br>
* Method: clone<br> * Create a clone of this vector feature. Does not set any non-standard properties.<br><br>I guess I have no other solution to move the id parameter inside the geojson "properties" object.<br>
<br>F.<br><br>