|
@@ -45,11 +45,11 @@
|
|
|
<div class="label c">人口总量:</div>
|
|
|
<div class="count">{{ polulation.人口总量 }}人</div>
|
|
|
</div>
|
|
|
- <div class="diver10"></div>
|
|
|
+ <!-- <div class="diver10"></div>
|
|
|
<div class="item">
|
|
|
<div class="label c">人口密度:</div>
|
|
|
<div class="count">{{ polulation.人口密度 }}人/公顷</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
<div class="line60"></div>
|
|
|
<div class="title">年龄分布</div>
|
|
@@ -1709,6 +1709,9 @@ export default {
|
|
|
this.sexData[0].value = 0;
|
|
|
this.sexData[1].value = 0;
|
|
|
});
|
|
|
+ },
|
|
|
+ test(){
|
|
|
+
|
|
|
},
|
|
|
async queryVillageName(wktStr) {
|
|
|
return new Promise((resolve, reject) => {
|
|
@@ -1740,16 +1743,16 @@ export default {
|
|
|
const feature = response.data.features[0];
|
|
|
const villageName = feature.attributes.name;
|
|
|
// Convert ArcGIS JSON geometry (in 4528) to GeoJSON (in 4326 by default for arcgisToGeoJSON)
|
|
|
- const geojsonGeometry = arcgisToGeoJSON(feature.geometry);
|
|
|
- // Calculate planar area in square meters using turf (assuming input coordinates are in meters)
|
|
|
- let areaInSquareMeters = 0;
|
|
|
- if (geojsonGeometry && geojsonGeometry.type === 'Polygon' || geojsonGeometry.type === 'MultiPolygon') {
|
|
|
- areaInSquareMeters = turf.area(geojsonGeometry);
|
|
|
- }
|
|
|
- // Convert area to hectares
|
|
|
- const areaInHectares = areaInSquareMeters > 0 ? (areaInSquareMeters / 10000).toFixed(2) : 0;
|
|
|
-
|
|
|
- resolve({ villageName, areaInHectares });
|
|
|
+ // const geojsonGeometry = arcgisToGeoJSON(feature.geometry);
|
|
|
+ // // Calculate planar area in square meters using turf (assuming input coordinates are in meters)
|
|
|
+ // let areaInSquareMeters = 0;
|
|
|
+ // if (geojsonGeometry && geojsonGeometry.type === 'Polygon' || geojsonGeometry.type === 'MultiPolygon') {
|
|
|
+ // areaInSquareMeters = turf.area(geojsonGeometry);
|
|
|
+ // }
|
|
|
+ // // Convert area to hectares
|
|
|
+ // const areaInHectares = areaInSquareMeters > 0 ? (areaInSquareMeters / 10000).toFixed(2) : 0;
|
|
|
+
|
|
|
+ resolve({ villageName, areaInHectares:0 });
|
|
|
} else {
|
|
|
resolve({ villageName: null, areaInHectares: 0 }); // Return 0 hectares if no feature
|
|
|
}
|