Google Maps with Hivepress doesn’t work
-
Hi,
I’m using Complianz and Rentalhive theme and I want to block the Google Maps API till the user accepts all cookies. I use script center to block google urls like it describes here: https://complianz.io/debugging-google-maps/.
- On “deny” the map gets blocked and the placeholder is displayed correctly.
- On “accept” the map does not appear, but sometimes if I refresh the page, it works.
But, no matter the settings I tried (accept/deny), in the console it gives the following error message: Uncaught ReferenceError: google is not defined. It seems some js, like common.min.js or jquery.min.js etc., still try to request the Google Maps.
Uncaught ReferenceError: google is not defined
at HTMLDivElement. (common.min.js?ver=1.3.7:1:2912)
at Function.each (jquery.min.js?ver=3.7.0:2:3129)
at e..each (jquery.min.js?ver=3.7.0:2:1594)
at hivepress.initGeolocation (common.min.js?ver=1.3.7:1:2077)
at HTMLDocument. (common.min.js?ver=1.3.7:1:4104)
at HTMLDocument.dispatch (jquery.min.js?ver=3.7.0:2:39997)
at v.handle (jquery.min.js?ver=3.7.0:2:37968)
at Object.trigger (jquery.min.js?ver=3.7.0:2:70063)
at HTMLDocument. (jquery.min.js?ver=3.7.0:2:70665)
at Function.each (jquery.min.js?ver=3.7.0:2:3129)On the main page I have the similar error:
Uncaught ReferenceError: google is not defined at GeoComplete.initGeocoder (jquery.geocomplete.min.js?ver=1.3.7:8:2461) at GeoComplete.init (jquery.geocomplete.min.js?ver=1.3.7:8:1270) at new GeoComplete (jquery.geocomplete.min.js?ver=1.3.7:8:1177) at HTMLInputElement.<anonymous> (jquery.geocomplete.min.js?ver=1.3.7:8:8724) at Function.each (jquery.min.js?ver=3.7.0:2:3129) at e.<computed>.each (jquery.min.js?ver=3.7.0:2:1594) at $.fn.geocomplete (jquery.geocomplete.min.js?ver=1.3.7:8:8649) at HTMLDivElement.<anonymous> (common.min.js?ver=1.3.7:1:1179) at Function.each (jquery.min.js?ver=3.7.0:2:3129) at e.<computed>.each (jquery.min.js?ver=3.7.0:2:1594)
I followed this tutorial to fix it : https://complianz.io/custom-google-maps-implementation/ but still I can’t get the problem fixed.
Could you please help me to find a technical solution with a MU plugin? I would be happy about any help!Best regards
- The topic ‘Google Maps with Hivepress doesn’t work’ is closed to new replies.