|
@@ -238,6 +238,7 @@
|
|
|
v-if="showDetail"
|
|
|
ref="znxz"
|
|
|
@toggle="toggleInfoTab"
|
|
|
+ @cluster="addClusterLayer"
|
|
|
@gowkt="goWkt"
|
|
|
@clear="clearMark"
|
|
|
:item="detailData"
|
|
@@ -304,7 +305,6 @@ import wkt from "wellknown";
|
|
|
import VueMarkdownIt from "vue-markdown-it";
|
|
|
import landMethods from "@/api/land";
|
|
|
import AIBtn from "@/components/AIBtn.vue";
|
|
|
-
|
|
|
export default {
|
|
|
components: {
|
|
|
industrialTop,
|
|
@@ -319,6 +319,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ nearMarkerList: [],
|
|
|
radarScanStyle: {
|
|
|
width: "100%",
|
|
|
height: "100%",
|
|
@@ -1100,7 +1101,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//详情页tab切换地图绘制相关清空
|
|
|
- toggleInfoTab() {
|
|
|
+ toggleInfoTab(points) {
|
|
|
if (this.markerLayer) {
|
|
|
this.map.removeLayer(this.markerLayer);
|
|
|
this.markerLayer = null;
|
|
@@ -1116,6 +1117,26 @@ export default {
|
|
|
this.wktToGeojsonLayer = null;
|
|
|
}
|
|
|
},
|
|
|
+ addClusterLayer(points) {
|
|
|
+ this.nearMarkerList.forEach((ele) => {
|
|
|
+ this.map.removeLayer(ele);
|
|
|
+ });
|
|
|
+ this.nearMarkerList = [];
|
|
|
+ points.forEach((ele) => {
|
|
|
+ var className = "point-yellow-icon";
|
|
|
+ let ll= String.fromCharCode(65+ele.letter)
|
|
|
+ var myIcon = L.divIcon({
|
|
|
+ html: "<div>" + ll + "<div>",
|
|
|
+ className: className,
|
|
|
+ //图标大小
|
|
|
+ iconSize: [28, 28],
|
|
|
+ });
|
|
|
+ var marker = L.marker([ele.latitude, ele.longitude], {
|
|
|
+ icon: myIcon,
|
|
|
+ }).addTo(this.map);
|
|
|
+ this.nearMarkerList.push(marker);
|
|
|
+ });
|
|
|
+ },
|
|
|
//路线绘制
|
|
|
goPointMark(item) {
|
|
|
var center = item.center;
|
|
@@ -1132,12 +1153,15 @@ export default {
|
|
|
//图标大小
|
|
|
iconSize: [32, 32],
|
|
|
});
|
|
|
+ this.nearMarkerList.forEach(ele=>{
|
|
|
|
|
|
- this.markerLayer = L.marker([centerList[1], centerList[0]], {
|
|
|
- icon: myIcon
|
|
|
- })
|
|
|
- .addTo(this.map)
|
|
|
- .bindPopup(item.name);
|
|
|
+ });
|
|
|
+ this.map.flyTo([centerList[1], centerList[0]], 17);
|
|
|
+ // this.markerLayer = L.marker([centerList[1], centerList[0]], {
|
|
|
+ // icon: myIcon,
|
|
|
+ // })
|
|
|
+ // .addTo(this.map)
|
|
|
+ // .bindPopup(item.name);
|
|
|
// if (this.dkGeo) {
|
|
|
// const bounds = L.latLngBounds();
|
|
|
// bounds.extend(this.dkGeo.getBounds());
|
|
@@ -1224,8 +1248,6 @@ export default {
|
|
|
// that.$refs.znxz.showDistance(item);
|
|
|
// }
|
|
|
// });
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
//所有地块仿百度地图绘制
|
|
|
showXgdkCenterPoint() {
|
|
@@ -2545,6 +2567,28 @@ export default {
|
|
|
background-size: cover;
|
|
|
}
|
|
|
|
|
|
+.point-yellow-icon {
|
|
|
+ /*width: 36px !important;
|
|
|
+ height: 52px !important; */
|
|
|
+ width: 38px !important;
|
|
|
+ height: 38px !important;
|
|
|
+ text-align: center !important;
|
|
|
+ font-size: 14px;
|
|
|
+ padding-top: 8px;
|
|
|
+ color: white;
|
|
|
+ font-weight: 400;
|
|
|
+ cursor: pointer;
|
|
|
+ background: url("~@/assets/image/staticImage/icon-yellow.png");
|
|
|
+ background-size: cover;
|
|
|
+}
|
|
|
+
|
|
|
+.point-yellow-icon:hover {
|
|
|
+ width: 38px !important;
|
|
|
+ height: 38px !important;
|
|
|
+ background: url("~@/assets/image/staticImage/icon-green.png");
|
|
|
+ background-size: cover;
|
|
|
+}
|
|
|
+
|
|
|
.point-div-icon {
|
|
|
/*width: 36px !important;
|
|
|
height: 52px !important; */
|