没用过iclient 8c for JavaScript,但思路是相通的,先来抛砖引玉。
要实现你的要求,应该是sql查询+矢量裁剪分析+图层切换
示例代码分别如下
http://iclient.supermapol.com/examples/leaflet/editor.html#02_getFeatureBySQL
http://iclient.supermapol.com/examples/leaflet/editor.html#vectorClipJobService
http://iclient.supermapol.com/examples/leaflet/editor.html#controler_layerswitcher