Hello. I've installed and setup GMap module.
I've created a new node and add this php code:

<?php
// a simple GMap array
  $map_array1 = array(
    'id' => "my-map",         // id attribute for the map
    'width' => "100%",        // map width in pixels or %
    'height' => "600px",      // map height in pixels
    'latitude' => 41.9023,    // map center latitude
    'longitude' => -87.5391,  // map center longitude
    'zoom' => 7,              // zoom level
    'maptype' => "Map",       // baselayer type
    'controltype' => "Small", // size of map controls

    'behavior' => array(
      'locpick' => FALSE,
      'nodrag' => FALSE,
      'nokeyboard' => TRUE,
      'overview' => TRUE,
      'scale' => TRUE,
    ),

    'markers' => array(
      array(
        'text' => 'First Marker',
        'longitude' => -3.80126953125,    
        'latitude' => 39.8928799002948,
        'markername' => 'cluster',
      ),
      array(
        'text' => 'Second Marker',
        'longitude' => -3.90126953125,    
        'latitude' => 39.8928799002948,
        'markername' => 'cluster',
      )
    )
  );
  $output1 = theme('gmap', array('#settings' => $map_array));
echo $output1;
?>

The map is shown good, but I can't see the markers.
I've configured all zoom levels to 0 (in gmap settings), to show markers in all zoom levels.
Where could be the mistake?

Comments

briantes’s picture

Sorry, I've found it. Three days without see the bug, I put the question in the forum and five minutes after, I found the bug.

The variable $map_array passed to theme function should be $map_array1:

$output1 = theme('gmap', array('#settings' => $map_array1));