()
| 114 | } |
| 115 | |
| 116 | _getResolution() { |
| 117 | var bounds = this.map.getBounds(); |
| 118 | var dw = bounds.getEast() - bounds.getWest(); |
| 119 | var rect = this.map.getCanvas().getBoundingClientRect(); |
| 120 | var resolutionX = dw / rect.width; |
| 121 | // 一个像素是多少米 |
| 122 | return getMeterPerMapUnit('DEGREE') * resolutionX; |
| 123 | } |
| 124 | |
| 125 | _getCenterPixel() { |
| 126 | return this.map.project(new mapboxgl.LngLat(0, 0)); |
nothing calls this directly
no test coverage detected