You are here

function location_map_link_providers in Location 7.3

Provide default map link providers.

By implementing location_map_link_COUNTRYCODE_providers, individual countries can add to this (they will be merged so this default can also be overridden using those functions).

Return value

array An array where

  • the key is the a descriptive key for the provider. The key is also used in the function name of the function that generates the map links for that provider. For example, a key of 'google' means the name of the function that builds a link to a map Google Maps would be 'location_map_link_google', or 'location_map_link_COUNTRYCODE_google' for country overrides.
  • the value is itself an array with 3 key/value pairs:
    • 'name' => points to the name of the mapping service. For 'google', this would be 'Google Maps'
    • 'url' => the url of the main page of the mapping service. For 'google', this would be 'http://maps.google.com'
    • 'tos' => the url of the page that explains the map providers Terms of Service, or Terms of Use. For 'google', this would be 'http://www.google.com/help/terms_local.html'
2 calls to location_map_link_providers()
location_map_link in ./location.inc
Get a deep-link to a mapping service such as Yahoo! Maps or MapPoint given an location.
location_map_link_options_form in ./location.admin.inc
Settings page for map links.

File

./location.inc, line 111
Public API for the Location module.

Code

function location_map_link_providers() {
  return array(
    'google' => array(
      'name' => t('Google Maps'),
      'url' => 'http://maps.google.com',
      'tos' => 'http://www.google.com/help/terms_local.html',
    ),
  );
}