Jump to content

Google map in the contact page [SOLVED]


Recommended Posts

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

×
×
  • Create New...