Adding Venue to the Map view in actual Map image houver over

Home Forums Calendar Products Events Calendar PRO Adding Venue to the Map view in actual Map image houver over

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1081560
    Khanh
    Participant

    Hi,
    We want to do the customiazation on Map view on Actual Map that is displayed at the top. We want to add Venue into the houver-over, where currently only Title is displayed when you houver to particular location of the Event.

    Can you guide us where & how can we achive this customization? We have a urgent need for this.

    Regards,
    ICXUser, IEEE
    Ph.732-562-6559

    #1081966
    Geoff
    Member

    Hi James — nice to see you again and hope all is well!

    Unfortunately adding those details is a bit complicated. Venue information can be retrieved using the tribe_get_venue() function, but adding that information to the tooltips requires a more code editing than a simple swapping of data and I’m afraid I’m unable to offer much help with the whole customization, but hopefully these suggestions help:

    1. Here’s a basic example of a function that modifies the text in the map tooltip to give you a feel for how that information can be manipulated:

    `if ( function_exists( ‘Tribe_ECP_Load’ ) ) {
    /**
    * Modify ‘Event:’ and/or ‘Address:’ text in Map View tooltips.
    *
    */
    function tribe_support_1052594( $data ) {

    if ( tribe_is_map() ) {
    $data[‘map_tooltip_event’] = ”; // Default is ‘Event: ‘.
    $data[‘map_tooltip_address’] = ”; // Default is ‘Address: ‘.
    }

    return $data;
    }

    add_filter( ‘tribe_events_pro_localize_script’, ‘tribe_support_1052594′ );
    }’

    2. Find the map_add_marker() JavaScript function here in your Events Calendar PRO plugin files:

    src/resources/js/tribe-events-ajax-maps.js

    It should look like this:

    HGQyclaBYc-1200x1200

    This function is where some of the tricky elements of the customization start to arise. You’ll have to take the reins from here, but essentially you will need to recreate the event-generation JavaScript but for a third item on the marker, which will be the venue name.

    Sorry I don’t have more of a concrete solution for you, but will this at least help you get started? Please let me know. 🙂

    Cheers!
    Geoff

    #1087757
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Adding Venue to the Map view in actual Map image houver over’ is closed to new replies.