Ticket #2736 (closed bug: duplicate)
Google v3 layer issues
|Reported by:||pwr||Owned by:|
I've found 2 problems with using the v3 layer:
1. Google Chrome fails with "Uncaught TypeError: Cannot read property 'childNodes' of null". This seems to be specific to Chrome and does not occur with other webkit browsers. It also does not occur with the example, but only with more complex pages which read in more scripts. Presumably, the first time the repositionMapElements() loop is executed, the mapObject has a div but without children, so the problem can be fixed by checking this as in the attached patch.
2. I was adding a Google scale control. This seems to include the zoombar in the mapObject, meaning that there are 4 controls not 3, and they are in a different sequence, so using lastChild means the wrong child gets put in the wrong div, and general confusion results. You could put in complicated logic to loop through the controls putting them in the right div, but as the scale control is largely meaningless at many latitudes/zoomlevels this hardly seems worthwhile. So I've just added a comment in the docs that the layer is not compatible with Google Controls.
Also, the current docs at the top (line 13) says 'Note that' - something seems to be missing :-)