There’s an explanation here:
http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference#Map
I’m guessing you just want to add map_content=single in your template tag.
hmm … but I did add that map_content=single in the tag where the single map should be showing (see the 1st code snippet above)
that was exactly my issue … with or without that “single” inside the tag, the only map which is showing is the global map .. š
are there any further constraints about the single map to show (like does it have to be inside the loop, or in a special location etc? )
Thanks!
If you’re getting a global map with map_content set to single, that may be a bug. Can you give me a link to an example?
When you ask for a single map outside the loop, the last post to be displayed is used for the location. If that’s not the right post, you can set object_id to the ID of the post you want used. It the post doesn’t have a location saved, you won’t get any map at all.
It is really not working … tried with both map_content=single and map_content=contextual … I am always getting ONLY the global map no matter where and which kind of code I use!
I have some custom post types defined (the map part shows correctly under the post edit section and locations are added to the map (well, the global one at least)!).
I have tried to include the map both inside a widget, or directly inside the text of the post using the shortcode.
No difference … it is only outputting the global map.
One other weird thing that happens is that when trying to insert the code in the sidebar widget, using “map_content=single” outputs nothing at all while using “map_content=contextual” outputs the … global map …
I have changed the theme in the meanwhile, so it’s not the theme either – I experienced the very same behavior on more themes.
Can’t send you a link as the project is not approved to go online as yet :(, but I hope my explanations here helped you identify the problem?
PS (edit): it really looks like there is a bug somewhere; just tried the following extra options: map_content=contextual AND “Click To Load” enabled > when clicking on the map place holder on the front-side, it DOES show a single map. Without “Click To Load” enabled it shows the global map
Nothing shows though for using “map_content=single”, with or without “Click To Load” the output is still fully empty.
Ok, I took a guess and found a bug that seems likely to be the same you’re experiencing. Star this issue to follow progress:
http://code.google.com/p/wordpress-geo-mashup/issues/detail?id=612
don’t know what is causing it, but I just found this as well and it does not seem to have been solved yet …
http://code.google.com/p/wordpress-geo-mashup/issues/detail?id=577
Do you think there will be a fix soon? I need a solution this week …
Any workaround would be good š
Thanks!
I’m not able to create a case where a global map is displayed when map_content is set to single. Without a test case that reproduces the problem I have no hope of fixing it.
You’ve eliminated the theme as a possible cause – does the problem persist if you deactivate all other plugins also? If so, it must be related to the server configuration.
I can’t go through the deactivation of all plugins right now, but the server config should be OK I suppose (php 5 anyways). I actually had the problem with the single map version from the very beginning (and this plugin was one of the first I have installed on a fresh WP 3.4.2 install).
An other strange behavior I have noticed, if I add “static=true” to the single map code inside the post (content part), it works! (I mean, it shows the static map). The problem persist with the dynamic maps though – still getting the global map ;(
As I just noted on issue 577, Geo Mashup 1.5rc1 may resolve this.
yesssssssssss!
Thanks for the update!
(hmmm … to early :))
still seems to be a bug when saving the locations for a second custom post type. It does not seem to “remember” the address it when in “single mode”, keeps showing only one other location (for an other post) …
I’m having the same problems on a couple of new sites. The test site is at http://ldekay.ipage.com/wptest/ and I’d be happy to give you admin access to look behind the scenes.
I have 4 different map pages with shortcodes shown above maps (replaced [] with ||). Doesn’t matter whether I designate single, contextual, or specify a category, it always shows all post locations on the map.
I’m even currently using your 1.5rc1 above and results are still the same.
One caveat, I temporarily installed WP Geo after reading their description but reverted to geo_mashup. Could there be some lingering elements that are messing things up?
Great to see a test case, thanks! I would like to do some debugging – could you grab my contact info from the sidebar at http://www.cyberhobo.net to create an admin account?
I remembered a prior issue where this kind of thing happened with the W3TC plugin:
https://code.google.com/p/wordpress-geo-mashup/issues/detail?id=425
That was fixed, but if for some other reason the WordPress transient system isn’t working on your system, that would cause behavior like this. I may see if I can build a transient test into the settings page to detect this.
Thanks @Idekay! In your case it is indeed the old W3TC issue. I turned off the object cache and that fixed things – probably the only option at this point.