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