diff --git a/src/assets/geojson/projectionArea.json b/src/assets/geojson/projectionArea.json new file mode 100644 index 0000000..f5bfab8 --- /dev/null +++ b/src/assets/geojson/projectionArea.json @@ -0,0 +1,357 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 114.33515823920274, + 34.822454264097516 + ], + [ + 114.33453957934123, + 34.820265159972152 + ], + [ + 114.33349261649866, + 34.817980877406555 + ], + [ + 114.33192217223481, + 34.815839362501308 + ], + [ + 114.33120833393306, + 34.814173739797219 + ], + [ + 114.33025654953073, + 34.811889457231622 + ], + [ + 114.32997101421003, + 34.809890709986725 + ], + [ + 114.32934283650448, + 34.807711123705381 + ], + [ + 114.32831782066461, + 34.804436014923141 + ], + [ + 114.32785782979738, + 34.803056042321487 + ], + [ + 114.3275534818281, + 34.801733917658737 + ], + [ + 114.32745513077317, + 34.800528324082443 + ], + [ + 114.32655093559096, + 34.797101900234047 + ], + [ + 114.32674129247143, + 34.796530829592648 + ], + [ + 114.32774066609387, + 34.795531455970192 + ], + [ + 114.32807379063469, + 34.794960385328793 + ], + [ + 114.32602745416968, + 34.786965396349203 + ], + [ + 114.3260417309357, + 34.786380048941766 + ], + [ + 114.32599176225459, + 34.785665020909519 + ], + [ + 114.340238785027, + 34.783285559903689 + ], + [ + 114.34392694958605, + 34.782482491814221 + ], + [ + 114.34749614109481, + 34.782095829400774 + ], + [ + 114.35279044183278, + 34.781738910249899 + ], + [ + 114.35817397235847, + 34.78123327478616 + ], + [ + 114.35897704044793, + 34.783374789691401 + ], + [ + 114.36022625747599, + 34.786200399635824 + ], + [ + 114.36135650145376, + 34.788044481915342 + ], + [ + 114.36263546174439, + 34.790929578384919 + ], + [ + 114.36320058373327, + 34.793606472016478 + ], + [ + 114.36311135394556, + 34.794915175569685 + ], + [ + 114.36379663871526, + 34.797542100520133 + ], + [ + 114.36419638816425, + 34.798798455931212 + ], + [ + 114.36476745880564, + 34.799369526572612 + ], + [ + 114.36528142238289, + 34.799997704278155 + ], + [ + 114.36573827889602, + 34.800911417304391 + ], + [ + 114.36642356366571, + 34.804794697665912 + ], + [ + 114.36579538596015, + 34.805422875371455 + ], + [ + 114.36705174137124, + 34.810448297015775 + ], + [ + 114.3687078462313, + 34.817529572969129 + ], + [ + 114.36887916742371, + 34.819299891957471 + ], + [ + 114.35517347203012, + 34.821241532138231 + ], + [ + 114.3478637678202, + 34.822440780485167 + ], + [ + 114.34575080644703, + 34.822440780485167 + ], + [ + 114.34215306140621, + 34.822326566356885 + ], + [ + 114.33935481526335, + 34.822326566356885 + ], + [ + 114.3361568196715, + 34.822554994613448 + ], + [ + 114.33521455311319, + 34.822712039039835 + ], + [ + 114.33515823920274, + 34.822454264097516 + ] + ] + ] + }, + "properties": { + "FID": 0, + "Id": 0, + "fillcolor": "#23d96e" + } + }, + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 114.36743245513225, + 34.800673471203794 + ], + [ + 114.38147127506663, + 34.800625881983677 + ], + [ + 114.38139989123646, + 34.78699157042027 + ], + [ + 114.38175681038733, + 34.779639035912254 + ], + [ + 114.36690897371095, + 34.779995955063129 + ], + [ + 114.36141241878748, + 34.780781177195053 + ], + [ + 114.36098887472845, + 34.781861452491704 + ], + [ + 114.36017985798647, + 34.783384307535435 + ], + [ + 114.3617027130302, + 34.785811357761382 + ], + [ + 114.362844854313, + 34.787572158905697 + ], + [ + 114.36336833573428, + 34.789285370829894 + ], + [ + 114.36417735247626, + 34.791379296515025 + ], + [ + 114.36455806623719, + 34.793425632980039 + ], + [ + 114.36484360155789, + 34.795329201784703 + ], + [ + 114.36555743985964, + 34.797375538249717 + ], + [ + 114.36627127816139, + 34.798708036412982 + ], + [ + 114.36679475958267, + 34.799326696274505 + ], + [ + 114.36722306256372, + 34.800135713016488 + ], + [ + 114.36743245513225, + 34.800673471203794 + ] + ] + ] + }, + "properties": { + "FID": 1, + "Id": 0, + "fillcolor": "rgba(251, 194, 26,1)" + } + }, + { + "type": "Feature", + "id": 2, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 114.18067926835914, + 34.796982927183748 + ], + [ + 114.23036241416088, + 34.797839533145847 + ], + [ + 114.23000549501, + 34.780707413903869 + ], + [ + 114.22864920223668, + 34.780850181564219 + ], + [ + 114.19538433737517, + 34.774354253018302 + ], + [ + 114.18524783349034, + 34.772212738113055 + ], + [ + 114.18596167179209, + 34.782135090507367 + ], + [ + 114.18546198498086, + 34.786989190959261 + ], + [ + 114.18067926835914, + 34.796982927183748 + ] + ] + ] + }, + "properties": { + "FID": 2, + "Id": 0, + "fillcolor": "rgba(232, 64, 51,1)" + } + } + ] +} \ No newline at end of file diff --git a/src/assets/geojson/projectionArea.json b/src/assets/geojson/projectionArea.json new file mode 100644 index 0000000..f5bfab8 --- /dev/null +++ b/src/assets/geojson/projectionArea.json @@ -0,0 +1,357 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 114.33515823920274, + 34.822454264097516 + ], + [ + 114.33453957934123, + 34.820265159972152 + ], + [ + 114.33349261649866, + 34.817980877406555 + ], + [ + 114.33192217223481, + 34.815839362501308 + ], + [ + 114.33120833393306, + 34.814173739797219 + ], + [ + 114.33025654953073, + 34.811889457231622 + ], + [ + 114.32997101421003, + 34.809890709986725 + ], + [ + 114.32934283650448, + 34.807711123705381 + ], + [ + 114.32831782066461, + 34.804436014923141 + ], + [ + 114.32785782979738, + 34.803056042321487 + ], + [ + 114.3275534818281, + 34.801733917658737 + ], + [ + 114.32745513077317, + 34.800528324082443 + ], + [ + 114.32655093559096, + 34.797101900234047 + ], + [ + 114.32674129247143, + 34.796530829592648 + ], + [ + 114.32774066609387, + 34.795531455970192 + ], + [ + 114.32807379063469, + 34.794960385328793 + ], + [ + 114.32602745416968, + 34.786965396349203 + ], + [ + 114.3260417309357, + 34.786380048941766 + ], + [ + 114.32599176225459, + 34.785665020909519 + ], + [ + 114.340238785027, + 34.783285559903689 + ], + [ + 114.34392694958605, + 34.782482491814221 + ], + [ + 114.34749614109481, + 34.782095829400774 + ], + [ + 114.35279044183278, + 34.781738910249899 + ], + [ + 114.35817397235847, + 34.78123327478616 + ], + [ + 114.35897704044793, + 34.783374789691401 + ], + [ + 114.36022625747599, + 34.786200399635824 + ], + [ + 114.36135650145376, + 34.788044481915342 + ], + [ + 114.36263546174439, + 34.790929578384919 + ], + [ + 114.36320058373327, + 34.793606472016478 + ], + [ + 114.36311135394556, + 34.794915175569685 + ], + [ + 114.36379663871526, + 34.797542100520133 + ], + [ + 114.36419638816425, + 34.798798455931212 + ], + [ + 114.36476745880564, + 34.799369526572612 + ], + [ + 114.36528142238289, + 34.799997704278155 + ], + [ + 114.36573827889602, + 34.800911417304391 + ], + [ + 114.36642356366571, + 34.804794697665912 + ], + [ + 114.36579538596015, + 34.805422875371455 + ], + [ + 114.36705174137124, + 34.810448297015775 + ], + [ + 114.3687078462313, + 34.817529572969129 + ], + [ + 114.36887916742371, + 34.819299891957471 + ], + [ + 114.35517347203012, + 34.821241532138231 + ], + [ + 114.3478637678202, + 34.822440780485167 + ], + [ + 114.34575080644703, + 34.822440780485167 + ], + [ + 114.34215306140621, + 34.822326566356885 + ], + [ + 114.33935481526335, + 34.822326566356885 + ], + [ + 114.3361568196715, + 34.822554994613448 + ], + [ + 114.33521455311319, + 34.822712039039835 + ], + [ + 114.33515823920274, + 34.822454264097516 + ] + ] + ] + }, + "properties": { + "FID": 0, + "Id": 0, + "fillcolor": "#23d96e" + } + }, + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 114.36743245513225, + 34.800673471203794 + ], + [ + 114.38147127506663, + 34.800625881983677 + ], + [ + 114.38139989123646, + 34.78699157042027 + ], + [ + 114.38175681038733, + 34.779639035912254 + ], + [ + 114.36690897371095, + 34.779995955063129 + ], + [ + 114.36141241878748, + 34.780781177195053 + ], + [ + 114.36098887472845, + 34.781861452491704 + ], + [ + 114.36017985798647, + 34.783384307535435 + ], + [ + 114.3617027130302, + 34.785811357761382 + ], + [ + 114.362844854313, + 34.787572158905697 + ], + [ + 114.36336833573428, + 34.789285370829894 + ], + [ + 114.36417735247626, + 34.791379296515025 + ], + [ + 114.36455806623719, + 34.793425632980039 + ], + [ + 114.36484360155789, + 34.795329201784703 + ], + [ + 114.36555743985964, + 34.797375538249717 + ], + [ + 114.36627127816139, + 34.798708036412982 + ], + [ + 114.36679475958267, + 34.799326696274505 + ], + [ + 114.36722306256372, + 34.800135713016488 + ], + [ + 114.36743245513225, + 34.800673471203794 + ] + ] + ] + }, + "properties": { + "FID": 1, + "Id": 0, + "fillcolor": "rgba(251, 194, 26,1)" + } + }, + { + "type": "Feature", + "id": 2, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 114.18067926835914, + 34.796982927183748 + ], + [ + 114.23036241416088, + 34.797839533145847 + ], + [ + 114.23000549501, + 34.780707413903869 + ], + [ + 114.22864920223668, + 34.780850181564219 + ], + [ + 114.19538433737517, + 34.774354253018302 + ], + [ + 114.18524783349034, + 34.772212738113055 + ], + [ + 114.18596167179209, + 34.782135090507367 + ], + [ + 114.18546198498086, + 34.786989190959261 + ], + [ + 114.18067926835914, + 34.796982927183748 + ] + ] + ] + }, + "properties": { + "FID": 2, + "Id": 0, + "fillcolor": "rgba(232, 64, 51,1)" + } + } + ] +} \ No newline at end of file diff --git a/src/assets/geojson/projectionAreaLabel.json b/src/assets/geojson/projectionAreaLabel.json new file mode 100644 index 0000000..8597759 --- /dev/null +++ b/src/assets/geojson/projectionAreaLabel.json @@ -0,0 +1,50 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Point", + "coordinates": [ + 114.34610027040698, + 34.800716430942813 + ] + }, + "properties": { + "FID": 0, + "name": "古城片区" + } + }, + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "Point", + "coordinates": [ + 114.3772812270181, + 34.787081190124404 + ] + }, + "properties": { + "FID": 1, + "name": "城东南片区" + } + }, + { + "type": "Feature", + "id": 2, + "geometry": { + "type": "Point", + "coordinates": [ + 114.2112469089431, + 34.788007856976151 + ] + }, + "properties": { + "FID": 2, + "name": "保税区片区" + } + } + ] +} \ No newline at end of file diff --git a/src/assets/geojson/projectionArea.json b/src/assets/geojson/projectionArea.json new file mode 100644 index 0000000..f5bfab8 --- /dev/null +++ b/src/assets/geojson/projectionArea.json @@ -0,0 +1,357 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 114.33515823920274, + 34.822454264097516 + ], + [ + 114.33453957934123, + 34.820265159972152 + ], + [ + 114.33349261649866, + 34.817980877406555 + ], + [ + 114.33192217223481, + 34.815839362501308 + ], + [ + 114.33120833393306, + 34.814173739797219 + ], + [ + 114.33025654953073, + 34.811889457231622 + ], + [ + 114.32997101421003, + 34.809890709986725 + ], + [ + 114.32934283650448, + 34.807711123705381 + ], + [ + 114.32831782066461, + 34.804436014923141 + ], + [ + 114.32785782979738, + 34.803056042321487 + ], + [ + 114.3275534818281, + 34.801733917658737 + ], + [ + 114.32745513077317, + 34.800528324082443 + ], + [ + 114.32655093559096, + 34.797101900234047 + ], + [ + 114.32674129247143, + 34.796530829592648 + ], + [ + 114.32774066609387, + 34.795531455970192 + ], + [ + 114.32807379063469, + 34.794960385328793 + ], + [ + 114.32602745416968, + 34.786965396349203 + ], + [ + 114.3260417309357, + 34.786380048941766 + ], + [ + 114.32599176225459, + 34.785665020909519 + ], + [ + 114.340238785027, + 34.783285559903689 + ], + [ + 114.34392694958605, + 34.782482491814221 + ], + [ + 114.34749614109481, + 34.782095829400774 + ], + [ + 114.35279044183278, + 34.781738910249899 + ], + [ + 114.35817397235847, + 34.78123327478616 + ], + [ + 114.35897704044793, + 34.783374789691401 + ], + [ + 114.36022625747599, + 34.786200399635824 + ], + [ + 114.36135650145376, + 34.788044481915342 + ], + [ + 114.36263546174439, + 34.790929578384919 + ], + [ + 114.36320058373327, + 34.793606472016478 + ], + [ + 114.36311135394556, + 34.794915175569685 + ], + [ + 114.36379663871526, + 34.797542100520133 + ], + [ + 114.36419638816425, + 34.798798455931212 + ], + [ + 114.36476745880564, + 34.799369526572612 + ], + [ + 114.36528142238289, + 34.799997704278155 + ], + [ + 114.36573827889602, + 34.800911417304391 + ], + [ + 114.36642356366571, + 34.804794697665912 + ], + [ + 114.36579538596015, + 34.805422875371455 + ], + [ + 114.36705174137124, + 34.810448297015775 + ], + [ + 114.3687078462313, + 34.817529572969129 + ], + [ + 114.36887916742371, + 34.819299891957471 + ], + [ + 114.35517347203012, + 34.821241532138231 + ], + [ + 114.3478637678202, + 34.822440780485167 + ], + [ + 114.34575080644703, + 34.822440780485167 + ], + [ + 114.34215306140621, + 34.822326566356885 + ], + [ + 114.33935481526335, + 34.822326566356885 + ], + [ + 114.3361568196715, + 34.822554994613448 + ], + [ + 114.33521455311319, + 34.822712039039835 + ], + [ + 114.33515823920274, + 34.822454264097516 + ] + ] + ] + }, + "properties": { + "FID": 0, + "Id": 0, + "fillcolor": "#23d96e" + } + }, + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 114.36743245513225, + 34.800673471203794 + ], + [ + 114.38147127506663, + 34.800625881983677 + ], + [ + 114.38139989123646, + 34.78699157042027 + ], + [ + 114.38175681038733, + 34.779639035912254 + ], + [ + 114.36690897371095, + 34.779995955063129 + ], + [ + 114.36141241878748, + 34.780781177195053 + ], + [ + 114.36098887472845, + 34.781861452491704 + ], + [ + 114.36017985798647, + 34.783384307535435 + ], + [ + 114.3617027130302, + 34.785811357761382 + ], + [ + 114.362844854313, + 34.787572158905697 + ], + [ + 114.36336833573428, + 34.789285370829894 + ], + [ + 114.36417735247626, + 34.791379296515025 + ], + [ + 114.36455806623719, + 34.793425632980039 + ], + [ + 114.36484360155789, + 34.795329201784703 + ], + [ + 114.36555743985964, + 34.797375538249717 + ], + [ + 114.36627127816139, + 34.798708036412982 + ], + [ + 114.36679475958267, + 34.799326696274505 + ], + [ + 114.36722306256372, + 34.800135713016488 + ], + [ + 114.36743245513225, + 34.800673471203794 + ] + ] + ] + }, + "properties": { + "FID": 1, + "Id": 0, + "fillcolor": "rgba(251, 194, 26,1)" + } + }, + { + "type": "Feature", + "id": 2, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 114.18067926835914, + 34.796982927183748 + ], + [ + 114.23036241416088, + 34.797839533145847 + ], + [ + 114.23000549501, + 34.780707413903869 + ], + [ + 114.22864920223668, + 34.780850181564219 + ], + [ + 114.19538433737517, + 34.774354253018302 + ], + [ + 114.18524783349034, + 34.772212738113055 + ], + [ + 114.18596167179209, + 34.782135090507367 + ], + [ + 114.18546198498086, + 34.786989190959261 + ], + [ + 114.18067926835914, + 34.796982927183748 + ] + ] + ] + }, + "properties": { + "FID": 2, + "Id": 0, + "fillcolor": "rgba(232, 64, 51,1)" + } + } + ] +} \ No newline at end of file diff --git a/src/assets/geojson/projectionAreaLabel.json b/src/assets/geojson/projectionAreaLabel.json new file mode 100644 index 0000000..8597759 --- /dev/null +++ b/src/assets/geojson/projectionAreaLabel.json @@ -0,0 +1,50 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Point", + "coordinates": [ + 114.34610027040698, + 34.800716430942813 + ] + }, + "properties": { + "FID": 0, + "name": "古城片区" + } + }, + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "Point", + "coordinates": [ + 114.3772812270181, + 34.787081190124404 + ] + }, + "properties": { + "FID": 1, + "name": "城东南片区" + } + }, + { + "type": "Feature", + "id": 2, + "geometry": { + "type": "Point", + "coordinates": [ + 114.2112469089431, + 34.788007856976151 + ] + }, + "properties": { + "FID": 2, + "name": "保税区片区" + } + } + ] +} \ No newline at end of file diff --git a/src/views/ElectronicMap.vue b/src/views/ElectronicMap.vue index 5b3d1e2..0f41953 100644 --- a/src/views/ElectronicMap.vue +++ b/src/views/ElectronicMap.vue @@ -57,6 +57,9 @@ import AMapUtils from '@/utils/gis/AMapUtils'; import kaifengPSFQ1 from '@/assets/geojson/kaifengPSFQ1.json'; import kaifengPSFQlabel1 from '@/assets/geojson/kaifengPSFQlabel1.json'; +import projectionArea from '@/assets/geojson/projectionArea.json'; +import projectionAreaLabel from '@/assets/geojson/projectionAreaLabel.json'; + import Img1 from '/static/images/1.png'; import Img2 from '/static/images/2.png'; import Img3 from '/static/images/3.png'; @@ -144,12 +147,12 @@ const init = () => { window.amapUtils = new AMapUtils('map'); // amapUtils.showCityInfo(); - kaifengPSFQ1.features.forEach((feature) => { + projectionArea.features.forEach((feature) => { gcoord.transform(feature, gcoord.WGS84, gcoord.AMap); }); - amapUtils.addGeojsonPolygon(kaifengPSFQ1, 'kaifengPSFQ1'); - amapUtils.addLabelLayer(kaifengPSFQlabel1, 'kaifengPSFQlabel1'); - kaifengPSFQ1.features.forEach((feature) => { + amapUtils.addGeojsonPolygon(projectionArea, 'kaifengPSFQ1'); + amapUtils.addLabelLayer(projectionAreaLabel, 'kaifengPSFQlabel1'); + projectionArea.features.forEach((feature) => { gcoord.transform(feature, gcoord.AMap, gcoord.WGS84); }); @@ -158,7 +161,6 @@ // 内容赋值 AllData.ProjectData = target.getExtData(); AllData.showBottom = true; - // } }); getProjectss(); };