Show all Events in ONE Google Map
-
Hi there,
I have multiple events and want to show all of them on a google map. Is this possible, I couldn’t figure it out.thanks
https://www.ads-software.com/extend/plugins/event-organiser/
-
If you want to specify which venues to show one google map see this post.
To display all venues:
[eo_venue_map venue="%all%"]
(requires 1.6+).
Great – works fine.
I included this script https://gist.github.com/4190351 in my functions.php and set the shortcode to
[eo_venue_map venue="%all%"]
.All events appear on my map. Two questions:
1) Can I set the dimensions and the zoom level of the map to a fixed number? Now the map zooms dynamically that all venues are seen. I’d like to see a whole map (of Germany) eben though there is just one or two events.
2) Can I modify the tooltip, so that there is a thumbnail of the featured image right on the map? And I didn’t figure out how to include a link to the event within the tooltip…
Thanks so much Stephen. I love your plugin ??
—
Oh, btw – is there a connection to gravity forms? Maybe (some day) I’d like to use gravity forms to create a event so it would be really nice if the data will go directly to EO and the event will show up on the map ??
That’s fantastic, I actually came on here to look for something like %all% so I didn’t need to update the map page every time I added a new venue!
I have two (and a half) questions myself about filtering venues to be shown on maps:
1) Is it possible to select all venues that match a certain attribute in their Title? (e.g. every venue with “Belfast” in the title)
2) Can I choose to only display venues that have events upcoming?
2A) And if so, can I filter that so only events in the upcoming week/fortnight/month are displayed?Many, many thanks for this amazing plugin – it’s the backbone of my entire website!
1) Mmmm… I think with more than one location it automatically sets the bounds and ignores the zoom attribute. That should probably change.
2) Yes there is a hook for that: https://wp-event-organiser.com/documentation/hook/eventorganiser_venue_tooltip/
3) Absolutely yes, A couple of people have done it. You might find this thread helpful (https://wp-event-organiser.com/forums/topic/posting-event-with-a-gravity-form/). You may find this article helpful too ( https://www.stephenharris.info/2012/front-end-event-posting/ ).
If you get something working (and are willing to) drop me an email to let me know :).
Yup the %all% is not very well documented. You can also use
[eo_events event_venue="%this%"]
to list events at the same venue as the current event (when using it on an event page). An easy way of implementing ‘Other events at this venue’.(1)-(2) – Afraid not. Advanced venue queries will be possible in the premium add-on though. So with that I might be able to add more advanced features to the venue map too.
Cool! ??
That’s great, I can’t wait to see what the pricing is for Premium now. Is it planned to be a one-off payment or a subscription?
I suppose once I’ve paid a bit of cash for the plugin I won’t feel as bad about constantly asking questions (and I have plenty more to come once my site has settled in a bit)!
Great :). It’ll be a 12-month license key which will give you automatic updates during its lifetime – it’ll also give you access to priority support, plus a few other goodies I’m planning :). (Obviously you’ll be able to manually renew the license too). If the key expires you won’t get updates or other perks, but the plug-in will still work. Price is to be confirmed at the moment.
If, after 12 months, I don’t want to renew, would I still get the updates from the free version of the plugin or is it a totally fresh install of it?
Absolutely, the premium version is an add-on for this version – so you would be activating a plug-in in addition to this one. And in that respect the plug-in hosted here is completely independent of the premium add-on. You’ll still get updates for this plug-in regardless.
You’re a brilliant man :p
Hi,
i have a problem running the hook for tooltips upgrading: https://wp-event-organiser.com/documentation/hook/eventorganiser_venue_tooltip/
Fatal error: Call to undefined function apply_filter() in ../wp-content/plugins/event-organiser/includes/event-organiser-venue-functions.php on line 578
function eo_get_venue_map($venue_slug_or_id='', $args=array()){
#L578 `apply_filter(‘eventorganiser_venue_tooltip’,’my_custom_callback’,10,2);
function my_custom_callback( $tooltip_content, $venue_id ){
//Callback performs operation
return $tooltip_content;
}/**
* Adds upcoming events to the venue tooltip in Event Organiser.
*
* Uses the eventorganiser_venue_tooltip filter to append content to the venue tooltip.
* This tooltip appears when clicking a venue on a map (if tooltips are enabled).
* @uses eventorganiser_venue_tooltip.
*
* The filter passes 2 objects: the content of the toolip, the venue (term) ID
*
* @requires Event Organiser 1.6+
*/add_filter(‘eventorganiser_venue_tooltip’,’my_venue_tooltip_content’,10,2);
function my_venue_tooltip_content( $description, $venue_id ){/* Get events that have not finished yet, at this venue */
$events = eo_get_events(array(
‘showpastevents’=> true,
‘event_end_after’=> ‘today’,
‘tax_query’=>array(
array(
‘taxonomy’=>’event-venue’,
‘field’=>’id’,
‘terms’=>array($venue_id),
),
),
));/* Append the upcoming events to the tooltip content */
$description .= ‘</br></br>’;
$description .= ‘<strong> Upcoming Events </strong>’;if( $events ){
$description .= ‘<ul>’;
/* We have some events, so list them and their date */
foreach( $events as $event ){
$description .= ‘<li>’.get_the_title($event->ID).’ ‘.eo_get_the_start(‘jS M’,$event->ID,null,$event->occurrence_id).'</li>’;
}
$description .= ‘</ul>’;
}else{
/* No upcoming / running events for this venue */
$description .= ‘No upcoming events’;
}
return $description;
}/**
* Adds a link to the venue page to the tooltip
*
* Uses the eventorganiser_venue_tooltip filter to append content to the venue tooltip.
* The filter passes 2 objects: the content of the toolip, the venue (term) ID
*/add_filter(‘eventorganiser_venue_tooltip’,’my_venue_tooltip_content_link_to_venue’,10,2);
function my_venue_tooltip_content( $description, $venue_id ){
$description .= sprintf(‘<p><a href=”%s”> Visit the venue page! </a> </p>’, eo_get_venue_link($venue_id));
return $description;
}
`thanks
That should be add_filter. Will just go and correct that. Thanks!
Also it looks like you’ve just copied that page into
/includes/event-organiser-venue-functions.php
. Don’t edit the core files please. Additional code should go in a utility plug-in (see this post: https://wp-event-organiser.com/blog/tutorial/where-should-i-put-code-from-the-tutorials/ )Hello @tunixtunix, how did you get the thumbnail to show on tooltip.
Many thanks,
BenOh I got it. Sorry for the inconvenience.
- The topic ‘Show all Events in ONE Google Map’ is closed to new replies.