I am trying to add Google Maps to a web page, however it has a fixed width and height, from the code using Googles tutorial. My HTML in the head is this:
<script src="https://maps.googleapis.com/maps/api/js"></script> <script> function initialize() { var mapCanvas = document.getElementById('map'); var myLatLng = {lat: 51.434408, lng: -2.53531}; var mapOptions = { center: new google.maps.LatLng(51.434408, -2.53531), zoom: 15, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(mapCanvas, mapOptions); var marker = new google.maps.Marker({ position: myLatLng, map: map, title: 'Hello Wold' }); } google.maps.event.addDomListener(window, 'load', initialize); </script> The HTML in the body is this:
<div id="map"></div> The CSS thats related is this:
#map { width: 1140px; height: 300px; } I am using bootstraps column method to layout and make my page responsive, at all sizes I would like the map to take up all 12 columns of the row that it is in. Any ideas?
Thanks!