[OpenLayers-Users] Reverse Geocoding

Stephen Woodbridge woodbri at swoodbridge.com
Sun Sep 27 13:22:30 EDT 2009


rmanor wrote:
> 
> Is it possible to do reverse geocoding with OpenLayers (give
> longitude/latitude and get street name/city name) ?
> 
> Thanks.

Yes, but you probably need a server side component to do the actual 
reverse geocoding. For example here is an application that I build:

http://imaptools.com/maps2/tiger.html

if you single click on the map is will reverse geocode that location and 
put the results in a marker. If you click the marker it will open with 
the xml results in it.

The single click does an Ajax request back to my server to do the 
reverse geocoding and then create a marker and puts the xml text as the 
contents of the marker. One could just as easily parse the xml and put 
is in a more human readable form in the marker.

You can look the the page source to see how I did the client side of this.

-Steve Woodbridge
  http://imaptools.com/



More information about the Users mailing list