How to add a Google MyMaps to the Google Maps v3 Shortcode plugin

The easiest way to create a custom KML is using Google’s “My Maps” feature.  Assuming you already have a MyMaps created, you can use it with this plugin by following these steps:

Grab the KML of your My Map

Go to your My Maps page, and select the map you want to use.  Then, click on the “edit” button as shown below:

A link to Google Earth should now appear above the map.  Right click on the link, and copy the link.

Add the KML to the shortcode

Now add that link to the shortcode like this:

[ map w="500" h="400" maptype="SATELLITE" kml="" ]

47 thoughts on “How to add a Google MyMaps to the Google Maps v3 Shortcode plugin

    • My guess is that the problem with many failed kml attempts is that you are adding the the shortcode in “visual” mode. Try adding the kml in “html” mode. Apparently, “visual” mode automatically adds a bunch of unnecessary tags to the shortcode.

      • It works! Ed, try it.
        Edit you page in HTML mode.
        Ull see a tab that says Visual and Html.
        Choose HTML
        and edit it.

        Thanks yohman!

  1. Try adding the kml in “html” mode. Apparently, “visual” mode automatically adds a bunch of unnecessary tags to the shortcode. Let me know if that works, and wow, good luck in your travels!

  2. ‘div id=”map”‘ overlaps when two or more contributions are in a page.
    Therefore, it is thought that the map is not displayed.
    It did not solve it though it tried in the html mode.

    1ページに複数の投稿があると、div id=”map”が重複して表示されないように思えます。

    • @tony

  3. The multiple map was described in “Readme”. I had overlooked it.


  4. Hello. I embed this to my blog & it works. Thanks. There is, however, a problem:

    I cannot embed the map with the zoom level.

    Checking the “Share link” option of GoogleMaps you may find it has option of


    the last three lines are very important to the plugin.

  5. Hi,

    The first load works well.
    But upon adding stuff to my google maps, it does not appear on the post.
    I tried to open the KML in gearth, and modification are there.
    Also tried to make another post, and it worked as well.

    Is there some caching features somewhere to flush ?

    • @nicolas

      hmm, I was not aware of that, thanks for the tip. I don’t think there is a map specific caching feature, though there may be something you can do to the entire page… let me know if you find something out.

    • Did you find a solution to the caching problem?
      I have the same problem, and it is realy anoying.

      • I found a solution/hack… it’s not realy a nice way, but it works…

        It works with the KML link to google maps, and maybe also to hard linked KML files.. after you made changes to your map/kml file, you have to change the link to the kml in the shortcode.

        Since the link to google maps is always the same, it’s cached somehow.
        But you can just ad some dummy variable at the end of the url to make it unique again…

        i just added &xyz=001 at the end of the url. After a change to the map, i change it to &xyz=002 etc.

        again… it’s not a nice way to do it, but it works.

  6. Hello Yoh,

    I would like to ask you: where do I add the kml code? In the post box?

    I tried to add it in a post (in the html tab) but I just get text output on my page.

    You can visit my website at I am building for my client to see what I mean. I posted a map on there, but only text is coming out.

    • @Eric

      You need to put the short code in as follows:

      [ map w=”500″ h=”400″ maptype=”SATELLITE” kml=”” ]

      but remember, you must remove the spaces after and before the opening and closing brackets.

  7. Thank you for great plugin!

    I am observing some strange problem with your plugin, however, that I cannot isolate.

    I have two websites with mirrored content in two languages. On one of them your plugin is working flawlessly, on the second one, it shows some problems.

    Problems are 1) corrupted google maps navigation (zoom in/out), 2) when map is moved, white vertical lines appear, 3) when clicked on pin, the balloon is also corrupted.

    It seems to me as some conflict in Java script. The only relevant difference between the two sites, that I can think of, is the version of Suffussion theme.

    Here are examples:

    Flawless operation:
    Problem appearing:

    Frankly speaking, I have no idea, how to debug/resolve this problem and would appreciate a hint.

    • @Rafal,

      Thanks for using my plugin! The problem is definitely in your stylesheet. This is the line:

      link rel=”stylesheet” href=”,skins/light-theme-pale-blue/style.css&comp=gzip-minify&ver=3.7.1″ type=”text/css” media=”all”/

      If you remove this line, it works. You may want to look into this further?

      • Thank you, Yohman!

        The reason was the following entry:

        .entry img {
        max-width: 99%;

        Removing it resolved the problem (setting to 100% – not). I will try to find out the result of this setting.

        BTW, is it possible to set an exception for your plugin only?

  8. I’m having problems including KML maps – the background (where the google maps should be) is white. You can check this out at and the corresponding code is: [map w=500 h=300 kml="" maptype="SATELLITE"]

    Do you have any idea on this? I’m pretty out of ideas. Thanks for looking into this!

  9. You can auto generate the KML in the URL by specifying you want the output to be kml, which makes this plugin very awesome for auto generating a map. I have it in my template like so:

    $mapCode = “[map w='500' h='400' kml='".urlencode($address)."&output=kml']“;

    echo do_shortcode($mapCode);

  10. Hello, this looks like exactly what I am looking for but I am not sure if perhapse google changed its code, or I am doing something wrong. With the link you supplied in your example the map shows up fine. But when I use my own link I get a map zoomed all of the way out with no place markers at all. Anty idea what I am doing wrong?

    is the map. I tried numerous variations including removing the “&output=kml” from the end

  11. I’m adding in the shortcode as per your examples and can’t seem to get it to work. The width & height doesn’t change, nor does the position of the map marker when adding in long & lat positions? Any ideas?

  12. Hello,
    I have been using your plugin and am pleased, although I am having a layering issue with the object. I have a drop-down menu that drops into the page space and goes BEHIND the map plugin. Do you know a short code to set the map object back, so when the menu drops down it covers the map, rather than the menu dropping behind it?
    Thanks so much

    • Great plugin, thanks.
      I have the same problem with the KML links as discussed earlier on this page. I suggest you replace line 61 in Google-Maps-v3-Shortcode.php by:
      $thiskml = htmlspecialchars_decode($attr[‘kml’]);
      Works fine this way, at least for me…

  13. Hello,
    I can not run the plugin. I created a map using Yahoo Pipes. I can extract the pipe from the map in KML format, and copying in, I can have a google map with all the information of Yahoo Pipes.
    I saved the map in my maps and when I try to put the link in the maps of my WordPress page, using your plugin, I can not see anything but the general map of the world with nothing else.

    Can you help me?



    Map address:

  14. Hi Yohman,

    Thanks for great plugin! It is simple and easy to use.

    Unfortunately there is one problem I am having with it which might be happening on my side, but I don’t even know what to look for. I hope that you can help with advice.

    When I add the code to a page with original URL from your FAQ, everything works perfectly fine – e.g. [map id="map1" w="560" h="300" kml=""] is dispalyed correctly.

    But when I replace URL with mine, than map of the globe is displayed instead… I tested my URL by entering to address bar in browser directly, Google Earth was called and file was open instantly. But for some reason it does not work through plugin…

    Do you know why this is happening?


  15. Probably this isn’t necessary but i got lost for a while so this is just a note to clarify this a bit more.

    When yohman says

    “My guess is that the problem with many failed kml attempts is that you are adding the the shortcode in “visual” mode. Try adding the kml in “html” mode. Apparently, “visual” mode automatically adds a bunch of unnecessary tags to the shortcode.”

    He is referring to the tab in wordpress Visual|HTML when you add a post

    Hope this helps newbs like me

    By the way the best Google Maps plugin for WordPress I have seen, congratulations

  16. Hi all,

    just integrated the tag to show a mymaps route in my blog. Using the link below I just get the map integrated but I cant see the route that I created on mymaps… :(

    This is the tag I am using:

    [map w="500" h="400" maptype="SATELLITE" kml=""]

    Any ideas what I am doing wrong?

    Thanks in advance,


  17. Hi,

    thanks for the Plugin!

    But, … I believe it is not working anymore to include a kml from ‘My Maps’ from Google Maps. They have changed the interface and there is no link anymore for ‘Open in Google Earth’. Or is it just me…

    Thanks for any hint,

    • Just found the following solution to add a Google MyMaps to the Google Maps v3 Shortcode plugin:

      – Go to you map in MyMaps
      – Klick the Link button in the upper right
      – Copy the URL
      – Add “&output=kml” at the end of the URL
      – Now add the full URL to the shortcode like this

      [map w="500" h="400" maptype="SATELLITE" kml=""]

      Hope that helps!

      Thanks again,

  18. Hi Yoman

    How to display several markers in same time on the map?

Comments are closed.