AE 中的查詢與定位,以城市查詢為例

2021-09-08 19:11:58 字數 695 閱讀 8115

在文字框輸入乙個城市,在地圖上查詢,當找到後讓mapcontrol自動跳轉到地圖上該點。

iqueryfilter filter = new queryfilterclass();

filter.whereclause = " name='"+城市名稱+"'";

ifeatruesel.selectfeatures(filter, esriselectionresultenum.esriselectionresultnew, false);

ifeaturecursor cursor = ifeaturelay.search(filter, false);

ifeature feat = cursor.nextfeature();

if (feat != null)

catch (exception ex)

}system.runtime.interopservices.marshal.releasecomobject(cursor);

ae中將地圖頁面跳轉到指定座標點

p.x=已知點x座標;

p.y=已知點y座標;

mapcontrol1.extent.centerat(p);

參考文章

1. arcgis engine 當在文字框輸入乙個城市,在地圖上查詢

定位

AE中Identify查詢工具的實現

原文 ae中identify查詢工具的實現 主要實現點選查詢並閃爍顯示,並把查詢要素的資訊通過datagridview顯示出來,主要用到的介面 iidentity iarray iidentifyobj ifeatureobj irowidentifyobject ifeature igroupla...

MySQL中以日期為查詢條件的方法

假如有個表product有個字段add time,它的資料型別為datetime,有人可能會這樣寫sql 如下 複製 select from product where add time 2013 01 12 對於這種語句,如果你儲存的格式是yy mm dd是這樣的,那麼ok,如果你儲存的格式是 2...

MySQL中以日期為查詢條件的方法

1.儲存的格式是yy mm dd型別時查詢 假如表product有欄位add time,它的資料型別為datetime,寫sql如下 如下 複製 select from product where add time 2019 01 12 對於這種語句,適合儲存的格式是yy mm dd型別的 1.da...