It seems like I am really close to finishing my implementation of addMarker. I'm using markers with labels, I've got the articles loaded into an JSON object, and I've created the content to pass to the showInfo function. It looks like we should be passing content to showInfo as a string of HTML, which I have all beautiful and set up.

The problem is that when I do that, my console is giving me the error copied below, and the info window's content is not showing up. How can I fix this? Am I wrong in thinking that the content argument of showInfo should be a string of HTML?

Uncaught TypeError: Cannot assign to read only property 'gm_bindings_' of 
<ul><li><a href = "http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNHOlvXsTSaLfaROJD…Cg&url=http://news.harvard.edu/gazette/story/2015/10/pop-art-on-spaghetti/">Pop art on spaghetti - Harvard Gazette</a></li><li><a href = "http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNELLTOwM01RWdF8w7…l=http://www.thecrimson.com/article/2015/10/16/hotc-supp-butt-second-year/">The Third Year: Experienced Harvard Coach Continues Newest Role - Harvard Crimson</a></li><li><a href = "http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNEpU-bZ8hZ4EVlD71…url=http://news.harvard.edu/gazette/story/2015/10/suffering-for-their-art/">Suffering for their art - Harvard Gazette</a></li><li><a href = "http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNFYJWqjRaJxcSvs45…anounces-new-research-institute-shanghai/37V8wL5CILoo51Xl9BU7cP/story.html">Harvard announces new research institute in Shanghai - The Boston Globe</a></li><li><a href = "http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNGaT5nQQ5aNgpu01L…ws.harvard.edu/gazette/story/2015/10/what-it-means-when-the-doctor-is-out/">What it means when 'The Doctor Is Out' - Harvard Gazette</a></li><li><a href = "http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNFDN_-_fMsCE4R5h9…searching-for-suspect-armed-bank-robbery/PYkkDF7sEKfCmmcJ6iGa6I/story.html">Arlington police are searching for a suspect in an armed bank robbery - Boston.com</a></li><li><a href = "http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNFZpQVbvB-preEs97…ience-machine-that-is-replacing-human-intution-for-big-data-analysis/6454/">MIT has Produce Data Science Machine that is Replacing Human Intution for Big ... - The Standard Daily</a></li><li><a href = "http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNHEdphrS0gCe7XeP9…ivist-was-longtime-women-rights-activist/pu4vy0QziuzGsIfSM17OVO/story.html">Bertha Hartry, at 85; Cambridge archivist, women's rights activist - The Boston Globe</a></li><li><a href = "http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNE1snyWDMAa_Gr0FZ…bostonglobe.com/sports/2015/10/16/schrdp/hq4pPqlYVTxmHFYkQUjw7J/story.html">Thursday's school roundup: Another step for Cambridge boys' soccer - The Boston Globe</a></li><li><a href = "http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNFQtdc30HYYv-Lp53…erage/2015/10/3_arraigned_in_september_parking_lot_killing_in_mission_hill">3 arraigned in September parking lot killing in Mission Hill - Boston Herald</a></li></ul>ub @ js:37K.bindTo @ js:37mZ @ VM2796:1m.internalAnchor_changed @ VM2796:2tb @ js:36tb @ js:36m.set @ js:35We.open @ js:63showInfo @ scripts.js:258(anonymous function) @ scripts.js:119j @ jquery-1.11.1.min.js:2k.fireWith @ jquery-1.11.1.min.js:2x @ jquery-1.11.1.min.js:4b @ jquery-1.11.1.min.js:4

1 Answer 1


Answer: showInfo expects marker and content as arguments, in that order. I was passing them in the wrong order. When you get an error like that, you have to go back and check every little thing!

You must log in to answer this question.

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