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

Add Object Directly via URL in iD Editor #10247

Open
baditaflorin opened this issue May 16, 2024 · 4 comments
Open

Add Object Directly via URL in iD Editor #10247

baditaflorin opened this issue May 16, 2024 · 4 comments

Comments

@baditaflorin
Copy link

baditaflorin commented May 16, 2024

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

@baditaflorin
Copy link
Author

baditaflorin commented May 16, 2024

Currently users need to do things like this
image

And this keeps us in the realms of pro users, suers that need to know and remember tags, etc.

Instead of allowing us to have simple websites that are focused on specific things (think wheelmap.org / public drinking water places, etc where the user does not care about roads, house nunbers and other things, he wants to know where is the closest place where he can find water, for example,and when he finds a new place, to be able to quickly add it to the map in less than 20 seconds, while also attaching a photo for source if he choose to, lets say

@tordans
Copy link
Collaborator

tordans commented May 17, 2024

Hey @baditaflorin thank you for sharing your use case. I don't think this is something to be done in iD, TBH.
There are other tools, however, that will get you quite far.

(Context: I am a volunteer that helps with issues in iD)

@baditaflorin
Copy link
Author

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

@k-yle
Copy link
Collaborator

k-yle commented May 17, 2024

You can kinda do this already, but the UX sucks and it only supports a restricted subset of tags (name and 7 other tags).

To use this feature, add &gpx=... to the URL. Here's an example that loads this gpx file.

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...

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