You are here

function location_map_link_au_mapquest in Location 7.3

Same name and namespace in other branches
  1. 5.3 supported/location.au.inc \location_map_link_au_mapquest()
  2. 6.3 supported/location.au.inc \location_map_link_au_mapquest()
  3. 7.5 supported/location.au.inc \location_map_link_au_mapquest()
  4. 7.4 supported/location.au.inc \location_map_link_au_mapquest()

MapQuest link.

File

supported/location.au.inc, line 189
Australia.

Code

function location_map_link_au_mapquest($location = array()) {
  $get_query = '';
  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=AU&' . $get_query;
  }
  else {
    return NULL;
  }
}