November 5, 2012 at 4:32 am #10750
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!November 5, 2012 at 8:55 pm #10752
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.November 6, 2012 at 3:11 am #10754
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.November 6, 2012 at 1:23 pm #10758
[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?November 8, 2012 at 8:55 am #10769
Hi Chris, so I’ve done some testing and so far this is the best I have gotten.
[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!November 8, 2012 at 9:01 am #10770
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:November 8, 2012 at 10:11 am #10771
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!November 8, 2012 at 10:32 am #10772
Approximately how many posts are in category land-listings?
What happens if you specify only the 2nd category?November 8, 2012 at 10:36 am #10773
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”]November 8, 2012 at 10:46 am #10774
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.November 8, 2012 at 10:59 am #10775
I don’t have any other map-type plugins. Sending my log in now. thank you!November 8, 2012 at 2:37 pm #10778
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.
- You must be logged in to reply to this topic.