Google Maps Integration

Hello HivePress Team,

I’m experiencing an issue with the Google Maps integration on my WordPress site. When I add a location to my listing and attempt to display the map on the front end, I encounter the following console error:

Cannot read properties of undefined (reading 'LatLngBounds')
TypeError: Cannot read properties of undefined (reading 'LatLngBounds')

The map is not being displayed. However, I can see the following HTML section (some information has been redacted):

<div data-markers="[{&quot;title&quot;:&quot;Example Location&quot;,&quot;latitude&quot;:EXAMPLE_LAT,&quot;longitude&quot;:EXAMPLE_LNG,&quot;content&quot;:&quot;<div class=\&quot;hp-listing hp-listing--map-block\&quot;><h5 class=\&quot;hp-listing__title\&quot;><a href=\&quot;#\&quot;>Example Location<\/a>\n\t<i class=\&quot;hp-listing__verified-badge hp-listing__verified hp-icon fas fa-check-circle\&quot; title=\&quot;Verified\&quot;><\/i>\n\t<\/h5><\/div>&quot;}]" class="hp-listing__map hp-listing__map widget hp-map" data-max-zoom="18" data-component="map" style="height: 396px;"></div>

The troubleshooting steps I have taken so far:

  1. Verified that the Google Maps API key is correctly configured.
  2. Ensured no conflicts with other plugins or scripts by deactivating non-essential plugins and testing again.

Any assistance or guidance would be greatly appreciated!

Hi,

Please try to test it on other pages and check if it is displayed only on listing pages or on other pages as well. Also, please send a link to the site, we will take a closer look.

Thank you for your response.

I have checked my API key restrictions and confirmed that there are no restrictions in place. I’ve attached a screenshot for your reference.

Here is the link to our listings page and an example listing:

Listings Page
[Individual Listing]

Please let me know if you need any further information or if there are additional steps I should take to resolve the issue.

Thank you for your assistance!

Hi,

Most likely, the issue is in third-party plugins. Please try disabling the plugins one by one, refreshing the page, and thus finding out which plugin is causing the issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.