_theme_nicemap_map_full

nicemap/nicemap.theme.inc, line 65

Versions
6
_theme_nicemap_map_full($points, $map, $options)

▾ 2 functions call _theme_nicemap_map_full()

theme_nicemap_map in nicemap/nicemap.theme.inc
Wrapper theme function allows for easy overriding of map style
theme_nicemap_map in nicemap/nicemap.theme.inc
Wrapper theme function allows for easy overriding of map style

Code

<?php
function _theme_nicemap_map_full($points, $map, $options) {
  $w = $options['width']  .'px';
  $h = $options['height'] .'px';
  $map_url = $map->url($options);
  if ($map_url) {
    $map_bg = "background-image:url('$map_url');";
  }

  // use a hardcoded index to associate point to item
  $i = 0;
  foreach ($points as $point) {
    $point['i'] = $i;
    $geopoints  .= theme('nicemap_point', $point);
    $geocontent .= theme('nicemap_content', $point);
    $i++;
  }

  $attr = array(
    "class" => "nicemap-map",
    "style" => "$map_bg width:$w; height:$h;",
  );

  $attr = drupal_attributes($attr);

  return "
    <div $attr>
      $geopoints
      <div class='hidden'>$geocontent</div>
    </div>
  ";
}
?>