[OSM-dev] API Logic
SteveC
steve at asklater.com
Fri Jan 25 15:33:58 GMT 2008
Guys
I've started a method to delete a way and all its nodes etc. It's
mostly there, see the last two functions in the way model. It's mostly
there but
* needs to know how to update the tile attribute when updating many
nodes (no clue how that's done). Actually it doesn't need to as it can
just copy the current tile as the node is being deleted not moved. But
more generally it's probably a good idea if I figure out what's needed.
* needs to deal with OldNode tags which has a dependency on this tag
normalisation stuff that nicks do(ing/ne)
I'm now comfortable enough to rip out most of amf_controller but it'll
take a while more. And depends on the following.
Ive split out the way controller delete method in to the model. I'm
50/50 on whether it should be an instance method or class method. It's
done as an instance method but I actually lean toward class method now
as it matches what happens in most of rails. It simplifies the way
controller (by just shifting all the logic sideways in to the model)
and allows the logic to be used by amf_controller.
I've done it as an example, I'd expect to do the same for all the
methods in nodes and ways and relations.
The other thing is that the relation stuff in there (the node and way
controllers) is a bit hacky and the SQL can be simplified away fairly
easily but I've not to got to it.
have fun,
SteveC | steve at asklater.com | http://www.asklater.com/steve/
More information about the dev
mailing list