New to the Google Maps API and currently integrating data from a MySQL database to display markers on a map.
Seeking help to adjust the map size to fit my website's layout. Below is the existing code:
<!DOCTYPE html >
<head>
...
</head>
<body onload="load()">
<div id="map" style="width: 600px; height: 450px"></div>
</body>
<script>
google.maps.event.trigger(map, 'resize');
</script>
After reviewing the documentation, I found that I should be using:
google.maps.event.trigger(map, 'resize');
Struggling to implement this correctly as it either disrupts the map functionality or fails to resize it as needed. Any suggestions?