Search code examples
javascriptgoogle-mapsgoogle-maps-api-3internet-explorer-8google-fusion-tables

< IE8 error : 'polygonOptions.fillColor' is null or not an object


I have created a fusion table with some data and polygons. I am styling it using google Maps API. Here is link to the website. It is working perfectly fine in latest browsers andalso in IE 9 but in < IE 8 I am getting this error :

Webpage error details :

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)

Message: 'polygonOptions.fillColor' is null or not an object

Solution

  • You are iterating over an array with a method that iterates over object-properties:

    for (t in e)
    

    this will result in unexpected behaviour, because this may also return names of built-in-properties, e.g. names of array-methods(for me IE stops when t is "map")

    Use

    for (var t=0; t<e.length; ++t) 
    

    to iterate over the items of the array