April 20, 201214 yr Hi All, Hope you had a good bank holiday and got lots of work done in your free time! I am having an issue with Google maps. Here is the code: <script type="text/javascript"> jQuery(document).ready(function($) { $("#tb_gmap_<?php echo $id; ?>").gMap({ maptype: "<?php echo $maptype; ?>", zoom: <?php echo $zoom; ?>, markers: [{ address: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", popup: <?php echo $popup; ?>, html: "<img src='<?php echo get_template_directory_uri(); ?>/images/xxx.png' /><br /></h3>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</h3><p>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>" },{ address: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", popup: <?php echo $popup; ?>, html: "<img src='<?php echo get_template_directory_uri(); ?>/images/xxx.png' /><br /><h3>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</h3><p>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>" }], controls: { panControl: true, zoomControl: true, mapTypeControl: true, scaleControl: true, streetViewControl: false, overviewMapControl: false } }); }); </script> I am just wondering how to make it so that my 'popup' windows display open by default and not just when you click the markers. Any help much appreciated! Thanks.
April 21, 201214 yr You might need something like below, so it opens by default. infowindow.open(map,marker); I haven't tested this, so see how you get on.
April 24, 201214 yr Author You might need something like below, so it opens by default. infowindow.open(map,marker); I haven't tested this, so see how you get on. Got me on the right track, thanks. Turns out you can't have more than one window open anyway so i left it in the end.
Create an account or sign in to comment