I am trying to develop a Javascript program which gets the current speed limit of the current road. I have tried using using the Overpass API, but that only returns an empty XML file:
/interpreter?node(around:10, 40.7127, 74.0059)[maxspeed];out;
I haven't implemented this into my code yet, testing it on Firefox.
Why is the XML file empty, and are there any other free online resources which can be used to get the speed limit of a road at coordinates x
,y
?
Note: I would prefer if it supported speed limits in the UK
Two reasons your query returns an empty result:
Try this query instead:
way
(around:70, 51.0483, 13.7495)
[maxspeed];
(._;>;);
out;
See the result on overpass turbo.