Stop Google Maps Disappearing

August 19, 2009 ·

If you’ve got a website, chances are you have a Google map displaying somewhere on your site showing your location or the locations of the places you blog about. Static maps which don’t allow you to zoom in or move around, are a thing of the past. If your location is spectacular, why wouldn’t you want website visitors to be able to click on Satellite View and see the beach, sea and surf for real.

WordPress and Google Maps

When you copy the embed code for a Google map and paste into the html view of a WordPress post or page, it appears to work as it should until you try and edit the page. When you make changes to your page, the map disappears and you have to go back to Google, get the embed code and paste all over again. Very annoying and time-consuming.

The Plugin to Solve Your Problems

As you probably suspected and I have recently discovered, there is a plugin called XML Google Maps Plugin which solves this problem and it’s not complicated to use. (See screenshots below)

First you need a maps API key.

  1. Go to Google Maps API Sign up Page
  2. Sign in to your Google Account
  3. Enter the website address where the maps will be displaying (if your WordPress blog is in a separate folder,include this in the address, otherwise just type your website address)
  4. Tick that you have read terms and conditions
  5. Click on the Generate API Key button at the bottom
  6. Paste the key into a blank file on your computer and logout (you will need this key later)

Next you need the XML Maps Plugin on your website.

  1. Download the XML Google Maps plugin and upload to your plugins folder using ftp.
  2. OR if you are using one of the latest versions of WordPress, go to plugins on your admin bar, click Upload New, find the right plugin and upload it directly into your plugins folder.
  3. Activate the plugin in your plugins admin.

Adjust the Settings on the XML Google Maps admin page.

  1. Once you have activated the plugin, on your site, this will appear under Settings in your admin bar
  2. Paste your API Key into the box at the top
  3. Enter 0 in the caching box or leave as is
  4. Change the size the map will display at depending on the size of your pages (you can change this later)
  5. Choose whether you want map only or text with the map
  6. Choose whether you want the default view or satellite etc
  7. Save changes in any of the boxes on the right
Screenshots

How to Add a Map to Your Page/Post

  1. Go to Google maps
  2. Login to your Google account and create a map
  3. Once you are happy with the map, right click on the “View this map in Google Earth” link (top right) and select Copy Link Address.
  4. Login to your website and navigate to the page where you want the map to display.
  5. Enter text on your page where you want the map to appear. Eg. View map….
  6. Highlight the text and click on the Link/Anchor icon (same line as bold, italic etc)
  7. Paste your link address into the top box on the pop up window over the http
  8. Insert link and Publish or Save your page

Your Google map will magically appear on your website page. If you choose map only in your XML Google Map settings, the text will not be showing.

This plugin can do all sorts of amazing things which I haven’t covered in this article. Let me know in the comments section below if you’re using any of the other features what you think of them.

Other Articles You Might Enjoy

Best Wordpress Membership Plugin

Comments

10 Responses to “Stop Google Maps Disappearing”

  1. Michelle Ackers on August 19th, 2009 12:58 pm
    Michelle Ackers

    Hi Jo,
    Can this plugin also be used to represent a google map listing that is created in the Local Business Center rather than from Google Maps? If not – is there an alternative plugin that does it?

  2. Jo on August 19th, 2009 3:55 pm
    Jo

    Yes. It works exactly the same but you need to go to the main google maps page – http://maps.google.co.nz/, sign in, then click on My Maps to find the ones you’ve created in the Local Business centre. Click on the one you want, then follow the rest of the instructions from step 3.

  3. Ed Gunther on September 1st, 2009 1:40 am
    Ed Gunther

    Jo,
    Will the plugin mess with all the Google Maps I already have?
    Also, can this only be used from within WordPress or can I continue to use Windows Live Writer to publish a draft with the Map?

    Nice site. Thanks

  4. Jo on September 8th, 2009 10:59 pm
    Jo

    Adding the plugin shouldn’t affect any Google maps you already have on your site. I’m not sure about Live Writer. Sorry.

  5. rosemary neave on September 9th, 2009 4:10 pm
    rosemary neave

    hi jo, I have this issue of code disappearing or not displaying with other widgets – just been trying to get my new buybreambay twitter up on breambay.co.nz using a twitter based widget – script displays in html but not in visual or when loaded up.
    any thoughts?

    rosemary

  6. Jo on September 9th, 2009 7:19 pm
    Jo

    Which twitter widget are you using?

  7. Kathy Gannett on February 16th, 2010 7:30 am
    Kathy Gannett

    Hi: I will be installing the XML Maps Plugin to keep my map from disappearing. Can I place a google map on a page and have text BESIDE it (not above or below)?

    Thnaks, Kathy

  8. Jo Couchman on February 16th, 2010 12:12 pm
    Jo Couchman

    Hi Kathy,
    Yes. You can set the map alignment to left, right etc inside the Google Maps Settings page once activated.

  9. James on March 1st, 2010 6:41 pm
    James

    I have a google map embeded on my homepage under “Trails”.

    I have the problem of the disappearing map using html, and I have been trying to use this plugin for some time.

    It just will not display the map. I have followed the instructions word for word.

    Any ideas?

  10. Jo Couchman on March 2nd, 2010 8:37 am
    Jo Couchman

    Hi James,
    Have you added your google maps api key to the settings page?
    I would try pasting the normal embed code into the spot on the homepage. As long as the plugin is setup this should still work.

Post your questions and feedback below or contact me on Twitter.
To receive an email when I reply to comments or add updates to this post, tick the box at the bottom of this form.