Posted by tom.camp on June 28, 2011 at 10:39pm
I have created a world map with polygons overlaying certain countries using Drupal 6 and the gmap module. However, I cannot for the life of me figure out how to make those polygons clickable so when a user clicks on them they open a popup with the information about the country. Any help/thoughts would be appreciated.
$map = array(
'id' => 'big_map',
'width' => '940px',
'height' => '405px',
'latitude' => 20.0,
'longitude' => 15.0,
'zoom' => 2,
'align' => 'left',
'controltype' => 'None',
'mtc' => 'none',
'behavior' => array(
'locpick' => FALSE,
'nodrag' => FALSE,
'nokeyboard' => FALSE,
'overview' => FALSE,
'scale' => FALSE,
'dynmarkers' => TRUE,
'nomousezoom' => TRUE,
'clickableshapes' => TRUE,
),
'shapes' => array(
'type' => 'polygon',
'points' => array( [latitudes and longitudes] ),
'style' => array( 'b20838', 1, 80, 'b20838', 25 ),
),
);
return theme( 'gmap', array( '#settings' => $map ) );Thanks in advance.

Comments
Have you tried passing in a
Have you tried passing in a text attribute to the shapes array?
I haven't tried doing this for polygons myself but I'd assume it would be the same as a marker.
eg.
I have tried. It doesn't seem
I have tried. It doesn't seem to have any effect. I did notice that on the Gmap settings page there is a Clickableshapes option, but it is disable and I don't know how to change it.
When in doubt, go downhill.