gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.51k stars 372 forks source link

GWT ScriptInjector injection successed,but $wnd.google.maps.MapTypeId is undefined #7770

Closed dankurka closed 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 7773

Found in GWT: 2.5

ScriptInjector.fromUrl( "http://maps.googleapis.com/maps/api/js?sensor=false&language="+
(lang == null ? "en_US" :lang)).setWindow(ScriptInjector.TOP_WINDOW).setCallback(new
Callback<Void, Exception>(){
    public void onFailure(Exception reason)
    {
       Window.alert("load google maps api failed,all map function will not work.");
    }
    public void onSuccess(Void result)
    {
         MapTypeId mapType=MapTypeId.valueOf("...");
    }}).inject();

Above code is will throw out exception:
    $wnd.google.maps.MapTypeId is undefined  

Reported by Alexander.Luya on 2012-11-08 12:07:28

dankurka commented 9 years ago
This is the GWT issue tracker, you probably want the gwt user group.

Reported by dankurka@google.com on 2013-05-27 19:33:50