MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / redrawThematicFeatures

Method redrawThematicFeatures

src/openlayers/overlay/Label.js:135–144  ·  view source on GitHub ↗

* @function Label.prototype.redrawThematicFeatures * @description 重绘所有专题要素。 * 此方法包含绘制专题要素的所有步骤,包含用户数据到专题要素的转换,抽稀,缓存等步骤。 * 地图漫游时调用此方法进行图层刷新。 * @param {Array. } bounds - 重绘范围。

(bounds)

Source from the content-addressed store, hash-verified

133 * @param {Array.<number>} bounds - 重绘范围。
134 */
135 redrawThematicFeatures(bounds) {
136 if (this.features.length > 0 && this.labelFeatures.length === 0) {
137 var feats = this.setLabelsStyle(this.features);
138 for (var i = 0, len = feats.length; i < len; i++) {
139 this.labelFeatures.push(feats[i]);
140 }
141 }
142 this.features = this.getDrawnLabels(this.labelFeatures);
143 super.redrawThematicFeatures.call(this, bounds);
144 }
145 /**
146 * @function Label.prototype.removeFeatures
147 * @description 从专题图中删除要素。这个函数删除所有传递进来的矢量要素。

Callers 6

LabelSpec.jsFile · 0.45
GraphThemeLayer.jsFile · 0.45
ThemeLayer.jsFile · 0.45

Calls 3

setLabelsStyleMethod · 0.95
getDrawnLabelsMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected