()
| 834 | } |
| 835 | |
| 836 | zoomTo() { |
| 837 | this.whenReady().then(() => { |
| 838 | let map = this.parentElement._map, |
| 839 | extent = this.extent, |
| 840 | tL = extent.topLeft.pcrs, |
| 841 | bR = extent.bottomRight.pcrs, |
| 842 | layerBounds = bounds( |
| 843 | point(tL.horizontal, tL.vertical), |
| 844 | point(bR.horizontal, bR.vertical) |
| 845 | ), |
| 846 | center = map.options.crs.unproject(layerBounds.getCenter(true)); |
| 847 | |
| 848 | let maxZoom = extent.zoom.maxZoom, |
| 849 | minZoom = extent.zoom.minZoom; |
| 850 | map.setView(center, Util.getMaxZoom(layerBounds, map, minZoom, maxZoom), { |
| 851 | animate: false |
| 852 | }); |
| 853 | }); |
| 854 | } |
| 855 | mapml2geojson(options = {}) { |
| 856 | return Util.mapml2geojson(this, options); |
| 857 | } |
no test coverage detected