You are here

function locationmap_static_image_url in Location Map 7.2

Same name and namespace in other branches
  1. 8.2 locationmap.module \locationmap_static_image_url()
  2. 7 locationmap.module \locationmap_static_image_url()

@todo Please document this function.

See also

http://drupal.org/node/1354

1 call to locationmap_static_image_url()
theme_locationmap_block_image_link in ./locationmap.module
Format static image for display in the block.

File

./locationmap.module, line 501

Code

function locationmap_static_image_url($w = 200, $h = 150) {
  $image_url = '//maps.googleapis.com/maps/api/staticmap?zoom=' . variable_get('locationmap_zoom', 5);
  if ($locationmap_api_key = variable_get('locationmap_api_key', '')) {
    $image_url .= '&key=' . $locationmap_api_key;
  }
  $image_url .= "&size={$w}x{$h}";
  $image_url .= '&markers=' . variable_get('locationmap_lat', 0) . ',' . variable_get('locationmap_lng', 0);
  return $image_url;
}