Closed autumnus closed 7 years ago
Hi @autumnus, you're not missing anything - Services_OpenStreetMap is. The package currently lacks the functionality for removing a specified tag, or group of tags, from an object.
I'll push up changes to support this shortly.
Wow, really fast! If I understand your changes I can now, after getting the object, remove tags, before adding it the the changeset again and commit it. This already helps a lot, thanks. But is that the way the OSM-API describes? I understand the quotation from the API I wrote in my last post that way that the removal also has to be done, when I update the data of an object. So if one key/tag is not present int the provided data any more, it is removed.
If I read my own post again and review your changes, now it can be done, like the OSM-API tells. Thanks again! It would just be some more convenient, if I would not have to remove the tags explicitly.
I've added a new method, setAllTags, that might make things more intuitive and less awkward to use.
https://github.com/kenguest/Services_Openstreetmap/commit/3323d7ccb38eb4d37de5ba87a8158f0bf99a721e
Closing this, as I think everything required has been addressed.
Is it possible to remove a Tag from an OSM-object? The API for changing an object says : "A full representation of the element as it should be after the update has to be provided." see here
But if I provide data which does not contain a key/tag anymore it seems to stay in the database. I would use following procedure:
and $data is an array:
Is that the correct way or am I missing something?