Displaying a map of events

The events map is only available with Pro, however the venue map is available in the free version of Event Organiser.

An events map displays events on a Google map – and allows you to restrict which events appear to those matching a certain query (for example, events happening this week).

It is very similar to the venue map, the chief difference is how the venues shown are determined: the venue map displays a map of either the venue of the current event, specified venues or all venues. The events map, however, shows a Google map of events which match the specified query.

Event map with tooltip. (Looks event better with custom venue markers!)

Event map with tooltip. (Looks event better with custom venue markers!)

How to display an events map

Simply add the shortcode [event_map] to a page or post, where you want the map to appear. In most cases you’ll want to specify attributes to tailor the way the map appears, and which events appear on it (see below for examples).

The [event_map] shortcode accepts the same arguments as both the event list shortcode (to determine which events are displayed) and venue map shortcode (to determine how the map is displayed): you can think of it as a cross between the two. See the event map shortcode documentation for more details.

Examples

Display a map of events starting in the next week:

 [event_map event_start_after="now" event_start_before="+7"]

Display a large map of events in the category “sport”:

 [event_map width="100%" height="500px" event_category="sport"]

Changing the tooltip display

By default the tooltip displays a list of events, occurring at that venue and matching the specified query.

You can change this by using the eventorganiser_event_map_tooltip tooltip:

function my_change_event_map_tooltip( $tooltip_content, $venue_id, $events ){

     //$tooltip_content is the HTML for the inside of the tooltip.
     //$venue_id - ID of the venue corresponding to this tooltip
     //$events - Array of events (posts) at this venue & matching the query

     $tooltip_content = ''; //Ammend / replace $tooltip_content. 

     return $tooltip_content;
}
add_filter( 'eventorganiser_event_map_tooltip', 'my_change_event_map_tooltip' );

Using custom markers with maps

The venue markers extension allows you to assign venues custom markers. You can upload your owncustom markers or choose from over 150 bundled markers. See this page for more details.