|
@@ -241,6 +241,7 @@ export default {
|
|
toggleVisibility() {
|
|
toggleVisibility() {
|
|
this.removeMapLayerQuery();
|
|
this.removeMapLayerQuery();
|
|
this.remove_query_click();
|
|
this.remove_query_click();
|
|
|
|
+ this.removeGeoJSON();
|
|
store.setToolBarAction(9);
|
|
store.setToolBarAction(9);
|
|
tdsy.remove(false);
|
|
tdsy.remove(false);
|
|
},
|
|
},
|
|
@@ -514,7 +515,6 @@ export default {
|
|
// 结果高亮
|
|
// 结果高亮
|
|
this.highlightResultsPng(xy.lng, xy.lat);
|
|
this.highlightResultsPng(xy.lng, xy.lat);
|
|
if (obj.serverType == "geoserver") {
|
|
if (obj.serverType == "geoserver") {
|
|
- console.log("----", obj);
|
|
|
|
this.getGeoserver(xy, obj);
|
|
this.getGeoserver(xy, obj);
|
|
} else {
|
|
} else {
|
|
if (!obj.source) {
|
|
if (!obj.source) {
|
|
@@ -632,28 +632,21 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async getGeoserver(xy, obj) {
|
|
async getGeoserver(xy, obj) {
|
|
- // url: obj.url, //'http://192.168.60.52:28085/geoserver/gwc/service/wmts';
|
|
|
|
-console.log("---a--a--a-a")
|
|
|
|
this.queryResults[obj.id] = [];
|
|
this.queryResults[obj.id] = [];
|
|
this.queryResultsGeom[obj.id] = [];
|
|
this.queryResultsGeom[obj.id] = [];
|
|
- let url = `${obj.url.substring(0, obj.url.indexOf("geoserver"))}/demo/wms`; //"http://192.168.60.52:28085/geoserver/wms";
|
|
|
|
|
|
+ let url = obj.url.substring(0, obj.url.indexOf("geoserver") + 9) + "/wms";
|
|
let params = {
|
|
let params = {
|
|
service: "WMS",
|
|
service: "WMS",
|
|
version: "1.1.1",
|
|
version: "1.1.1",
|
|
request: "GetFeatureInfo",
|
|
request: "GetFeatureInfo",
|
|
- // FORMAT: "image/png",
|
|
|
|
- transparent: true,
|
|
|
|
- query_layers: `${obj.fwgzkj}:${obj.fwmc}`,
|
|
|
|
- // STYLES: "",
|
|
|
|
layers: `${obj.fwgzkj}:${obj.fwmc}`,
|
|
layers: `${obj.fwgzkj}:${obj.fwmc}`,
|
|
- // exceptions: "application/vnd.ogc.se_inimage",
|
|
|
|
|
|
+ query_layers: `${obj.fwgzkj}:${obj.fwmc}`,
|
|
info_format: "application/json",
|
|
info_format: "application/json",
|
|
- // FEATURE_COUNT: 50,
|
|
|
|
- x: 19,
|
|
|
|
- y: 174,
|
|
|
|
srs: "EPSG:4326",
|
|
srs: "EPSG:4326",
|
|
- width: 256,
|
|
|
|
- height: 256,
|
|
|
|
|
|
+ x: 50,
|
|
|
|
+ y: 50,
|
|
|
|
+ width: 101,
|
|
|
|
+ height: 101,
|
|
bbox: bbox(xy, 10), // "12152284.626610054,2080930.4355590942,12153248.563804159,2081894.3727532008",
|
|
bbox: bbox(xy, 10), // "12152284.626610054,2080930.4355590942,12153248.563804159,2081894.3727532008",
|
|
};
|
|
};
|
|
let res = await axios.get(url, { params });
|
|
let res = await axios.get(url, { params });
|