Fashionist Posted August 13, 2014 Share Posted August 13, 2014 (edited) Hi all, how to add a google map in the contact page? Thanks all!!!! Edited August 18, 2014 by Fashionist (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 13, 2014 Share Posted August 13, 2014 in contact.tpl add code like: <script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script> {literal} <script> var map; function initialize() { var mapOptions = { zoom: 8, center: new google.maps.LatLng(-34.397, 150.644) }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); } google.maps.event.addDomListener(window, 'load', initialize); </script> {/literal} <div id="map-canvas" style="widtH:500px; height:200px;"></div> Link to comment Share on other sites More sharing options...
Fashionist Posted August 18, 2014 Author Share Posted August 18, 2014 Thanks Vekia but I have some error with zoom in and with layout. I have used the "iframe" script sharing from google map and now is all ok Thanks for your help! Link to comment Share on other sites More sharing options...
Recommended Posts