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

JavaScript

InfoWindow 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

Did you extend the existing line there (line 17) or did you add your own? Otherwise, your solution looks correct.

The 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!