Given street, city, lat / long and zip, how do you create a Google map snap?
After the Gmap result, I tried to reproduce the link that it gave. So far I have tried:
$street = str_replace(' ', '+', $location['street']);
$street = str_replace('#', '%23', $street);
$city = str_replace(' ', '+', $location['city']);
$state = str_replace(' ', '+', $location['state']);
$zip = $location['zip'];
$lat = $location['lat'];
$long = $location['long'];
$map = 'http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q='.$street.'+'.$city.'+'.$state.'&sll='.$lat.','.$long.'&ie=UTF8&hq=&hnear='.$street.',+'.$city.',+'.$state.',+'.$zip.'&ll='.$lat.','.$long;
Sometimes it works, sometimes I get "We could not understand your request." Does anyone know a way to make this work for any result?
Kevin source
share