function location_map_link_us_mapquest in Location 7.4
Same name and namespace in other branches
- 5.3 supported/location.us.inc \location_map_link_us_mapquest()
- 5 supported/location.us.inc \location_map_link_us_mapquest()
- 6.3 supported/location.us.inc \location_map_link_us_mapquest()
- 7.5 supported/location.us.inc \location_map_link_us_mapquest()
- 7.3 supported/location.us.inc \location_map_link_us_mapquest()
File
- supported/
location.us.inc, line 169
Code
function location_map_link_us_mapquest($location = array()) {
if (isset($location['street'])) {
$get_query .= 'address=' . urlencode($location['street']) . '&';
}
if (isset($location['city'])) {
$get_query .= 'city=' . urlencode($location['city']) . '&';
}
if (isset($location['province'])) {
$get_query .= 'state=' . urlencode($location['province']) . '&';
}
if (isset($location['postal_code'])) {
$get_query .= 'zipcode=' . urlencode($location['postal_code']);
}
if (strlen($get_query)) {
return 'http://www.mapquest.com/maps/map.adp?searchtype=address&country=US&' . $get_query;
}
else {
return NULL;
}
}