Geo Mashup Plugin


The WordPress Geo Mashup Plugin

wp-gmThanks for your interest in Geo Mashup! If you want to learn more about what it does and how to use it, visit the GitHub page or play with my hobomap as an example.





Donations in the past month: $0

Powered by cyberhobo and you

Geo Mashup started as a hobby and eventually helped me transition from a salaried web developer to an independent freelancer. Maybe one cyberhobo can make a good plugin, but it won’t be great unless I make it easy for you to help me. If you can do any of these things, Geo Mashup will benefit:

Examples

The comment list was getting too long, please visit the community forum for continued discussion.

250 responses to “Geo Mashup Plugin”

  1. Hi just installed geomashup it worked immediatly.
    Great work!
    I have a specific issue due to the fact that we are sailing around and seldom have a normal internet connection. I update my posts by email with my mobile phone. Is there a way to enter the position coordinates in the text or subject so that geo automaticaly puts them into the fields?

  2. Sadly, doesn’t seem to work for me. I’m getting two warnings on the options page – Warning: Wrong parameter count for print_r() in /so-on and so on/geo-mashup.php on line 237

    and

    Warning: Invalid argument supplied for foreach() in /et cetera/plugins/geo-mashup/geo-mashup.php on line 286

    Looks like it would be great – but something is wrong! Any ideas?

  3. Hi! This plugin seems great and is exactly what my buddy and I need for our travel blog.

    I have read the instructions, but I can’t figure out how to show the posts on the map. I have installed both GeoMashup and Geo, but where do I insert the: ?

    I am using the Flying Squirrel theme if that has anything to say…

    Thanks again!

  4. You need to enter coordinates for each post that you want to show up. On the post editing page there should be an area below the editor for entering coordinates.

    The show_on_map_link tag in most themes would go inside the loop in the page.php template file.

  5. Ok, I’ve figured out how to place the above php-code in The Loop, but that doesn’t fix my problem. My posts aren’t showing on the map, but I can’t figure out why not.

  6. Thanks for your quick answer. Hadn’t seen it when i wrote #106.

    I enter dthe coordinates, but the post doesn’t show on the map.

  7. Thank you for your great plugin.

    I see some people with problems that cause the map not to show. If I go to the site, it shows! how did that happen? I have the same problem, but cannot find the answer. none of the google map plugins show a map.

    I am using wordpress 2.0.4.

    Any ideas?

  8. I’m having a helluva time getting this to work. I’ve done everything as per the instructions. All posts have the lat/long data included.

    The page to display my map has the correct height/width allocated for it, but no map.

    The page it should be on is here:
    http://www.everything-everywhere.com/map/

    Any help would be appreciated.

  9. Most of the “map not appearing” problems have been caused by the page template not calling wp_footer().

    No map appears on the map page

    * Your map page template must have a header and footer. If not, you can add <?php wp_head();?> in your page template header before the </head> tag, and <?php wp_footer();?> before the </body> tag.

  10. Ok. I figured it out.

    For future reference, if anyone is using the Hemingway theme…

    In the page.php file:

    – Put above the
    tag.

    – Put above the and
    tags.

    – Any other placement of the wp_head and wp_footer tags doesn’t allow the map to show.

  11. I spoke too soon. It works fine in Firefox and IE on Windows, but the map doesn’t appear in any browsers for Linux or Mac.

    The logo appears but not the map.

  12. That you cyberhobo for the great plugin! I had trouble installing Geo… make sure there is no whitespace or linebreaks at the beginning or end of the geo.php file. I had an extra line at the end of the file and was getting “headers already started” errors. After I figured that out, everything went pretty smooth.

    There are a few mods that would be better suited to the site I am building such as not opening the balloon window on the latest entry, but rather just display all the pins. Also I would like to have different colored pins based on a different category. I saw on some of the posts that others were interested in these features as well, so if I figure it out I will post back.

  13. Third time lucky to get this right….

    I can’t get the map to show.

    My page template is page.php (standard Kubrick theme) and doesn’t have head and body tags.

    It has:
    ?php get_header(); ?
    ?php get_footer(); ?

    I assume these create the head and body tags.

    So Where do I put:
    ?php wp_head();? and
    ?php wp_footer();?
    to get the map to show?

  14. hello,
    i would really appreciate to use your plugin, but i’m newB with google api keys… Asking for a key requires to give a url corresponding to subdir in which the map will be used. As WP plugins are coming in their own dir, what is the actual URI i do need to declare when getting the key ? page_of_the_map_url or themes_template_page_url or ???. Did i miss something ?
    Thank you for your help…

  15. hello again !
    Many thanks for “Key” information delivery 🙂 I was not expecting such a fast answer : 6 mn !!! 8) you are great!

    I’m trying now to get rid off with K2’s css problems. Map is correctly showing after DIV erasing but layout structure is down !:)

    Ooops! I almost forgot to ask if there’s a simple way or option to tie default centering of the map to different lat,long coordinates than last_published_post’s ones ???

    Jean-Michel

  16. I’m having the same problem where the gray outline of the map shows, with the google logo, without controls, and without any content:

    http://gwlt.wstr.org/properties/

    At first the map wouldn’t show at all, so I added the header code you suggest to index.php in the folder of the theme I was using (I don’t have a page.php?). Then the map outline displayed, but with no content. I have one geotagged post, and the geo-mashup plugin is in the folder geo-mashup. The geo.php plugin is installed.

    I disabled all the other plugins.

  17. Great plugin. Ive got it up and running on my site and it’s working great. Even got an icon linking to the geo location from the title of the respective post. Good work. Thanks.

  18. Geo-Mashup + Email
    As an answer to #101 and to my personal objective (being able to blog by satellite phone email and put my position), I hacked a bit wp-cron-mail and geo.php to make it work:
    in wp-cron-mail.php I added after the line “$post_status = ‘publish’;”
    // Extract geo information from post
    // format used: look for geo:xx.xxxx,xxx.xxxx: in the beginning of post_title
    // ^geo:([0-9|.|-]+),([0-9|.|-]+):(.*)^

    if (preg_match(“^geo:([0-9|.|-]+),([0-9|.|-]+):(.*)^”, $post_title, $regs)) {
    $post_title = $regs[3];
    $position=$regs[1].”,”.$regs[2];
    $geo_post=1;
    $post_content .= “\r\n \r\n[Sent from: “.$position.”]\r\n”;
    }

    and after the line checking that the post was successfully inserted:
    // Position was given by the email, then we put it in the postmeta table
    if (isset($position)) {
    delete_post_meta($post_ID, ‘_geo_location’);
    add_post_meta($post_ID, ‘_geo_location’, $position);

    }

    In the file geo.php, I modified the update_post function to:

    function update_post($id)
    {
    if (isset($_POST[‘geo_lat’])) {
    delete_post_meta($id, ‘_geo_location’);
    add_post_meta($id, ‘_geo_location’, $_POST[‘geo_lat’] . ‘,’ . $_POST[‘geo_lon’]);
    }
    }

    and it works smoothly, if you send an email with a subject line like that:
    geo:45.4876,-120.6578:I was there!

    Good luck, I will soon post the address of my website, so that you could track me during my cross atlantic ocean cruise!

  19. Well done. I hope I can get this functionality into the plugin in the future! Look forward to seeing your map.

  20. Hi michelle,

    If you’re going to use the www. prefix in your URL, you’ll have to add it also to your WordPress URI settings in the options. Otherwise browsers think the map is trying to communicate with a different site, which is considered a security violation.

    -dylan-

  21. Awesome, awesome plugin.

    Any idea why the default zoom level would always be the same, no matter what I change the value to?

    – Casey

  22. Casey was experiencing a cache problem it seems. I wish I could determine exactly when this happens. If your settings don’t seem to be taking effect, try a shift+Reload, restart your browser, or as a last resort clear your cache. This shouldn’t normally be necessary, though.

  23. Hi Jerome comment 128
    it’s great to see someone with the same issues, We will continue sailing and cross the atlantic next Fall. I’m stil trying to get the geo-mashup to work by email. I’m not a programmer but I understood what your code does. I update my posts with a plugin called Postie http://postie.economysizegeek.com/ (modified wp-mail.php) with which you can post by mail or mobile using mms. Postie will reseize your pictures and insert them as thumbnails and other media in your post. Thats why I don’t use cron-mail. I set up a cronjob on a server which calls my wp-mail.php every 5 minutes. I tried to look for a place in wp-mail.php to insert your code but alas again I don’t understand enough.
    Maybe postie is something for you and you might want to look into it?
    best regards
    Rod

  24. hrmm actually that previous link just showed up. but my second test post isn’t… does it have something to with time to update or could it be my cache?

  25. For anyone else who experiences this: check your date and time settings in WordPress. Most likely your time zone is ahead of the web server, and future posts are not displayed by default.

  26. One very minor bug…I noticed that the plugin is trying to display the file: /geo-mashup/images/idle_icon.gif which doesn’t seem to be included in the .zip file. Other than that, I’m enjoying playing with this.

  27. Bravo the beta version works great on my site! Thank you!
    I finally managed to blog by email and send my position by satilite without having to trouble with my actual position. The GPS does that for me and all posts are geo coded.
    I have some possible questions towards your further developement:
    Will it be possible to exclude categories which will be shown?
    If following a track, is it possible to redline or connect the positions chronilogicaly with lines?
    thanks Rod

  28. Thanks Rod! I may come to you for help with email blogging in the future…

    I think both of your ideas would make good features. I have played with connecting points, but have only managed to make a mess so far. I’ll keep at it.

  29. Small bug: the display blows up when you geotag a post with quotes in the title. The problem comes because of the Javascript you generate; the quotes in the title don’t get escaped, which means scripting errors. Simple enough to fix – just add in some regex magic to escape quotation marks in titles. 🙂

    Otherwise, fantastic plugin. Works just like I needed it to!

  30. Can anybody tell me how to use the map in de header.php. Can’t get it work. Please help me out. Thanks!!

  31. Adrian: I’m not clear what you want a map in your blog header to contain, but currently Geo Mashup focuses on compiling data from your entire blog onto a single map on the page selected in the options. Take a look at the “Showing posts with the map” feature, maybe that resembles what you’re trying to accomplish?

  32. hi guys,

    I am using the geomashup-plugin for a university project and have the following problem:

    I have installed the newest Geo-plugin on a wp 2.0.5 installation. Everything worked fine
    until my host (www.host-europe.de) changed from PHP 5.0 to PHP 5.2. After that the “advanced-
    edting-option” fields were no longer shown in the (Administration > Options >) Writing Sub-Panel.
    So these fields aren’t showing up on the post.php until I deactivate the plugin.

  33. I have a diffrent problen than anybody here – it seems, running WP 2.1 without any plugs: As soon I activate the plug, everything below the texteditor in “New Post” disappear. At pages everything is still normal, but under posts “upload file” and everything below is gone.

    If I deactivate – everything is ok again. Any clues?