arcgis api for js 4.11最新版featurelayer中数据源使用source时,heatMap怎么出不来,也不报错

在网上看到一个用3.23版本featurelayer,数据源用的source可以使用热力图,为什么4.11不可以啊?求大神指教,万分感谢
已邀请:

AriaGIS

赞同来自:

匡匡

赞同来自:

const renderer = {
type: "heatmap",
filed:"num",
colorStops: [
{ color: "rgba(63, 40, 102, 0)", ratio: 0 },
{ color: "#472b77", ratio: 0.083 },
{ color: "#4e2d87", ratio: 0.166 },
{ color: "#563098", ratio: 0.249 },
{ color: "#5d32a8", ratio: 0.332 },
{ color: "#6735be", ratio: 0.415 },
{ color: "#7139d4", ratio: 0.498 },
{ color: "#7b3ce9", ratio: 0.581 },
{ color: "#853fff", ratio: 0.664 },
{ color: "#a46fbf", ratio: 0.747 },
{ color: "#c29f80", ratio: 0.83 },
{ color: "#e0cf40", ratio: 0.913 },
{ color: "#ffff00", ratio: 1 }
],
blurRadius : 8,
maxPixelIntensity: 10000,
minPixelIntensity: 0
};
//创建FeatureLayer图层
const featureLayer = new FeatureLayer({
source: features,
fields: [{
name: "num",
type: "integer",
alias: "num"
}],
objectIdField: "ObjectID",
geometryType: "point",
renderer: renderer
});
这个sorce:features是我自己的json数据,这样的featureLayer用这个heatmap不起作用。。。

__302

赞同来自:

大哥,你的问题解决了吗,我遇到了这个问题吗,我是4版本,然后map.add(featureLayer);之后报Error: multipleDefine错误
 

要回复问题请先登录注册