Exporting GPS trace

I am interested in selecting points on the map and exporting this set of [Lat,Long] values so that I can compare these values to the experimental route of an autonomous vehicle project my university is working on. Is there an easy way to select points on the map and export these data points?

What do you mean by select points,and what do you mean by the map?

All points in the map database already have a latitude and longitude attached to them, so if you mean select on of those, it is trivial…

If you are referring to the leaflet.js rendered maps, each horizontal pixel represents the same longitude difference, and the zoom levels differ by exactly 2:1 in scaling. I’m not 100% sure, but I think 1 pixel at zoom level zero is 360/256 degrees. The vertical pixel scaling is chosen to make the pixels square, so you have to do some simple trigonometry for that.

I suspect leaflet has an API to allow you to reat latitude and longitude for a screen pixel.

If you use the JOSM editor, I believe you can manually trace GPX tracks, which contain latitude and longitude, over the OSM map, and then export them.