Browse Source

修改服务地址

Version1.0
yangzhou-cyber 3 years ago
parent
commit
41ba2abdd6
3 changed files with 18 additions and 20 deletions
  1. +1
    -1
      .env.production
  2. +16
    -18
      src/views/Home.vue
  3. +1
    -1
      vue.config.js

+ 1
- 1
.env.production View File

@@ -1 +1 @@
VUE_APP_BASE_URL="http://42.192.234.71:8888/geoserver/demo/wms"
VUE_APP_BASE_URL="http://gisvector.yunhengzhizao.cn:8080/geoserver/demo/wms"

+ 16
- 18
src/views/Home.vue View File

@@ -362,7 +362,7 @@ export default {
axios
.get(
"/api" +
"?service=WFS&version=1.0.0&request=GetFeature&typeName=demo%3Asample_all&maxFeatures=50"
"?service=WFS&version=1.0.0&request=GetFeature&typeName=demo%3Asample_10&maxFeatures=50"
)
.then((res) => {
let features = new WMSGetFeatureInfo().readFeatures(res.data);
@@ -449,7 +449,7 @@ export default {
let regions = [];
axios
.get(
"http://e9r5x7df.dongtaiyuming.net/arcgis/rest/services/demo/results/MapServer/legend?f=pjson"
"http://gisraster.yunhengzhizao.cn:8080/arcgis/rest/services/demo/results/MapServer/legend?f=pjson"
)
.then((res) => {
let layers = res.data.layers;
@@ -480,7 +480,7 @@ export default {
let adrainage = new VectorSource({});
axios
.get(
"?service=WFS&version=1.0.0&request=GetFeature&typeName=demo%3Adrainage&maxFeatures=50"
"?service=WFS&version=1.0.0&request=GetFeature&typeName=demo%3Adrainage_10&maxFeatures=50"
)
.then((res) => {
let features = new WMSGetFeatureInfo(res.data).readFeatures(res.data);
@@ -545,7 +545,7 @@ export default {
axios
.get(
"/api" +
"?service=WFS&version=1.0.0&request=GetFeature&typeName=demo%3Alanduse"
"?service=WFS&version=1.0.0&request=GetFeature&typeName=demo%3Alanduse_10"
)
.then((res) => {
let features = new WMSGetFeatureInfo().readFeatures(res.data);
@@ -576,24 +576,22 @@ export default {
// 加载切片服务
// 河道无人机影像(3条)
let resolutionsDong = [
52.91677250021167,
26.458386250105836,
13.229193125052918,
6.614596562526459,
3.9687579375158752,
2.6458386250105836,
1.3229193125052918,
0.7937515875031751,
16.933367200067735,
8.466683600033868,
4.233341800016934,
2.116670900008467,
1.0583354500042335,
0.5291677250021167,
0.26458386250105836,
0.13229193125052918,
0.06614596562526459,
];
let originDong = [-2.00377e7, 3.02411e7];
let extentDong = [
1.3208182632841771e7,
3745046.606619288,
1.3236917029063372e7,
3763312.538603185,
1.3208198745643739e7,
3756347.006403017,
1.3226878157502549e7,
3763622.8685917375,
];
let tileGridDong = new TileGrid({
tileSize: 128,
@@ -605,7 +603,7 @@ export default {
crossOrigin: "Anonymous",
tileUrlFunction: function (coordinate) {
return (
"http://e9r5x7df.dongtaiyuming.net/arcgis/rest/services/demo/photos/MapServer/tile/" +
"http://gisraster.yunhengzhizao.cn:8080/arcgis/rest/services/demo/photos/MapServer/tile/" +
coordinate[0] +
"/" +
coordinate[2] +
@@ -629,7 +627,7 @@ export default {
// params: { layers: "show:0" },
ratio: 1,
url:
"http://e9r5x7df.dongtaiyuming.net/arcgis/rest/services/demo/results/MapServer",
"http://gisraster.yunhengzhizao.cn:8080/arcgis/rest/services/demo/results/MapServer",
});
this.tileDong = new ImageLayer({
opacity: 0.8,

+ 1
- 1
vue.config.js View File

@@ -3,7 +3,7 @@ module.exports = {
devServer: {
proxy: {
'/api': {
target: 'http://42.192.234.71:8888/geoserver/demo/wms',
target: 'http://gisvector.yunhengzhizao.cn:8080/geoserver/demo/wms',
ws: true,
changeOrigin: true,
pathRewrite: {

Loading…
Cancel
Save