JS Error in IE with multiple polygons

Aug 31, 2010 at 3:51 PM


I get the following java script errors in Internet Explorer when drawing multiple polygons:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.3; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; MS-RTC LM 8; yie8)
Timestamp: Tue, 31 Aug 2010 13:18:54 UTC

Message: Unspecified error.
Line: 1145
Char: 65
Code: 0
URI: http://maps.gstatic.com/intl/en_us/


Message: Object doesn't support this property or method
Line: 8
Char: 1
Code: 0
URI: http://maps.gstatic.com/cat_js/intl/en_us/mapfiles/270a/maps2.api/%7Bmod_api_gc,mod_drag,mod_ctrapi,mod_poly,mod_zoom%7D.js

Oct 13, 2010 at 3:37 PM

I got the same error! Have you solve the issue?

Oct 13, 2010 at 3:54 PM
Edited Oct 13, 2010 at 4:41 PM

Well, I had multiple issues contributing to this problem. One turned out to be on my side. I am displaying thumbnails from Youtube on the same page as the map and if a thumbnail doesn't exist, that causes the above JS errors with the map in IE. After that issue was resolved, I was still getting intermittent errors in IE that were hard to reproduce. I was reading documentation on this control (http://googlemap.codeplex.com/documentation) the other day and found this:

  • If you want to show polylines on your map (like the lines used by Google Maps to show driving directions), you need to include the VML namespace in your XHTML document to make everything work properly in Internet Explorer. The beginning of your XHTML document should look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">

Not sure if it's the same problem with polygons as with polylines, I haven't actually tried this fix yet.

Hope this helps.