|
@@ -7,10 +7,85 @@ export const serviceArr = [
|
|
|
name: '区县',
|
|
|
visible: false,
|
|
|
opacity: 1,
|
|
|
- title: 'quxian',
|
|
|
- id: 'quxian',
|
|
|
- url: import.meta.env.VITE_LOCAL_CONTENT_URL + '/OneMapServer/rest/services/z02_district_boundary/MapServer',
|
|
|
- type: 'dynamic',
|
|
|
+ title: 'quxian-feature',
|
|
|
+ id: 'quxian-feature',
|
|
|
+ url: import.meta.env.VITE_LOCAL_CONTENT_URL + '/OneMapServer/rest/services/z02_district_boundary/MapServer/0',
|
|
|
+ type: 'feature',
|
|
|
+ renderer: {
|
|
|
+ type: 'simple',
|
|
|
+ symbol: {
|
|
|
+ type: 'simple-fill',
|
|
|
+ color: [25, 255, 236, 0.1],
|
|
|
+ outline: {
|
|
|
+ color: [255, 191, 0, 0.5],
|
|
|
+ width: 5,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ labelingInfo: {
|
|
|
+ labelPlacement: 'above-center',
|
|
|
+ labelExpressionInfo: {
|
|
|
+ value: '{NAME}',
|
|
|
+ },
|
|
|
+ symbol: {
|
|
|
+ type: 'label-3d',
|
|
|
+ symbolLayers: [
|
|
|
+ {
|
|
|
+ type: 'text',
|
|
|
+ material: {
|
|
|
+ color: 'white',
|
|
|
+ },
|
|
|
+ size: 32,
|
|
|
+ halo: {
|
|
|
+ color: [0, 0, 0, 0.7],
|
|
|
+ size: 2,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '街道',
|
|
|
+ visible: false,
|
|
|
+ opacity: 1,
|
|
|
+ title: 'street-feature',
|
|
|
+ id: 'street-feature',
|
|
|
+ url: import.meta.env.VITE_LOCAL_CONTENT_URL + '/OneMapServer/rest/services/z03_town_boundary/MapServer/0',
|
|
|
+ type: 'feature',
|
|
|
+ renderer: {
|
|
|
+ type: 'simple',
|
|
|
+ symbol: {
|
|
|
+ type: 'simple-fill',
|
|
|
+ color: [25, 255, 236, 0.1],
|
|
|
+ outline: {
|
|
|
+ color: [255, 191, 0, 0.5],
|
|
|
+ width: 5,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ labelingInfo: {
|
|
|
+ labelPlacement: 'above-center',
|
|
|
+ labelExpressionInfo: {
|
|
|
+ value: '{NAME}',
|
|
|
+ },
|
|
|
+ symbol: {
|
|
|
+ type: 'label-3d',
|
|
|
+ symbolLayers: [
|
|
|
+ {
|
|
|
+ type: 'text',
|
|
|
+ material: {
|
|
|
+ color: 'white',
|
|
|
+ },
|
|
|
+ size: 32,
|
|
|
+ halo: {
|
|
|
+ color: [0, 0, 0, 0.7],
|
|
|
+ size: 2,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
];
|
|
|
|
|
@@ -23,45 +98,22 @@ export function getGroupLayers(groupId) {
|
|
|
return serviceArr.filter((item) => item.group === groupId);
|
|
|
}
|
|
|
|
|
|
-export function initMap(bol) {
|
|
|
- let bm = getLayerInfo('JAWHITE');
|
|
|
- let cx = getLayerInfo('cx');
|
|
|
+export const districtArr = [
|
|
|
+ { id: 1, name: '浦东新区', pac: 310115 },
|
|
|
+ { id: 2, name: '长宁区', pac: 310105 },
|
|
|
+ { id: 3, name: '静安区', pac: 310106 },
|
|
|
+ { id: 4, name: '普陀区', pac: 310107 },
|
|
|
+ { id: 5, name: '杨浦区', pac: 310110 },
|
|
|
+ { id: 6, name: '虹口区', pac: 310109 },
|
|
|
+ { id: 7, name: '嘉定区', pac: 310114 },
|
|
|
+ { id: 8, name: '青浦区', pac: 310118 },
|
|
|
+ { id: 9, name: '宝山区', pac: 310113 },
|
|
|
+ { id: 10, name: '闵行区', pac: 310112 },
|
|
|
+ { id: 11, name: '徐汇区', pac: 310104 },
|
|
|
+ { id: 12, name: '黄浦区', pac: 310101 },
|
|
|
+ { id: 13, name: '松江区', pac: 310117 },
|
|
|
+ { id: 14, name: '奉献区', pac: 310120 },
|
|
|
+ { id: 15, name: '金山区', pac: 310116 },
|
|
|
+ { id: 16, name: '崇明区', pac: 310151 }
|
|
|
+]
|
|
|
|
|
|
- addMapLayer({
|
|
|
- ...bm,
|
|
|
- visible: bol,
|
|
|
- });
|
|
|
- addMapLayer({
|
|
|
- ...cx,
|
|
|
- url: cx.url + '/3',
|
|
|
- type: 'feature',
|
|
|
- visible: bol,
|
|
|
- renderer: {
|
|
|
- type: 'simple',
|
|
|
- symbol: {
|
|
|
- type: 'simple-fill',
|
|
|
- color: [25, 255, 236, 0.1],
|
|
|
- outline: {
|
|
|
- color: [255, 255, 255, 1],
|
|
|
- width: 1,
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- });
|
|
|
-}
|