[OpenLayers-Users] Re: Finding the country/state/city beneath the mouse click

Peter N. Schweitzer pschweitzer at usgs.gov
Thu Mar 24 14:06:30 EDT 2011


On 03/24/2011 01:55 PM, harahara wrote:
> Thank you very much for the pointers to geonames.org and Nominatum. Since my
> database would be relatively small (around 10000 places) I could look into
> implementing a simple lookup table based on the longitude and latitude (if I
> want to do it offline).
>
> At the least, I know what is the term that I should be looking for, namely
> "reverse geocoding". As you can see I am new to this stuff.

For locations within the US, you can try  a URL of the form
   http://tin.er.usgs.gov/atlas/point-xml.php?longitude=-78.3&latitude=38.7
View source to see that the result is XML.

Outside North America that service will give only the country.

Peter
-- 
Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192)
(703) 648-6533  FAX: (703) 648-6252  email: pschweitzer at usgs.gov
<http://geology.usgs.gov/peter/>


More information about the Users mailing list