Update:* Checked other peoples code(https://github.com/endiliey/cs50) on the web and their icons are not showing up either.

I also noticed that the staff implementation now no longer have the newspaper icon but the normal google location icon. I suspect its been updated. But nothing in the change log.

So it was working fine and dandy, my pset8, but life happened and i left it for awhile 5-6 months. Was only missing a removemarker implementation.

Came back and needed to migrate my pset8 to the new IDE to get more space.


My Markers and News icon no longer shows up.

I believe something changed in Google/Ajax/Json change which cause the my(plus others) code to break?

I can't seem to find a way to diagnose it. (side question, how do we debug/find the issue in JS?) Anyone or CS 50 staff can help?

enter image description here


[code edited away to avoid spoilers]


Looks like you missed out at least one setting for your marker.

Be sure you have in your new Marker

     map: map,

So that the markers will go on the map.

I added that one line and your markers reappeared.

(in context)

var marker = new google.maps.Marker({
position: myLatlng,
// title: place.place_name + ", " + place.admin_name1,     //<-- title key in this object, marker add a tool tip when mouse over.
label: place.place_name + ", " + place.admin_name1,
map: map,
icon: {
    url: 'https://maps.google.com/mapfiles/kml/pal2/icon31.png',
    labelOrigin: new google.maps.Point(11,40)
    // origin: new google.maps.Point(0,0),
    // anchor: new google.maps.Point(11,40)
//anchorPoint: new google.maps.MarkerOptions.Point(0,32)

  • odd that the markers still showed up before even without that map: map,. But that help! Thanks so much!
    – nvs0000
    Dec 27 '17 at 9:22

You must log in to answer this question.

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