* @function GraphicLayer.prototype.onAdd * @description 添加该图层。 * @param {maplibregl.Map} map - MapLibreGL Map 对象。
(map)
| 58 | * @param {maplibregl.Map} map - MapLibreGL Map 对象。 |
| 59 | */ |
| 60 | onAdd(map) { |
| 61 | this.map = map; |
| 62 | this.renderer = new GraphicLayerRenderer(this.id, this.options, { |
| 63 | getMapState: this.getMapState.bind(this) |
| 64 | }, { targetElement: this.map.getCanvasContainer(), mapElement: this.map.getCanvas() }); |
| 65 | } |
| 66 | /** |
| 67 | * @function GraphicLayer.prototype.render |
| 68 | * @description 添加该图层。 |
no test coverage detected