* @function MapvLayer.prototype.onAdd * @description 添加该图层
(map)
| 41 | * @description 添加该图层 |
| 42 | */ |
| 43 | onAdd(map) { |
| 44 | this.map = map; |
| 45 | this.mapContainer = map.getCanvasContainer(); |
| 46 | this.renderer = new MapvRenderer(map, this.dataSet, this.options, { |
| 47 | transferCoordinate: this._transferCoordinate, |
| 48 | getCenterPixel: this._getCenterPixel, |
| 49 | getResolution: this._getResolution, |
| 50 | validZoom: this._validZoom.bind(this) |
| 51 | }, { id: this.id, targetElement: this.mapContainer, mapElement: this.map.getCanvas() }); |
| 52 | this.mapContainer.style.perspective = this.map.transform.cameraToCenterDistance + 'px'; |
| 53 | this._bindEvent(); |
| 54 | } |
| 55 | /** |
| 56 | * @function MapvLayer.prototype.onRemove |
| 57 | * @description 添加该图层 |
nothing calls this directly
no test coverage detected