Google Plus and Google Maps - Embedding Content

Both Google and YouTube provide ready-to-paste HTML code so that you can show Google Maps and YouTube videos directly on your website.  This page tells you how.

Embedding a Google+ Button    Google +1 button

You can paste the HTML code from Google straight into a PanPage Raw/HTML item, and you can tweak things a little on the way...

The first step is to create a Raw/HTML item where you want the button to appear in your website.  Next get your Google+ code here.  You can also find it under 'Business Solutions' at the bottom of Google's home page.

Note that Google tells you to paste the code into two different places in your website but you can get away with pasting it all together in a single Raw/HTML item.  It may not be completely correct but it works!

Embedding a Google Map

You can paste a Google Map into a PanPage Raw/HTML item in much the same way as the button above....

Create a Raw/HTML item where you want the map to appear in your website.  Take note of the width (in pixels) of the column containing this item as that is the maximum width of map you can embed.

Google Maps link buttonNext, in Google, navigate to the map you want to display and click the 'link' button at top right (see picture right).

Click the link 'Customise and Preview Embedded Map'.

Choose 'Custom Width' and enter the width of the column you looked up earlier.  Enter a suitable height too.

Google shows the map at corect size and the HTML code is in a box below. 

Click in the code box and press [Ctrl+A] then [Ctrl+C} or right click and choose 'Select All' then again and choose 'Copy'.

Now go back to your PanPage item. Click in the edit window and press [Ctrl+V] or right click and choose 'Paste'.  This will copy the HTML code into your item.

Click the Save button then go and see how the page looks.

Customising the Map

If you're feeling brave there are a couple of things you can tweak to improve the appearance of the map on your web page....

Styling the link below the map

By default Google creates an ugly bright blue link below the map but you can remove a small piece of HTML code to style the link like other links on your website.

In the PanPage editor go to the end of the code you just pasted and look for this fragment...

...source=embed" style="color:#0000FF;text-align:left">View Larger Map...

Delete this piece:  style="color:#0000FF;text-align:left"  leaving just

...source=embed">View Larger Map...

Be careful not to delete any more - particularly the closing angle bracket before 'View Larger Map'.

Removing the White Address Box

The white call-out box Google places on the embedded map is annoying, particularly if you have a very small map.  You can remove it as follows...

In the pasted code locate the piece  iwloc=A  and change the 'A' to 'near' - so it reads  iwloc=near

If that piece of code isn't present you can add it.  Locate this piece
  output=embed"></iframe>
and just after embed but before the closing quote mark, add
  &amp;iwloc=near
so it reads
  output=embed&amp;iwloc=near"></iframe>

Remember this is all HTML code so type it in EXACTLY as shown here, ampersands, semi-colons, slashes, the lot!

This website uses cookies for statistical usage data. By continuing to use this site, you agree to the use of cookies.

Don't show this again