Forum Replies Created
-
AuthorPosts
-
Hi, the plugin doens’t have any option to place a marker in the center. A workaround might be to create a map with a marker in the center, though, and include that map in your mashup.
That’s strange, is your custom post type actually using tags, or is it using categoriess or a custom taxonomy?
If you’d like send a login using the contact form and I’ll take a look for you (please tell me which post to check for the mashup).
Hi,
The syntax can be tricky. It comes from the WordPress query_posts() function. The WordPress codex has some more examples at that link.
I think for what you want to do, assuming the tag you want is ‘mytag’ you would write:
[mashup width="100%" show="query" show_query="post_type=project&tag=mytag"]
Hi,
If you’re just using a single map with all the locations (and not a mashup) then you can just drag and drop the POIs to set their sort order in the map editor (you’ll need version 2.38.5 or later). Then use the shortcode argument ‘sort=”false”‘ to turn off sorting by title:
[mappress sort="false"]
Hi, please see the documentation for some examples, or let me know if that doesn’t help:
http://mappresspro.com/mappress-documentation
Hi,
I’m not sure I understood your question, but there’s no way to edit a map without editing the post where you created it. You need to edit the post, then you can edit the map within that post using the map editor.
Hi, it’s a flaw in the plugin – it doesn’t provide a directory you can view. I’m working on fixing this, but in the current version when you edit a post, you can only view the maps you created in that post.
The only way to see a list of all maps is to check the database table ‘mappress_maps’.
Similarly, when you delete the original post, its associated maps should also be deleted.
Hi Geoff,
A URL might help so I can see what you mean, but I think your first query is the right one (assuming your post type is ‘product’).
For the infowindow problem: by default MapPress will show the post excerpt for each post. The default WP excerpt suppresses shortcodes, so you’d never see the ‘mashup’ in the infoWindow. I’m guessing the Woo theme includes its own excerpt function that doesn’t work the same way.
Yo might take a look at the Woo forums to see if there are some tips about how to modify their excerpt function.
Here’s are some other things that might help:
1) You could use an explicit post excerpt for each post. That might work, although it also depends on the Woo excerpt function. Then you can control exactly what shows in the infoWindow – for example, you could choose not to include the [mappress] short code.
2) You can modify the Woo excerpt function or override it to suppress the shortcode and show some portion of your post content instead.
3) You can use the MapPress excerpt filter: ‘mappress_poi_excerpt’. You can add it to your functions.php. For example:
function my_excerpt($html, $postid) { $post = get_post($postid); return $post->post_content; }add_filter('mappress_poi_excerpt', 'my_excerpt', 10, 2);4) You can use the mashup option marker_link=’false’. Then the mashup will show the POIs exactly as they were saved in each map, but it won’t link the POIs to the underlying posts. Unfortunately, I’m guessing that’s not what you want to do.
Hi,
I’m not sure what your requirements are, but the number passed to getPoi() is the index of that POI in the map you’re displaying. So one way to prevent it from changing for a specific POI is to keep that POI in the same position in the map’s POI list – for example always place it at the top of the list. You can control the list sort order by dragging and dropping in the map editor (for maps), or using the action ‘mappress_sort_pois’ (for mashups).
If you’re doing a mashup, and it’s linked to the unerlying posts, then you can also try changing the template to use the postid instead of the index. There’s a javascript method getPoiById(postid) for that purpose.
Hi, unfortunately that can’t be changed.
The problem is that the plugin doesn’t know in advance which posts/pages will have a map. But the CSS has to be loaded in the header before the page is rendered (it can’t be loaded in the footer or it will seem to ‘pop’ in as the page is displayed).
The CSS is small and will be cached, or you can minimize it to compress it further, but that’s the only (partial) solution I can suggest.
Hi,
I tested this and I see what you mean now. The problem is that the ‘center’ link automatically centers the map to show all of the POIs. It doesn’t consider the original center and zoom.
For individual maps (as opposed to mashups) it would be better if ‘center’ just reset the map back to its original cneter/zoom values. I’ll see if I can implement that for beta 2.38.6.
Until then, you may want to remove the ‘center’ link to prevent the behavior.
For mashups, like the widget, it will need to continue to automatically center, since the POIs could come from many different maps.
Hi,
The mashup doesn’t really center on a particular POI. It adjusts its center and zoom to show all of the POIs. You can use the “initialopeninfo” parameter to open the first POI in the mashup.
If you are using the latest beta (http://mappresspro.com/betas ) the “first” POI is the one that is alphabetically lowest (POIs are sorted alphabetically by title), for example “aaa”.
To apply a different sort order there are two options:
1. The easiest way is to just turn off the default sorting using the mashup parameter
sort="false". Then you can set a POI order in your query using the clause ‘orderby’:show_query="post_type=post&orderby=author"
2. If you know some PHP, there is an action
mappress_sort_poisyou can use to sort the map POIs.You would need to implement that action in your
functions.phpfile. You can see the default implementation in filemappress_map.phpas an example.Hi, when you drag a marker it no longer has an address associated with it – it becomes just a lat/lng coordinate. So there’s no way for the plugin to know how far to zoom in or out (it doesn’t know if it’s the location of a road, a city, or a country).
However, you can still manually set a zoom level in the map editor, and it will remember that zoom and use it when you display the map.
You can also set a specific zoom in the widget.
August 23, 2012 at 9:58 am in reply to: Few little quirks that I am hoping someone can advise on… #10280Hi,
I checked the blog and your mashup shortcode had
directions="true"
The valid values are ‘inline’, ‘google’ or ‘none’, so I switched it to ‘inline’. It seems to be working now. If you want to change the directions links on a per-map basis you can use the following with your choice of links:
poi_lins="zoom,directions_from,directions_to"
August 23, 2012 at 9:43 am in reply to: Few little quirks that I am hoping someone can advise on… #10279Hi, you can use the contact for or email me: chris at mappresspro.com.
The problem seems to be that somehow the ‘directions’ setting is saved incorrectly. Could you try going to the MapPress settings and selecting ‘inline’, then saving the settings?
If that doesn’t help, please send a login and I’ll take a look.
-
AuthorPosts
