You are here

function _addressfield_embed_map_render_google_maps in Address Field Static Map 7

Render regular Google Embed Map for a specific address.

Parameters

string $address: The address being displayed.

array $settings: An array of settings related to the map to be displayed.

object $entity: The entity to which the field is attached.

Return value

string Rendered Google map.

2 calls to _addressfield_embed_map_render_google_maps()
addressfield_staticmap_block_view in ./addressfield_staticmap.module
Implements hook_block_view().
addressfield_staticmap_field_formatter_view in ./addressfield_staticmap.module
Implements hook_field_formatter_view().

File

./addressfield_staticmap.module, line 385
Main file for the addressfield static map module.

Code

function _addressfield_embed_map_render_google_maps($address, array $settings, $entity) {
  drupal_add_css(drupal_get_path('module', 'addressfield_staticmap') . '/addressfield_staticmap.css');
  $render = theme('addressfield_staticmap_embed_map', array(
    'address' => urldecode($address),
    'settings' => $settings,
    'entity' => $entity,
  ));
  return $render;
}