1 files modified
4 files added
| | |
| | | }, |
| | | mounted () { |
| | | //建立地图 |
| | | this.createmap(2); //1为本地 |
| | | |
| | | // 正式服务器上使用 |
| | | this.ol2d = new OlMap({ |
| | | layers: [ |
| | | new OlLayerTile({//矢量地图 |
| | | |
| | | source: new WMTS({ |
| | | url: "http://47.49.21.207:7001/PGIS_S_TileMapServer/Maps/YX", |
| | | layer: "JX14YGJCIMGL7_L14", |
| | | style: "default", |
| | | matrixSet: "JX14YGJCIMGL7_L14", |
| | | format: "image/png", |
| | | wrapX: true, |
| | | tileGrid: new WMTSTileGrid({ |
| | | origin: getTopLeft(projectionExtent), |
| | | //resolutions: res.slice(0, 15), |
| | | resolutions: resolutions, |
| | | matrixIds: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] |
| | | }) |
| | | }), |
| | | |
| | | }) |
| | | ], |
| | | |
| | | // 注意地图控件的写法 |
| | | controls: defaults().extend([ |
| | | new FullScreen(), |
| | | new ScaleLine(), |
| | | // new MousePosition(), |
| | | new Rotate(), |
| | | new Attribution() |
| | | ]), |
| | | target: 'track_map', |
| | | view: new OlView({ |
| | | center: [115.85883507433789, 28.708432053474827], |
| | | projection: projection, |
| | | zoom: 11, |
| | | maxZoom: 15, |
| | | minZoom: 1 |
| | | |
| | | }) |
| | | }) |
| | | this.createmap(1); //1为本地 |
| | | |
| | | this.parentParameter(); |
| | | |