Google map API reverse geocoding lookup country -
i want country longitude , latitude user enters.but can't country's using following
$country = $code->results[0]->address_components[6]->long_name;
because country name comes in
$country1 = $code->results[5]->formatted_address;
how common code country?
you should checking types
of country
instead of index before getting long name. highly doubt country in same position addresses.
https://developers.google.com/maps/documentation/geocoding/intro
Comments
Post a Comment