This patch is to allow tabbed info windows for markers. It works with php map, but can be easily extended to gmap macro form.
If infotabs array is present, the label property is ignored
This is the sample:
<?php
$mymarkers=array(array('markername'=>'blue',
'infotabs' => array('Tab #1' => 'Terminal bus stop',
'Tab #2' => 'Content of tab2'),
'point' =>'49.19236205396474,-123.1790542602539'),
array('markername'=>'green',
'label' => 'Service buildings bus stop',
'infotabs' => array('Tab #1' => 'Service buildings bus stop',
'Tab #2' => 'Content of tab2'),
'point' =>'49.19224986943509,-123.1538200378418'),
array('markername'=>'green',
'infotabs' => array('Tab #1' => 'Transer to Vancouver bus',
'Tab #2' => 'Content of tab2'),
'label' => 'Transer to Vancouver bus',
'point' =>'49.191801128772326,-123.14231872558594'));
$mymap=array('id' => 'mymap',
'center' => '49.19258642226091, -123.17647933959961',
'zoom' => 13,
'width' => '100%',
'height' => '400px',
'type' => 'Satellite',
'markers' => $mymarkers);
echo gmap_draw_map($mymap);
?>
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | gmap-tabwin2.patch | 2.58 KB | yecarrillo |
| gmap-tabwin.patch | 2.51 KB | yecarrillo |
Comments
Comment #1
yecarrillo commentedPrevious patch was working with Firefox, not with IE. This modified version works in both IE & Firefox.
Problem was: In Internet Explorer final comma in arrays is not allowed (javascript):
Comment #2
bdragon commentedFixed in 5.x-1.x-dev a while back -- use the 'tabs' property on a marker. (See marker.js lines 45-51.)
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.