theme_nicemap_map

nicemap/nicemap.theme.inc, line 24

Versions
6
theme_nicemap_map($points = array(), $map, $width = 200, $height = 200, $js = true)

Wrapper theme function allows for easy overriding of map style

Parameters

$points Array An array of points in the form: array('title' => 'Chester', 'content' => 'Test', 'lat' => 40.47, 'lon' => -74.41, 'weight' => 5, ), @param $map nicemap_map object @param $width int Desired width of the resulting image @param $height int Desire height of the resulting image

Return value

A fully themed map

Code

<?php
function theme_nicemap_map($points = array(), $map, $width = 200, $height = 200, $js = true) {
  drupal_add_css(drupal_get_path('module', 'nicemap') .'/nicemap.css');
  if ($js) {
    drupal_add_js(drupal_get_path('module', 'nicemap') .'/nicemap.js');
  }
  $points = $map->process($points, array('width' => $width, 'height' => $height));
  $options = array(
    'width' => $width,
    'height' => $height,
  );
  return _theme_nicemap_map_full($points, $map, $options);
}
?>