Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Google Maps API / Jquery Popup Always On Top

Featured Replies

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.

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.

  • 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.