Skip to content
Snippets Groups Projects
Commit bb09e0b6 authored by Brandon Bergren's avatar Brandon Bergren
Browse files

Document extramarkerevents and the new clickableshapes behavior flags.

Add shape clickability.
parent 2402ca18
No related branches found
No related tags found
No related merge requests found
...@@ -212,6 +212,18 @@ function gmap_gmap($op, &$map) { ...@@ -212,6 +212,18 @@ function gmap_gmap($op, &$map) {
'help' => t('Adds a scale control to the map in the default position.'), 'help' => t('Adds a scale control to the map in the default position.'),
'previewable' => TRUE, 'previewable' => TRUE,
), ),
'extramarkerevents' => array(
'title' => t('Enable extra marker events.'),
'default' => FALSE,
'help' => t('Used for advanced javascript work, this will enable the <em>mouseovermarker</em>, <em>mouseoutmarker</em>, and <em>dblclickmarker</em> events.'),
'internal' => TRUE,
),
'clickableshapes' => array(
'title' => t('Enable clickable shapes.'),
'default' => FALSE,
'help' => t('Used for advanced javascript work, this will enable the <em>clickshape</em> event.'),
'internal' => TRUE,
),
); );
break; break;
......
...@@ -95,10 +95,12 @@ Drupal.gmap.addHandler('gmap', function(elem) { ...@@ -95,10 +95,12 @@ Drupal.gmap.addHandler('gmap', function(elem) {
} }
obj.vars.shapes.push(shape); obj.vars.shapes.push(shape);
obj.map.addOverlay(shape.shape); obj.map.addOverlay(shape.shape);
//if (obj.vars.behavior.autozoom) {
// obj.bounds.extend(marker.marker.getPoint()); if (obj.vars.behavior.clickableshapes) {
// obj.map.setCenter(obj.bounds.getCenter(),obj.map.getBoundsZoomLevel(obj.bounds)); GEvent.addListener(shape.shape, 'click', function() {
//} obj.change('clickshape', -1, shape);
});
}
}); });
obj.bind('delshape',function(shape) { obj.bind('delshape',function(shape) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment