| | |
| | | import OlSourceOSM from "ol/source/OSM.js"; |
| | | import OlLayerTile from "ol/layer/Tile.js"; |
| | | import OlMap from "ol/Map.js"; |
| | | import { defaults as defaultInteractions } from "ol/interaction"; |
| | | |
| | | import XYZ from "ol/source/XYZ"; |
| | | |
| | |
| | | }, |
| | | openlayers: { |
| | | map2D: new OlMap({ |
| | | layers: [], |
| | | interactions: defaultInteractions({ |
| | | pinchRotate: false, // 移动端禁止地图旋转 |
| | | }), |
| | | layers: [ |
| | | /** |
| | | * new OlLayerTile({ |
| | | zIndex: 4, |
| | | title: "影像", |
| | | source: new XYZ({ |
| | | url: "http://t4.tianditu.com/DataServer?T=vec_w&tk=b9031f80391e6b65bd1dd80dcde1b097&x={x}&y={y}&l={z}", // 行政区划 |
| | | }), |
| | | }), |
| | | new OlLayerTile({ |
| | | zIndex: 5, |
| | | title: "影像", |
| | | source: new XYZ({ |
| | | url: "http://t4.tianditu.com/DataServer?T=cva_w&tk=b9031f80391e6b65bd1dd80dcde1b097&x={x}&y={y}&l={z}", // 行政区划 |
| | | }), |
| | | }), |
| | | */ |
| | | ], |
| | | view: new OlView({}), |
| | | }), |
| | | map3D: null, |