Dynamically loading Google Maps API v3 in ExtJS 4

extjs4, google-maps-api-3

Solution

Ext.Loader.loadScriptFile('https://www.google.com/jsapi',function(){
    google.load("maps", "3", {
        other_params:"sensor=false",
        callback : function(){
            // Google Maps are loaded. Place your code here
        }
    });
},Ext.emptyFn,null,false);

You can pass more params to the api using:

`other_params: "sensor=false&libraries=places&key=YOUR_API_KEY"`

For more information about the google loader: https://developers.google.com/loader/

Problem

Can you load the Google Maps API in ExtJS 4 after the page has loaded?

Original source