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

Method setGraphics

src/openlayers/overlay/Graphic.js:272–278  ·  view source on GitHub ↗

* @function Graphic.prototype.setGraphics * @description 设置绘制的点要素,会覆盖之前的所有要素。 * @param {Array. } graphics - 点要素对象数组。

(graphics)

Source from the content-addressed store, hash-verified

270 * @param {Array.<OverlayGraphic>} graphics - 点要素对象数组。
271 */
272 setGraphics(graphics) {
273 this.graphics = this.graphics || [];
274 this.graphics.length = 0;
275 let sGraphics = !Util.isArray(graphics) ? [graphics] : [].concat(graphics);
276 this.graphics = [].concat(sGraphics);
277 this.update();
278 }
279
280 /**
281 * @function Graphic.prototype.addGraphics

Callers 4

GraphicSpec.jsFile · 0.45

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected