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

Build an Interactive Website > Google Maps Integration > Adding Point Markers to a Map task 1/6

I have tried different variations of defining geocoder as google.maps.Geocoder(), but I can not seem to make it right.

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

What am I missing?

2 Answers

I figured out the code was right but failed to notice the tab called app.js. I was writing it in the index.html. False alarm :)

Andrew Chalkley
STAFF
Andrew Chalkley
Treehouse Guest Teacher

Hey Johan,

Also if the src attribute is set, the JavaScript code won't get executed but if you opened a new script tag afterwards it would.

Regards Andrew