wemaycode / 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

Google Earth API for maps v3 utility library conflicts with jquery components #283

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have an interface that contains google maps/earth pane to render kml files in 
addition to tree view and accordion jquery components, I want users to be able 
to switch between map view and earth view on the same pane,  the interface was 
working perfectly well with google maps v2 using G_SATELLITE_3D_MAP map type,

I am trying to upgrade to google maps v3 now with google earth component (Earth 
view) where things start to go wrong, it looks like there are some issues with 
Google Earth API for maps v3 utility library, it conflicts with other jquery 
components (exp. dynatree, Jaccordion), the map does not switch to earth view 
and the error message received is "Cannot read property 'style' of undefined", 
removing the usage of that utility causes things to work well back again but 
without the earth view of course, 

using the same jquery components with normal google earth works fine, I wanted 
to combine google maps and earth in one pane but using that utility has raised 
strange behavior,

below is a snippet of code, your help is much appreciated,

function init() {
                    map = new google.maps.Map(
                    document.getElementById('map'), {
                            center: new google.maps.LatLng(34, -100),
                            zoom: 13,
                            mapTypeId: google.maps.MapTypeId.ROADMAP
                    });

                    ge = new GoogleEarth(map);
            }
google.maps.event.addDomListener(window, 'load', init);

Original issue reported on code.google.com by halou...@gmail.com on 27 Nov 2013 at 6:53