osm-search / nominatim-ui Goto Github PK
View Code? Open in Web Editor NEWDebug UI for Nominatim
License: GNU General Public License v2.0
Debug UI for Nominatim
License: GNU General Public License v2.0
Going to a /details.html result page displays "no such place" while the initial API request is still running. It should instead display something like "loading...", "please wait...".
If one is searching and has navigated to one of the results' Details page, they might want to come back to the results. A "Back to results/search/xxx" would be beneficial.
P.S. One can also simply use the browser back button!
I can't run the latest version (or 1.2.0) from the dist
directory. Firefox reports a 404 on a /assets.html
file. I just can't find any reference to this file.
Example
https://nominatim.openstreetmap.org/ui/details.html?osmtype=R&osmid=2145268&class=boundary
in the address line lists has both 'Germany' and 'de' but no links to their OSM or detail pages.
The API doesn't return the ids but maybe we can still add a link in the UI, even if it goes to a search page.
"address": [
{
"localname": "Bavaria",
"place_id": 235644837,
"osm_id": 2145268,
"osm_type": "R",
"place_type": "state",
"class": "boundary",
"type": "administrative",
"admin_level": 4,
"rank_address": 8,
"distance": 0,
"isaddress": true
},
{
"localname": "Germany",
"place_id": null,
"osm_id": null,
"osm_type": null,
"place_type": null,
"class": "place",
"type": "country",
"admin_level": null,
"rank_address": 4,
"distance": 0,
"isaddress": true
},
{
"localname": "de",
"place_id": null,
"osm_id": null,
"osm_type": null,
"place_type": null,
"class": "place",
"type": "country_code",
"admin_level": null,
"rank_address": 4,
"distance": 0,
"isaddress": false
}
],
Add more logic (and help text) so one search box can understand all three query types.
There used to be a link below the results for more results that went missing with the new UI. Either get the more link from the result or simply collect the place_ids to be excluded yourself.
jQuery is still used for tab navigation and dropdown. Once Bootstrap v5 is released we should be able to remove the library completely.
A single load of the details page sends 12 calls to the status endpoint. The search page sends 7 calls to status. The reverse page even sends 16. Predictably the server starts blocking at some point.
With the database versioning PR the status call has received some additional fields. And I'm also thinking to extend the status.php to report which backend server is being used for osm.org.
It might be nice to add a HTML view for all that.
Run the test suite automatically. Update the documentation that we have a test suite.
To help people find bad postcodes we could add a link in the details page next to the postcode to an Overpass query that shows all objects with that postcode in a 10km radius around the centroid of the place. It probably should include a little explanation why it is there and how to fix the postcodes.
See for example https://nominatim.openstreetmap.org/ui/details.html?osmtype=W&osmid=161461811. The title line says 'null'.
It seems to /dist/ contains debug build due to bundle.js try to load livereload.js
When you try to rebuild with yarn build
you can see changes in
dist/build/bundle.css <-- just changed hashes
dist/build/bundle.js <-- removed livereload module
dist/build/bundle.js.map
The API and details link on the search result page always contains a parameter 'polygon_geojson=1' because the geometry output is used on the map. But when looking at raw API output, the geometry information just gets in the way and makes the request slow. So I would suggest to remove this one parameter from the API and debug URLs.
Projects might install their own version or even fork of Nominatim and expose a user interface to internal or external users. The users might not be aware what data was imported, whom to contact or where/how to file bugs. To avoid confusing with the frontend running on https://nominatim.openstreetmap.org/ some customization should be possible
Default should be just "Nominatim Demo" and https://nominatim.openstreetmap.org/ will maintain some of the current content in their configuration (or fork).
I used to get to the debug view of the search by adding a &debug=1
to the URL. That doesn't work anymore for obvious reasons. So it would be nice to have a link for that. The link neds to go to the original API with format=json
(to avoid being redirected back to the UI because of the format being potentially HTML) and debug=1
.
Run yarn lint
at least.
Opening https://nominatim.openstreetmap.org/ui/search.html?street=10+downing+street&city=london stays on the 'Simple' tab and it's confusing all search fields are empty.
Since Nominatim PHP will switch to dotenv files soon it makes sense to use https://www.npmjs.com/package/dotenv here, too.
idea:
nominatim.openstreetmap.org has their API on / and runs nominatim-ui in a subdirectory '/ui'. Maybe that unusual but it's the most used installation so we should add test cases.
Possibly by setting an environment variable, running an API proxy on '/' and just running the whole test suite again. Something we'd run with github actions but not part of the regular 'yarn test' run.
nominatim.osm.org asks for all automated tools to set a user agent. We should set one when running our tests. I think that works by setting args
during puppeteer.launch()
https://peter.sh/experiments/chromium-command-line-switches/
https://nominatim.openstreetmap.org/ui/details.html should allow something like 'r7444' as an ID. Currently only 'R7444' works.
For every API call there is a second call to /status to display the last-updated time. It would be nice if the response would be cached, even nominatim.openstreetmap.org doesn't update faster than minutely. Ideally configurable, many installations only once per day.
Displaying "3 minutes ago" (full timestamp when you mouse-over the value) would be great.
No issue category did really fit this one AFAICT. I presume this is a code problem but I have not installed nominatim locally.
The link shown on the top right of https://nominatim.openstreetmap.org/reverse.html is wrong. This only happens after you switch between forward and backward search a few times. Then you end up at https://nominatim.openstreetmap.org/ui/search.html.html (NB: `.html.html) which obviously does not exist.
Go for example to https://nominatim.openstreetmap.org/ui/search.html?q=horse+chipping There are a lot of pub icons in the result list. However, looking at the API results only the "The Black Horse" result has an icon in the response.
When loading index.html or search.html from a file:// URL then the browser doesn't allow Javscript to fetch local files.
Firefox
Security Error: Content at file:///private/tmp/test3/nominatim-ui-3.0.0/dist/search.html may not load data from file:///private/tmp/test3/nominatim-ui-3.0.0/dist/reverse.html.
The error is printed in the browser console but maybe we can display something in the UI itself.
sometimes the "details" link in search result is empty, e.g. on postcodes
https://nominatim.openstreetmap.org/ui/search.html?q=berlin+10115
returns 3 results, but only the first and second have a details link
This seems to happens on some postcode objects but not on all. Other class/types seem to work fine
thanks
For example we don't enforce numeric limits, so requesting https://nominatim.openstreetmap.org/search.php?q=London&limit=abc&format=jsonv2 will return
{"error":{"code":400,"message":"Integer number expected for parameter 'limit'"}}
That message should be displayed to the user.
Same for reverse searches with no results.
https://nominatim.openstreetmap.org/reverse.php?lat=-19.81327&lon=-142.88769&zoom=18&format=jsonv2
{"error":"Unable to geocode"}
(here it might be better to display a different message offering more help)
On the starting page of nomination UI
https://nominatim.openstreetmap.org (which redirects to https://nominatim.openstreetmap.org/ui/search.html)
there's a link to "reverse search" but I'm missing a link to the "show details for place" search page
https://nominatim.openstreetmap.org/ui/details.html
Motivation:
I only found this "show details" search page by luck. I am new to OSM and I wanted to double check that my OSM ids are correct. The search box on openstreetmap.org does not accept OSM ids as search input and thus displays an empty results list including a link to the OpenStreetmap Nominatim server https://nominatim.openstreetmap.org. I followed this link and only by clicking back and forth I suddenly ended up on the "show details for place" search page https://nominatim.openstreetmap.org/ui/details.html. To ease access, I'd like to suggest to add a link to the "show details for place" search page prominently on the starting page of nomination UI.
Thank you.
The links to the details page in the result list and the details links in the details page are missing the class parameter. I believe that this is a regression against the old UI.
In addition to that the details page does not forward the class parameter to the API.
This must be a regression in the last release.
Go to https://nominatim.openstreetmap.org/ui/details.html?osmtype=N&osmid=946563004&keywords=1
Page is empty. Error reported in console:
Uncaught (in promise) TypeError: r is undefined
Si DetailsPage.svelte:168
ei DetailsPage.svelte:166
p DetailsPage.svelte:222
W index.mjs:764
F index.mjs:732
The search rusults doesn't fit by defining a country code in advance
The content is no longer easily diffable between builds and tends to cause a lot of conflicts during development, so it has become a bit of a nuisance. There is also the real danger of shipping debug builds, see #47. So I'd vote for removing the content of dist/build
from the repo and require that people using master to build first.
Some ideas for keeping it easily accessible for Nominatim software users:
dist/
for every release and uploads it as an artefact to the release pageThere are situations when Nominatim API instance is secured and passing authentication token through header or query parameter is needed.
I have added simple support to configure both, headers and query parameters, but I am not sure if You would like to have it integrated.
Please take a look at https://github.com/petoc/nominatim-ui/tree/change and if You think it make sense, I can create pull request.
I think it can be useful for some users.
The Nominatim API allows a couple of other parameters that cannot be set via the UI. Lately I was missing limit
, dedupe
. Ideally they can all be set via the GUI at some point. For the moment it would just be nice if all additional parameters in the URL are forwarded as is to the API call.
I tried making structured search its own top navigation link but it was too complex to keep track of the mode on page changes. Try if making it its own /advsearch.html page is easier.
After navigating from one place to another using "details" link on details page "display child places" contains wrong link
The map used to keep its current view when going from the search form to the reverse form. This must have gotten lost in refactoring somewhere.
Currently you have to adapt dist/config.js
to your local environment. That's inconvenient because it pollutes the git status. May I suggest that the file is moved to dist/config.js.example
and then add instructions in the README to copy the file to dist/config.js
and adapt the copy.
PS: I'm aware of the dotenv issue. I'm more looking for a quick fix of the git status pollution as this is a blocker for deploying on osm.org.
As noted in #114 we already keep the map center, but when clicking 'reverse' a search with highest zoom level gets started and the result will usually be very much zoomed in. We can't use zoom=
in the URL, that's for the search. Possibly save the map state/bounds in a Svelte store.
I've used the website with a API URL that exists but isn't a Nominatim endpoint. The API request ended with 404 and "CORS missing allow origin". There was no error shown, but just the "Loading data from API ..." keeps spinning forever.
We need to constrain the width of the details list: https://nominatim.openstreetmap.org/ui/details.html?osmtype=R&osmid=62782&class=boundary
On https://nominatim.openstreetmap.org/ui/search.html the page is not reloaded for multiple searches. To reproduce:
Console has:
Uncaught (in promise) TypeError: URL constructor: /search.php?q=suhl&polygon_geojson=1&format=jsonv2 is not a valid URL.
Zt LastUpdated.svelte:15
r index.mjs:35
bt api_utils.js:31
I suspect that is has something to do with it.
I've updated to latest master last night, so this is likely a regression in one of the last commits.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.