-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add Object Directly via URL in iD Editor #10247
Comments
Hey @baditaflorin thank you for sharing your use case. I don't think this is something to be done in iD, TBH.
(Context: I am a volunteer that helps with issues in iD) |
Thanks @tordans for the answer, MapComplete looks like it was built before I was alive. MapRoulette and or the RapidID seems like a god wa going. Interested also if I would fork the iD editor, around where I should start looking to implement a way to do this |
You can kinda do this already, but the UX sucks and it only supports a restricted subset of tags ( To use this feature, add Since this was too limited for us, we forked the iD/RapiD editor for a very similar use case. You provide a geojson file which specifies the nodes/ways that should be created, edited or deleted. Then iD prompts the user to review each feature in the geojson file. It would be nice if this were built into iD or RapiD one day... |
Description
I would like to request a feature that allows adding a new object directly via a URL in the iD editor. Currently, it is possible to edit existing objects using the following URL formats:
Node: https://www.openstreetmap.org/edit?editor=id&node=node_id
Way: https://www.openstreetmap.org/edit?editor=id&way=way_id
Relation: https://www.openstreetmap.org/edit?editor=id&relation=relation_id
However, there is no way to add a new object directly through a URL. This feature would be beneficial for scenarios where users select from a predefined list of things and then click "Add to Source," which would redirect them to the iD editor with the object ready to be added.
Proposed URL Format:
The proposed URL format to add a new object directly should look like this:
https://www.openstreetmap.org/edit?editor=id#map=18/${lat}/${lon}&add=${encodeURIComponent(JSON.stringify(tags))}
Example Usage:
If a user wants to add an amenity with the tag amenity=drinking_water, the URL should be formatted as:
https://www.openstreetmap.org/edit?editor=id#map=18/40.7128/-74.0060&add=${encodeURIComponent(JSON.stringify({"amenity":"drinking_water"}))}
This URL will open the iD editor centered on the specified latitude and longitude and set it to add a point with the specified tags.
Benefits:
Enhances the usability of the iD editor by allowing direct addition of objects via URL.
Streamlines the process for users to add commonly used amenities and objects.
Reduces the steps needed for users to contribute new data to OpenStreetMap.
Additional Notes:
The implementation should handle the encoding of tag parameters properly to ensure the URL functions correctly.
This feature should support at least nodes and ways.
Thank you for considering this feature request. I believe it will greatly enhance the user experience and efficiency of the iD editor.
Screenshots
No response
The text was updated successfully, but these errors were encountered: