Pradeep Kumar
Pradeep Kumar

Reputation: 11

As anyone tried using the below OSM API

Please let me know if anyone tried using the below OSM API in C# .Net application to retrieve address from Latitude and Longitude.

http://nominatim.openstreetmap.org/reverse?format=json&lat=[Latitude]&lon=[Longitude]

I request to post the same below.

thanks

Upvotes: 1

Views: 1269

Answers (1)

bassfader
bassfader

Reputation: 1356

As the error says you are creating too many requests.

A quick search on google brought up that there is a hard limit on the number of requests you're allowed send, found in the usage poilicy of Nominatim:

Requirements

  • No heavy uses (an absolute maximum of 1 request per second).
  • Provide a valid HTTP Referer or User-Agent identifying the application (stock User-Agents as set by http libraries will not do).
  • Clearly display attribution as suitable for your medium.
  • Data is provided under the ODbL license which requires to share alike (although small extractions are likely to be covered by fair usage / fair dealing).

Source: https://wiki.openstreetmap.org/wiki/Nominatim_usage_policy

So in order to fix this error you'll have to make sure that you are not sending more than 1 request per second for your whole application.

Upvotes: 2

Related Questions