I can't get the news articles to show up inside of the markers on mashup. I tried debugging with the console, but all I get is an error 500 from the articles function, although when I tested articles directly through the url (https://ide50-username.cs50.io/articles?geo=02138) I got the JSON object as expected. I suspect I'm using getJSON wrong, but I can't figure out how. Can anyone tell me what is wrong? Here is addMarker:
function addMarker(place){
var latitude = place.latitude;
var longitude = place.longitude;
var marker = new google.maps.Marker({
position: new google.maps.LatLng(latitude,longitude),
map:map,
visible:true
});
$.getJSON(Flask.url_for("articles"), function(news){
google.maps.event.addListener(map, "click",function(){
showInfo(marker, news.title);
});
});
marker.setMap(map);
markers.push(marker);
}