Hi @sam98brown,
I’ve checked and found that there is an already existing integration with the Property Hive Google Map, available on our integrations GitHub here: https://github.com/Really-Simple-Plugins/complianz-integrations/blob/master/property-hive.php
You can upload that PHP file to the folder /wp-content/mu-plugins/ folder on your website, after which this integration will automatically be enabled.
Note that since the Property Hive map doesn’t have a div class we can use to target and add the placeholder, the placeholder is added to a div with class “cmplz-maps-placeholder” instead. As that class doesn’t exist yet, you will have to add the “cmplz-maps-placeholder” class to the Google Map element. In the Gutenberg editor for example, this is done by selecting the block and navigating to Advanced > Additional CSS Classes in the right-hand side menu.

For good measure, please disable the custom integration you had previously created in the Script Center when testing the above MU Plugin.
Please also find the documentation on how to integrate scripts/plugins within the Complianz Script Center attached here: https://complianz.io/integrating-plugins/
Kind regards,
Jarno
-
This reply was modified 3 years, 11 months ago by
Jarno Vos.
-
This reply was modified 3 years, 11 months ago by
Jarno Vos.
Hey Jarno
Thanks for the help here.
Does the Google Maps service need to be enabled for this to work? I’ve cleared my custom integration and set this file up in mu-plugins but no luck. The file is definitely running as I ran a die(); command to check.
Hi @sam98brown,
I made a small change in the integration file on GitHub, so that it uses the correct URL for the Maps API. Can you give this new version a try as well? I wouldn’t expect that having the Google Maps service enabled/disabled will make a difference in this case.
In addition, could we perhaps see the current state of the Google Map on the website in question? If we can see why it breaks (or doesn’t), that often helps to point us in the right direction.
Kind regards,
Jarno
Hi Jarno
Here’s the console error:
Uncaught ReferenceError: google is not defined
<anonymous> https://mysite.six/wp-content/plugins/propertyhive-map-search/assets/js/ph-map-search.js?ver=1.1.31:586
ph-map-search.js:586:1
This file calls the function:
propertyhive_init_map
Is this any help?
-
This reply was modified 3 years, 11 months ago by
sam98brown.
Plugin Author
Aert
(@aahulsebos)
Hi @sam98brown,
We can do the following; https://propertyhive.us8.instawp.xyz/index.php/property/10-knoll-garth-bury-st-edmunds/
The issue remains, which is adding a placeholder. As it now only shows when accepting on the banner.
In my example I have <div id="property_map_canvas" style="height:400px"></div> and we need a class to add the placeholder.
Altering the <div> however will throw an error, as the div element is not as expected when initializing the map.
Maybe the fastest way would be asking PropertyHive if there’s an easy way of adding a class, even for styling this could make sense.
regards Aert