Google Maps Plugin for FCKeditor

Introduction

Did you ever wanted to be able to add a Google Map to a page that you are editing with FCKeditor?

You might have faced all that javacript code and thought that it was almost impossible to do it easily, well, this plugin is the answer. Add it to your installation of FCKeditor and you'll be able to insert and edit maps easily.

The total time of setting up the plugin shouldn't take you more than 5 minutes, it's really easy and it's all detailed in the installation page. Then every user of your page will be able to create their own maps.

Author:

Alfonso Martínez de Lizarrondo

Sponsored by:

Dynamical.biz

Uritec

InControl Solutions

Version history:

  1. 1.0: 25/08/2007. First version.
  2. 1.1: 28/08/2007. Ups, didn't test 2.4.3
  3. 1.2: 31/08/2007. New icon by Dynamical.biz. Use IMG instead of DIV as placeholder for the moment.
  4. 1.3: 01/09/2007. Complete documentation in HTML for installation and users.
  5. 1.4: 21/09/2007. Use the onload event to generate the maps (to avoid IE issues), and include the call to GUnload call. Automatically remove the toolbar icon if there is no proper Google Key.
  6. 1.5: 30/09/2007. Support for drawing polylines in the map.
  7. 1.6: 24/10/2007. Support for multiple markers.
  8. 1.7: 03/02/2008. Support for the new dialogs in FCKeditor 2.6.
  9. 1.8: 02/05/2008. Support for Terrain view and remembering the selected map type. The preview in the editor now uses the static maps.
  10. 1.9: 19/05/2008. It respects the values set for width and height (only assumes that they are pixel if they are numbers without any modifier)
    Optional configuration parameters: GoogleMaps_WrapperClass and GoogleMaps_PublicKey (this code proposed by Makerweb.it) .
  11. 1.95: 12/09/2008. The preview reflects the real type of the map. It shows also the markers.
    Dutch translation added
  12. 1.96: 14/09/2008. Preserve any previous onload handler.
    French translation added
  13. 1.97: 20/09/2008. Simplified the onload handler according to the advice by Hector Virgen.

This is the last version that it's open source. The information for the next version is available in http://martinezdelizarrondo.com/googlemaps2/install.html, and some screenshots and detailed info are available in the user manual

Known bugs:

The 'Preview' command in FCKeditor won't work properly if there's a GoogleMap in the content. This seems related to the way the Google Maps API script loads and inserts its content.

These threads in the API group point to the same problem:
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/7849dfd612181b6c/1c3e5f7fb5fa3301
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/89ea5fa4e0a0ccb9/05c364940447891d

A workaround for the problem could be to use the Server preview plugin

Demo

You can see it at work in the following editor (note, instead of the normal 'Preview', this editor is using the 'serverPreview' command):

Final notes

If you find this plugin useful, consider making a donation so it can be further improved, any amount can help to keep the development running.

If you need some special feature for this plugin, or if you need any other kind of plugin for FCKeditor then contact me and we can discuss it

Other plugins

Check other plugins that I've created for FCKeditor

Disclaimers

FCKeditor is © FredCK.com

Google, Google Maps and the Google Maps API are all properties of Google.