Forum Replies Created
-
AuthorPosts
-
Hi,
The way to do this is to import each POI as a separate post. Set the post title to the POI title you want, and the post body to its body. Then combine the POIs on a single mashup map. For example:
[mashup query="all"]Hi,
I don’t know if I understand your question. You can make the infowindow open when the map is shown by using initialopeninfo=”true”, if that helps.
Hi,
It’s a quirk of WordPress: functions with the_ at the front require you to call setup_postdata() first to set up some global variables.
I think the easiest thing for your template is to call get_permalink() instead. It doesn’t require that extra step, and you can call it with the postid.
Hi,
If you use the HTML generated by WordPress for an image, it will be incorrect. WordPress uses height and width for the image tag but doesn’t include ‘px’, which is invalid in some browsers. Add the ‘px’ suffix to make it work.
For example, change
<img height="300" width="225" src="myimage">To:
<img height="300px" width="225px" src="myimage">It looks like the problem is that you’re querying for the mashup by post type. You should be querying by category instead:
[mashup query="category_name=beach"]There are some other query examples here:
http://mappresspro.com/mappress-documentation#toc-mashupsHi,
The query looks OK but WP will ignore the post type if it’s invalid. Are you using post types or categories (or some other taxonomy) to group the posts?
December 22, 2014 at 8:08 am in reply to: Version 2.42.1 throwing 500 error from admin-ajax.php #15485Hi,
Great, I’m glad you found it. It should be an easy fix: you can use get_post_meta instead – there’s an example here:
http://mappresspro.com/mappress-documentation#toc-modifying-the-poi-template
December 22, 2014 at 7:31 am in reply to: Version 2.42.1 throwing 500 error from admin-ajax.php #15483Hi,
I don’t think it’s jQuery, and MapPress is compatible with WP 4.1. Could this be the same problem you had back in May?
http://mappresspro.com/forums/topic/ajax-error-after-upgrading-from-2-40-7The error means the server crashed. Usually that’s because of a syntax error in a PHP file.
If you check your PHP error log, it will show you exactly where the error occurred. Or, to rule out another plugin or a conflict: deactivate all other plugins and switch to a standard theme (like 2014) for a moment and see if the error persists.
Hi,
There’s a short section in the documentation about this that may help. There are also some examples in the WordPress page here:
http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
—
Queries to Set the Sort Order
MapPress by default sorts POIs by title.
You can turn off the default behavior using the shortcode parameter sort to “false”.
If the default sort is turned off, you can use the WordPress order and orderby parameters in queries to sort your posts by various fields including author, date, etc. For example to sort all posts by date, descending:
[mashup query=”orderby=date&order=desc” sort=”falseNo, even if it was possible, calling wp_footer() won’t work.
MapPress wasn’t designed to display the maps in anything but a blog page, so I don’t think there’s a solution using the current version.
However – I’d like to take a look to see if the plugin can be modified to work in the scroller. Could you send me a link your blog, and tell me which infinite scroll plugin you’re using?
Please use the contact form so I can email you directly. I’ll post any updates here.
Hi,
I’m sorry, but I don’t think it will be possible to display the maps inside the infinite scroll area.
Because the Google Maps API is large, MapPress only outputs its scripts and map data (POIs, styles, etc.) when a map shortcode is present in the current post. They are output in the blog footer, during the wp_footer() function call.
My guess is the scroller is fetching the post content for each page, but not the footer. That makes sense for the scroller – but in this case the footer would normally contain the map scripts and data. Without them, it won’t be possible to just call an ‘initialize’ function and draw the map.
Hi,
Have you uploaded ‘workoffice.png’ to the directory ‘/wp-content/uploads/mappress/icons’? If not, you’ll need to FTP it over to that directory.
Other than that, I’m not sure. Could you post your current code again?
You’re getting the default icon because the plugin can’t find the icon you set, or because nothing was set.
Try *always* returning ‘workoffice.png’ – then you’ll know whether the issue is with the code to check the taxonomy or with the icon itself. For example:
function myiconid($iconid, $poi) { return ‘workoffice.png’; }Hi,
For custom icons you must return the file name WITH the extension. For example if the icon is ‘workoffice.png’ then your code should be:
if (has_term(‘online-business’, ‘business-type’, $postid)) return ‘workoffice.png’;I think that may be why you’re getting the default icon instead of workoffice.png.
Hi,
Percent height isn’t supported by the plugin.
This is because of the way CSS works: if an element has a % height, the height is calculated based on its parent element(s) – not the window.
In most blogs (including yours) the parent elements don’t have a fixed height because they grow to the size of the post content. In this case ‘100%’ would return ‘0 pixels’ and you would just see a thin horizontal line for the map.
Hi,
I think we crossed posts, I’m glad you figured it out.
If you need to bulk publish existing posts, you can do it from the post list on the WP admin screen: in the ‘screen options’ dropdown, enter the number of posts you want to see. Select all the posts, click ‘edit’ in bulk actions, and then press the ‘update’ button.
-
AuthorPosts
