• I have installed the free Events Manager to display Google Maps on both single event pages and on a separate page to show all events in one map.

    On single Event Pages, the generated API key works as it should (see https://worldboatingday.com/events/superyacht-life-mock-event/), but there is one page on which all events should be displayed in one map (https://worldboatingday.com/events-map), and on that page, the map gets stuck on Loading.

    I have already contacted Google to check the API settings and they have confirmed it is set up correctly. I am no developer, so I have no idea where to go next. If anyone can guide me in the right direction, I will be very grateful.

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

Viewing 4 replies - 16 through 19 (of 19 total)
  • joneiseman

    (@joneiseman)

    Start with a clean install of wordpress and then just install Events Manager and then add the locations and see if it works. You can then continue to make changes by adding any additional plugins and themes as well as Evnts Manager settings changes until you find the problem.

    Thread Starter Ispeakenglishwell-Ilearnitfromabook

    (@emilyvansomeren)

    Thank you for all your help. It has finally been resolved!

    @emilyvansomeren Could you please tell us how you fixed it? We’re facing the same problem here. We have a Javascript error like this:

    Uncaught (in promise) SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)
    at Function.parse as parseJSON
    at em_maps_load_locations (maps.js:41:23)
    at HTMLDivElement. (maps.js:136:60)
    at Function.each (jquery-3.4.1.min.js?ver=3.4.1:2:2777)
    at k.fn.init.each (jquery-3.4.1.min.js?ver=3.4.1:2:1419)
    at em_maps (maps.js:136:33)
    at js?v=quarterly&libraries=places&callback=em_maps&key=AIzaSyA_y7NmQY28SH0ldRcTe6NdZGgjLyTwee8:288:509
    at js?v=quarterly&libraries=places&callback=em_maps&key=AIzaSyA_y7NmQY28SH0ldRcTe6NdZGgjLyTwee8:288:21

    It’s a error that occurs on this piece of code:

    function em_maps_load_locations(el){
    var el = jQuery(el);
    var map_id = el.attr('id').replace('em-locations-map-','');
    var em_data = jQuery.parseJSON( el.nextAll('.em-locations-map-coords').first().text() );
    if( em_data == null ){
    var em_data = jQuery.parseJSON( jQuery('#em-locations-map-coords-'+map_id).text() );
    }

    The JSON looks like this:

    {“em_ajax”:true,”query”:”GlobalEventsMapData”,”width”:”400px”,”height”:”300px”,”id”:486052607}

    However in my html it parses html entities:

    <div class='em-locations-map-coords' id='em-locations-map-coords-1667966170' style="display:none; visibility:hidden;">{“em_ajax”:true,”query”:”GlobalEventsMapData”,”width”:”400px”,”height”:”300px”,”id”:1667966170}</div>

    Like this:

    <div class=’em-locations-map-coords’ id=’em-locations-map-coords-1667966170′ style=”display:none; visibility:hidden;”>{“em_ajax”:true,”query”:”GlobalEventsMapData”,”width”:”400px”,”height”:”300px”,”id”:1667966170}</div>

    It seems the quotes are not the correct opening and closing quotes?

    • This reply was modified 11 months, 2 weeks ago by rienco.

    @rienco In my case, the cause was a conflict with the Advanced Custom Fields plugin. We added the map shortcode to page.php to bypass this.

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Google Maps stuck on Loading’ is closed to new replies.