Skip to content

Commit ef286b5

Browse files
committed
Hiding the Google Map from the browser until we have a working Contact Page.
1 parent bd0e1ca commit ef286b5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

inc/footer.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,13 @@
8383
</div>
8484
</div>
8585
</footer>
86-
<!-- FOOTER -->
87-
<div id="map-pop"></div>
86+
<!-- // TODO: The div below is the Google Maps integration but I have hidden it from the browser
87+
view with the display:none CSS declaration. I don't want this on every page but if we don't
88+
include the "map-pop" on every page then we get Console errors. The Google Maps & gmap.js
89+
scripts need to be moved out of the footer and into a new contact.php page and then we can
90+
move "map-pop" to this page. This will mean we only load the JavaScript and actual Google Map
91+
on the Contact page and it is not referenced again across the site. -->
92+
<div id="map-pop" style="display:none"></div>
8893
</div>
8994

9095
<!-- Javascript -->
@@ -110,6 +115,7 @@
110115
<script src="<?php echo getenv('STORE_URL'); ?>/assets/js/jquery.prettyphoto.js"></script>
111116
<script src="<?php echo getenv('STORE_URL'); ?>/assets/js/script.js"></script>
112117
<script src="<?php echo getenv('STORE_URL'); ?>/assets/js/booking.js"></script>
118+
<!-- // TODO: The two script tags below need to be removed from the Footer and placed on the Contact page only. -->
113119
<script async defer src="https://maps.googleapis.com/maps/api/js?key=<?php echo getenv('GOOGLE_MAPS_API_KEY', null); ?>&v=quarterly&callback=initMap" type="text/javascript"></script>
114120
<script src="<?php echo getenv('STORE_URL'); ?>/assets/js/gmap.js"></script>
115121
</body>

0 commit comments

Comments
 (0)