HOW TO
Instructions provided describe how to perform a Filter Query after a Buffer Query on the Same Map Object. When using ArcIMS Java Connector, if you attempt to perform a filter query after a buffer query, the filter query may fail, regardless whether the filter query is performed on the same layer as the buffer query or not.
The reason is that the Java Connector memorizes the previous buffer information and the filter query is not correctly built. The solution is to clear the previous buffer information completely before perform the filter query.
Code:
tLayer.getRecordset().clearRecordset();
tLayer.getRecordset().clearGeometry();
fLayer.setFilterObject(null);
tLayer.setFilterObject(null);
map.createBufferImage(false, false);
map.clearBuffer();
Code:
Map map2=new Map();
FeatureLayer selectLayer = (FeatureLayer)map2.getLayers().item(4);
Filter selectFilter= new Filter();
...
selectLayer.setFilterObject(selectFilter);
map2.refresh();
Recordset records =selectLayer.getRecordset();
Get help from ArcGIS experts
Download the Esri Support App