Questions tagged [mashup]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Why CS50 2019 excluded MashUp problem set?

everyone I have noticed that staff solution for MashUp problem set is not working correctly , displaying same articles for any location in USA and having waterMark ( "for development purposes only")....
0
votes
1answer
32 views

$.getJSON request for articles not working

I'm getting a bit confused about what I need to do here to retrieve my articles in scripts.js from /articles to display on my marker. I have done ample reading about AJAX and $.getJSON, but still ...
0
votes
1answer
18 views

Mashup - Listener for click on marker not working

I've been struggling with setting up a listener and opening content above a marker lately. When I click on the marker, nothing happens. I tried approaching this through calling showInfo() from the ...
0
votes
1answer
80 views

Do we need an API key for mashup?

I get RefererNotAllowedMapError in console, and the whole screen is gray. But, at the bottom of the Mashup specification, there is changelog where it says that we don't need to get an API key. ...
0
votes
1answer
55 views

pset8 - addMarker and infowindow problem

I am having trouble with addMarker in pset8. The markers are only shown one by one each time I pan or zoom in/out the view. And after 10 moves it keeps adding markers (limitation to 10 isn't working). ...
0
votes
1answer
22 views

PSET8 invalid sw.

When I am trying to use the search bar, the autofill just gives me " , , " and when I click on that suggestion the console tells me "invalid sw". After reasearching the problem a bit, everyone seems ...
0
votes
1answer
49 views

PSET8 Mashup : helpers.py

I can't understand the magic happening in helpers.py What is lookup.cache[]? I know lookup is the name of our function. I tried to search online for cache function but couldn't get any leads. I need ...
0
votes
1answer
51 views

Pset8 Mashup removeMarkers not working

as far as I can tell everything works more or less as I intend it to, except removeMarkers which doesn't seem to work, despite being a very short and easy function. My code: // Google Map let map; //...
2
votes
1answer
78 views

Why do cs50/2018/x/speller, cs50/2018/x/mashup show looks good but give 4 / 5 for style?

I have run update50 and I'm still not seeing any style errors but I'm still getting 95% and 4/5 for style?
0
votes
1answer
69 views

Google maps API quota

I have found that after one request per day the google map of pset8/mashup doesn't load properly. I mean it displays the message that the site is for development purpose and doesn't load the map. So, ...
0
votes
1answer
34 views

Mashup Search Box Not Filling Screen

In my final project, I am integrating a map and search box based on the Google Maps API used in Pset8 Mashup. My search box is creating a list of places, however the results it produces only fill part ...
0
votes
1answer
84 views

Map Not Loading

In my final project, users can create an account as used in Pset7 Finance and I am including a map using the Google Maps API as used in Pset8 Mashup, however the map isn't loading. I have used code ...
0
votes
0answers
48 views

Been Trying to get Mashup To work

I've been trying to get my article's function to work in the mashup project but every time I use the test url I get an "Internal Server Error" my code is as bellow: @app.route("/articles") def ...
0
votes
1answer
158 views

pset8 addMarker - markers not showing on map

When I run flask and open the map, I can't view the markers on the map. Is there something wrong with my addMarker function? Thank you. // Add marker for place to map function addMarker(place) { //...
1
vote
1answer
60 views

Mashup - AddMarker not creating a marker

I've seen similar posts about this but mine does seem to be related to the db as my latitude and longitude come back okay. Also I am not initializing the map. As far as I understand the map is ...
0
votes
1answer
89 views

mashup: add marker does not render infowindow

My code successfully creates markers that pop up throughout the view of the map. However, upon clicking, there is no info map that pops up. The terminal does show that the server receives the command ...
0
votes
1answer
215 views

intersection of a list of arrays, python

I have two arrays that have dictionaries within them (these dictionaries objects in both arrays contain identical keys): a = [{1:"a", 2:"b"},{1:"c", 2:"d"}] b = [{1:"e", 2:"f"},{1:"c", 2:"d"}] I ...
0
votes
1answer
64 views

Specify Multiple Search Conditions for SQL

this is a question about search() in pset8 Mashup. How does one select rows given multiple characteristics(for example in pseudo code, SELECT * THAT CONTAIN KEYWORDS "New Haven" AND "Connecticut" AND ...
0
votes
0answers
180 views

pset8 mashup How To Work With The JSON Object?

As the title says, I'm having troubles about how to work with the returned data from the /articles route. My question is about accessing key->value pairs of the JSON Object. When I manually search ...
0
votes
1answer
161 views

Search function - Pset8 - Mashup

I found the search query a little bit complicated, in the sense it can be difficult to adjust it to the user's input. For example, how do I permit the user to enter the parameters in different order ...
0
votes
1answer
347 views

jsonify not working when I add this line of code <<db = SQL(“sqlite:///mashup.db”)>> to application.py

I am trying to return a JSON on a certain URL in python application. Without this line db = SQL("sqlite:///mashup.db") everything works. The JSON is returned correctly. If I uncomment that line, ...
0
votes
1answer
142 views

Handlebars.compile() not behaving as expected

I am trying to use handlebars.compile() to generate my HTML unordered list items in my getJSON() callback function: function addMarker(place) { ... // add event listener to open info window ...
0
votes
1answer
52 views

pset8 mashup scritp.js/configure what is the format of data to be input of handlebars.compile

I tried all ways to add these lines but always not working the map is not appearing only the text box with no action I tried this suggestion: Handlebars.compile( "<div>" + ...
0
votes
1answer
192 views

Pset 8 - Jquery of addMarker

I'm having some issues displaying the list of articles on my marker. I've definitely managed to get it to work and display things inside, but I think there's an issue with the syntax on my jquery ...
1
vote
1answer
247 views

Mashup: removeMarkers not removing markers? PLEASE HELP

Salutations good people, Been hacking away at Mashup for far too long on one issue after the next. Now my program works almost exactly as the staff solution, but I've noticed when dragging/zooming ...
0
votes
1answer
242 views

Can't get articles on my marker, and city markers are persisting

function addMarker(place) { // Create marker var marker = new google.maps.Marker({ position: {lat: place.latitude, lng: place.longitude}, map: map, title: place["...
0
votes
0answers
38 views

Update the API mashup distribution code

The 2018 mashup assignment distribution code is oudated. When reading the documentation, there's mention of using the Promise interface, but the distribution code is using the callback-based ...
0
votes
1answer
183 views

Pset8 - mashup (2018 or 2017): Downloading distribution code does not include txt files

I'm having some issues with downloading the distribution code for Pset8 (mashup). I am getting everything except US.txt and readme.txt. I do get the other text file, requirements.txt. Is anyone ...
0
votes
1answer
172 views

mashup add marker how to use $.getJSON getting [object Object] in pop up

My problem is with the function addMarker in scripts.js This is what I have: function addMarker(place) { var myLatLng = {lat: place.latitude, lng: place.longitude}; var geo = place.postal_code ...
0
votes
1answer
291 views

pset8 2018 mashup search

I have changed nothing in the pset8 distribution code and only implemented search function and formatted configure in script.js, but no suggestion shows up from the search box 'q'. This worked ...
0
votes
1answer
171 views

PSet8 Mashup Jsonify call fails on unmodified project

I took a long break from CS50, and came back to it today. I discovered that with no modifications and following the mashup directions, when running I always get an error on every method that returns ...
0
votes
1answer
160 views

can't import US.txt into places

PSET 8 Mashup: I am not able to run the following commands as given by the problem set: $ sqlite3 mashup.db .separator "\t" .import US.txt places I've tried multiple ways, I am certainly in the same ...
2
votes
1answer
361 views

2017 pset8 mashup: Slow search - how to improve search performance?

I have successfully implemented search in application.py. Though ss I was testing through the app, I noticed that every search was really slow. It's turns out that every search request was from 63KB ...
0
votes
1answer
295 views

pset8 - search function in application.py

My search function returns the correct results when I am using for example q=Cambri but when I try to search using for instance q=021 nothing is returned. In my database I have set postal_code field ...
1
vote
1answer
130 views

PSET8 - Error: near “wc”: syntax error

I am trying to execute the command : wc -l US.txt inside the sqlite3 terminal but I keep getting the following error: Error: near "wc": syntax error This is the sequel of the commands I am trying ...
0
votes
1answer
244 views

Search function do not work if several words entered

Both mine and stuff solutions do not work for examples like (where there is two of more words from different db fields): https://ide50-username.cs50.io/search?q=New+Haven,+Connecticut // http://pset8....
0
votes
2answers
385 views

Pset8 Mashup search function not displaying the correct suggestions

I have one question regarding the search part of mashup. It is almost working as intended, but when I try to search by postal code it works for the first digits (for example: 554), but when I type the ...
0
votes
1answer
63 views

pset8 Mashup onion links problem

I've found many questions about onion links showing up instead of local news, but haven't found solution for that problem. So, I have the same problem and my question is: is there solution or ...
0
votes
1answer
501 views

How to insert data from a txt file to specific SQLite table column

I am trying to make the search function in mashup more versatile by creating a new column in my SQLite places table called full_location where it will hold the postal_code, place_name, and admin_name1 ...
1
vote
1answer
493 views

request.args.get, how is it used in application.py?

if not request.args.get("sw"): raise RuntimeError("missing sw") if not request.args.get("ne"): raise RuntimeError("missing ne") In mashup, how is the request.args.get() used in above code? I ...
0
votes
1answer
72 views

CS50 Mashup-Suggestion box displays only 2 commas

So, as the title says, no matter what is inputted into the textbox, only 2 commas appear and when clicked on, turn the map gray and unusable. Link to scripts.js
0
votes
1answer
565 views

Need help with pset8/mashup/scripts.js/add_marker

I am done with mashup.db, apllication.py but seem to be stuck into add_marker. In so far as I have been able to write the code for instantiating a marker, adding labels and simple icons to it. For ...
0
votes
2answers
163 views

pset8/mashup need help

I have successfully implemented my articles and search route in application.py in so far as my articles route returns a JSON array of 10 objects which is to say 10 news feeds. I have implemented my ...
0
votes
1answer
161 views

pset8 (mashup): Onion articles not showing

My links for non-Onion articles are displaying just fine in infoWindows attached to markers, but even though the Onion aricles are fetched correctly through ajax, they are not being displayed in my ...
0
votes
0answers
54 views

PSET8: dealing with empty infoWindows

My infoWindows are working fine when there is text to be displayed in them, but I'm struggling with empty infoWindows. The code I tried to use to implement the empty window functionality is below: $....
0
votes
1answer
401 views

problems with markers on addmarkers pset8

I'm currently working on pset8 and I'm having a problem with addMarkers(). So, I can get my markers to show on my map, but they only appear once I zoom out until the map shows the whole world (I need ...
0
votes
1answer
345 views

pset8 search function not working like supposed to

I'm trying to implement search in pset8 so that it can narrow down searches based on whether a comma followed by a state name or symbol is included. For example, the standard search would output many ...
0
votes
0answers
54 views

Scripts.js file is not being loaded Pset8

I have written the code for scripts.js. But somehow my web server is not reading it. Hence I can see no changes on the map.What could be the possible problems?
0
votes
1answer
411 views

My articles do not match with the staff articles

I implemented articles in application.py, but the articles I get have nothing in common with the staff articles for the same Postal Code 02138 https://ide50-username.cs50.io/articles?geo=02138 http:...
1
vote
1answer
138 views

PSET8: addmarker: uncaught type error

I am currently working on Pset8 and just managed to implement the addmarker function. However, when I try to implement the getJSON part, the mashup gives me a Uncaught Type error: cannot read ...