Google Maps Complex Icons - Page error

前端 未结 1 505
萌比男神i
萌比男神i 2021-01-26 12:32

I have the following google maps code:



        
相关标签:
1条回答
  • 2021-01-26 12:56

    IE doesn't like "hanging commas" (commas at the end of arrays or objects, without anything after them). They cause it to append a null to the end of the object or array, which then generates an error in the API.

    Remove them from your code.

    var beaches = [
    ['Car:806', -27.4481025666613, 153.035155217002, 916],
    ['Car:520', -27.4777186625335, 153.00697421394, 915],
    ['Car:1477', -27.4523199466005, 153.029570366226, 914],
    ['Car:815', -27.5315143182514, 153.023819055977, 913],
    ['Car:334', -27.3930054770139, 153.104887341157, 912],
    ['Car:191', -27.4705744176833, 153.030243260862, 911],
    ...
    
    ['Car:618', -27.4146792620242, 153.081801794924, 1],
    ['Car:1096', -27.3369540394594, 153.069279763313, 0], // ** remove the comma at the end of this line **
    ];
    
    0 讨论(0)
提交回复
热议问题