Skip to content

Commit d116c93

Browse files
committed
Removed Google Map Scripts from Footer and Migrated to Contact Page.
1 parent 8e5022c commit d116c93

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

assets/js/gmap.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
// GOOGLEMAP
2-
// google.maps.event.addDomListener(window, 'load', init);
3-
41
function initMap() {
5-
var latLong = new google.maps.LatLng(-33.918861, 18.423300);
2+
var latLong = new google.maps.LatLng(-33.98056, 18.46528);
63
var mapOptions = {
7-
zoom: 11,
4+
zoom: 13,
85
center: latLong,
96
styles: [{
107
"featureType": "landscape",

inc/footer.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,6 @@
8383
</div>
8484
</div>
8585
</footer>
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>
9386
</div>
9487

9588
<!-- Javascript -->
@@ -115,8 +108,5 @@
115108
<script src="<?php echo getenv('STORE_URL'); ?>/assets/js/jquery.prettyphoto.js"></script>
116109
<script src="<?php echo getenv('STORE_URL'); ?>/assets/js/script.js"></script>
117110
<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. -->
119-
<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>
120-
<script src="<?php echo getenv('STORE_URL'); ?>/assets/js/gmap.js"></script>
121111
</body>
122112
</html>

0 commit comments

Comments
 (0)