WP Geo Mashup Toolkit

THIS PLUGIN HAS BEEN RETIRED. IT IS NO LONGER UPDATED NOR SUPPORTED. PLEASE FIND AN ALTERNATIVE PLUGIN.

51 Comments

I installed wp-geo, activted it, inserted google api, then uploaded geo mashup from zip saved to my harddrive. After that nothing. I see no seetings or anything for you plugin.

Thanks,

That’s correct… because there are no settings 🙂 Just use the shortcode [wp_geo_mashup] in any post or page content to display a map showing all geo locations you have on your site.

No, not within my extention plugin. It uses the WP Geo internal function get_wpgeo_map() which in turn uses the Default Map Width and Height that you can set in the WP Geo options… Change these settings and the size of the mashup map changes, along with all other maps that are rendered via shortcode or automatically in post/page content.

Thanks for this plugin, it’s great! One question: It uses the small version of the marker images. Is there any way to make it use the large markers?

Good question! So I have done a little test and it seems to be possible. You will have to edit my plugin though… If you are up for it, open the main (and single) plugin file wp-content/plugins/wp-geo-mashup-map/wp-geo-mashup-map.php in your favourite plain text editor or in the WordPress plugin editor (via Admin > Plugins > Edit) and replace the complete content after the plugin description tags (closing with “*/”) with this code :


if( !function_exists('wp_geo_mashup_map_init') ) {

function wp_geo_mashup_map_init() {
add_shortcode( 'wp_geo_mashup', 'shortcode_wpgeo_mashup' );
}

function wp_geo_mashup_map_icon_large() {
return 'wpgeo_icon_large';
}

function shortcode_wpgeo_mashup( $atts, $content = null ) {
global $wpgeo;

if ( !is_feed() && isset($wpgeo) && $wpgeo->show_maps() && $wpgeo->checkGoogleAPIKey() ) {
add_filter( 'wpgeo_marker_icon', 'wp_geo_mashup_map_icon_large');
return get_wpgeo_map('numberposts=-1');
} else {
return '';
}
}

}

add_action('init', 'wp_geo_mashup_map_init' );

This will force the use of large markers on the global mashup map. I will consider some way of making this optional in the next release but I cannot promise anything 😉

Another question: Is it possible to add the polylines to the mashup map so that the points on the map are connected by lines according to the polylines settings in the wp geo settings?

Sorry to keep bugging you on here, but I just installed the new version of wpgeo which supposedly has [wpge0_mashup] built in. I assume this might be part of why my map now shows up blank when the shortcode is [wp_geo_mashup]. But when I change my shortcode to wpgeo_mashup it doesn’t recognize it as a shortcode at all. Is there something I need to do to “enable” this new functionality?

Ok, by disabling the wp_geo_mashup plugin I was able to get the new shortcode working, only now I don’t know how to get the large icons working for it that you showed me how to do before, AND it only seems to show the posts that are on that particular page, as opposed to all geo posts. Is there any way to make it work like that or should I just downgrade wpgeo and bring back your plugin?

Hi Darren,
Yes, the shortcode does not work with the latest version of WP Geo anymore. I’m working on a new version right this moment… There will be some improvements over the new WP Geo built in shortcode [wpgeo_mashup] and it will be using the old [wp_geo_mashup] shortcode but with extra options like type=”G_HYBRID_MAP” for a hybrid map and marker=”large” for large marker icons and others. Soon 🙂

See the http://douxsejours.fr/carte/ for what’s coming up: the first map is the one by the new WP Geo internal shortcode [wpgeo_mashup] (displaying only 4 out of 20 coordinates) the second is done with [wp_geo_mashup marker=”large” polylines=”Y”] (in development)…

Oh wow that’s such great news!! Thank you! Is there any possible way to have access to the development version? I’m using this for a road trip that’s happening right now and lasting for another week, so it would be most useful to be able to try out now (though it will still be very useful afterwards as a sort of “archive map”)

Great plug-in, easy to install and set-up, thanks for your work on it!

Is it possible to have the map center on the geo location of the current post?

Also, Is it possible to use one marker style for the current post and another marker style for the other posts?

Hi Julie, there is no implementation of those features yet. But they are planned for the next version…

I threw on the short code and it worked great. I set a location on a post however and my mashup map is not giving me a fatal error:

Fatal error: Call to undefined function: esc_js() in /homepages/15/d131018061/htdocs/2009/wp-content/plugins/wp-geo/includes/templates.php on line 303

Any ideas on where I went wrong. Thanks for the help.

apologize, this is the error I get with your extension:

Fatal error: Call to undefined function: esc_js() in …/wp-content/plugins/wp-geo-mashup-map/wp-geo-mashup-map.php on line 44

Hi David, what WP version are you using? If it’s older than 2.8 that might explain the missing function but otherwise I cannot think of a reason why this WP (core) fromatting function would not be available at the time your shortcode gets processed… Where are you using the shortcode? In post/page content or in a text widget?

…to continue: If you are using WP 2.7 (or earlier) then you could try the following.

Open Plugins > Editor and select the WP Geo Mashup Map plugin (file wp-geo-mashup-map/wp-geo-mashup-map.php) and scroll to that line 44 that has the content:

var marker = new wpgeo_createMarker2(map, center, ' . $icon . ', '' . esc_js( $post->post_title ) . '', '' . get_permalink($post->ID) . '');

Now replace that esc_js with js_escape and save the file.

I love it, was searching for this plugin for long.

Actually would love using it on my website,
but how could I make it work with (?):
Qtranslate: on maps it shows posts titles in all languages whatever language I am in.
Japanese: looks like we have a problem of encoding.

Thank you again for the good work !

Salut François,

I have not tested with qTranslate but it will be interesting to make it compatible so I’d like you to test something for me: Assuming you are using the latest version of WP Geo, could you replace the shortcode with [wpgeo_mashup] and see if that changes anything?

About the encoding: in Opera 11, I do see some characters between the converted qTranslate language tags like <!--:ja-->富士山の離れ笠と鳶<--:--> that look Japanese to me… Not sure ofcourse but I think if we get it compatible with qTranslate, we end up with clean japanese too.

Dear Ravan,
Thank you for the answer, this time I clicked on the “notify me” button to be able to react faster.
So, yes, this is Japanese.

I did setup a test page for you to check, here, using [wpgeo_mashup]:
http://www.discretepicture.com/?page_id=4222
The Japanese is shown correcltly, at least no problem with encoding, only a problem with the interpretation of the Qtranslate data, either the place to get the data or the delimiters.
You may observe that the widget map from WP-GEO on the right is going ok on the homepage (but so small !).

Hope it helps, and if working in the end let’s not forget to advertise the compatibility with qtranslate !
Francois

Hi François, I have just uploaded a new development version (0.5 alpha) which you can find on http://downloads.wordpress.org/plugin/wp-geo-mashup-map.zip … Please wait at least half an hour to let the changes propagate through the WP Extend servers before downloading. Switch back to [wp_geo_mashup] shortcode (notice the difference between the shortcodes: _ ) and let me know if you find any problems 🙂

I just did the update with the 0.5 alpha file you proposed, and GOOD NEWS it’s now 100% qtranslate specifics.
You can go and check here:
http://www.discretepicture.com/?page_id=4222&lang=en

You may observe a small bug with the hyphen not well interpreted, appearing as: &#811
Certainly not a big problem. For me it will do, I will edit my titles with hyphens and go.

Feel free to ask me if you need to test another Alpha or Beta.
For the future updates, will it be through the automatic updates of wordpress, or will I have to come back manually to a final branch ? (non-alpha)

Actually the small bug applies to other common “non-letters” characters, I found it also for ‘

Now I also searching why I have a page appearing with a big mark on the map without the most recent or anything, not specific configuration I found… maybe something to do with WPGEO itself ?

Bad news: turns out it qTranslate is also doing character encoding of its own somewhere along the line. So there is no way I can prevent this happening AND keep qTranslate compatibility… If you want it looked at, you need to get in touch with the qTranslate devs. My plugin (now) uses get_the_title() which calls the filter the_title. This filter is used by qTranslate and here is where the encoding that is out of my hands takes place.

François, do not worry about future updates, they will be available via the normal WP update process.

On the topic of special characters, I will search for a better way to prevent problems with certain characters (like single-quote) in the javascript that creates the map while not converting harmless characters… So I might bother you about testing another development version later 😉

That last icon appearing as a big one is the default behaviour in my extension plugin. You can find instructions on how to change this by way of shortcode parameters on http://wordpress.org/extend/plugins/wp-geo-mashup-map/faq/

Hi João, the regular WP Geo plugin already can display maps per category via the widget or a template function. I suppose that works for tag and user archive pages too… Or is that not what you are looking for?

No, there is no shortcode for that at the moment. But I’ll take this as a request and (when I get around to it) try to include something in the next release 🙂

Goedendag Ravan.

I have 2 categories with geo-located posts:
a) News
b) Office Locations

I want to show two different mashup-maps, one for each category.

Any ideas on how this can easily be achieved?

Dank je wel
Denis

Hallo Denis,

In the current version, you can add the shortcode to a text widget and place it in the sidebar (or elsewhere depending on your theme) and with the excellent plugin Widget Logic (there are others too) limit the text widget to be shown only on category pages.

That way, there will be a mashup map with more options available when viewing each category page, listing the N last posts in those categories. But the map will limit itself to that exact N number of posts shown on that category page. You probably want to show ALL post from one category on a separate page, right?

I’ve just uploaded the new development version. Wait half an hour for the WP Extend servers to update (after this reply) and then download and install the development version 0.5 from http://wordpress.org/extend/plugins/wp-geo-mashup-map/download/ then add the new parameter category_name=”category-slug” to the shortcode to limit the map points to one particular category, using its slug name.

Let me know how it works for you 🙂

Groet,
Allard

Works well. But it now makes more sense to have:

a) News items as Posts in the News category(constantly updated data)
b) Each Office as a child Page of Office Locations (rarely updated data)

For now I’ll hack wp-geo-mashup-map.php to include the post_parent parameter

… will let you know and send you the code changes.

Hi Jason, that page currently shows me a ‘Fatal error: require_once()’ because of a seemingly missing plugin file ‘gpp-slideshow/theme/archive-listings.php’. No idea where that stems from but it looks like your theme needs that file to generate that particular page. Maybe the template you have selected for it?

In any case, for the WP Geo Mashup Map to function, you need two things:
1. The latest and greatest WP Geo plugin activated and configured with API and allowed to show maps on posts and pages;
2. Posts and/or pages on your site that actually have a location assigned to them.

Ha Niels, The coordinate detection is somewhat limited. It can only detect coordinates in a format similar to (for example) 46:58:16S for latitude and 168:10:13E for longitude. What format are you using?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.