NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello,

I have simple problem: I am using Nominatim to get the list of pharmacies in London. I always get 50 results, regardless of what I set to limit. Any ideas what I do wrong?

I using such javascript code:

var city = "london";
var object = "pharmacy";
var limit = "10000";
var nomstring = "http://nominatim.openstreetmap.org/search?format=json&q=" + object + "+in+" + city + "&limit=" + limit;
$.getJSON(nomstring, function(result,status)

Thanks!

asked 28 Jul '17, 12:00

marcin%20galazka's gravatar image

marcin galazka
61113
accept rate: 0%


Maximum 50 results is a hardcoded limit in the Nominatim logic for /search. It can't (currently) even be overwritten by a configuration setting on the server.

For a list of POIs considering using the http://overpass-turbo.eu/ tool.

permanent link

answered 28 Jul '17, 12:37

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

Maximum 50 results is a hardcoded limit in the Nominatim logic for /search. It can't (currently) even be overwritten by a configuration setting on the server.

Correct, if you have access to the API files, you can change this. The limit is defined in Geolocate.php on line 100 if ($iLimit > 50) { $iLimit = 50;

Here you can make the limit higher or remove it by removing the if statement (just don't forget to change the elseif after it to if)

I found this file under /usr/local/lib/nominatim/lib-php/

If however your file is not there you can find your path in 'project-folder'/website/search.php: @define('CONST_LibDir', 'PATH DEFINED HERE');

permanent link

answered 06 May '22, 23:18

ossycraft's gravatar image

ossycraft
11
accept rate: 0%

edited 06 May '22, 23:19

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×689
×85
×60

question asked: 28 Jul '17, 12:00

question was seen: 3,346 times

last updated: 06 May '22, 23:19

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum