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

Method addGraphics

src/openlayers/overlay/Graphic.js:285–290  ·  view source on GitHub ↗

* @function Graphic.prototype.addGraphics * @description 追加点要素,不会覆盖之前的要素。 * @param {Array. } graphics - 点要素对象数组。

(graphics)

Source from the content-addressed store, hash-verified

283 * @param {Array.<OverlayGraphic>} graphics - 点要素对象数组。
284 */
285 addGraphics(graphics) {
286 this.graphics = this.graphics || [];
287 let sGraphics = !Util.isArray(graphics) ? [graphics] : [].concat(graphics);
288 this.graphics = this.graphics.concat(sGraphics);
289 this.update();
290 }
291
292 /**
293 * @function Graphic.prototype.getGraphicBy

Callers 4

GraphicSpec.jsFile · 0.45

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected