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

Really stuck on this ...is there an error??

so the quesiton is asking :

Set the query parameter of "markers" to equal the URL encoded address of "622 E Washington Street, Suite 240, Orlando, FL 32801"

somehow this code is wrong...i dont know why..i even tried removing the comma but still says "markers invalid"

Set the query parameter of "markers" to equal the URL encoded address of "622 E Washington Street, Suite 240, Orlando, FL 32801"

2 Answers

figured it out. apparently i had to put all commas in place for it to work.

Check out the Google Map API documentation herre: https://developers.google.com/maps/documentation/staticmaps/#Markers

I'll give you a tip. You can't have spaces in a URL. Here is an example static map link:

http://maps.googleapis.com/maps/api/staticmap?center=Berkeley,CA&zoom=14&size=400x400&sensor=false

The way google represents spaces, e.g.

staticmap?markers=Blah blah blah

is substituting a space with a +

staticmap?markers=Blah+blah+blah

If you went to the first link it would be the same as going to: staticmap?markers=Blah, because there are no spaces in URL's.

Try the + for the google maps API. The proper URL encode substitution is %20 for a space though. You can check out how that works here: http://www.w3schools.com/tags/ref_urlencode.asp

Though each API may handle spaces differently.

Regards,

Richard