Mashup not working

Home Forums MapPress Support Mashup not working

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #10750
    lalate
    Participant

    Hi, I posted this on another thread, but imagine it will be clearer in its own post.

    Essentially, all of my maps use the kml are working perfectly (thank you!) with version 2.38.7 but now I need to make a page with a mashup. I need to show all published posts here, so it seems like the [mashup] shortcode should work. It brings in a map, but no formatting or locations show up.

    Do I need to add more code to make this function work? Also, is there a way to show these in Google Earth?

    Thank you!

    #10752
    Chris
    Keymaster

    Hi,

    For the mashup, what post type are you hoping to display?  One common ‘gotcha’ is that by default, WordPress only checks post type ‘post’ and the first page’s worth of entries.

    It is also possible you’re running out of memory if you have a large blog.  If so, you can limit the posts to be selected, by category, post type, etc.

    Check out the documentation for some examples if you need a different post type or want to check > 1 page of posts for map locations.

    As for Google Earth – no, it’s a separate API.

    #10754
    lalate
    Participant

    Thanks for getting back to me. So I’m wanting to display all of the listings that I have entered with Maps. They are all in posts, so I was hoping that I wouldn’t have to efine them, especially since these will be updated/removed pretty consistently.

    Wondering if the fact that they are all Land areas instead of markers is part of the problem. When I just do Mashup, it gives me a map that isn’t set to my default size and shows the entire world, so its not picking up any data at all.

    #10758
    Chris
    Keymaster

    Hi,

    [mashup] by itself should show only current posts, which would be type ‘post’ and limited to 10.

    You can use [mashup query="all"] to show all posts, but that can be slow or cause the query to run out of memory.  I would suggest tagging or categorizing the posts with maps.

    If that doesn’t help, a few tests might narrow it down:

    1) Enter [mappress] on one of your posts.  Do you see the map?

    2) Try [mashup query="p=1234"] where 1234 is one of your post IDs.  Do you see a map?

    #10769
    lalate
    Participant

    Hi Chris, so I’ve done some testing and so far this is the best I have gotten.
    http://www.rowhouseco.com/grantmassie/google/

    by using:
    [mashup width="642" height="642" show="query" show_query="posts_per_page=6&category_name=land-listings"]

    How can I make this show ALL of the listings in the ‘land-listings’ category, as well as listings in a 2nd category?

    getting there….thanks!

     

    #10770
    Chris
    Keymaster

    Hi,

    That query will show only 6 posts.  Change it to posts_per_page=-1 to show them all.

    I think you can use “category_name=”a,b” to grab two categories a and b.

    There should be an example in the MapPress docs, and there are also a few in the WordPress codex:

    http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters

     

    #10771
    lalate
    Participant

    So now no listings are showing up. Thoughts? Here’s my code…
    [mashup width="642" height="642" show="query" show_query="posts_per_page=-1&category_name=land-listings"]
    thx!

    #10772
    Chris
    Keymaster

    Approximately how many posts are in category land-listings?

    What happens if you specify only the 2nd category?

    #10773
    lalate
    Participant

    For the ‘land=listings’ category that I have been trying there are close to 80. For the 2nd category there are 3. When I change the category it only shows me 1.

    [mashup width="642" height="642" show="query" show_query="posts_per_page=-1&category_name=commercial-listings"]

    http://www.rowhouseco.com/grantmassie/google/

     

    #10774
    Chris
    Keymaster

    Hi, that is strange – the only time I’ve seen that kind of result is when another plugin has adjusted the query results.  Is that possible in your case?

    If not, please send a login using the contact form and I’ll trace it for you.

    #10775
    lalate
    Participant

    I don’t have any other map-type plugins. Sending my log in now. thank you!

    #10778
    Chris
    Keymaster

    For anyone else looking for this:

    In the first case the query was actually selecting the right posts – but the KML maps in each post were small and widely separated so it was difficult to see them the mashup map.

    In the second, with two categories using “category_name=a,b” there is a bug in MapPress that is causing them to not be selected properly.

    The bug will be fixed in 2.38.8.  If you have the same issue, as a workaround you can use “category__in=1,2”  instead.  Note that this requires category ids instead of category names, and does not include the children of the category.

     

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.