| | |
| | | item, |
| | | text: item.mechanismName, |
| | | url: this.publicPath + 'img/icon/bubble.png', |
| | | anchor: [16, 34] |
| | | anchor: [16, 34], |
| | | event: (e) => { |
| | | that.mapPopup(item) |
| | | } |
| | | })) |
| | | }) |
| | | |
| | |
| | | let campusLayers = [ |
| | | { |
| | | key: 1, |
| | | tileUrl: "https://fkxt.jxstnu.edu.cn/changjing/arcgis/rest/services/ksd1/MapServer/tile/{z}/{y}/{x}", |
| | | center: [112.63716735643777, -0.087080937773012637833], |
| | | resolution: 0.00014276766034981682, |
| | | origin: [-400.0, 399.9999999999998], |
| | | tileUrl: "https://fkxt.jxstnu.edu.cn/changjing/arcgis/rest/services/ksd1206/MapServer/tile/{z}/{y}/{x}", |
| | | center: [10800, -4900], |
| | | resolution: 4.233341800016934, |
| | | origin: [-5123200.0, 10002100], |
| | | projection: 'EPSG:4548', |
| | | resolutions: [ |
| | | 0.00019035688046642243, 0.00014276766034981682, 0.00009517844023321122, |
| | | 0.00004758922011660561, |
| | | 16.933367200067735, 8.466683600033868, 4.233341800016934, |
| | | 2.116670900008467, 1.0583354500042335, 0.5291677250021167, |
| | | 0.26458386250105836 |
| | | ], |
| | | fullExtent: [ |
| | | 112.51302281804038, -0.17416638494176828, 112.76131189483516, |
| | | 0.000004509395743004334, |
| | | -0.5, -11468.5, 18506.5, |
| | | 0.5, |
| | | ], |
| | | polygonUrl: 'https://fkxt.jxstnu.edu.cn/changjing/lkarcgisapp' |
| | | }, |
| | |
| | | center: [115.79624983, 28.6416099], |
| | | resolution: 0.000007138383017490841, |
| | | origin: [-400.0, 400.0], |
| | | projection: '4548', |
| | | resolutions: [ |
| | | 0.000014276766034981682, 0.000007138383017490841, 0.00000475892201166056, |
| | | 0.00000237946100583028, |
| | |
| | | // 瓦片数据源 |
| | | const tileArcGISXYZ = new XYZ({ |
| | | tileGrid: tileGrid, |
| | | projection: "EPSG:4326", |
| | | // projection: curCampus.projection, |
| | | url: curCampus.tileUrl, |
| | | }) |
| | | |
| | |
| | | // 初始化中心点坐标 |
| | | center: curCampus.center, |
| | | resolution: curCampus.resolution, |
| | | projection: "EPSG:4326", |
| | | // projection: curCampus.projection, |
| | | extent: curCampus.fullExtent, |
| | | })) |
| | | } |
| | |
| | | // } |
| | | // return; |
| | | // } |
| | | this.map2D.getView().setCenter([112.63716735643777, -0.087080937773012637833]) |
| | | this.map2D.getView().setResolution(0.00009517844023321122) |
| | | this.map2D.getView().setCenter([11000, -4900]) |
| | | this.map2D.getView().setResolution(2.116670900008467) |
| | | }, |
| | | |
| | | openActivity () { |
| | |
| | | let campusLayers = [ |
| | | { |
| | | key: 1, |
| | | tileUrl: "https://fkxt.jxstnu.edu.cn/changjing/arcgis/rest/services/ksd1/MapServer/tile/{z}/{y}/{x}", |
| | | center: [112.63716735643777, -0.087080937773012637833], |
| | | resolution: 0.00014276766034981682, |
| | | origin: [-400.0, 399.9999999999998], |
| | | tileUrl: "https://fkxt.jxstnu.edu.cn/changjing/arcgis/rest/services/ksd1206/MapServer/tile/{z}/{y}/{x}", |
| | | center: [11000, -4900], |
| | | resolution: 2.116670900008467, |
| | | origin: [-5123200.0, 10002100], |
| | | projection: 'EPSG:4548', |
| | | resolutions: [ |
| | | 0.00019035688046642243, 0.00014276766034981682, 0.00009517844023321122, |
| | | 0.00004758922011660561, |
| | | 16.933367200067735, 8.466683600033868, 4.233341800016934, |
| | | 2.116670900008467, 1.0583354500042335, 0.5291677250021167, |
| | | 0.26458386250105836 |
| | | ], |
| | | fullExtent: [ |
| | | 112.51302281804038, -0.17416638494176828, 112.76131189483516, |
| | | 0.000004509395743004334, |
| | | -0.5, -11468.5, 18506.5, |
| | | 0.5, |
| | | ], |
| | | polygonUrl: 'https://fkxt.jxstnu.edu.cn/changjing/lkarcgisapp' |
| | | }, |
| | | |
| | | { |
| | | key: 2, |
| | | tileUrl: "https://dev.jxpskj.com:8023/arcgis156/rest/services/cc/MapServer/tile/{z}/{y}/{x}", |
| | |
| | | // 瓦片数据源 |
| | | const tileArcGISXYZ = new XYZ({ |
| | | tileGrid: tileGrid, |
| | | projection: "EPSG:4326", |
| | | url: curCampus.tileUrl, |
| | | }) |
| | | |
| | |
| | | // 初始化中心点坐标 |
| | | center: curCampus.center, |
| | | resolution: curCampus.resolution, |
| | | projection: "EPSG:4326", |
| | | extent: curCampus.fullExtent, |
| | | })) |
| | | }, |
| | |
| | | |
| | | import TilegridTileGrid from "ol/tilegrid/TileGrid"; |
| | | |
| | | const tileUrl = |
| | | "https://fkxt.jxstnu.edu.cn/changjing/arcgis/rest/services/ksd1/MapServer/tile/{z}/{y}/{x}"; |
| | | // 坐标原点 |
| | | const origin = [-400.0, 399.9999999999998]; |
| | | // 分辨率 |
| | | const resolutions = [ |
| | | 0.00019035688046642243, 0.00014276766034981682, 0.00009517844023321122, |
| | | 0.00004758922011660561, |
| | | ]; |
| | | const fullExtent = [ |
| | | 112.51302281804038, -0.17416638494176828, 112.76131189483516, |
| | | 0.000004509395743004334, |
| | | ]; |
| | | const tileGrid = new TilegridTileGrid({ |
| | | tileSize: 256, |
| | | origin: origin, |
| | | extent: fullExtent, |
| | | resolutions: resolutions, |
| | | }); |
| | | // 瓦片数据源 |
| | | const tileArcGISXYZ = new XYZ({ |
| | | tileGrid: tileGrid, |
| | | projection: "EPSG:4326", |
| | | url: tileUrl, |
| | | }); |
| | | |
| | | const openlayerData = { |
| | | state: { |
| | | mapscene: { |
| | |
| | | }, |
| | | openlayers: { |
| | | map2D: new OlMap({ |
| | | layers: [ |
| | | // 瓦片图层 |
| | | // new OlLayerTile({ |
| | | // source: tileArcGISXYZ, |
| | | // }), |
| | | ], |
| | | view: new OlView({ |
| | | // 初始化中心点坐标 |
| | | // center: [112.63716735643777, -0.087080937773012637833], |
| | | // 注意:此处指定缩放级别不能通过zoom来指定,指定了也无效,必须通过resolution来指定 |
| | | // resolution: 0.00014276766034981682, |
| | | projection: "EPSG:4326", |
| | | // extent: fullExtent, |
| | | }), |
| | | layers: [], |
| | | view: new OlView({}), |
| | | }), |
| | | map3D: null, |
| | | |