Posts

Showing posts from September, 2013

Google Maps InfoWindow Problem

Image
I'm not sure what went wrong here, but Google Maps infoWindow seems to have stopped working in one of the API release. At least, it stopped working in the way that it used to. As is often the case, the fix was a simple one.  The symptoms I was getting was the info window seeming like it was appearing off the top left of the map when I had :- google.maps.visualRefresh = true; or not appearing at all if this was false.  No errors.  If I popped an alert into the click addListener, the alert popped up.  It looked like this for me :- In the end, it seems that one can no longer assign a value to the infoWindow's "content" property :- var infoWindow = new google.maps.InfoWindow(); infoWindow.content = "Some HTML"; This just failed.  Instead, a subtle change :- var infoWindow = new google.maps.InfoWindow({content:  "Some HTML" }); Worked perfectly. I had done all sorts before like trying to alter the scope of variables.  I'd even