Google Maps Clustering IE Problem

Home/Google Maps Clustering IE Problem

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]];

2017-05-19T15:48:04+00:00 June 10th, 2014|PHP Snippets, Web Programming|0 Comments

About the Author:

Warren Chandler is a freelance web programmer and web developer, based in Frinton on Sea, Essex. Warren specialises in web programming, web design, corporate identity, copy writing, SEO, logo and print media for home, work, and mobile platforms.

Leave A Comment