arcgis api for javascript ClassBreaksRenderer渲染后,移动地图有卡顿

使用ClassBreaksRenderer 分级渲染移动地图时卡顿
// 定义线符号
var lineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASH, new Color([255, 0, 0]), 0.0001);
//定义面符号
var fill = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, lineSymbol, new Color("#FFFFCC"));
//定义分类渲染器,对字段alias进行渲染,fill是默认的渲染符号
var renderer = new ClassBreaksRenderer(fill, "Shape_Length");
//设置渲染间隔
renderer.addBreak(0.0007926193939076301, 0.010042750491546664, new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, lineSymbol, new Color([153,142,195])));
renderer.addBreak(0.010042750491546664, 0.028821227277051983, new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, lineSymbol, new Color([126, 183, 206])));
renderer.addBreak(0.028821227277051983, 0.055210211917812425, new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, lineSymbol, new Color([108,218,150])));
renderer.addBreak(0.055210211917812425, 0.16044285020276738, new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, lineSymbol, new Color([163, 230, 87])));
renderer.addBreak(0.16044285020276738, 0.4533346445096635, new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, lineSymbol, new Color([241, 163, 64])));
featureLayer.setRenderer(renderer);
但是用SimpleRenderer就不会
var render = new SimpleRenderer(new SimpleFillSymbol().setOutline(new SimpleLineSymbol().setWidth(0.0001).setColor(new Color([128, 128, 128]))));
var colors = [];
dojo.forEach(renderer.infos, function (info) {
colors.push(info.symbol.color);
});
render.setColorInfo({
field: "Shape_Length",
minDataValue: 0,
maxDataValue: 1,
colors: colors
});
featureLayer.setRenderer(render);
知道为什么吗
已邀请:

要回复问题请先登录注册