本帖最后由 nanaze 于 2010-08-02 14:39:06 编辑

解决方案 »

  1.   

    function getJoGIS(){
        var div=document.createElement("div");
        var codes=[];    
        var JoGIS;    codes.push('<object id="JoGIS" classid="CLSID:FC8F7F34-C20D-4406-8BAE-EFE2E232227F" width="100%" height="100%" align="top"> ');
        codes.push('<param name="_Version" value="65536"/>');
        codes.push('<param name="_ExtentX" value="2646"/>');
        codes.push('<param name="_ExtentY" value="1323"/>');
        codes.push('<param name="_StockProps" value="0"/>'); 
        codes.push('</object>'); 
        codes.push('<script language="javascript" for="JoGIS" event="SelectedElement()" type="text/javascript">');
        codes.push('clickEvent();');
        codes.push('</script>');
        codes.push('<script language="javascript" for="JoGIS" event="AddedElement()" type="text/javascript">');
        codes.push('AddedElement_();');
        codes.push('</script>');
        codes.push('<script language="javascript" for="JoGIS" event="OnMouseUp(BUTTON,SHIFT,X,Y)" type="text/javascript">');
        codes.push('OnMouseUp_(SHIFT,X,Y);');
        codes.push('preCalDIs();');
        codes.push('</script>');
    //    codes.push('<script language="javascript" for="JoGIS" event="OnMouseDown(BUTTON,CONTROL,X,Y)" type="text/javascript">');
    //    codes.push('OnMouseDown_(BUTTON,CONTROL,X,Y);');
    //    codes.push('</script>'); div.style.cssText="display:none;"
        div.innerHTML=codes.join("");
        JoGIS = div.innerHTML; //.removeChild(div.getElementsByTagName("object")[0]);//
       
    div=null;
        return JoGIS;    
    }function showJoGIS() {
        var InnerGDB =  getJoGIS();
        document.getElementById('divGDB').innerHTML = InnerGDB;
    }window.onload= function(){
      showJoGIS()
      GeoGIS = document.getElementById("JoGIS");
      var url = "http://202.200.85.77/files/1.gdb";
      GeoGIS.LoadMapFile( url);
      GeoGIS.OperateState = "0";
     originalScale= GeoGIS.ZoomScale();
    }