|
@@ -114,7 +114,7 @@
|
|
|
</div> -->
|
|
|
<a-upload
|
|
|
class="item"
|
|
|
- action="/server/api/shape/toJson"
|
|
|
+ action="/djycserver/api/shape/toJson"
|
|
|
:show-upload-list="false"
|
|
|
:on-success="handleSuccess"
|
|
|
accept=".shp"
|
|
@@ -600,7 +600,7 @@ import 'leaflet.markercluster/dist/MarkerCluster.Default.css';
|
|
|
import 'leaflet.markercluster';
|
|
|
import GetApi from '@/api/get';
|
|
|
import axios from 'axios';
|
|
|
-import { getWmtsLayer, getWmsLayer } from '@/utils/leaflet';
|
|
|
+import { getWmtsLayer } from '@/utils/leaflet';
|
|
|
import { PerfectScrollbar } from 'vue3-perfect-scrollbar';
|
|
|
import DjycApi from '@/api/djyc';
|
|
|
import AnalysisApi from '@/api/analysis';
|
|
@@ -614,7 +614,7 @@ import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
|
|
|
import * as turf from '@turf/turf';
|
|
|
import SettingPage from './SettingPage.vue';
|
|
|
import wkt from 'terraformer-wkt-parser';
|
|
|
-
|
|
|
+import Proj from "proj4leaflet";
|
|
|
const showLayerControl = ref(false);
|
|
|
const showLegend = ref(false);
|
|
|
const pageRef = ref();
|
|
@@ -1114,72 +1114,34 @@ const handleSuccess = (response) => {
|
|
|
};
|
|
|
const initMap = () => {
|
|
|
layers.value = window.AppGlobalConfig.layerTreeConfig;
|
|
|
- layers.value.forEach((item, index) => {
|
|
|
- if (index == 0) {
|
|
|
- item.layers.forEach((citem, cindex) => {
|
|
|
- if (cindex == 0) {
|
|
|
- citem.checked = true;
|
|
|
- } else {
|
|
|
- citem.checked = false;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- L.CRS.CustomEPSG4490 = L.extend({}, L.CRS.Earth, {
|
|
|
- code: 'EPSG:4490',
|
|
|
- projection: L.Projection.LonLat,
|
|
|
- transformation: new L.Transformation(1 / 180, 1, -1 / 180, 0.5),
|
|
|
- scale: function (zoom) {
|
|
|
- return 256 * Math.pow(2, zoom - 1);
|
|
|
- }
|
|
|
+ let CRS_4490 = new Proj.CRS('EPSG:4490', '+proj=longlat +ellps=GRS80 +no_defs', {
|
|
|
+ resolutions: [
|
|
|
+ 1.4062500262315807, 0.7031249999891485, 0.35156249999999994, 0.17578124999999997,
|
|
|
+ 0.08789062500000012, 0.04394531250000006, 0.021972656250000007, 0.01098632812500002,
|
|
|
+ 0.00549316406250001, 0.0027465820312500017, 0.0013732910156250009, 6.866455078124991e-4,
|
|
|
+ 3.4332275390624957e-4, 1.7166137695312503e-4, 8.583068847656251e-5, 4.291534423828141e-5,
|
|
|
+ 2.1457672119140645e-5, 1.0728836059570307e-5, 5.364418029785169e-6, 2.6822090642902305e-6,
|
|
|
+ 1.3411045333348457e-6
|
|
|
+ ],
|
|
|
+ origin: [-180, 90]
|
|
|
});
|
|
|
|
|
|
- let myCenter = new L.LatLng(form.value.latitude, form.value.longitude); // 设置地图中心
|
|
|
form.value.map = L.map(form.value.id, {
|
|
|
- center: myCenter,
|
|
|
- zoom: form.value.zoomLevel
|
|
|
+ zoom: window.AppGlobalConfig.mapOptions['zoom'],
|
|
|
+ center: window.AppGlobalConfig.mapOptions['center'],
|
|
|
+ crs: CRS_4490
|
|
|
});
|
|
|
|
|
|
- var tk = window.AppGlobalConfig.tk;
|
|
|
- // var tk = '44afc2274fd58544196a7baa2c56b1ab';
|
|
|
- // 添加天地图底图
|
|
|
- //底图
|
|
|
- imageryLayer = L.tileLayer(
|
|
|
- 'http://t{s}.tianditu.gov.cn/img_w/wmts?tk=' +
|
|
|
- tk +
|
|
|
- '&SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}',
|
|
|
- {
|
|
|
- subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
|
|
|
- zIndex: 1
|
|
|
- }
|
|
|
- );
|
|
|
- vectorLayer = L.tileLayer(
|
|
|
- 'https://t{s}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=' +
|
|
|
- tk,
|
|
|
- {
|
|
|
- subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
|
|
|
- transparent: true,
|
|
|
- zIndex: 2
|
|
|
- }
|
|
|
- );
|
|
|
-
|
|
|
- //注记
|
|
|
- const cia = L.tileLayer(
|
|
|
- 'http://t{s}.tianditu.gov.cn/cia_w/wmts?tk=' +
|
|
|
- tk +
|
|
|
- '&SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}',
|
|
|
- {
|
|
|
- subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
|
|
|
- transparent: true,
|
|
|
- zIndex: 3
|
|
|
- }
|
|
|
- );
|
|
|
- form.value.map.addLayer(cia);
|
|
|
openGeojsonLayers = L.featureGroup([]).addTo(form.value.map);
|
|
|
geojsonLayers = L.featureGroup([]).addTo(form.value.map);
|
|
|
bufferLayers = L.featureGroup([]).addTo(form.value.map);
|
|
|
markersLayers = L.markerClusterGroup();
|
|
|
- switchMapLayer(layers.value[0].layers[0]);
|
|
|
+ //默认加载所有选中图层
|
|
|
+ layers.value.forEach((layerGroup) => {
|
|
|
+ layerGroup.layers.forEach((oneLayer) => {
|
|
|
+ switchMapLayer(oneLayer);
|
|
|
+ });
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
const mapClick1 = (e) => {
|
|
@@ -1446,38 +1408,30 @@ const toggleCustom = () => {
|
|
|
const switchMapLayer = (item) => {
|
|
|
if (item.checked) {
|
|
|
if (item.layer === undefined || item.layer == null) {
|
|
|
- if (item.type == 'wmts') {
|
|
|
+ if (item.type == 'dynamic') {
|
|
|
+ item.layer = dynamicMapLayer({
|
|
|
+ layers: [0],
|
|
|
+ url: item.url,
|
|
|
+ f: 'image'
|
|
|
+ });
|
|
|
+ } else if (item.type == 'geoserver') {
|
|
|
+ item.layer = L.tileLayer.wms(item.url, {
|
|
|
+ // 链接要改对应的
|
|
|
+ layers: item.layername,
|
|
|
+ format: 'image/png',
|
|
|
+ layerID: Math.random(),
|
|
|
+ transparent: true
|
|
|
+ });
|
|
|
+ item.layer.setZIndex(item.zindex);
|
|
|
+ } else if (item.type == 'wmts') {
|
|
|
item.layer = getWmtsLayer(item);
|
|
|
- item.layer.setZIndex(100);
|
|
|
- form.value.map.addLayer(item.layer);
|
|
|
- } else if (item.type == 'wms') {
|
|
|
- item.layer = getWmsLayer(item);
|
|
|
- form.value.lastLayerId = item.id;
|
|
|
- item.layer.setZIndex(100);
|
|
|
- form.value.map.addLayer(item.layer);
|
|
|
- } else if (item.type == 'tdt') {
|
|
|
- if (item.id == 'image') {
|
|
|
- item.layer = imageryLayer;
|
|
|
- form.value.map.addLayer(item.layer);
|
|
|
- }
|
|
|
- if (item.id == 'dxt') {
|
|
|
- item.layer = vectorLayer;
|
|
|
- form.value.map.addLayer(item.layer);
|
|
|
- }
|
|
|
+ item.layer.setZIndex(item.zindex);
|
|
|
}
|
|
|
- } else {
|
|
|
- form.value.lastLayerId = item.id;
|
|
|
- form.value.map.addLayer(item.layer);
|
|
|
- }
|
|
|
- if (item.name == '基准地价') {
|
|
|
- showLegend.value = true;
|
|
|
- } else {
|
|
|
- showLegend.value = false;
|
|
|
}
|
|
|
+ form.value.map.addLayer(item.layer);
|
|
|
} else {
|
|
|
if (item.layer != undefined || item.layer != null) {
|
|
|
form.value.map.removeLayer(item.layer);
|
|
|
- showLegend.value = false;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -1582,7 +1536,7 @@ const submit = () => {
|
|
|
var c = country == '全部' ? '' : country;
|
|
|
var city_name = city + c;
|
|
|
GetApi.postData(
|
|
|
- `/lianqiai/predict_land_price?city_name=${city_name}&year=${year}&land_type=${target_column}&policy_factors=${zc}`
|
|
|
+ `/zjugisai/predict_land_price?city_name=${city_name}&year=${year}&land_type=${target_column}&policy_factors=${zc}`
|
|
|
)
|
|
|
.then((data) => {
|
|
|
// var data = {
|
|
@@ -3384,7 +3338,7 @@ const ycmxConditionChange = () => {
|
|
|
kljFlag.value = false;
|
|
|
// queryJzdjFeature();
|
|
|
//geoserver
|
|
|
- basePrice.value='';
|
|
|
+ basePrice.value = '';
|
|
|
queryJzdjGeoServerFeature();
|
|
|
}
|
|
|
};
|