banner-772x250

This plugin will enable a simple short code that you can use for embedding Google Maps in any WordPress post or page. The short code uses the WordPress HTTPS API and the Transients API for delivering cached maps with little to no impact on your site’s performance.

Maps are displayed with the [pw_map]] short code:

[pw_map address="New York City"]

The size of the map can be adjusted by supplying the width and height parameters:

[pw_map address="New York City" width="400px" height="200px"]

You can also use percentages for sizes:

[pw_map address="New York City" width="50%" height="200px"]

Maps are cached using the WordPress Transients API, which allows for very simple database-based caching.

Each time you display a map, the address specified is used to generate a unique md5 hash, which is used for the cache identifier. This means that if you change the address used for your map, the cache will be refreshed.

The maps are cached for 3 months, though are automatically cleared (for individual maps) when you change the address in the short code.

Download Plugin
  1. Noumaan Yaqoob

    This is great, thank you for sharing this plugin. I have reviewed several Maps plugins during last few months while writing for wplift and I think this plugin will truly help a lot of people. There are some really excellent plugins to display Google, Bing or Mapquest maps but this one is simpler and easier and plus it has built in support for caching.

    • Pippin

      My biggest complaint with most map plugins is just that they’re generally too heavy. I like simple, light plugins :)

  2. MonkeyMays

    Awesome Pippin, great plugin :)

    My daughter is building her school’s FLBA chapter a news and community calendar site, Of course she chose WP to build on, but I’m not allowed to help, Per se… but I can suggest plugins =D She is required to incorporate maps… this will be so easy for her to use.

    • Pippin

      Great to hear!

  3. edukidaveyoung

    Hey Pippin,

    Any facility to use multiple addresses or provide lat/lon? The image at the top of the page shows two pins (red and blue).

    • Pippin

      No, sorry.

  4. noah

    Wonderful plugin! Suits my needs perfectly.

    One question though: when the map is re-sized based on the page width, the yellow street view person icon starts to “squish” until at 300px wide, it’s barely visible.

    Is there a fix for this? Or a way I can just disable the street view, as it isn’t necessary for my purposes?

    Thank you!

    Noah

    • Pippin

      Noah, could you give me a live URL so that I can see the issue?

  5. elad

    Hi Pippin,
    It really is a wonderful plugin!
    Just wonder how and if possible to show the map with different language then En?

    Tx

    • Pippin

      No, sorry.

  6. john

    Hi Pippin.

    Great plug.

    One question though, when I use the same coordinates (in this case a post code) on multiple page the map still shows but with scroll/click facilities missing! It is almost as though the map is now an image.
    Any reason for this?

    • Pippin

      It’s probably caused by CSS in your theme. Could you show me a live URL?

    • john

      (link removed)

      Could you please not publish this url?

  7. john

    Thank you Pippin, you were right it was the css that was at fault.
    Could you please remove the url in my previous post.

    Many thanks for a great plug. :-)

    • Pippin

      Great!

      I have removed the link.

  8. Eoin Gregory

    Hi Pippin,

    Thank you for making this very cool shortcode plugin.

    I’m trying to display a custom map from my google account with a url like:

    https://maps.google.com/maps/ms?msid=010101010101010101010101012&msa=0

    can I do:

    [pw_map address="http://maps.google.com/maps/ms?msid=010101010101010101010101012&msa=0" width="500px" height="600px"]

    Or will the plugin only work on geographic locations?

    Thanks!

    Eoin

    • Pippin

      Only actual addresses, sorry.

  9. Mike

    I wonder if you can assist. I love your plugin, but it seems it is not playing well with my CSS? The map has lines all through it. Can you recommend where to start? I am using the silverOrchid theme from gazpo.com

    Thanks in advance…

    • Pippin

      Can you show me a live URL?

  10. sash

    How to set up the scale?

    • Pippin

      The default scale?

  11. Alan

    Can the zoom of map can be changed?

    • Pippin

      No, sorry.

  12. marcos

    Hi, thank you for this great plugin, It is posible set the map by latitude and longitude ?

    • Pippin

      No, sorry.

  13. aljuk

    Hi Pipin,

    I’ve recently moved a site to a new server. I’m using the map shortcode on that site, in the single template of a custom post type (it’s a local business directory). It’s been working great for ages, but I’ve recently moved the site to a new server and am seeing some odd behaviour.

    Although the maps generated previously (on the previous server) are displaying as normal, maps for newly created posts are not being generated. If I take a database dump and recreate the site locally (MAMP), then presto – all the maps are there.

    Do you have any idea what might be causing this? Might it be something to do with transients do you think?

    • Pippin

      Sounds like the maps are cached and simply need a few hours to regenerate.

Your email address will not be published. Required fields are marked *

Error: Please enter a valid email address

Error: Invalid email