Guides and Reviews‎ > ‎Internet‎ > ‎

Google Maps - How to Embed YouTube Video in Custom My Maps

I was creating a custom Google Map, and found that I could not embed a YouTube video in a placemark as I had done before.  I tried the provided embed code, and the old embed code, but neither worked.  The HTML code disappeared from the placemark when I clicked OK.

Well, I found the solution: Modify the regular embed code slightly, and it will work. 

1. Get the embed code that looks like this:

    
    <iframe width="640" height="480" src="//www.youtube.com/embed/Re8wn090D0U?rel=0" frameborder="0" allowfullscreen></iframe>


2. add http: just before the //www.youtube..., and delete the ?rel=0 at the end of the link.       

<iframe width="640" height="480" src="http://www.youtube.com/embed/Re8wn090D0U" frameborder="0" allowfullscreen></iframe>


3. Click OK on the placemark.  When you re-open the placemark, you will notice that it adjusted the code slightly (removed the allowfullscreen, and moved the width/height callouts), but properly displays the embedded video.

        <iframe src="http://www.youtube.com/embed/Re8wn090D0U" width="640" height="480" frameborder="0"></iframe>



A side note:
I also noticed that if the embedded video was the first thing in the placemark description box (i.e. no other text first), that the description box would not stay displayed when viewed on iOS Safari.  My solution was to include just a bit of text before the video embed code.  Something like "Watch this video to see..."