style="display: none" now causing errors

160 views
Skip to first unread message

GGarry

unread,
Nov 8, 2011, 10:44:19 AM11/8/11
to Google Maps JavaScript API v3
I have my maps in a hidden div that allows users to toogle "show map"
and "hide map" it was working fine till a few days ago, now I am
getting a javascript error in internet explorer even though it still
works.

Webpage error details

User Agent: .....

Message: Invalid argument.
Line: 1
Char: 348
Code: 0
URI: http://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/7/0/%7Bmain,places%7D.js

If I remove the style="display: none" and show map and they can toogle
it off it works fine but it is used in a directory of businesses so 20
maps on a page is a bit much...

Any ideas?

geoco...@gmail.com

unread,
Nov 8, 2011, 4:01:42 PM11/8/11
to Google Maps JavaScript API v3
On Nov 8, 7:44 am, GGarry <garry...@gmail.com> wrote:
> I have my maps in a hidden div that allows users to toogle "show map"
> and "hide map" it was working fine till a few days ago, now I am
> getting a javascript error in internet explorer even though it still
> works.
>
> Webpage error details
>
> User Agent: .....
>
> Message: Invalid argument.
> Line: 1
> Char: 348
> Code: 0
> URI:http://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/7/0/%7Bmain,...
>
> If I remove the style="display: none" and show map and they can toogle
> it off it works fine but it is used in a directory of businesses so 20
> maps on a page is a bit much...
>
> Any ideas?

Not without a link to your map that exhibits the problem. Perhaps
change your map to not use the nightly/development version. (call out
v=3.6...)

http://code.google.com/apis/maps/documentation/javascript/basics.html#VersionTypes

-- Larry

gardnose

unread,
Nov 9, 2011, 7:08:50 AM11/9/11
to google-map...@googlegroups.com
I had the same issue. A fix for me was to set the containing div to 1px by 1px high, and set visibility:hidden.
Then I had to rewrite my toggle function to do a bit more work.
Reply all
Reply to author
Forward
0 new messages