[OSM-dev] Difficulty fetching data from API in own app, but not browser

Nick Whitelegg nick.whitelegg at solent.ac.uk
Mon Jul 23 16:19:36 UTC 2018

.... Digging a bit more, it looks like the API will reject a request if you make it relatively soon after the first; is this correct?

Is there a specific time limit between requests, i.e. you can only make requests every X seconds (if so, I can code this into my app)?

To make it absolutely clear - I am using the API for editing purposes. Specifically, the feature I'm testing at the moment allows you to download data from the API (2x2km square centred on current location), select ways and add/modify a designation tag.



From: Nick Whitelegg <nick.whitelegg at solent.ac.uk>
Sent: 23 July 2018 16:50:14
To: dev at openstreetmap.org
Subject: [OSM-dev] Difficulty fetching data from API in own app, but not browser


Currently experiencing some inconsistent behaviour with the API in which fetching via the browser gives a response,

but my own app ('MapThePaths', part of a project intended to help map footpaths and edit designation tags in the UK) frequently hangs waiting for a response.

MapThePaths uses the osmapi (Tobias Zwick) to fetch data.

Is there any reason currently why the API might be responding to standard web browsers but not custom apps?

FWIW my app should be reporting itself as "MapThePaths Android app" and I have just (around 16:35-16:40 UK time) made three unsuccessful requests with the bbox:  -0.7295872761598865,51.09355911139382,-0.7005316007485753,51.11122494429744.

Sometimes, however, my app is retrieving data from OSM successfully (perhaps 60-70% of the time).

No exception is thrown - just looks like a timeout.

I also observed similar behaviour 'in the field' yesterday afternoon when I was using the app in the countryside. The app could talk to my own API on mapthepaths.org.uk successfully but could not communicate with the OSM API.

Is this simply related to the issues with the OSM API at the moment related to moving to another server?



Nick Whitelegg
Senior Lecturer in Computing (Internet)  | School of Media Arts and Technology
Southampton Solent University  | RM424 | East Park Terrace | Southampton SO14 0YN
T: 023 8201 3075 | E: nick.whitelegg at solent.ac.uk<mailto:nick.whitelegg at solent.ac.uk> | W: solent.ac.uk<http://www.solent.ac.uk/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20180723/6d56038d/attachment-0001.html>

More information about the dev mailing list