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 trialPeter Hatzer
20,837 PointsNeed help on Jquery google map part 7/7
I have seen this question go around a lot on the forum, but no one seems to know what the answer is. In part 7 of Building Interactive Website Jquery Google map it ask you to do the following: Set the "theMap" to a new google.maps namespaced "Map" object with the parameters of "mapElement" and "mapOptions", I just seem to get the same error of: Oops! It looks like Task 2 is no longer passing.
Has anyone solved this problem yet?
this is my code:
<!DOCTYPE html>
<html>
<head>
<title>Map</title>
<style type="text/css">
body, html {
margin:0;
padding:0;
}
body, html, #map {
width:100%;
height:100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAn8fk75K8kCdW6pQ4B7yoBHJNrUbleieY&sensor=false"></script>
<script type="text/javascript">
var mapOptions = {center: new google.maps.LatLng(28.42, -81.58),
zoom: 18,
mapTypeId: google.maps.MapTypeId.SATELLITE};
var mapElement = document.getElementById("map");
var theMap = new google.maps.Map(mapElement, mapOptions);
</script>
</body>
</html>
20 Answers
Alberto Centelles
8,356 PointsI am having the same problem. It doesn't work and the code seems to be fine. My browser is Chrome, version 39.0.2171.71 m
Natali Schwarzauger
7,375 PointsI also have a same problem :( firefox 33
Natali Schwarzauger
7,375 PointsI was using FF 34, on OS X Yosemite, Version 10.10.1
Carmine Maraglio
29,762 PointsHaving the same issue on Chrome 39.0.2171.71 (64-bit), OS X 10.10.2.
oxanaox
16,295 PointsMac OS X, Version 10.7.5
Stefan Osorio
16,419 PointsChromium Version 39.0.2171.65 @ Ubuntu 14.10 (64-bit)
and
Firefox 34.0 @ Ubuntu 14.10 (64-bit)
Tomasz Budny
14,588 PointsI have the same issue in Chromim Version 39.0.2171.65 Built on Ubuntu 14.04, running on LinuxMint 17 (64-bit), I can test it also in FF and Windows 7 if it will be of any help.
Unknowing about this discussion I also started my own topic on that problem. Please remove if possible.
[Broken Link]
Andrew Chalkley
Treehouse Guest TeacherThanks Tomasz Budny - If you could try copying and pasting the above code in Windows 7 too that would be great :)
Ken Alger
Treehouse TeacherEnvironment:
Windows 8.1 64-bit
Firefox 34.0
-
Manually typed in - Task 7 failed - "Oops! It looks like Task 2 is no longer passing."
-
Cut & Paste from above from Task 1 on -
Task 1 - passed.
Task 2 - failed, had to comment out the var theMap = ...
line of code.
Task 3 - failed with full code, error "Oops! It looks like Task 2 is no longer passing." Passed with var TheMap
line commented.
Task 4 - see Task 3
Task 5 - see Task 3
Task 6 - see Task 3
Task 7 - see Task 3. When commenting out var theMap
"Oops! It looks like Task 1 is no longer passing." is the new error.
Google Chrome 39.0.2171.71 m
-
Manually typed in - Same results for Firefox
-
Cut& Paste - Same results for Firefox
4 Dec 2014
Ken
Daan Hage
13,318 PointsI tried the script with a mac, firefox as well as chrome (the newest versions)
Stefan Osorio
16,419 PointsSame result (null) in the Treehouse App (Android 5 on Nexus 5).
Rashad Nasir
7,867 PointsSame issue, OSX 10.10.1, chrome Version 39.0.2171.95 (64-bit), Safari Version 8.0 (10600.1.25.1) and Firefox developer edition 36.0a2.
Cut & paste, manually typed it in.. no difference. Bummer null was the error
Daniel Rose
24,219 PointsStill not working. Has there been a fix yet? I tested it on Chrome Version 39.0.2171.95 (64-bit) & Safari version 8.0.2. Both on OSX 10.10.1.
Jack McDowell
37,797 PointsWell it looks like this was never properly fixed before the course was retired. I tried almost everything I could think of and it never worked in chrome 43 or ie 11 under Windows 8.1 x64. Like the comments above I kept on getting a "return to step 2" error :/
Jay McGavren
Treehouse TeacherEveryone, we think we may have identified the issue - the challenge was set up using the experimental Google Maps API, which Google recently changed, causing the challenge code to break.
We've updated the challenge default code to use a stable version of the Google Maps API; hopefully this will fix the issues everyone's seeing. If you want to try copying and pasting the solution, please try this code instead of the code in Peter's post:
<!DOCTYPE html>
<html>
<head>
<title>Map</title>
<style type="text/css">
body, html {
margin:0;
padding:0;
}
body, html, #map {
width:100%;
height:100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyAn8fk75K8kCdW6pQ4B7yoBHJNrUbleieY&sensor=false">
</script>
<script type="text/javascript">
var mapOptions = {
center: new google.maps.LatLng(28.42, -81.58),
zoom: 18,
mapTypeId: google.maps.MapTypeId.SATELLITE
};
var mapElement = document.getElementById("map");
var theMap = new google.maps.Map(mapElement, mapOptions);
</script>
</body>
</html>
Let us know if you continue having difficulty!
Andrew Chalkley
Treehouse Guest TeacherThank you so much Jay McGavren!
Stefan Osorio
16,419 PointsYay, works fine :)
Tomasz Budny
14,588 PointsThank you! :)
Aaron Graham
18,033 PointsI came up with the same code you did and had the same problem. I also tried assigning different values to theMap
which, depending on the value, causes Task 1 to fail. It seems like assigning the wrong value should just make Task 7 fail with some message about assigning the wrong value to theMap
. I know that is how other tasks have worked. Maybe something is wrong with this task?
Andrew Chalkley
Treehouse Guest TeacherWhat ever problem you were having seems to have been fixed. I copied your code verbatim and pasted it in to the code challenge and it worked fine.
There could have been a bug in the Code Challenge engine. I tried and tested it on the Mac with Safari, Firefox and Chrome and it worked.
If people are still having an issue please give details of which Browser and Operating System they are using and that they have tested it with the above code copied and pasted. If it works from copying and pasting can you also try typing the code by hand and seeing if it works too. Thanks!
oxanaox
16,295 PointsAndrew, I'm having the same issue. I tried to copy and paste a code from other tread and it still does not work. I'm using Chrome, version 38.0.2125.111 I also checked with Safari, same issue!
davpay
40,173 PointsIt's definitely buggy. I was having problems for over an hour until I reported it. Based on Andrews feedback I logged out, closed Chrome, re-opened, logged back in and copied and pasted the code above and it went through fine.
Before copying and pasting it in one go it would pass the first task then say 'Ooops, task 1 isn't passing' (or whatever the message is) when hitting submit the second time because the code for task 3 was present. Just copying and pasying the code at each stage worked up until stage 7 (the foundation of this thread) then it would say 'Oops! It looks like Task 2 is no longer passing'.
I'm using Chrome Version 39.0.2171.65 (64-bit).
Andrew Chalkley
Treehouse Guest TeacherHi all,
If people are still having an issue please give details of which Browser and Operating System
Those people who still have the problem can you confirm your Operating System (e.g. Windows 8.1, OS X Mavericks)
Thanks
Andrew
Andrew Chalkley
Treehouse Guest TeacherOK I'll report this as an issue with the developers. For those who are still having the issues (on a Mac) if you open QuickTime, go to File > New Screen Recording and start a screen recording of your copying, pasting the code and clicking through the steps. I just want to get as much info as possible. If you can share the recording with me at andrew@teamtreehouse.com I'll attach it to the issue.
Andrew Chalkley
Treehouse Guest TeacherThanks everyone! Keep any information coming!
Carmine Maraglio
29,762 PointsI was able to duplicate the issue on my iPad via the Treehouse app.
Tomasz Budny
14,588 PointsThe result is the same in Windows 7 using Chrome 39.0.2171.71 m, FF 33.0.2 and IE 11.
When I paste the whole solution at Task 2 I get "Bummer! null"
and when I do it step by step I get "Oops! It looks like Task 2 is no longer passing." trying to complete Step 7
Alberto Centelles
8,356 PointsAlberto Centelles
8,356 PointsWindows 8.1