1

I have a problem with ie7 and method setIcon of marker google maps.

when used for a single item marker.setIcon(image) works OK, but when I use an array marker [i].setIcon(image) does not work, the error of IE is the object has that method.

Anyone know the cause?

Thanks.

bamnet
  • 2,525
  • 17
  • 21
Cmarfil
  • 139
  • 6

1 Answers1

1

the problem is solved, i don't know because but ie add element with name "IndexOf" in the array...

The solution:

       for(var ii in markers) //Cambio de color - todos a negro
        { 
            if(ii == 'indexOf')
                continue;
             markers[ii].setIcon(image);
        } 

bamnet- For introduce markers in array:

Google Maps JS API v3 - Simple Multiple Marker Example

Thanks.

Community
  • 1
  • 1
Cmarfil
  • 139
  • 6