How To Hide The InfoWindow In An iFrame Embedded Google Map

When wanting to show a location on a simple Google Map within a website there are few options that you have in order to do this. One of the easiest and quickest methods is to use an iFrame. Let’s look at how we can get the code for the iFrame:

By putting this HTML into our webpage it will give us the iFrame below:

Hiding The InfoWindow By Default

In the iFrame above can you see how the InfoWindow (ie. the white bubble / popup) is shown by default? What if we don’t want it to be visible when the iFrame first loads? Luckily the fix is simple and can be achieved by amending the ‘src’ attribute of the <iframe> tag.

At the end of the ‘src’ attribute add the following to the URL:

&amp;iwloc=near

In full our iFrame code should now look like the HTML below. I’ve highlighted the additional parameter in red.