src/model/map/OLMap.ts
@@ -267,6 +267,24 @@ olZoom.style.display = 'none'; } /** * 放大地图 */ zoomIn() { const view = this.map.getView(); const zoom = view.getZoom(); view.setZoom(zoom + 1); } /** * 缩小地图 */ zoomOut() { const view = this.map.getView(); const zoom = view.getZoom(); view.setZoom(zoom - 1); } getWMTS = () => { const projection = getProjection('EPSG:3857'); const projectionExtent = projection.getExtent();