• 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 15 replies - 1 through 15 (of 19 total)
  • Verify that all of the locations display correctly. Maybe one of the locations has a bad coordinate specification which is causing the events-map page to fail to load.

    Thank you for the suggestion. However, only 2 events have been created and both have valid coordinates. On those 2 single event pages, the Google Map is displayed correctly. I therefore don’t think this is the issue.

    On my website the events-map page is working fine. When I edit the events-map page I see it’s a shortcode like this:

    [events-map]

    Is it that way on your site too? Do you specify any options on the shortcode? When I look at the source html on my page I see this:

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

    When I look at the source html on your site I see this:

    <div class='em-locations-map-coords' id='em-locations-map-coords-1289496220' style="display:none; visibility:hidden;">{“width”:”\u201d100%\u201d”,”em_ajax”:true,
    ”query”:”GlobalMapData”,”height”:”50%”,”id”:1289496220}</div>

    It looks like all the data in between the curly braces is messed up.

    Did you disable any styling in Events Manager settings?

    • This reply was modified 9 months, 3 weeks ago by joneiseman.
    • This reply was modified 9 months, 3 weeks ago by joneiseman.

    Thank you so much for checking. I was using the [locations_map] shortcode (no additional specifications) and have now tried the [events_map] shortcode, but no changes.

    I checked the styling settings under Events > General > Styling Options (Advanced) and I have set them to:
    Enable All Styling? Yes
    Enable Theme Styling? Yes (also tried No, but no changes)
    Individual Components CSS > Default plugin settings (also tried Inherit you theme settings, but no changes)
    Individual Components styling > all enabled

    Under Events > Formatting > Maps
    I have the Default map width and height set to 400px and 300px.

    Not sure which other setting could have caused that data to become messed up.

    Try disabling all the other plugins and switching to a default theme (like Twenty Twenty-Four). If that fixes the problem then enable one plugin at a time to see which one is causing the problem.

    @joneiseman I have disabled all plugins and have applied a default theme, but still the map is not loading. Is it a configuration problem?
    If you’d be willing, I could email you the credentials to the test environment to see if that is the case. I have no idea what else to try at this point.

    It’s against the rules of this forum to request or accept website credentials. Add the following code snippet to create a shortcode to print out your locations:

    add_shortcode('em-event-locations', 'my_locations');
    function my_locations()
    {
        $ret = "";
        $locations = EM_Locations::get();
            foreach ($locations as $location) {
                $ret .= "Name:" .$location->location_name . "<br />";
                $ret .= "Address:" .$location->location_address . "<br />";
                $ret .= "Town:" . $location->location_town . "<br />";
                $ret .= "State:" . $location->location_state . "<br />";
                $ret .= "Postcode:" . $location->location_postcode . "<br />";
                $ret .= "Region:" . $location->location_region . "<br />";
                $ret .= "Country:" . $location->location_country . "<br />";
                $ret .= "Latitude:" . $location->location_latitude . "<br />";
                $ret .= "Longitude:" . $location->location_longitude . "<br />";
            $post = get_post($location->post_id);
                    $ret .= "post content:" . $post->post_content;
            }
            return $ret;
    }

    Then create a page with the [em-event-locations] shortcode and then paste the output here (inside a code block). Then I will try to reproduce the problem.

    Thread Starter Ispeakenglishwell-Ilearnitfromabook

    (@emilyvansomeren)

    I have taken the above steps. The output is:

    Name:BILGIN YACHTS- HEADQUARTER
    Address:MARMARA MAH. ULUSUM CAD. NO:28/1 WEST ISTANBUL MARINA BEYLIKDUZU
    Town:ISTANBUL
    State:
    Postcode:34000
    Region:
    Country:TR
    Latitude:40.963328
    Longitude:28.66395
    post content:Name:NDSM
    Address:NDSM-Plein 28
    Town:Amsterdam
    State:
    Postcode:1033 WB
    Region:
    Country:NL
    Latitude:52.400509
    Longitude:4.893571
    post content:Name:Superyacht Life
    Address:Diemerzeedijk 27-B
    Town:Amsterdam
    State:
    Postcode:1051 RG
    Region:
    Country:NL
    Latitude:52.361269
    Longitude:4.966395
    post content:
    add_shortcode(’em-event-locations’, ‘my_locations’);
    
    joneiseman

    (@joneiseman)

    You need to add the code snippet using the Code Snippets plugin. Then create a page with the [em-event-locations] shortcode and then view the page. Then copy the output to a code block here.

    Thread Starter Ispeakenglishwell-Ilearnitfromabook

    (@emilyvansomeren)

    Okay, I did that.

    The output is on this page: https://worldboatingday.com/events-map/ and is as follows:

    Name:BILGIN YACHTS- HEADQUARTER
    Address:MARMARA MAH. ULUSUM CAD. NO:28/1 WEST ISTANBUL MARINA BEYLIKDUZU
    Town:ISTANBUL
    State:
    Postcode:34000
    Region:
    Country:TR
    Latitude:40.963328
    Longitude:28.66395
    post content:Name:NDSM
    Address:NDSM-Plein 28
    Town:Amsterdam
    State:
    Postcode:1033 WB
    Region:
    Country:NL
    Latitude:52.400509
    Longitude:4.893571
    post content:Name:Superyacht Life
    Address:Diemerzeedijk 27-B
    Town:Amsterdam
    State:
    Postcode:1051 RG
    Region:
    Country:NL
    Latitude:52.361269
    Longitude:4.966395
    post content:
    add_shortcode(’em-event-locations’, ‘my_locations’);
    Thread Starter Ispeakenglishwell-Ilearnitfromabook

    (@emilyvansomeren)

    @joneiseman Does this give you any more insight into the issue or is there some other info I can provide? Thank you for your trouble.

    joneiseman

    (@joneiseman)

    I added these locations but I’m still not able to reproduce the problem.

    Thread Starter Ispeakenglishwell-Ilearnitfromabook

    (@emilyvansomeren)

    Okay, thank you for trying that out. So it’s probably not an issue with the uploaded locations/events.
    Maybe it’s a config issue? I can see if I can share my config settings if that helps? I don’t know what else it could be – feels like I’ve tried everything else.

    joneiseman

    (@joneiseman)

    It might be due to some setting in Events Manager that’s causing the problem. Try going to Events Manager settings in the General Tab then scroll down and click on “Admin Tools (Advanced)” and then click on the Reset button to reset all the Events Manager settings back to the original settings. You may then have to add back some settings that you changed.

    Thread Starter Ispeakenglishwell-Ilearnitfromabook

    (@emilyvansomeren)

    I did that on the test environment just now and this did not resolve the issue. I again contacted Google Support to check the API but they said this is all configured correctly. Also, the maps do work on the Single Event pages, just not the combined events map. I really have no idea what else it can be or what else to try.

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