Skip to content


GMMS ( Google Maps Made Simple) – WP plugin

Updated : 12 August 2007 … after a week like hell finally I got some time to fix the plugin and add the possibility to use CURL for file retrieval :) . To set it just open the file and look after this line “define (“USE_CURL”,0);” , by default it is set to use file_get_contents, if you want it to get the file using CURL or if you receive an error (some hosts doesn’t let file_get_contents/fopen to read external files) replace that line with “define (“USE_CURL”,1);”

I was really busy last few weeks and I had almost no free time to write on my blogs or talk with the friends. Now, the things are better, at least for the next 2 days :)

Sunday evening, I wanted to write some posts on my Journey Diary ( http://www.romanianjourney.com ) and I couldn’t find any Wordpress plugin that lets the user to manually select the zoom so I started writing my own one ( though this is my first plugin ever wrote ). After few hours of work I managed to get a working version.

GMMS features : you can write an address or a set of coordinates, you can manually set the zoom level :D , you can set the width/height of the map.

GMMS limitations : maximum one map per post.

This version is exactly what I wanted but if I get enough requests I will develop it even further :) .


Here are the steps you need to make in order to install the plugin :

  • download the plugin : GMMG 1.02 – Wordpress Plugin
  • open it using any text/php editor you want
  • go to http://www.google.com/apis/maps/signup.html , read & check the agreement checkbox , insert your website URL, press the “Generate API key” button. Copy & paste your newly created API key into the GMMS.php at line 38, replacing the PASTE_YOUR_GOOGLE_API_KEY_HERE with your API key. While there you can also change the default map Zoom Level, Width and/or Height.
  • Don’t forget to save you file.
  • Upload the file into the plugins folder of your WordPress installation ( wp-content/plugins/ )
  • Login to your administration area and go to “Plugins” to activate GMMS.
    Wordpress Admin - Install GMMS
  • You are done :P

—-

Usage : there are 2 mods ( The ZoomLevel,Height and Weight can be optional )
:

  • address based :

    #GMAP_SIT("Address","ZoomLevel";"Height";"Weight")#
    

  • coordinates based :

    #GMAP_SIT("Latitude@Longitude";"ZoomLevel";"Height";"Weight")#
    

  • Examples :

    #GMAP_SIT("Sibiu,Romania";"4";"300";"300")#
    #GMAP_SIT("12.432@27.835";"6")#
    

  • Working example : http://www.nekhbet.ro

If you have any questions/suggestions …. feel free to ask :)

Edited ( 15 June 2007 , 09:45 AM ) : If you want to be kept updated on new releases I suggest to subscribe to the blog’s feed.

Posted in Misc.


43 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. xformed says

    I’ve tried downloading the file 4 times and WinZip says it’s corrupted…:(

  2. Chris says

    Can’t get it to work,

    does this work for one map per domain or can you set it up for different maps for different posts

    I get the following errors

    Warning: file_get_contents(): URL file-access is disabled in the server configuration in wampago/html/wp-content/plugins/GMMS.php on line 201

    Warning: file_get_contents(http://maps.google.com/maps/geo?q=London%2CEngland%2C4%2C300%2C300&output=csv&key=ABQIAAAA6IYz-y6B-9G25LQIKwnmSRSlKP1yjvNy4buJwTMpgWXSKZROMhSrPn50H-E2jlChU2B_XDI-yy11zQ): failed to open stream: no suitable wrapper could be found in wampago/html/wp-content/plugins/GMMS.php on line 201

    Copied the instructions and followed exactly

  3. Claude Gelinas says

    Google Maps in my WP posts!

    That’s an excellent idea for a plug-in, indeed.

    Other users who don’t yet know this will be happy to learn the following: using your plug-in to diplay any given map, users can “move around” the map, zoom and switch from “map”, “satellite” and “hybrid” in just one click.

    Excellent work ; )

  4. libretto says

    When you paste the API key, do you need to keep the quotes around the key ?
    Thanks

  5. Trimbitas Sorin says

    Hey,

    I’m glad to see interest for the plugin :D
    So let me reply for all of you :
    - xformed : I have check and recheck the file, it is ok. Try using WinRar even if it is compressed to ZIP.
    - Chris : “URL file-access is disabled in the server configuration” … you need to enable allow_url_fopen in your PHP installation or maybe ask your webhosting company to do this. Anyway, I’ll release Sunday another version for the people who can’t enable this option (using CURL). As for the plugin … you can use as many maps as you want on your website as long they are one per post.
    - Claude Gelinas : thanks, I really appreciate it :)
    - libretto : yes, you need to have something like : define (“GOOGLE_KEY”,”ABQIAAAArVQcVxnRtt…”);

    Regards

    Sorin

  6. Chris says

    Thanks Sorin I should be able to do it though htaccess

  7. xformed says

    Thanks! It’s in my plugin file. Will have to play with it tonight.

  8. Matt says

    Nice plugin. I would be interested in having this with googles new feature streetview. Any chance of that happening?

  9. Lars Verket says

    I can´t get the coordinates to function right. North-South seems right, but east-west is 10-15 km wrong in western direction. What can be wrong here?
    http://www.homoludens.no/2007/06/11/opprydding/
    The exact coordinate is N58 00.184 E7 20.416. I had to change E7 20 to E7 34 to get it approximately right. I don´t understand this. Is it another coordinate system??

  10. Lars Verket says

    I worked it out (or a friend of mine). You have to choose decimal grades, and not minutes. Then it will work!!! Great!

  11. addvisemedia says

    hi!
    Thanks for your plugin, really cool! However, i have a problem a compatibility with Macintosh+Safari, it says everytime that it doesn’t found the google map key (this key is registred for an other website).. Do you know why?

  12. Trimbitas Sorin says

    Glad you like it :)
    You need an API key for every website,generate a new one for this specific website. Does it work now?

  13. bosco says

    Does it work with Google MyMaps?

  14. Shawn Honnick says

    I get a conflict when I am running this plugin:

    http://www.joostdevalk.nl/code/enhanced-wp-contactform/

  15. bosco says

    Hi everyone!
    The is a problem with this plugin instructions, because the parameters separator is | instaed of comma separated values:

    #GMAP_SIT(“3.247833@41.918118|8|420|200″)#

    Anyway, what I wanted to show was my adaptation of GMMS plugin, in order to support Google MyMaps features. Just have a look my blog where I show it.

  16. Trimbitas Sorin says

    Hi all,
    I just came back from a short trip :)
    Shawn Honnick … I’ll take a look on it tomorrow and reply.
    Bosco … great thing :) , I’ll contact you in few minutes on e-mail.
    Thanks :)

  17. Daniel says

    Hi Trimbitas Sorin

    Where is the CURL version? My hosting not allowed allow_url_fopen…

    Thanks!!!

  18. Trimbitas Sorin says

    I had some personal problems in the last several days, now all is fine. I’ll release the CURL version in less than 2h from now.
    Regards

  19. Trimbitas Sorin says

    Done, a new version is available for download :)
    Thanks for support

  20. Tom says

    Hello and thank you very much for this plugin!

    A nice expected feature should be the ability to display an itinerary…

    What would you say?

    Bye!

  21. Bisente says

    Hi

    I’ve modified the plugin so that it allows you to insert more than one map per post. The patch is available here:

    http://www.bisente.com/wp-content/blogs.dir/bisente/programas/wordpress/MyGMMS/more-than-one-map.diff

    I’m using Bosco’s version with MyMaps support, so line numbers might be a little bit off. If the patch doesn’t apply cleanly just get in touch with me. Anyway the modification is quite simple, you’ll get it.

    Regards

  22. Trance says

    Hi !
    Your plugin is simple, useful, and great !
    But you cannot include more than one map… And since that’s I want, I’ve edited your plugin to enable this feature. It’s pretty simple, this is how to do it :

    Change line 53 :
    function GMMS($content, $offset = 0)

    Change line 56 :
    $pos = strpos($content, “#GMAP_SIT”, $offset);

    At line 84, insert the following code :
    $next_pos = strpos($content, “#GMAP_SIT”, $offset);
    if($next_pos != false) {
    $content = GMMS($content, $next_pos);
    }

    That’s it ! Now the plugin supports several maps in each post ;)

    Enjoy !

  23. manoj says

    where i put this function
    GMAP_SIT(“Latitude@Longitude”;”ZoomLevel”;”Height”;”Weight”)
    in index page or in side the post editor

  24. carol says

    excellent plugin, so so useful!

Continuing the Discussion

  1. Weblog Tools Collection » Blog Archive » Wordpress Plugin Releases for 6/14 linked to this post on June 14, 2007

    [...] Google Maps Made Simple Plugin allows a user to add Google Maps to a Wordpress post and allow the user to set the zoom level and the width and the height of the map. (No Ratings Yet)  Loading … [...]

  2. Google Maps Made Simple WordPress Plugin » D’ Technology Weblog: Technology News & Reviews linked to this post on June 14, 2007

    [...] more info and download…. [...]

  3. http://cibis.de » Blog Archive » Googlemaps @WordPress linked to this post on June 14, 2007

    [...] ziemlich einfach einzubinden mit dem Plugin “Google Maps Made Simple“. Karten können dann mit #GMAP_SIT(“Frankfurt, Hessen, Bruchfeldstraße, Germany”)# [...]

  4. Plugin pour afficher des cartes Google maps avec un zoom : GMMS linked to this post on June 14, 2007

    [...] donc le plugin GMMS (Goggle Maps Made Simple – Gooogle Maps rendu facile), qui vient aurait été créé dimanche [...]

  5. Niklas’ blog » Blog Archive » My Del.icio.us bookmarks created during the past week linked to this post on June 15, 2007

    [...] GMMS ( Google Maps Made Simple) – WP plugin — You can write an address or a set of coordinates, you can manually set the zoom level, you can set the width/height of the map. Tagged as: [wordpress plugin google maps] [...]

  6. GMMS, integra Google Maps en tu Wordpress | aNieto2K linked to this post on June 15, 2007

    [...] GMMS (Google Maps Made Simple) es un plugin para Wordpress que te permite meter mapas de Google Maps en tuWordpress. Hasta aqui todo bien, nada nuevo y más de lo mismo, pero si miramos un poco más vemos que integra las nuevas opciones que Google Maps ofreció hace unos días. [...]

  7. oriolrius lifestream » GMMS ( Google Maps Made Simple) - WP plugin » Dedication to DIY and programming linked to this post on June 15, 2007

    [...] GMMS ( Google Maps Made Simple) – WP plugin » Dedication to DIY and programming [...]

  8. La Cartumba » Blog Archive » Dónde estaré este verano linked to this post on June 15, 2007

    [...] P.D.: De paso, pruebo un plugin nuevo para el Wordpress: GMMS. [...]

  9. Terrón Org » Blog Archive » GMMS, integra Google Maps en tu Wordpress linked to this post on June 15, 2007

    [...] GMMS (Google Maps Made Simple) es un plugin para Wordpress que te permite meter mapas de Google Maps en tuWordpress. Hasta aqui todo bien, nada nuevo y más de lo mismo, pero si miramos un poco más vemos que integra las nuevas opciones que Google Maps ofreció hace unos días. [...]

  10. Google Maps en tu Wordpress — Tierra0 linked to this post on June 18, 2007

    [...] como google maps podemos localizar cualquier sitio en un mapa mas que bastante vistoso. Por esto aquí os dejo una adaptación de los famosos mapas de google para mi amado Wordpress. Este se trata del plugin [...]

  11. WP Plugins DB » Plugin Details » GMMS ( Google Maps Made Simple ) linked to this post on July 3, 2007

    [...] Visit [...]

  12. Bosco Curtu » MyGMMS WordPress Plugin linked to this post on July 29, 2007

    [...] GMMS plugin (Google Maps Made Simple) is a plugin by Trimbitas Sorin-Iulian. It is a simlpy php script that inserts some js Google Maps APIs commands to represent the map. [...]

  13. Bosco Curtu » La mágia del Open Source linked to this post on September 7, 2007

    [...] un par de meses me pasé a WordPress busqué un plugin de Google Maps para WordPress, y encontré GMMS, que estaba bien, pero no tenía la funcionalidad de mostrar MyMaps sobre los mapas. Pero como era [...]

  14. Plugin para integrar Windows Live Maps con Wordpress linked to this post on April 9, 2008

    [...] no podrá ser integrar los mapas de de Windows Live Maps. Si lo nuestro es más Google Maps, GMMS es una opción que permite hacer lo mismo, integrándose con Wordpress, aunque su instalación es [...]

  15. Tecnologia » Blog Archiv » Plugin para integrar Windows Live Maps con Wordpress linked to this post on April 9, 2008

    [...] no podrá ser integrar los mapas de de Windows Live Maps. Si lo nuestro es más Google Maps, GMMS es una opción que permite hacer lo mismo, integrándose con Wordpress, aunque su instalación es [...]

  16. » Blog Archive » Integrar Windows Live Maps con WordPress linked to this post on April 9, 2008

    [...] no podrá ser integrar los mapas de de Windows Live Maps. Si lo nuestro es más Google Maps, GMMS es una opción que permite hacer lo mismo, integrándose con Wordpress, aunque su instalación es [...]

  17. Google Maps en tu Wordpress | Seraphinux linked to this post on April 14, 2008

    [...] GMMS (Google Maps Made Simple) Puede ubicar una dirección o un conjunto de coordenadas, puede ajustarse manualmente el nivel de zoom, puede establecer la anchura / altura de la ruta. Solo puedes poner un máximo de una ruta por lugar. [...]

  18. Prova de Google Maps amb GMMS | Albert Sarlé linked to this post on June 19, 2008

    [...] Prova de Google maps amb el plugin GMMS [...]

  19. LIVE MAPS PARA WP | NUESTRO RINCONCITO linked to this post on August 23, 2008

    [...] no podrá ser integrar los mapas de de Windows Live Maps. Si lo nuestro es más Google Maps, GMMS es una opción que permite hacer lo mismo, integrándose con Wordpress, aunque su instalación es [...]



Some HTML is OK

or, reply to this post via trackback.


Get Adobe Flash playerPlugin by wpburn.com wordpress themes