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 trialSofia Martinez
11,607 PointsAddress for Google Maps / Key problem
Hi! I'm adding a static map following the video but when we get to the part of the address in the URL:
```<img src="http://maps.googleapis.com/maps/api/staticmap?key=AIzaSyAEVECnSAjjzhDbP9Ryd-crOmaF5v9TguI&size=400x300&sensor=false&markers=ADDRESS" alt="">
I want to put a Mexican Address:
Boulevard Barra Vieja 1000
Acapulco, Guerrero
México
I'm trying like this:
```<img src="http://maps.googleapis.com/maps/api/staticmap?key=AIzaSyAEVECnSAjjzhDbP9Ryd-crOmaF5v9TguI&size=400x300&sensor=false&markers=Boulevard+Barra+Vieja+1000+Acapulco+Mexico" alt="Boulevard Barra Vieja 1000, Acapulco, México">
But it doesn't work. Can anyone help me, please?
4 Answers
Sofia Martinez
11,607 PointsThe only way it worked was to create a new Google Account and generate a new key... obviously is not the best solution but I didn't find anything else.
Christopher Romero
8,564 PointsHi Sofia, It looks like the "key" portion of your url is creating the issue. If remove that section from the url the map displays properly: http://maps.googleapis.com/maps/api/staticmap?size=400x300&sensor=false&markers=Boulevard+Barra+Vieja+1000+Acapulco+Mexico
Sofia Martinez
11,607 PointsOk, thanks! So.. I don't need the key? Without it it'll work fine?
Christopher Romero
8,564 PointsI'm a little fuzzy the Google Maps API, but the map appears to display without using the key. If you want to look into it further you may want to take a look at the settings in your API console. Here is a Stackoverflow post that may point you in the right direction: http://stackoverflow.com/questions/19408066/the-google-maps-api-server-rejected-your-request
Sofia Martinez
11,607 PointsIt doesn't work with the key... I need it for the map to be interactive, right?
I tried with a new key but Google didn't allow it, I checked that the Referers is to "Any referer allowed", I have the "Key for browser apps"... Help!