Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changeset and setTag #128

Closed
PanierAvide opened this issue Jan 14, 2021 · 5 comments
Closed

Changeset and setTag #128

PanierAvide opened this issue Jan 14, 2021 · 5 comments

Comments

@PanierAvide
Copy link

PanierAvide commented Jan 14, 2021

Hello,

I started using this library (1.0.0RC2), which is really helpful. I can't figure if there is a way yet to change changeset tags. I tried :

$osm = new Services_OpenStreetMap([...]);
$changeset = $osm->createChangeset();
$changeset->begin(...);
$changeset->setTag('host', '...');
...
$changeset->commit();

And defined tags are not applied. I also tried $changeset->add($changeset); to mimic other objects behaviour, but this causes an infinite loop. I'm not sure if setting custom tags on changesets is not permitted yet by the library, or if I missed how to use it.

By reading current code, I understand that most of changeset tags are hard-written in begin method. If this is not supported, one simple solution could be to add a tags parameter to this function and append custom tags to existing ones. One more complex solution could be to handle PUT HTTP call on changesets.

Best regards.

@sascha-hendel
Copy link
Contributor

sascha-hendel commented Aug 24, 2023

I need to add custom tags to the changeset, too.
Right now changeset tags are indeed hardcoded as @PanierAvide mentioned. Implementation of a setTag method for changeset similar to item would be nice! @kenguest do You still maintain this project? I could create a fork and try to do the implementation. Would You merge the fork if things working? (I only spent my time therefore if there is a chance that the result will go into the main fork)

@kenguest
Copy link
Member

Yes @sascha-hendel - if you implement the changes in your fork I'll be happy to merge your pull request :-)

Nice to see there's still some interest in this package ;-)

@sascha-hendel
Copy link
Contributor

Thanks for the immediate reply! Ok, I will have a deeper look on the code in some weeks and hopefully extend the code to support individual changeset tags.

@sascha-hendel
Copy link
Contributor

Tested my fork with a setTag method for changeset now for a while. Seems to work.
Pull request (#214) created.

@kenguest
Copy link
Member

Closing as pr #214 has addressed this, thanks to @sascha-hendel !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants