C ArcEngine問題小結(一)

2021-05-24 14:35:25 字數 1390 閱讀 6045

1、mapcontrol的currenttool=null不起作用:

在vb中使用mapcontrol.currenttool=nothing即可,而使用c#就不靈了。解決辦法如下所示,先做一轉換即可。

imapcontrol2 pmainmap2=(imapcontrol2)axmapmain.object;

pmainmap2.currenttool=null;

2、toccontrol的hittest不起作用:

該問題與上一問題類似,做以下處理

itoccontrol ptoccontrol = (itoccontrol)axtocctrl.object;

ptoccontrol.hittest(e.x, e.y, ref item, ref map, ref layer, ref other, ref index);

3、通過toccontrol 控制項的事件調換圖層:

ilayer pmovelayer;  

int itolayerindex;

private void axtocctrl_onmousedown(object sender, axesri.arcgis.toccontrol.itoccontrolevents_onmousedownevent e)

else

axtocctrl.mousepointer=esricontrolsmousepointer.esripointerhotlink;}}

private void axtocctrl_onmouseup(object sender, axesri.arcgis.toccontrol.itoccontrolevents_onmouseupevent e)

pmap.movelayer(pmovelayer,itolayerindex);

axmapmain.activeview.refresh();}}

axtocctrl.mousepointer=esricontrolsmousepointer.esripointerarrow;

}  }

4、鷹眼的實現

private void drawmapeaglerect(imap pmap, int ired, int igreen, int iblue, int iwidth, object newenvelope) 

private void axmapmain_onmapreplaced(object sender, axesri.arcgis.mapcontrol.imapcontrolevents2_onmapreplacedevent e) 

}private void axmapeagle_onmousedown(object sender, axesri.arcgis.mapcontrol.imapcontrolevents2_onmousedownevent e) 

sql問題小結

1.不要使用不含有條件的語句,比如select from tablename,要加上where條件,並且 條件中滿足此表的所建立的索引 2.在加上條件的時候最好按照索引順序 3.盡量不使用not in,not exists 這樣的條件 4.在條件索引欄位上不要加上表示式,特別注意隱式轉換,比如cus...

linux epoll 問題小結

1,server端的fd不需要設定et模式 我們在建立socket成功後會有個listenfd,listenfd socket af inet,sock stream,0 然後會把這個fd加入epoll wait佇列中,網上很多沒有經過驗證的 是這樣寫的 ev.data.fd listenfd ev...

Jsp問題小結

今天,將專案放到伺服器上後,除錯專案時,發現了乙個問題 attribute value request.getparameter searchtype is quoted with which must be escaped when used within the value。源 如下 input...