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);

?>
CommentFileSizeAuthor
#1 gmap-tabwin2.patch2.58 KByecarrillo
gmap-tabwin.patch2.51 KByecarrillo

Comments

yecarrillo’s picture

StatusFileSize
new2.58 KB

Previous 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):

new array('a','b',);
bdragon’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev
Status: Active » Fixed

Fixed in 5.x-1.x-dev a while back -- use the 'tabs' property on a marker. (See marker.js lines 45-51.)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.