()
| 122 | } |
| 123 | |
| 124 | _getResolution() { |
| 125 | var bounds = this.map.getBounds(); |
| 126 | var dw = bounds.getEast() - bounds.getWest(); |
| 127 | var rect = this.map.getCanvas().getBoundingClientRect(); |
| 128 | var resolutionX = dw / rect.width; |
| 129 | // 一个像素是多少米 |
| 130 | return getMeterPerMapUnit('DEGREE') * resolutionX; |
| 131 | } |
| 132 | |
| 133 | _getCenterPixel() { |
| 134 | return this.map.project(new maplibregl.LngLat(0, 0)); |
nothing calls this directly
no test coverage detected