Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jennifer Fry
9,855 PointsGoogle Maps Integration 3 of 7
I can't seem to crack what is going wrong with this code:
In the "mapOptions" object set the "center" key to a new google.maps namespaced "LatLng" object with the arguments of 28.42 and -81.58
Relevant code:
<script type="text/javascript"> var mapOptions = { center = new maps.google.LatLng(28.42, -81.58) };
var mapElement;
var theMap;
</script>
Can someone please advise?
4 Answers
Sander de Wijs
Courses Plus Student 22,267 PointsUse a colon instead of equal sign.
{ center: new google.maps.LatLng(etc...) };
Jennifer Fry
9,855 PointsSorry, should appear more like:
var mapOptions = {
center = new google.maps.LatLng(28.42, -81.58)
};
Jennifer Fry
9,855 PointsThanks Sander de Wijs ! It's always the silly errors...
Sander de Wijs
Courses Plus Student 22,267 PointsYeah, I know what you mean :-) Cheers!