Showing addresses on map

Just my two cents here:

If you're using nominatum to geocode an address you can use some params like:
amenity, street, city, county, state, postalcode, country in a structured query.

For example, Google HQ are on 1600 Amphitheatre Parkway, Mountain View, United States
So you have the street name, the street number, the city, and the country.

Your API will search this:
https://nominatim.openstreetmap.org/search?street=1600+Amphitheatre+Parkway&city=Mountain+View&country=United+States&format=json

And the result is this:

Which is exactly the place:
image

Just note that you can't use those params on a singular query like search?q=someinfohere.
Of course that search?q= will bring more results, but maybe not as specific as the structured.
Depending on what's your situation, you have two ways.


You can use a repeat for every address, then search the coordinates from the structured API (the regular search maybe is not so accurate for this) then insert to the table both results.

1 Like