arcgis for js 4.X 中 能否对MapImageLayer进行过滤?

如题,是否只能在FeatureLayer上进行过滤???
已邀请:

湫谷 - 一个刚开始接触WEBGIS的小萌新

赞同来自:

为了获取属性还是?如果自己写ajax的话就可以对返回的结果进行过滤了,如果是使用arcgis的js话,他好像是针对FeatureLayer的。
其次,MapImageLayer好像是切片?还是栅格?。。

ZGQ

赞同来自:

解决方案:
var layer = new MapImageLayer({
url: "https://sampleserver6.arcgison ... ot%3B,
sublayers: [
{ // sets a definition expression on sublayer 3
id: 3,
definitionExpression: "pop2000 > 40000000"
},
{ // sublayer 2 will be rendered as defined in the map service
id: 2
},
{ // sublayer 1 will be included in the layer, with visibility off
id: 1,
visible: false
},
{ // sublayer 0 will have new renderer and label
// expressions applied in the view on the fly
id: 0,
renderer: {
type: "class-breaks" // autocasts as new ClassBreaksRenderer()
// set renderer properties here
},
labelingInfo: [ new LabelClass ( ... ) ]
}
]
});
还是api看的不仔细....

要回复问题请先登录注册