waterinfo Posted January 12, 2012 Share Posted January 12, 2012 as the title ,not like google map. as the bellow,the key is sign by 127.0.0.1 I found the UniGUI was failed at the first line : google.load("earth", "1"); Any suggestion will be appreciated! <html> <head> <title>Sample</title> <script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAtnKGgF_rljT3MDHOFHbWKhRi_j0U6kJrkFvY4-OX2XYmEAa76BQVsSWfv5Fi27cTJJ8aXqbIR2Vngg"> </script> <script type="text/javascript"> var ge; google.load("earth", "1"); function init() { google.earth.createInstance('map3d', initCB, failureCB); } function initCB(instance) { ge = instance; ge.getWindow().setVisibility(true); } function failureCB(errorCode) { } google.setOnLoadCallback(init); </script> </head> <body> <div id="map3d" style="height: 400px; width: 600px;"></div> </body> </html> Quote Link to comment Share on other sites More sharing options...
waterinfo Posted January 12, 2012 Author Share Posted January 12, 2012 I would like to show the detail code generated by unigu , cound any one experienced with extjs can tell me the reason. Since there is always a loading.. show in the page. ----------------------------------------------------- <!DOCTYPE html public> <html> <head> <title>New Application</title> <meta http-equiv="content-type" content="charset=utf-8" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="pragma" content="no-cache" /> <link rel=stylesheet href="ext-3.4.0/resources/css/uni-ext.css" /> <link rel=stylesheet href="ext-3.4.0/resources/css/ext-all.css" /> <script src="ext-3.4.0/adapter/ext/ext-base.js"></script> <script src="ext-3.4.0/ext-sync-1.3.7-min.js"></script> <script src="ext-3.4.0/ext-all.js"></script> <script src="ext-3.4.0/examples/ux/ux-all.js"></script> <link rel=stylesheet href="ext-3.4.0/resources/css/xtheme-blue.css" /> <link rel=stylesheet href="ext-3.4.0/examples/ux/css/ux-all.css" /> <link rel=stylesheet href="ext-3.4.0/resources/css/uni-xtheme-blue.css" /> <script src="http://www.google.com/jsapi?key=ABQIAAAAtnKGgF_rljT3MDHOFHbWKhRi_j0U6kJrkFvY4-OX2XYmEAa76BQVsSWfv5Fi27cTJJ8aXqbIR2Vngg"></script> <script src="ext-3.4.0/ext-unigui-1.3.7-min.js"></script> </head> <p></p> <script> _S_ID="_S_ID=HyIkLgG6qq1P9VS"; Ext.onReady(function() {setTimeout(function() {Ext.get("loading").remove(); Ext.get("loading-mask").fadeOut({remove:true});},250); Ext.BLANK_IMAGE_URL="ext-3.4.0/resources/images/default/s.gif"; TextMetrics=Ext.util.TextMetrics.createInstance(Ext.getBody()); function AjaxError(m, t){Ext.Msg.show({title:"Ajax Error",multiline: true,value:t,width:400,minWidth:200,msg:m,icon:Ext.Msg.ERROR,buttons:Ext.Msg.OK});}; function AjaxSuccess(response){if(_aexc_(response))return;try{eval(response.responseText);} catch(err){AjaxError(err.message,response.responseText);}}; function AjaxFailure(){AjaxError("Server unavailable, please try later");}; Download=Ext.DomHelper.append(document.body,{tag:"iframe",cls:"x-hidden"}); O0=new Ext.Window({id:"O0_id",retfalse:{},title:"MainForm",width:600,height:579});O0.nm="O0"; _cdo_("MainForm");MainForm.ajxS=AjaxSuccess;MainForm.ajxF=AjaxFailure;O0.rootObj=true;MainForm.appRoot="/"; _cdo_(null,O0,"window",MainForm); O10=new Ext.form.FormPanel({id:"O10_id",border:false,layout:"absolute",anchor:"100% 100%",tabItems:new Ext.util.MixedCollection()});O10.nm="O10";_cdo_(null,O10,"form",MainForm); O10.on("afterrender",function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O10&Evt=afterrender&This="+P0.nm+""+"&ci="+_gci_()+_gv_(O10),success:AjaxSuccess,failure:AjaxFailure,obj:O10,e:"afterrender"});}); O20=new Ext.Panel({id:"O20_id",layout:"absolute",bodyBorder:false,border:false,width:553,height:457,x:16,y:105}); O20.nm="O20"; _cdo_("UniHTMLFrame1",O20,null,MainForm); _coe_(MainForm,"UniHTMLFrame1",null,"afterupdatehtml", function(sender) { var ge; google.load("earth", "1"); function init() { google.earth.createInstance('map3d', initCB, failureCB); } function initCB(instance) { ge = instance; ge.getWindow().setVisibility(true); } function failureCB(errorCode) { } google.setOnLoadCallback(init); }); O10.add(O20); O2F=new Ext.Button({id:"O2F_id",text:"UniBitBtn1",width:75,height:25,x:96,y:-56,scale:"small",icon:""}); O2F.nm="O2F";_cdo_("UniBitBtn1",O2F,null,MainForm);O20.add(O2F); O33=new Ext.Button({id:"O33_id",text:"UniBitBtn2",width:75,height:25,x:72,y:-48,scale:"small",icon:""});O33.nm="O33"; _cdo_("UniBitBtn2",O33,null,MainForm);O20.add(O33); O37=new Ext.Button({id:"O37_id",text:"UniBitBtn3",width:105,height:33,x:32,y:50,scale:"medium",icon:""});O37.nm="O37"; _cdo_("UniBitBtn3",O37,null,MainForm);O10.add(O37);O10.render(document.body); O3B=new Ext.Viewport({id:"O3B_id"});O3B.nm="O3B"; O3B.on("resize",function(P0,P1,P2,P3,P4){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O3B&Evt=resize&This="+P0.nm+"&AdjWidth="+P1+"&AdjHeight="+P2+"&RawWidth="+P3+"&RawHeight="+P4+""+"&ww="+P0.getWidth()+"&hh="+P0.getHeight()+_gv_(O10),success:AjaxSuccess,failure:AjaxFailure,obj:O3B,e:"resize"});});_cwk_();_dko_({BS:true,ESC:true}); O20.update(" <div id=\"map3d\" style=\"height: 457px; width: 600px;\"></div>\n \n", true); O20.fireEvent("afterupdatehtml", this);}); </script> <body> <div id="loading-mask"></div><div id="loading"> <div class="loading-indicator">Loading...</div></div> <div id=body></div><noscript>This web application requires JavaScript enabled</noscript></body> <link REL="SHORTCUT ICON" HREF="cache/openGPS/HyIkLgG6qq1P9VS/favicon.ico"></html> Quote Link to comment Share on other sites More sharing options...
waterinfo Posted January 12, 2012 Author Share Posted January 12, 2012 if a remark this sentence,the program can load without googleearth plugin. google.load("earth", "1"); According to google's specification,this load is just load the namespace ,why failed ? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 12, 2012 Administrators Share Posted January 12, 2012 First of all. Please enclose your code in [ code ] tag so your posts will be more readable. You can analyze our Google Maps demo and make necessary changes and adopt it to Google earth. Quote Link to comment Share on other sites More sharing options...
waterinfo Posted January 12, 2012 Author Share Posted January 12, 2012 First of all. Please enclose your code in [ code ] tag so your posts will be more readable. You can analyze our Google Maps demo and make necessary changes and adopt it to Google earth. Farshad,Thanks for you instant replay,I was just analysis your excellent demo about Google map,But about google Earth,Every thing was changed. I find this line was wrong or without properly result: google.load('earth','1'); I has taken all day long to solve this problem ,but no answer yet:( Quote Link to comment Share on other sites More sharing options...
waterinfo Posted January 13, 2012 Author Share Posted January 13, 2012 My team has solved this problem,the conclusion is nothing to do with ungui,just for the reason of google earth it self. Thanks every one here,especially the great Farshad who created this grand product! Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 13, 2012 Administrators Share Posted January 13, 2012 Thanks for update. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.