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
Bob Smith
6,711 PointsAdding Point Markers to a Map: Geocoding
In "app.js" on line 11 set "geocoder" to a new google.maps namespaced "Geocoder" object.
var geocoder = new google.maps.Geocoder();
That's my code so far... any ideas what i'm doing wrong?
7 Answers
Bob Smith
6,711 PointsRandomly just worked when I refreshed the page. How annoying.
Bob Smith
6,711 Pointsvar geocoder = new google.maps.Geocoder();
var geocoderOptions = {address: "Magic Kingdom, Disney World"};
var marker = new google.maps.Marker({map: theMap, position: addressLocation});
This is my current code and i'm certain it is correct! Keep getting 'Bummer: null' error.
Bob Smith
6,711 PointsP.s. it seems to carrry over random incomplete code from each of the past challenges. Even when I move to a new challenge it loads it back into the app.js
Bob Smith
6,711 PointsEven on the next topic, the code seems to pull over from the last challenge on a previous topic and the only error I ever get is "bummer! null'. Think it's a major bug :(
James Barnett
39,199 PointsIf you think you found a bug, email the Treehouse support team directly at help@teamtreehouse.com so they can check it out.
Eric Anderson
4,336 PointsThe following is not working for me either:
<script type="text/javascript" src="app.js"> var geocoder = new google.maps.Geocoder(); </script>
Have 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, or am I missing something in my code? Thanks.
Andrew Chalkley
Treehouse Guest TeacherHi Eric,
Can you show your code in context with the rest of the code please?
You can also indent it with four spaces at the beginning of each line for code formatting.
Regards Andrew
Alexandre Ogata
5,092 PointsHi guys,
Maybe you are doing the same mistake as me. The code should be entered in the app.js file, not between the <script> tag in index.html.
geocoder = new google.maps.Geocoder();
Hope this helps...