0

Help! I have 5 days left and I am trying to finish up pset8. Thankfully, I have already finished the final project, and I have done most of this pset8. However, making the marker a link to articles.php seems impossible! Below is the code and I don't know what is wrong. When I load https://pset8/ on my aplliance, all I see are markers, but when clicked, nothing happens! Any help would be great. Thanks!

function addMarker(place)
{
// set the Lat/Lng of the place
var placeLatLng = new google.maps.LatLng(parseFloat(place.latitude), parseFloat(place.longitude));

var marker = new MarkerWithLabel({
    position: placeLatLng,
    map: map
});

var parameters = {geo: markers.postal_code};


// set a listener for the info window
google.maps.event.addListener(marker, "click", $.getJSON("articles.php", parameters).done(
function(data, textStatus, jqXHR) 
{
    var content = data;
    var articles = "";
    var len = data.length;
    for(var i = 0; i<len;i++)
    {
       articles += "<div>"+content[i].title+"</div>"
    }      
    showInfo(marker, articles);
}));

// add marker to markers[]
markers.push(marker);
}
1
1

first-off there is some change about EDX 2015 class. read this

https://courses.edx.org/courses/HarvardX/CS50x3/2015/info

Now Marker with label you have to read this

http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.9/docs/examples.html

Which is given here

http://cdn.cs50.net/2015/x/psets/8/pset8/pset8.html#addmarker_2

Some options are missing in what you give us to read

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .