()
| 743 | |
| 744 | // a method that can the viewport to be centred on the feature's extent |
| 745 | zoomTo() { |
| 746 | let extent = this.extent, |
| 747 | map = this.getMapEl()._map; |
| 748 | let tL = extent.topLeft.pcrs, |
| 749 | bR = extent.bottomRight.pcrs, |
| 750 | bound = bounds( |
| 751 | point(tL.horizontal, tL.vertical), |
| 752 | point(bR.horizontal, bR.vertical) |
| 753 | ), |
| 754 | center = map.options.crs.unproject(bound.getCenter(true)); |
| 755 | map.setView(center, this.getZoomToZoom(), { animate: false }); |
| 756 | } |
| 757 | whenReady() { |
| 758 | return new Promise((resolve, reject) => { |
| 759 | let interval, failureTimer; |
nothing calls this directly
no test coverage detected