I need a script that calculates the extent of a location. A location is a village, country, continent or area code. The script has to offer an API which is accessible via AJAX. The results must be rendered as XML (default) or by choice (by parameter) as JSON. The location is given by a user (a string) and must be recognized by the script most likely through a third-party service such as Google Maps. If the location is not clear the script must provide an error message or a list of suggestions if possible. If the location is known and recognized the script must calculate the extent of the location in square meter (default) or by choice (by parameter) as square feet. The script must also return the geographical points (corner points) which describe the location from which a schematic of the location can be drawn.