Forum Replies Created
-
AuthorPosts
-
Also – for the current posts, try:
[mashup query="current"]This will depend on your theme, plugins, etc. though – it will only work if the current global WordPress query ($wp_query) is set to the correct posts.
Hi,
By default WP will only select post type ‘post’. You might try including the post type in your query:
[mashup query="post_type=location&posts_per_page=-1"]Or just all post types:
[mashup query="post_type=any&posts_per_page=-1"]Hi,
You can pass arguments as an array:
echo $maps[0]->display(array('width' => '50%', 'height: 300px'));Hi,
I’m not sure I understood. If you just want to display the map for the current post, the widget has a ‘current post’ option, or you can use query=”current” in the [mashup] shortcode.
If you want to use PHP, you can get all the maps for a particular post using Mappress_Map::get_post_map_list($postid).
For example this should display the first map for the current post:
<?php global $post; $maps = Mappress_Map::get_post_map_list($post->ID); if (isset($maps[0])) echo $maps[0]->display(); ?>Hi,
If it is a mashup you’re displaying, you can use getPoiById() instead, and pass it the post ID you want (1234 in this example):
mapp0.getPoiById(1234).open(true);If you’re displaying a map, the POIs are numbered in the order they appear on the map: 0, 1, 2…and so on.
May 21, 2013 at 4:58 am in reply to: GeoCoding Settings – Additional Option For Title Mapping #12627Hi Clive,
You can modify the
map_poi.phptemplate to always display the post title instead of the POI title. From your other question, it sounds like you’ve already started playing around with the template but if you need help let me know. If you can, send an email with your current template so I can take a look (chrisvrichardson at mappresspro.com).Hi,
1 – no (you could convert all the images to custom icons but it would be very time-consuming)
2 – [mappress width="100%" height="100%"]. Note that if you set a % height your page body must also have a height. Most blog pages don’t (since they can be scrolled up and down). You can test it by just putting a div in your theme:
<div style="background-color: red; width: 100%; height: 100%"></div>Hi Robert,
There’s a function called get_open_link() in ‘mappress_poi.php’ that does something similar.
You can take a look at that code, or try adding javascript like this to whatever element you want to be clickable (an anchor, div, etc. – the code below is for an anchor):
<a href='#' onclick='mapp0.getPoi(0).open(true); return false;'>Click me!</a>‘mapp0’ means the first map on the page, you can also use the “name” parameter of the shortcode to assign a different name. getPoi(0) means get the first POI, getPoi(1) is the 2nd, and so on. And .open(true) means open and zoom in – set to false to just open the marker.
Hi,
There’s a sidebar widget that comes with the plugin, or you can use the do_shortcode() function in any template file, e.g.:
Hi,
There’s a parameter for that in the shortcode, and a checkbox in the widget. The shortcode is:
[mashup hideempty="true" query=...]
Hi,
Are you trying to display this template for mashups or for single posts?
If it’s for mashups, you will need to get the postid from the poi rather than relying on the global $post variable:
postid) {
$post = get_post($poi->postid);
…your code here…
}
?>You might also want to try just placing that code in your theme to verify that it’s working before trying to use it in the map poi…
If that doesn’t help, please send me the template so I can take a look (you can just paste it into the contact form on the site).
Hi,
There some examples in the documentation, do they work for you?
For example, 5 posts from category ‘mycat’:
posts_per_page=5&category_name=mycat
Or ALL posts:
posts_per_page=-1&category_name=mycat
Hi,
Use the ‘geocoding’ settings in the MapPress settings screen to define your fields (lat/lng or address). Then go to a post that has those fields and publish it. You should see a map named ‘automatic’ is created.
You can’t display a mashup until you create the maps in each post.
Hi,
I don’t know if I understand your question, but I your mashup doesn’t seem to have a query.
If you don’t provide a query, it’ll just show the other maps on the page (and there aren’t any).
To see ALL maps, try:
[mashup query="all"]Hi,
Yes, there’s a section in the MapPress settings for ‘styled maps’ and some info in the documentation. You’ll need to use Google’s styled maps tool and then copy the resulting JSON to the plugin settings.
-
AuthorPosts
