Remote Sensing Tools

Control over reality.™

IKONOS 4,3,2 false-color composite, converted to pseudo natural-color using the CIR to Naturaltone plug-in. Image courtesy of GeoEye.
free mobile ringtonessex and the city ringtonesupload ringtoneat

WordPress Plugin, Google Maps Quicktag

August 22nd, 2007 · 48 Comments · Trackback/Ping · Share This

Since Google Maps can now be ‘embedded’ in a similar way to YouTube and Google Videos, I decided to create a basic plug-in for WordPress users and share it with whoever might think it’s useful. All it is, is a simple addition of a button in the administration panel editor — which pops open a new browser window for Google Maps.

While editing your post, you can quickly pop-open Google Maps from the editor and generate your map through the Maps interface, or quickly grab the link to a map you’ve already prepared in My Maps. Then, you can copy the code given for embedding and paste it directly into your editor.

It’s very simple — but I like it and I think it’s useful.

Download Google Maps Quicktag Plugin for WordPress

You can download the .zip file containing the plug-in here:
Compressed Zip Package Google Maps Quicktag for WordPress v1.0.1

Alternate SVN location added, WordPress.org:
http://wordpress.org/extend/plugins/google-maps-quicktag/

Google Maps Quicktag for WordPress is confirmed to be compatible with WordPress version 2.5. No changes are necessary, regardless of your WordPress version.

WordPress MU (Multiple User) Version

You can download the .zip file containing the MU version here:
Compressed Zip Package Google Maps Quicktag - MU v1.0.1

This version is specifically for WordPress MU installations. The code contributed in comment #24, allows the iframe tag and its attributes to be used, which is not allowed in MU by default as a result of a security concern related to malicious page injection.

Use at your own risk! Use of this plug-in with WordPress MU installations with open registration is not recommended.

Additional code contributed by Oncle Tom. (Thank you.)

Installation

Simple install, as usual for WordPress.

  1. Unzip the .zip file, and upload the mymaps-quicktag folder to the /wp-content/plugins/ directory for WordPress.
  2. Through the administration Plugins panel, click Activate.

You should now see a new button in your editor, like the following:

Google Maps Quicktag Plugin

Updating

Simply download the newest package provided above, and replace the files in the plug-ins directory on your server.

Usage

Now, create a custom map in My Maps through the Google Maps interface. Refer to the following tutorial to use as a guide for the most common use of incorporating a map into a web page here:
Google Maps Tutorial, Creating Placemarks

Once you’re done, simply copy/paste the code given by Google Maps when you click on Link to this page — or use the code given in the Customize and preview embedded map page. You’ll be able to embed a map very easily and get a result such as the following — which is a map that I created in My Maps, of several locations where I can get Caribou Coffee in my area:


View Larger Map

Additionally, you can copy and paste the KML link provided by Maps and paste it into your post to view in Google Earth’s 3D environment. (This example includes a custom icon, to signify that it’s a Google Earth file.):
Example KML link for the map above. Google Earth File - Google Earth must be installed

Alternate Use

Take a look at Adam Franco’s script for mashing-up Flickr sets to be viewed in GoogleEarth, GoogleMaps, or other geo-browsers.

For now, I’ve added comments in the Google Maps Quicktag script, where you can change the URL you wish to open. If you wish to run Adam’s script — simply alter that URL to open where ever you have it running on your server.

Stefan Geens at Ogle Earth has a working example incorporating both Adam’s script and an embedded Google Map.

Categories: Web · Web Mapping · WordPress
Tags: , , , , , ,

Advertisement

48 responses so far ↓

  • 1 Weblog Tools Collection » Blog Archive » WordPress Plugin Releases for 8/23 Aug 22, 2007 at 10:38 pm

    […] Google Maps Quicktag makes it convenient to open the Google Maps web site while editing, where you can generate your map and copy the needed code to paste into the editor. […]

  • 2 Nico Nemil | Filipino Web Developer | Pinoy Web Designer | Intermediate Graphics Artist » WordPress Plugin Releases for 8/23 Aug 23, 2007 at 12:54 am

    […] Google Maps Quicktag makes it convenient to open the Google Maps web site while editing, where you can generate your map and copy the needed code to paste into the editor. […]

  • 3 WordPress Plugin - Google Maps Quicktag at WordPress Themes, Plugins, Blog Tips, Make Money Online >> WPthemesplugin.com Aug 24, 2007 at 12:11 am

    […] Visit & Download […]

  • 4 Skylog » Blog Archive » links for 2007-08-24 Aug 24, 2007 at 12:17 am

    […] WordPress Plugin, Google Maps Quicktag (tags: wordpress plugin) […]

  • 5 Google Maps Quicktag | わーどぷれすっ! Aug 24, 2007 at 6:16 am

    […] WordPress Plugin, Google Maps Quicktag […]

  • 6 Andy Wibbels » Embed Google Maps in Your WordPress Blog with the Google Maps Quicktag Plugin Aug 24, 2007 at 1:10 pm

    […] Full description and download. This entry was written by Andy Wibbels and posted on Aug 24, 2007 at 1:10 pm and filed under Tools, Techniques and Tutorials, WordPress. Bookmark the permalink. Follow any comments here with the RSS feed for this post. Trackbacks are closed, but you can post a comment. « Particles Theme Framework for WordPress […]

  • 7 Deborah Aug 26, 2007 at 5:30 pm

    Daniel,

    Thanks - the plugin works great! Thanks for your quick response to my questions about the plugin.

  • 8 Daniel Aug 26, 2007 at 5:36 pm

    Deborah,

    My pleasure — and thank you for the catch. It’ll be fun to see how people utilize maps in communicating ’stuff’. What you’re doing is exactly the kind of thing that I was hoping to see happen!

  • 9 Alex Lawrence-Richards Aug 28, 2007 at 2:58 pm

    Here’s a question: Is there a way to setup a Google Map that is searchable and still retains Quicktags?

    What I’m trying to do is: I have a client who has a number of locations that he wants displayed on his Google Map. That part seems pretty trivial. BUT he also wants the ability for the user to input their address and find the closest location to them.

    I’ve been on a tight deadline and have had to do a laundry list of other stuff for him, but this is one of the last things I need to finish.

    Any ideas or help would be greatly appreciated.

    Quicktags may have been the wrong word — I’ve been up too long. By quicktags, I meant points on the map representing locations that I want pinpointed. Not sure what you call them.

  • 10 Daniel Aug 28, 2007 at 3:17 pm

    Alex, it sounds like what you want to accomplish is already inherently provided by Google Maps.

    If you create a placemark in Google Maps, it will automatically give you the Directions options for the reader to utilize. You can add additional information in the info-bubble as well for those businesses if you chose — pictures, text, and all that pretty mess.

    The Quicktags button is simply meant to tie-in Google Maps to the editor in WordPress, making it more convenient and user-friendly while publishing and editing.

  • 11 Alex Lawrence-Richards Aug 28, 2007 at 3:20 pm

    Upon further inspection, I see that you’re right. However, is there any way that a user can input his or her address and find the _closest_ location of them all? Or do I need to pull my head out of the clouds…

  • 12 Daniel Aug 28, 2007 at 3:24 pm

    Yes, when the user clicks on Directions to here, then it will allow said user to enter his/her starting location. From there, Google Maps provides the necessary directions to the location.

    Try making a placemark once, and you’ll see the options presented at the bottom of the bubble when you click on it.

  • 13 Daniel Aug 28, 2007 at 3:41 pm

    I’ll write-up a brief tutorial on how to search and create Placemarks in the Google Maps, My Maps editor — to demonstrate how easy it is to do what Alex is requesting above.

  • 14 WordPress Plugins Database » Plugin Details » Google Maps Quicktag Sep 7, 2007 at 12:26 am

    […] Visit […]

  • 15 Google Maps - blogger vs. wordpress.com « Digital Explorer Sep 24, 2007 at 5:29 am

    […] your wordpress blog yourself, there are some plug-ins that will help out - the best one is at the Remote Sensing Tools blog and does not require any messing around with APIs and the […]

  • 16 Anachronous Oct 2, 2007 at 8:15 am

    Has this been tested with WP MU? Specifically, I’m using WP MU 1.2.1, and the embedded image does not display and WP appears to truncate the code after I save it, leaving only the code for the “View larger map” link.

    Anyone else run into this? I’m working on upgrading to 1.2.5a right now, but found the behavior curious nonetheless.

    Same result with 1.2.5a; the code is automatically truncated by WP after saving the page entry.

  • 17 Daniel Oct 2, 2007 at 11:58 am

    Anachronous,

    You are probably experiencing either of the following:

    1. You’re using the Visual editor. Disable use of this editor and the default editor will not truncate your code.
    2. WordPress.com users will experience problems trying to input code due to filters. Someone has written mention of this issue here.
  • 18 links for 2007-10-03 « thedysh Oct 3, 2007 at 6:27 am

    […] WordPress Plugin, Google Maps Quicktag (tags: wordpress plugin) […]

  • 19 WP插件:Google Maps Quicktag-谷歌地图快捷标签 | 帕兰的口袋 Oct 10, 2007 at 12:05 am

    […] 功能简介:Google Maps Quicktag在你的CODE编辑模式下加入一个“Open google maps”的选项,用来为你生成Google地图的代码,你可以在写日志时把这些代码粘贴进去,就可以显示Google Maps.具体演示地址看这里。 […]

  • 20 The Blog for DesignCreatology » Blog Archive » WP Plugs October 19, 2007 Oct 19, 2007 at 5:31 pm

    […] Google Maps Quicktag makes it convenient to open the Google Maps web site while editing, where you can generate your map and copy the needed code to paste into the editor. […]

  • 21 Google Maps Quicktag_Wordpress plugin Jan 22, 2008 at 10:07 pm

    […] Plugin Homepage […]

  • 22 Andrew Feb 19, 2008 at 12:49 pm

    I’m a little late to the party, both in terms of finding this post and starting a wordpress blog. But from what I can tell, wordpress doesn’t allow me to upload plugins. Is this a recent change? Is there a work-around?

  • 23 Daniel Feb 21, 2008 at 12:15 am

    Andrew,

    It appears that you’re running your blog at Wordpress.com, which to my understanding does not allow plug-in installation.

  • 24 Oncle Tom Feb 24, 2008 at 10:47 am

    It seems Wordpress MU does not enable the iframe tag so the plugin isn’t working, even without the visual editor.

    A filter must be added:

    function filter_extend_add_iframe(&$content) {
    $content += array('iframe' => array('width' => array(), 'height' => array(), 'frameborder' => array(), 'src' => array()));
    return $content;
    }

    add_filter('edit_allowedposttags', 'filter_extend_add_iframe');

    Enjoy

  • 25 Daniel Feb 24, 2008 at 5:07 pm

    Oncle Tom,

    Thank you for making me aware of this. It appears that the MU team has prevented use of the iframe tag as a result of a security concern. I’ll look into this issue further and determine whether to make a separate release for MU users available.

  • 26 Daniel Feb 24, 2008 at 6:58 pm

    MU version now available, including the code as suggested in Comment #24. This version is not recommended for MU installations with open registration — refer to additional notes for details related to a potential security risk.

  • 27 Oncle Tom Feb 25, 2008 at 5:21 am

    Thanks Daniel. It’s recommended only for closed subscriptions or only very trusted people. It’s good you mentioned it.

    I was not aware of this security filter (which is logical after all) until I saw the IFRAME was systematically removed.

    Maybe an option for WP MU can be added to allow this only for Admin/Editors or other groups? Take it as a suggestion, the plugin works well like that for now. :-)

  • 28 Daniel Feb 25, 2008 at 4:33 pm

    Oncle Tom,

    In all honesty, it’s a permissions feature that I would suggest the MU team should implement. Or, since they didn’t go that step, and instead took the easy way out (display filters) — someone could eventually develop a plug-in that adds a permissions page for the site adminstrator to allow for certain users to utilize various plug-ins. (The caveat with the current system being that — it would require more code to circumvent the filters they established, and may have issues in a truly good permissions-based system. It wouldn’t be elegant.)

    Looking through the documentation and where the source of this issue is noted — it appears more to me that they simply added the display filters without instead filtering the input code on Save/Publish — which would have been the more elegant approach as it’d open-up the interface to allowing plug-in use based on permissions hierarchy. (If user has permission to submit certain code, it saves — if user does not have permission, that code is stripped on save [eg: how comment submission works].)

    It’s a good idea for a plug-in if they wouldn’t be willing to bend on the approach as suggested, but I don’t have an install of MU running — it might be an opportunity for someone (like you) to explore so that there’s a logical and useful solution that’s available for everyone using MU.

    Personally, I think that forcing a plug-in to be developed only highlights that there’ll always be potential for this security concern. The only way to eliminate that security concern — is to do it right, and solve the problem — by implementing the permissions based system I mention.

  • 29 freeflyair Mar 8, 2008 at 1:07 pm

    Hi,

    I’ve uploaded the folder and activated the plugin on the options page, but I can’t see the button on the Write page. Am I missing something?
    Thanks

  • 30 Daniel Mar 8, 2008 at 4:22 pm

    Freeflyair,

    I haven’t received any complaints, so can you please describe what version WordPress you’re running, and whether you have the visual editor on or off?

  • 31 freeflyair Mar 13, 2008 at 5:20 pm

    Hi Daniel, sorry about that, I forgot to load the code tab…
    it works fine!

  • 32 blumjonathan Mar 19, 2008 at 6:04 pm

    Hi Daniel,

    I have a wordpress blog, but do not run Wordpress on my own server. You aren’t allowed to upload plugins to Wordpress.com blogs for security reasons. Is there any way to embed google maps in a blog that is hosted in this way? or am I SOL? Is there a workaround?

  • 33 Daniel Mar 22, 2008 at 5:08 pm

    Blumjonathon,

    As far as I’m aware, there are no work-arounds to posting an iframe at WordPress.com. You’re only hope would be to find an alternative method to post a map — though, most will use a similar technique, or require a plug-in or javascript.

    Your best option with the most flexibility is to run your own install of WordPress.

  • 34 Embedding iFrames on WPMu at bavatuesdays Apr 1, 2008 at 10:52 am

    […] cool plugin for WPMu (there is also one for a single WP install, so don’t get confused), Google Maps Quicktag, that is specifically designed for embedding a Google Maps iframe into WPMu. But, as it happens, it […]

  • 35 DogSolitude › WordPress Plugin, Google Maps Quicktag Apr 4, 2008 at 3:57 pm

    […] Plugin: Google Maps Quicktag.  Not 2.5 ready, however. This was written by rob. Posted on Friday, April 4, 2008, at 12:52 […]

  • 36 Daniel Apr 4, 2008 at 9:14 pm

    Confirmed compatible with WordPress version 2.5. Version number 1.0.1 will be used to reflect compatibility.

  • 37 Heygabe Apr 7, 2008 at 3:08 pm

    Works great on WP 2.5. However, more note should be made that this plugin does _more_ than just creating a button on he interface, but actually makes embedding a Google Map possible in WP.

  • 38 Daniel Apr 9, 2008 at 1:25 am

    From my perspective, it’s Google Maps that makes it possible to ‘embed’ a Google Map into WordPress, by providing the application that can be distributed. Else, the only context in which I am helping to make it possible, is with WordPress MU, due to MU’s elimination of the iframe code that Google provides.

    In other words — I view it as an enhancement to the WordPress editing interface and nothing more. The rest of the work in creating and generating a map is basically up to all you bright map makers out there in this crazy mixed up world.

  • 39 » Embedding iFrames on WPMu WPMu Ed Apr 10, 2008 at 10:08 am

    […] cool plugin for WPMu (there is also one for a single WP install, so don’t get confused), Google Maps Quicktag, that is specifically designed for embedding a Google Maps iframe into WPMu. But, as it happens, it […]

  • 40 Robert May 2, 2008 at 2:43 pm

    Hi, 1st of all, I am no programmer and also new to Wordpress. I really like this plug in yet I can get the map embedded, but lose the ability to edit the post further as after I paste the code both the code and my post text disappear from the edit post box. Am I doing something wrong in using the plugin? I have used a few hrs up attempting to solve this problem - but no success - anyone have any ideas thanks

  • 41 Daniel May 2, 2008 at 5:05 pm

    Robert,

    I really don’t understand what exactly it is you’re seeing. It sounds like you’re using the visual editor and it might be creating the problem. Try switching off using the visual editor and enter your posts that way and see if that helps solve the problem.

    There tends to be various issues with the visual editor — many of us never use it as a result.

  • 42 Skolebloggen » Blog Archive » Embed Google Maps May 3, 2008 at 5:36 am

    […] http://www.remotesensingtools.com/2007/08/22/wordpress-plugin-google-maps-quicktag/ […]

  • 43 richardphung.com » Blog Archive » google map test May 9, 2008 at 2:49 pm

    […] the Google Maps QuickTag plugin… not too […]

  • 44 Foto Georeferenziate - Certhidea SRL - sito di test applicativi e plugins May 24, 2008 at 6:44 am

    […] (georeferenziate) dentro una immagine del satellite è un po’ rognoso, ma ci si riesce. In questo Blog, Daniel, spiegando come ha fatto a fare una tanto splendida quanto abbastanza inutile plugin di […]

  • 45 Ilya Jun 3, 2008 at 2:41 pm

    Hi there, and thanks for the plugin.

    Somehow I cannot get it to work on my blog. I have ‘my own’ blog, the latest wp version. I have turned visual off and switched to the code-view when making an article. If I simply enter the given google maps url, I simply see the google map url. The plugin is activated. I’ve read all messages, and cannot find anything that could help me with this (probably simple) problem. I am not using the MU version btw.

    Did I miss something? Should I put the code into special brackets just like when you insert a youtube video?

    So far, I only inserted the url in de post, nothing more…

    Anybody got any pointers into how to get this plugin to work?

    Thank you.

  • 46 Daniel Jun 6, 2008 at 3:18 am

    Ilya,

    This plug-in only inserts an additional button into the editor, to pop open Google Maps in a new window, and so that it makes it convenient while editing. From there, you insert the embed code provided by Google Maps into your editor for publishing.

  • 47 Winston Salem Foreclosures Jul 2, 2008 at 9:00 pm

    I have a real estate site & would like to use this plugin to show my listings on a single map. I would like to add the address to the map each time I add a listing. I am not a programmer, but did the blog myself with the help of a video tutor. I do host the wp blog on my on server. Could someone take a look at my site to see if this plugin would work? And if so, is it rather simple to use? Thanks! Tony

  • 48 Daniel Jul 7, 2008 at 3:52 am

    Tony,

    I’m not sure what it is you’re asking. This plug-in simply adds a button to the WordPress editor interface, making it convenient to pop-open Google Maps, where you do the map-making in your My Maps account.

    In relation to what you’d like to accomplish — I see no reason why you wouldn’t be able to accomplish a very robust map as you outline using Google My Maps.

    I also haven’t been keeping up with WordPress development. You may wish to look around to see if others have integrated Google Maps in a more profound way. Things to look for would be any type of map automation with Google Maps or Google Earth — more specifically, whether GPS metadata has been integrated into WordPress in relation to images, making it easy to automatically associate any photograph with points on a map in Google Maps or Google Earth.

    I hope that suggestion is of help to you.

Respond to “WordPress Plugin, Google Maps Quicktag”