JavaScript Error in Internet Explorer

ron_s - June 7, 2008 - 11:47
Project:gProximity
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

In the June 4 release version, loading the map in Internet Explorer 7 results in a JavaScript error, and none of the markers are loaded. The error is as follows:

Line: 26
Char: 32
Error: Invalid argument.
Code: 0
URL: http://localhost/web/map-test

After investigating the problem a bit, I found that it's a very similar issue to what I reported here: http://drupal.org/node/267701#comment-873532. The issue is with the getIcon() function.

I am able to fix the problem by hardcoding a solution in the createMarker() function. What I did to bypass the function is as follows:

1) Comment out var marker = new GMarker(point,{icon: icon}); in the getMarker() function, to make sure it's not using the icon generated by loadMarkers() using the getIcon() function.

2) Add the following lines as a replacement in getMarker():

var fIcon = new GIcon(baseIcon);
fIcon.image = "http://localhost/web/files/markers/yellow.png";
var marker = new GMarker(point, { icon:fIcon });

Obviously totally defeats the purpose of defining the icon in Drupal, but it works. :)

#1

greenSkin - June 7, 2008 - 12:33

I'm almost sure that this issue is caused by the getimagesize error, I hope to have this fixed ASAP.

 
 

Drupal is a registered trademark of Dries Buytaert.