You are here

function gmap_debug_map_page in GMap Addons 7

Same name and namespace in other branches
  1. 6 gmap_debug/gmap_debug.module \gmap_debug_map_page()
1 string reference to 'gmap_debug_map_page'
gmap_debug_menu in gmap_debug/gmap_debug.module
Implementation of hook_menu().

File

gmap_debug/gmap_debug.module, line 89
Debugging helpers for gmap.

Code

function gmap_debug_map_page($nummarkers) {
  $map = array_merge(gmap_defaults(), gmap_parse_macro('[gmap width=100% |height=600px]'));
  for ($n = 0; $n < $nummarkers; $n++) {
    $marker = array(
      'latitude' => (double) ((mt_rand(65000, 70000) - 60000) / 1000),
      'longitude' => (double) ((mt_rand(181000, 190000) - 180000) / 1000),
      'markername' => 'drupal',
      'offset' => $n,
    );
    $map['markers'][] = $marker;
  }
  return theme('gmap', $map);
}