Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Matthew Pray
7,137 PointsAdding a dynamic map
My map will not show... Its just giving me a broken image.. here is my code
<html>
<head>
<title>
</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
<div id="locations" class="grid_12">
<div class="map">
</div>
<p class="static_map"> <img src= "http://maps.googleapis.com/maps/api/staticmap?key=AIzaSyCVDleBGSnjUA8BtctXE6hjxvHSzjp-Xik&size=400x300&sensor=false&markers=1014+Miami+Springs+Rd+Longwood,+FL+32779" alt="1014 Miami Springs Rd,
Longwood, FL 32779"> </p>
</div>
```javascript
<script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCVDleBGSnjUA8BtctXE6hjxvHSzjp-Xik&sensor=false"> </script> <script type="text/javascript"> $(.locations).prepend('<div class="map"> </div>') $(".static_map").remove(); function initialize() { var mapOptions = { center: new google.maps.LatLng(-34.397, 150.644), zoom: 8 }; var map = new google.maps.Map(document.getElementById("map"), mapOptions); } google.maps.event.addDomListener(window, 'load', initialize); initialize(); </script>
html </body> </html>```
3 Answers

Ryan Scharfer
Courses Plus Student 12,537 PointsI tried formatting that code for you, but it proved to be a bigger challenge than I expected : )

Ryan Scharfer
Courses Plus Student 12,537 Points
Matthew Pray
7,137 PointsThanks for trying:)