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

Adding Point Markers to a Map: Geocoding

As with a recent commenter in another thread, the following code is not working for me either: var geocoder = new google.maps.Geocoder();

I’ve also tried, per the code in the lesson file: geocoder = new google.maps.Geocoder();

Has it been determined whether or not this is a bug (as was suggested in the other thread), or am I missing something in my code? Thanks.

2 Answers

Andrew Chalkley
STAFF
Andrew Chalkley
Treehouse Guest Teacher

Hi Eric,

Can you show it in context with the rest of the code and the particular step you're having an issue with in the code challenge?

Regards Andrew

I originally did that, but the forum omitted the surrounding context for some reason. I'll try again to paste in the code:

<script type="text/javascript" src="app.js">
    var geocoder = new google.maps.Geocoder();
</script>

How do I get it to NOT omit the surrounding code?

Andrew Chalkley
Andrew Chalkley
Treehouse Guest Teacher

The <body> tag was messing it up - I've edited your post.

I can now see your issue.

You need to modify the code in the app.js file. Script tags with the src attribute done allow the code in between the <script> tags to get ran.