function location_map_link_cn_google in Location 7.3
Google link.
File
- supported/
location.cn.inc, line 73 - China.
Code
function location_map_link_cn_google($location = array()) {
$query_params = array();
foreach (array(
'street',
'city',
'postal_code',
'country',
) as $field) {
if (isset($location[$field])) {
$query_params[] = $location[$field];
}
}
if (count($query_params)) {
return 'http://maps.google.com.hk?q=' . urlencode(implode(', ', $query_params));
}
else {
return NULL;
}
}