WordPress.org

Ready to get started?Download WordPress

Forums

Geo Mashup
[resolved] single vs. global map - no difference ?!? (19 posts)

  1. candy2012
    Member
    Posted 1 year ago #

    Am I understanding something wrong here?!?
    On single pages I used this in template:

    <?php echo GeoMashup::map('height=270&width=270&zoom=11&add_overview_control=false&add_map_type_control=false&map_content=single');?>

    and on the homepage this (through a widget):

    [geo_mashup_map height="300" width="300" zoom="10" add_overview_control="false" add_map_type_control="false" map_content="global" radius_km="100"]

    However, there is NO difference between the 2! Both show all markups from ALL posts (so basically the global map)!

    Wasn't the single one supposed to only show the markups from that particular post only ??

    I really do not understand how is this supposed to work ...

    http://wordpress.org/extend/plugins/geo-mashup/

  2. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. candy2012
    Member
    Posted 1 year ago #

    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!

  4. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. candy2012
    Member
    Posted 1 year ago #

    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.

  6. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    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

  7. candy2012
    Member
    Posted 1 year ago #

    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!

  8. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  9. candy2012
    Member
    Posted 1 year ago #

    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 ;(

  10. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    As I just noted on issue 577, Geo Mashup 1.5rc1 may resolve this.

  11. candy2012
    Member
    Posted 1 year ago #

    yesssssssssss!
    Thanks for the update!

  12. candy2012
    Member
    Posted 1 year ago #

    (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) ...

  13. ldekay
    Member
    Posted 1 year ago #

    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?

  14. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  15. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  16. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  17. ldekay
    Member
    Posted 1 year ago #

    Thanks for the help. I probably never would have found that conflict. I made the same change in the other site BingenEvents.com/wp I was having problems with and it seems to be working OK after making some category adjustments and cleaning out some excess html that worked it's way into the shortcodes.

  18. Dylan Kuhn
    Member
    Plugin Author

    Posted 1 year ago #

    I wouldn't have found it either without your help. Appreciate the link, hope your sites are a big success :)

  19. Devin Walker
    Member
    Posted 1 year ago #

    Hey I just want to say thanks to @candy2012 for posting this bit of code:

    <?php echo GeoMashup::map('height=400&width=100%&zoom=11&add_overview_control=false&add_map_type_control=false&map_content=single');?>

    Which allowed me to place a single Geo Mashup location map on custom post type I have setup. I wasn't really clear about it and this post solved it right up. Oh, and thanks be to the plugin author for such a great plugin!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.