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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Beniamin Mincu](https://secure.gravatar.com/avatar/2cbe8d594b8ab87f514414da6bcfb8a0?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Beniamin Mincu
5,297 PointsInfoWindow variable
Hello,
I am stuck at task #1 of Customizing Google Maps - Adding info windows.
This is the code I am typing in:
var infoWindow = new google.maps.InfoWindow({content: "Magic Kingdom"});
It seems I can't make it work.
Please help, thanks!
2 Answers
![John W](https://secure.gravatar.com/avatar/774b091b5329f51f1964fe528087988d?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
John W
21,558 PointsDid you extend the existing line there (line 17) or did you add your own? Otherwise, your solution looks correct.
![Beniamin Mincu](https://secure.gravatar.com/avatar/2cbe8d594b8ab87f514414da6bcfb8a0?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Beniamin Mincu
5,297 PointsThe text was saying: "On line 27, set the variable "infoWindow" to a "new google.maps.InfoWindow" passing in an object with the key "content" set to the string of "Magic Kingdom""
So that's why I tried to do it on line 27.
Now I just tried it on line 17 and it worked.
Thanks a lot!