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="[{"title":"Example Location","latitude":EXAMPLE_LAT,"longitude":EXAMPLE_LNG,"content":"<div class=\"hp-listing hp-listing--map-block\"><h5 class=\"hp-listing__title\"><a href=\"#\">Example Location<\/a>\n\t<i class=\"hp-listing__verified-badge hp-listing__verified hp-icon fas fa-check-circle\" title=\"Verified\"><\/i>\n\t<\/h5><\/div>"}]" 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:
- Verified that the Google Maps API key is correctly configured.
- Ensured no conflicts with other plugins or scripts by deactivating non-essential plugins and testing again.
Any assistance or guidance would be greatly appreciated!