• Resolved mradnanox

    (@mradnanox)


    I want to center map to on the location of the current article, is there a way to do this?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Bastien Ho

    (@bastho)

    Hi,

    I can’t see the plugin’s map on the given page.

    Thread Starter mradnanox

    (@mradnanox)

    Sorry, i change domain name

    https://marrakechagenda.com/agenda/offre-speciale-noel-riad-nashira-spa-mmarrakech/

    • This reply was modified 6 years, 11 months ago by mradnanox.
    • This reply was modified 6 years, 11 months ago by mradnanox.
    Plugin Author Bastien Ho

    (@bastho)

    It seems that you’re able to code your theme and/or plugins.

    Actually, there is no way to dynamically center the map on a custom point. Nevertheless I suggest you to add a custom javascript at the very of the page with something like this :

    ep_maps['event_map_allevent_geolist1'].getView().setCenter(new ol.proj.transform([jQuery('.user-social-wrapper-adresse address').data('longitude'), jQuery('.user-social-wrapper-adresse address').data('latitude')], ep_proj_source, ep_proj_destination));

    Hope it helps

    Thread Starter mradnanox

    (@mradnanox)

    Thank you for your quick reply
    I have this error in the console :
    Uncaught ReferenceError: ep_maps is not defined

    I already tried a similar solution, but without result

    Thread Starter mradnanox

    (@mradnanox)

    Finally I find a solution, not the most pruning but it works ??

    I add your javascript code at the end of the eventpost.min.js file before closing the jQuery(window).load

    Thank you again for your help and for this beautiful plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to center the map on the event of the current article’ is closed to new replies.