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.


Issues with setting Google Maps markers using JQuery

im stuck on this question and i dont know what to do to make it right, PLEASE HELP.

In app.js, on line 20, initialize a new marker with the 'map' set to 'theMap' and the 'position' set to 'addressLocation'

the line of code i have is: var marker = new google.maps.Marker({map: theMap, posotion: addressLocation});

why isnt this working? i cant figure it out.


David, in your original post, the word "position" is spelled incorrectly. You have "posotion". This worked for me:

var marker = new google.maps.Marker({
    map: theMap,
    position: addressLocation


3 Answers

var marker = new google.maps.Marker({map: theMap, position: addressLocation}); should work.

Check your spelling of position inside the ()

Luc Dejardin
Luc Dejardin
3,072 Points

No, it don't work either, dono why.

John Glynn
John Glynn
8,239 Points

Did you make sure it was in the app.js tab? That's what threw me off, the above code worked for me.

Luc Dejardin
Luc Dejardin
3,072 Points

Yes, it was probably a bug cuz it ended by working with the same code.

How did you finally get this to work? I have the same code... tried yesterday and am now trying it again today.

var marker = new google.maps.Marker({map: theMap, position: addressLocation});
Gagandeep Virk
Gagandeep Virk
19,741 Points

Hi All, I am having little problem in the adding static maps code challenge of question 4, I don't know what I am doing wrong? Can someone help me please? The question is Set the query parameter of "size" to 400 by 300 and my answer is &size=400×300"

John Coughlan
John Coughlan
9,414 Points

Hi there, I used a very similar bit of code to yours, but used the letter 'x' between the numbers: &size=400x300"

It worked for me so hopefully that helps!