[OpenLayers-Dev] [OpenLayers-Trac] [OpenLayers] #1324: OpenLayers.Feature.Vector.clone() must clone the fid property.

Martijn van Oosterhout kleptog at gmail.com
Tue Feb 12 03:41:29 EST 2008


On Feb 12, 2008 3:52 AM, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> That's not really here nor there though. Your point is correct: if a
> *unique* FID is required, then it should be set to something uniquely
> generated (presumably at the application level). However, what I
> actually meant was "a unique or null FID": 'null' usually means 'use the
> remote server to populate one for me', instead of using the value as a
> FID. This is the behavior I think makes the most sense: for most
> applications, when you clone a feature, you want to keep a null FID
> until you serialize and post to a server, and *then* do the logic to
> create one and assign it on the client.

Given that when you create a new feature, it doesn't populate the fid
field, I don't think populating it on clone() can be supported
either... I assume that a null fid is an anonymous object, if it
should have an fid, it's up to the application to provide it.

Have a nice day,
-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/



More information about the Dev mailing list