Simple Google Maps plugin for wordpress

What is it?
This is a demo post for a little plugin I wrote that uses custom fields in WordPress together with Google’s HTTP geo coding API and Google Maps to produce a map with a marker in the post. The current version (0.5) of the plugin takes the following custom keys and use them to geocode the location (Zip, City, Address, Country) and also display them in the info window popup in the map. Keys marked with a * are required for the plugin to output the map.

  • Zip
  • City*
  • Address
  • Country*
  • Phone
  • Misc

Installation and useage

  • Download the plugin file and upload it to your plugin directory.
  • Activate the plugin.
  • Go to and sign up for an API key.
  • Go to the GMaps plugin configuration page (in Options) and enter your API key (and select default Zoom level).
  • In your header.php template file, change to .
  • Make a new post.
  • Add at least the City and Country custom keys, and add the tag [ GMaps ] (without extra spaces) where you want the map to render.
  • Done!

Download

GMaps plugin v0.5 (downloaded 554 times)

Plugin output

Popularity: 10% [?]

11 Responses to Simple Google Maps plugin for wordpress

  1. Angela Byrne | #1

    Thanks for sharing.

  2. Where and how do you put the ‘custom keys’? You skipped over that whole part, which is kind of important to making it work.

    Googling just shows to put ID, $key, true); ?> “somewhere on the wordpress page” but whenever you do that, WordPress strips most of it away because it always messes up actual code like that.

  3. Isee | #3

    Awesome plugin!
    I get email daily about where we are located so we’re going to add this to our contact page.
    Should eliminate a few of those annoying emails!
    Thanks!

  4. Homer Dakes | #4

    I do exactly the same thing. I don’t blame you for not commenting if you think you’re not going to add something new to the discussion.

  5. Ron | #5

    Hi i installed the plugin, added the custom code to the header.php file but nothing loads on my page… i have specified address like this:

    5 xxxx avenue
    suite xxx
    city, state, zip
    country

    am i doing something wrong?

  6. britt | #6

    Hey Jasper
    Great simple plugin! Thanks!
    I have it working perfectly right now, but I would like the white bubble to show/have a link to “get directions to” etc

    Do you have any resources I could check out or tips for me?

    Thanks!
    -britt

  7. hari | #7

    Yu should specify where to add the city and country code.Else how can others understand??

  8. Pete | #8

    thats great. have you any idea how to put a rectangle on the map?

    Thanks a lot,

    Pete

  9. Jesper | #9

    Hi Quentin.

    If you put < ?php echo GMaps_main(); ?> in your template where you want the map to appear it might work, but only in single post view.

    Haven’t tried though.

    /Jesper

  10. Quentin | #10

    Hi,
    and very thank you for this very simple plugin.
    Could you tell me how to insert the map from the sidebar or anywhere outside the post ?

    Kind regards,

    uentin

Trackbacks/Pingbacks:

  1. TurboCSV 1.1 - Now With Custom Fields – RatingPress