I thought my longitude / latitude search was being limited to the UK only by
using the following line of code
define("MAPS_HOST", "maps.google.co.uk");
However if I search for wellington, it is returning the longitude and
latitude for Wellington in New Zealand.
Here is a snippit of my code to get the longitude and latitude: Any ideas
how to limit it to UK only?
$location = $_POST['location'];
$radius_search_unit = "miles";
// Initialize delay in geocode speed
$delay = 0;
$base_url = "http://" . MAPS_HOST . "/maps/geo?output=csv&key=" . KEY;
$geocode_pending = true;
while ($geocode_pending) {
$request_url = $base_url . "&q=" . urlencode($location);
$csv = file_get_contents($request_url) or die("url not loading");
$csvSplit = split(",", $csv);
$status = $csvSplit[0];
$lat = $csvSplit[2];
$lng = $csvSplit[3];
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---