The feature table does not work. To show a lot of data

435
0
11-21-2016 04:41 AM
ParkSeungHyun
New Contributor II

I changed the arcgis-js api version from 3.14 to 3.18. 

This is because the alias has not changed in 3.14.

But I faced one problem.

In 3.18, the feature table did not work when there was a lot of data.

I have compared the parameters of both.

<3.14>

http://localhost:8080/iOpenAPI/AGS/rest/services/CadastralMap/MapServer/13/query?f=json&returnIdsOnl... 

<3.18>

http://localhost:8080/iOpenAPI/AGS/rest/services/CadastralMap/MapServer/13/query?f=json&returnIdsOnl... 

The value of returnIdsOnly was different.

So I tried to change this parameter but I could not find a way.

How can I change this parameter?

Or how can I show a lot of data in the feature table?

this is my code. 

if(map.getLayer('FeatureTableLayer')) map.removeLayer(map.getLayer('FeatureTableLayer'));
if(krcgis.core.EventList['table.add']) krcgis.core.EventList['table.add'].remove(); //다른 레이어 선택시 중복 이벤트 제거.
var result_layer_list = [];
var selectLayerInfos = [];
if (!this.cboLayer.item) {
return;
}
var url = selectService.url + '/' + this.cboLayer.item.LYR_ID;

selectLayer = new FeatureLayer(url, {
mode: FeatureLayer.MODE_ONDEMAND, //여기를 좀 다른걸로 줘서 테스트해바바
// mode: FeatureLayer.MODE_SELECTION,
outFields: ["*"],
visible: false,
id: 'FeatureTableLayer'
});

if (!selectLayer) {
return; //피처 레이어 객체가 생성되지 않았을 경우.
}

if (this.InfoGrid) {
//console.log('infoGrid after create..', this.InfoGrid);
//infoGrid.destroyRecursive(true);
this.InfoGrid.destroy();
}
map.addLayer(selectLayer);
krcgis.core.EventList['table.add'] = map.on('layer-add',lang.hitch(this,function(e){
for(var key in e.layer.fields){
selectLayerInfos.push(e.layer.fields[key].name);
}
krcgis.Function.Dictionary.getList("FIELD",selectLayerInfos, lang.hitch(this,function(json){
for (var i=0 ; i<selectLayerInfos.length ; i++) {
var ename = selectLayerInfos;
var kname = ename;
if(json[ename]) kname = json[ename];
var result_layer_data = {
name: ename,
alias: kname
}
result_layer_list.push(result_layer_data);
}
this.InfoGrid.fieldInfos = result_layer_list;
this.InfoGrid.featureLayer.name = this.cboLayer.item.LYR_NM;
this.InfoGrid.startup();
}));
}));
var _div = dojo.place('<div id="_TableWidgetOnInfoGrid" style="width:100%;height:100%;"></div>', cpC.domNode);
this.InfoGrid = new FeatureTable({
featureLayer : selectLayer
}, _div.id);

0 Kudos
0 Replies