Event Maps

Home Forums Welcome! Pre-Sales Questions Event Maps

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1428815
    David Perry
    Guest

    We are a non-for-profit volunteer group and looking into expanding the map element (we already use the events calendar as part as our theme). We ideally want to have markers on the map that show future events (but also just important is to show past events). These markers can then link extra information. Future events link to the event but past events link to a page/blog or an info note that shows statistics on what happened on the previous event. Can the pro version do this? thanks

    #1429997
    Andras
    Keymaster

    Hi David,

    Thanks for your question.

    Out of the box that is not possible.

    The map is provided to us through the Google Maps API and it is limited what we can do in terms of the pins / markers on the map.

    Here is a snippet that will show you how you can modify some of the elements:

    add_filter( 'tribe_events_ajax_response', function( $data ) {
    if ( empty( $data['markers'] ) ) {
    return $data;
    }
    foreach ( $data['markers'] as &$marker ) {
    // Change the following line to modify the markers as needed
    $marker['title'] = 'New event title';
    $marker['link'] = 'slug'; // this will change https://domain.com/events/map/slug
    $marker['link'] = 'BRAND NEW TITLE OH YEAH BABY';
    }
    return $data;
    } );

    With some extensive coding and extra JS that redefines the content based on different criteria it might be possible to achieve what you are looking for, but that is beyond the scope of our support.

    I hope this can get you started. Let me know if you have further questions.

    Cheers,
    Andras

    #1449073
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Event Maps’ is closed to new replies.