5

This can be easily solved by noting which terminal the export command was executed in the same terminal window that flask is running in (will be prompted to run in after the export command). Otherwise, flask cannot recognize the API_KEY as an environment variable, hardly being an environment variable.


5

Two different things here: there is a function and there is a function call In JavaScript, functions are so-called first-class objects, and what this means is that they, like other values, can be passed to or returned by other functions. So it is possible for a JavaScript function to take another function as an argument (or return another function), as it'...


3

Have you tried to clear Chromes's cache? https://support.google.com/accounts/answer/32050?hl=en Another approach is to use the browser in incognito mode. Chrome's incognito mode uses a fresh cache and cookies and gets rid of it off when you close the incognito window. And you shouldn't worry about that NO APIS KEY error, it's minor. You can do the pset ...


2

Thanks to @DinoCoderSaurus for your help - basically the problem was that I was trying to instantiate a MarkerClusterer for each individual marker that was added to the array. The solution was to delete the line markerCluster = new MarkerClusterer(map, markers, {imagePath: '/static/markers/m'}); from the addMarker() function; and instead have it run once ...


1

Check the link in the comment: http://stackoverflow.com/a/12410385 It's not documented thus subject to changes but it still exists.


1

Take a look at the general documentation of markers by Google here: https://developers.google.com/maps/documentation/javascript/markers. Start by reading what a marker is and how you create a new marker and add it to the map. Then read, a few scrolls bellow it, what a marker label is and how you can use it inside your marker. It has for example the following ...


1

Random by design. Review the sql(s) in the update function of application.py and the reason will be revealed. That's the sql(s) used to populate the data sent to addMarker. The staff's solution for articles returns 5 rows. The default for google news RSS is 10 rows. So it seems that the staff solution is not using the same version of helpers.py as is ...


1

That is how things are since July 2018. Google added a paywall; you can register for an API KEY (requires credit card), or use it the way it is. Look in the browser console, and you'll see messages. This should not prevent your progress. And make sure to have a look at the course home page on edX. The syllabus has changed for 2019; the mashup pset has been ...


1

CAN you use it? Yes, it's fair game. SHOULD you use it? Probably better to get your own key, unless you want to fight that problem while you work on it. Seems that it is failing intermittently. Students using it for pset8 are having the same problems. It's up to you. If this answers your question, please click on the check mark to accept. Let's keep up ...


1

I used this from staff solution and it WORKED ! <!-- https://developers.google.com/maps/documentation/javascript/ --> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyALLIbAxCoIMyHh47Pue4moE1LyA7wvP30&v=3.exp"></script> Substitute above HTML code in your index.html .


1

I added this line service = new google.maps.places.PlacesService(map); to my pset8 and it gave this message TypeError: google.maps.places is undefined in the browser console. Internet search of the error turned up this stack post which says you need to add a libraries option to the Google API URL (more detail in the link). But wait, there's more! (5 hours ...


1

Thanks to Dinos comment above i have now resolved this issue. It turns out i was logged into the CS50 IDE under cloud9. When running flask this produced a ulr: "http://ide50-USERNAME.c9users.io:8080/" I first manually changed this to "https://ide50-USERNAME.cs50.io:8080/" and the map would run correctly, however. Flask would still give me the incorrect ...


1

be sure to grab the latest version of the problem spec (and the distribution code). You are no longer required to use your own API key.


1

Solved! This is the link with the solution (i needed to enable Google Maps JavaScript API): https://stackoverflow.com/questions/35700182/apinotactivatedmaperror-for-simple-html-page-using-google-places-api If you cant find out how to do this go to this link: https://console.developers.google.com/apis/dashboard, then on top search for: "Google Maps ...


1

You aren't expected to use any of those. The lookup function in helpers.py will create the feed (with this line feed = feedparser.parse("https://news.google.com/news/rss/local/section/geo/{}".format(urllib.parse.quote(geo, safe=""))) and your articles function in application.py should simply call lookup and return the json list. You then use that in ...


Only top voted, non community-wiki answers of a minimum length are eligible