arcgis for javascript ArcGISDynamicMapServiceLayer 过滤图层点
记录下过滤 ArcGISDynamicMapServiceLayer 图层服务的方法
- function filterArcGISDynamicMapServiceLayer(){
- map.graphics.clear();//清楚地图上现有的点
- var layerDefinitions = [];//定义过滤条件
- //过滤5个图层
- layerDefinitions[0] = "NAME_ = '11'";
- layerDefinitions[1] = "NAME_ = '高区' or NAME_ = '环翠区'";
- layerDefinitions[2] = "NAME_ = '0002'";
- layerDefinitions[3] = "NAME_ = '0002'";
- layerDefinitions[4] = "NAME_ = '0002'";
- layer1.setLayerDefinitions(layerDefinitions);//开始过滤
- map.addLayer(layer1);//将过滤结果添加到地图上
- return;
- }
最后没用上但是记录一下