mcfxkh-Web/src/views/Home/MapCtrl/mapstyle/sources.js

284 lines
7.4 KiB
JavaScript
Raw Normal View History

2025-05-19 14:26:18 +08:00
import ContourLayer from "./contourlayer";
import RealDrpLayer from "./realdrplayer";
import RealHDLayer from "./realhdlayer";
import RealSkLayer from "./realsklayer";
import { DCPJ_TYPES } from "../../consts";
import WataLayer from "./watalayer";
import PlaneAreaLayer from "./planarealayer";
import YuwaiLayer from "./yuwailayer";
import PicStLayer from "./picstlayer";
import config from "../../../../config";
import PumpLayer from "./tmp/pumplayer";
import BxSkLayer from "./tmp/bxsk";
2025-05-26 16:26:39 +08:00
import BxjcLayer from './bxjclayer'
import SyjcLayer from './syjclayer'
import SljcLayer from './sljclayer'
import ByjcLayer from "./byjclayer";
import ShuiZhaLayer from "./shuizhalayer";
import BzLayer from "./bzlayer";
import SbLayer from "./sblayer";
import QdLayer from "./qdlayer";
import ShuizhiLayer from "./shuizhilayer";
import TrsqLayer from "./trsqlayer";
2025-05-28 15:09:02 +08:00
import ShuichangLayer from "./shuichangLayer";
import ShuiyuandiLayer from "./shuiyuandiLayer";
2025-05-26 16:26:39 +08:00
2025-05-19 14:26:18 +08:00
const hash = window.location.origin;
const sources = {
"mapbox-dem": {
'type': 'raster-dem',
'url': `${hash}/data/dem.json`,
'tileSize': 512,
'maxzoom': 12
},
"mapbox-demrgb": {
'type': 'raster-dem',
'url': `${hash}/data/dem.json`,
},
"mapbox-dom": {
'type': 'raster',
'tiles': [
`http://res3dstatic0.cloudowr.cn/${config.address}/dom2/{z}/{x}/{y}.png`,
`http://res3dstatic1.cloudowr.cn/${config.address}/dom2/{z}/{x}/{y}.png`,
`http://res3dstatic2.cloudowr.cn/${config.address}/dom2/{z}/{x}/{y}.png`,
`http://res3dstatic3.cloudowr.cn/${config.address}/dom2/{z}/{x}/{y}.png`,
`http://res3dstatic4.cloudowr.cn/${config.address}/dom2/{z}/{x}/{y}.png`,
`http://res3dstatic5.cloudowr.cn/${config.address}/dom2/{z}/{x}/{y}.png`,
`http://res3dstatic6.cloudowr.cn/${config.address}/dom2/{z}/{x}/{y}.png`,
`http://res3dstatic7.cloudowr.cn/${config.address}/dom2/{z}/{x}/{y}.png`,
],
'tileSize': 256,
'minzoom': 1,
'maxzoom': 18,
},
2025-05-21 09:17:19 +08:00
//热力图
"heatmapImg": {
'type': 'image',
'url': `${hash}/assets/bg.png`,
'coordinates': [
// 图片覆盖地图的四至点
[114.6710271999999929, 31.6068084090000987], // 左上
[115.4557823634995805, 31.6068084090000987], // 右上
[115.4907823634995805, 30.8713739500000008], // 右下
[114.7460271999999929, 30.8613739500000008], // 左下
],
},
2025-05-28 17:05:53 +08:00
//灌区图
"gqmapImg": {
'type': 'image',
'url': `${hash}/assets/gqbg.png`,
2025-05-29 11:46:29 +08:00
// 'coordinates': [
// // 图片覆盖地图的四至点
// [114.8510271999999929, 31.2068084090000987], // 左上
2025-05-28 17:05:53 +08:00
2025-05-29 11:46:29 +08:00
// [115.0357823634995805, 31.1568084090000987], // 右上
2025-05-28 17:05:53 +08:00
2025-05-29 11:46:29 +08:00
// [115.0707823634995805, 30.9913739500000008], // 右下
2025-05-28 17:05:53 +08:00
2025-05-29 11:46:29 +08:00
// [114.6660271999999929, 30.9913739500000008], // 左下
// ],
'coordinates': [
[114.818962 , 31.291471], // 左上
[115.027001, 31.231773], // 右上
[115.0707823634995805, 30.9913739500000008], // 右下
[114.687749, 30.963712], // 左下
]
2025-05-28 17:05:53 +08:00
},
// 管网图
"gwImg": {
'type': 'image',
'url': `${hash}/assets/gwbg.png`,
'coordinates': [
// 图片覆盖地图的四至点
[114.5510271999999929, 31.4068084090000987], // 左上
[115.5357823634995805, 31.4068084090000987], // 右上
[115.4947823634995805, 30.9713739500000288], // 右下
[114.9490271999999929, 30.8613739500000288], // 左下
],
},
2025-05-19 14:26:18 +08:00
"县界": {
"data": `${hash}/mapbox/geojson/县界.geojson`,
"type": "geojson"
},
"乡镇边界": {
"data": `${hash}/mapbox/geojson/乡镇边界.geojson`,
"type": "geojson"
},
"水系": {
"data": `${hash}/mapbox/geojson/水系.geojson`,
"type": "geojson"
},
"河流": {
"data": `${hash}/mapbox/geojson/RIVL.geojson`,
"type": "geojson"
},
"adcd": {
"data": `${hash}/data/adcd.geojson`,
"type": "geojson"
},
/*
"绿色区域": {
"data": `${hash}/mapbox/geojson/绿色区域.geojson`,
"type": "geojson"
},
*/
"高速": {
"data": `${hash}/mapbox/geojson/高速.geojson`,
"type": "geojson"
},
"国道": {
"data": `${hash}/mapbox/geojson/国道.geojson`,
"type": "geojson"
},
"铁路": {
"data": `${hash}/mapbox/geojson/铁路.geojson`,
"type": "geojson"
},
"省道": {
"data": `${hash}/mapbox/geojson/省道.geojson`,
"type": "geojson"
},
"县道": {
"data": `${hash}/mapbox/geojson/县道.geojson`,
"type": "geojson"
},
"高速引路": {
"data": `${hash}/mapbox/geojson/高速引路.geojson`,
"type": "geojson"
},
...(
Object.keys(DCPJ_TYPES).reduce((total, cur) => {
total[DCPJ_TYPES[cur]] = {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
};
return total;
}, {})
),
2025-05-26 16:26:39 +08:00
//新图层
[BxjcLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[SyjcLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[SljcLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[ByjcLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[ShuiZhaLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[BzLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[SbLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[QdLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[ShuizhiLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[TrsqLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
2025-05-28 15:09:02 +08:00
[ShuichangLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[ShuiyuandiLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
2025-05-19 14:26:18 +08:00
[RealDrpLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[RealHDLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[RealSkLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[PicStLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[YuwaiLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[BxSkLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[ContourLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[ContourLayer.LabelSourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[PlaneAreaLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[WataLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
[PumpLayer.SourceName]: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
highlight: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
fzdx: {
type: 'geojson',
data: { type: 'FeatureCollection', features: [] },
},
};
export default sources;