Reputation: 851
Can you load the Google Maps API in ExtJS 4 after the page has loaded?
Upvotes: 3
Views: 1905
Reputation: 851
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/
Upvotes: 7