If you’re having trouble getting Google Maps marker clustering working on IE8, this little snippet may be of use.

A client recently came to me with an issue whereby Google Maps were showing the clusters on all browsers except Internet Explorer 8, but it’s usually a more straight forward fix than you might think. The issue was with how the browser parses the JavaScript variables in the map points array.


var markers = [[123.234,213.345],[672,123,125,554],];

The problem with that array is the trailing comma, something that’s often present when you create an array via a programming loop. Remove it so the array is as follows and you should be good to go. Modern browsers are able to ignore this problem, while some.. not so much!


var markers = [[123.234,213.345],[672,123,125,554]];