views:

28

answers:

1

I would like to store a user enter location and could do with some pointers on how to go about it.

Input - I wish to allow the user to enter a location using either a map (eg Google maps) or text input.

Storage - I believe it would make sense to store the location as the longitude and latitude.

Manipulation and Display - I'd like to display a name for a given longitude and latitude. I'd also like to search for all inputs from an arbitrary region eg London.

What libraries or packages (preferably Java, preferably free) can be used to help with this process?

+1  A: 

The process of converting an address to a latitude/longitude pair is called geocoding. Doing the reverse process (lat/long to address) is called reverse geocoding.

The Google Maps API is capable of performing both these functions. However, note that there are service limits in place on the number and frequency of requests made to perform these functions. This means you'll want to implement some kind of caching mechanism for the results.

Doing a name search for a region I don't know about. The maps API may do this, but I haven't gone in enough depth with it to find out.

Jon Seigel