Nominatim Query Locally

المشرف العام

Administrator
طاقم الإدارة
The Problem:

I have a local open street maps server set up and rendering tiles perfectly. I wanted to add search capabilities so I installed Nominatim and did the following:

./utils/setup.php --osm-file --osm-file /path/to/planet.osm --all ./utils/setup.php --create-website /var/www/nominatim sudo mkdir /var/www/nominatimand then I configured apache with:

Options FollowSymLinks MultiViews AddType text/html .phpIn my local.php file for nominatim I have this is the url:

@define('CONST_Website_BaseURL', 'http:///nominatim/');Finally my javascript goes as follows for a search bar:

function addr_search() {var inp = document.getElementById("addr");$.getJSON('http:///nominatim/search?format=json&limit=5&q=' + inp.value, function(data) { var items = []; $.each(data, function(key, val) { bb = val.boundingbox; items.push("" + val.display_name + '
'); }); $('#results').empty(); if (items.length != 0) { $('
', { html: "Search results:" }).appendTo('#results'); $('<ul/>', { 'class': 'my-new-list', html: items.join('') }).appendTo('#results'); } else { $('
', { html: "No results found" }).appendTo('#results'); }});}When I complete the search, while using google chrome debugging tools, the console throws the following error:

http:///nominatim/reverse?format=json&limit=5&q=fort wayne indiana Failed to load resource: the server responded with a status of 404 (Not Found)How do I fix this? I need to search from my local Nominatim setup?



أكثر...
 
أعلى