1. <tt id="5hhch"><source id="5hhch"></source></tt>
    1. <xmp id="5hhch"></xmp>

  2. <xmp id="5hhch"><rt id="5hhch"></rt></xmp>

    <rp id="5hhch"></rp>
        <dfn id="5hhch"></dfn>

      1. Java實(shí)現(xiàn)點(diǎn)在線添加的方法

        時(shí)間:2020-09-23 12:10:32 JAVA認(rèn)證 我要投稿

        Java實(shí)現(xiàn)點(diǎn)在線添加的方法

          Java如何實(shí)現(xiàn)點(diǎn)在線添加,下面YJBYS小編為大家整理了相關(guān)資料,希望對(duì)你有所幫助。內(nèi)容如下:

          public void addPoint(MapEvent event){

          AGSLocalMapResource res = (AGSLocalMapResource)this.webContext.getResources()。get(“ags0”);

          try{

          // 建立一個(gè)工作空間工廠對(duì)象,并設(shè)置它的參數(shù)信息。

          SdeWorkspaceFactory sdewf = (SdeWorkspaceFactory)res.getServerContext()。createObject(SdeWorkspaceFactory.getClsid());

          PropertySet pset = (PropertySet)res.getServerContext()。createObject(PropertySet.getClsid());

          pset.setProperty(“SERVER”, “gxk”);// 服務(wù)器名稱

          pset.setProperty(“INSTANCE”, “5151”);// 實(shí)例名

          pset.setProperty(“USER”, “sa”); // SDE數(shù)據(jù)表空間的用戶名

          pset.setProperty(“PASSWORD”, “sa”);// 密碼

          pset.setProperty(“VERSION”, “DBO.gxk”);// SDE數(shù)據(jù)的版本

          Workspace iws =(Workspace) sdewf.open(pset, 0);

          WebPoint screenPoint = (WebPoint)event.getWebGeometry();

          WebMap mapctrl = event.getWebContext()。getWebMap();

          WebPoint mappnt =WebPoint.toMapPoint(screenPoint, mapctrl.getCurrentExtent(), (int)mapctrl.getWidth(), (int)mapctrl.getHeight());

          Geometry soapgeo=AGSUtil.toAGSGeometry(mappnt);

          String soapString = com.esri.adf.web.ags.util.AGSUtil.serializeStub(soapgeo);

          soapString = soapString.replaceAll(“xsi:type=\”soapenc:Array\“”, “”);

          IPoint mypoint = (IPoint)AGSUtil.deserializeArcObject(soapString, res.getServerContext());

          IWorkspaceEdit wse = (IWorkspaceEdit)iws;

          wse.startEditing(false);

          wse.startEditOperation();

          IFeatureClass featureclass = iws.openFeatureClass(“sde.DBO.Respt”);

          IFeature feature = featureclass.createFeature();

          feature.setShapeByRef((IGeometry)mypoint);

          feature.setValue(feature.getFields()。findField(“NAME”), “kkk”);

          feature.store();

          wse.stopEditOperation();

          wse.stopEditing(true);

          this.webContext.refresh();

          }catch(Exception e){

          e.printStackTrace();

          }

          }

          刷新地圖后不能顯示新加入的`數(shù)據(jù)的原因是:由于在開(kāi)始編輯時(shí)新打開(kāi)了一個(gè)工作空間,該工作空間并不是瀏覽器中看到地圖所在的工作空間。

        【Java實(shí)現(xiàn)點(diǎn)在線添加的方法】相關(guān)文章:

        Java如何實(shí)現(xiàn)點(diǎn)的在線添加10-08

        Java中g(shù)oto實(shí)現(xiàn)方法10-25

        java實(shí)現(xiàn)電腦定時(shí)關(guān)機(jī)的方法06-19

        Java動(dòng)態(tài)代理實(shí)現(xiàn)AOP的方法10-25

        java實(shí)現(xiàn)web服務(wù)器的方法11-14

        Java多線程的實(shí)現(xiàn)方式10-07

        關(guān)于JAVA實(shí)現(xiàn)httpClient的實(shí)例10-08

        實(shí)現(xiàn)鼠標(biāo)畫(huà)圖的Java程序10-25

        使用JavaScript實(shí)現(xiàn)Java的List功能11-13

        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码

        1. <tt id="5hhch"><source id="5hhch"></source></tt>
          1. <xmp id="5hhch"></xmp>

        2. <xmp id="5hhch"><rt id="5hhch"></rt></xmp>

          <rp id="5hhch"></rp>
              <dfn id="5hhch"></dfn>