szelee / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
Apache License 2.0
0 stars 0 forks source link

Infobox.js - Uncaught exception "google.maps.OverlayView" is not a constructor #315

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Demo link or sample code:

http://app.volkswagen.de/dcc/de/dealers.html

What steps will reproduce the problem?
1. Loading the site, reliably with Opera Presto or IE9, less reliable with 
newer browser versions
2. Alternatively, using a tool like fiddler to delay the google maps code will 
allow reproduction on all environments

Expected result:
[Describe what you expected to happen]

Actual result:
The titular javascript error occurs and blocks all further execution of the site

Version: 1.1.12

Browser / Operating System:
Opera Presto, IE9 reliably, other browsers with fiddler

Additional comments:
We have been deploying version of this site across different markets for months 
now, none of them had this issue (e.g. app.volkswagen.fr/dcc/fr/dealers.html), 
it also only occurs, unfortunately, on the production site.

It is obvious from the error and from the network waterfall charts that the 
problem is the library script expecting all google maps objects at a point when 
they are not yet loaded.

I know from issue 42 that it is recommended to load infobox.js dynamically in 
cases where google maps scripts are loaded "dynamically", but it seems odd as 
the very first google maps script tag is not dynamic at all (it obviously 
inserts its own scripts dynamically, but that's always the case, the original 
script tag itself is static and before our library scripts). This is the way 
the script is inserted in all demo codes as well 
(https://code.google.com/p/google-maps-utility-library-v3/source/browse/trunk/in
fobox/examples/infobox-basic.html - line 4 & 5) - first the google maps script 
tag, then the infobox js (in our case, as part of many libraries).

Obviously, the remedy we'll try is to load the library code upon the successful 
loading of google maps itself, but I'm wondering whether I'm not seeting 
something in the architecture here.

Original issue reported on code.google.com by CBurtc...@googlemail.com on 15 Aug 2014 at 7:59

GoogleCodeExporter commented 9 years ago
(expected result - page loads and displays dealers and their infoboxes in all 
their glory)

Original comment by CBurtc...@googlemail.com on 15 Aug 2014 at 8:02