166 lines
4.3 KiB
JavaScript
166 lines
4.3 KiB
JavaScript
|
|
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";
|
||
|
|
|
||
|
|
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,
|
||
|
|
},
|
||
|
|
"县界": {
|
||
|
|
"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;
|
||
|
|
}, {})
|
||
|
|
),
|
||
|
|
|
||
|
|
|
||
|
|
[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;
|