|
@@ -631,12 +631,11 @@ export default {
|
|
|
);
|
|
|
let newCorrectCoordArr = publicFun.latLngsCorrection(correctCordArr);
|
|
|
feature.geometry.coordinates = newCorrectCoordArr;
|
|
|
-
|
|
|
- if (
|
|
|
- this.town.indexOf(feature.properties.NAME.replace("镇", "")) > -1
|
|
|
- ) {
|
|
|
- this.renderPolygon(feature);
|
|
|
- }
|
|
|
+ // if (
|
|
|
+ // this.town.indexOf(feature.properties.NAME.replace("镇", "")) > -1
|
|
|
+ // ) {
|
|
|
+ this.renderPolygon(feature);
|
|
|
+ // }
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -713,30 +712,32 @@ export default {
|
|
|
// 坐标
|
|
|
townLocationMap.set(name, center);
|
|
|
townPolygonMap.set(name, polygon);
|
|
|
- let wmarker = L.circleMarker(center, {
|
|
|
- radius: 10,
|
|
|
- weight: 1,
|
|
|
- fillOpacity: 0,
|
|
|
- color: "#e6d273",
|
|
|
- });
|
|
|
- wmarker.bindLabel(feature.properties.NAME, {
|
|
|
- noHide: true,
|
|
|
- clickable: true,
|
|
|
- offset: [-25, 10],
|
|
|
- });
|
|
|
- wmarker.addTo(map2DViewer.groups["浦东新区_label"]);
|
|
|
- let circle1 = L.circleMarker(center, {
|
|
|
- radius: 8,
|
|
|
- weight: 1,
|
|
|
- fillOpacity: 0,
|
|
|
- color: "#e6d273",
|
|
|
- }).addTo(map2DViewer.groups["浦东新区_polygon"]);
|
|
|
- let circle2 = L.circleMarker(center, {
|
|
|
- radius: 5,
|
|
|
- weight: 1,
|
|
|
- fillOpacity: 1,
|
|
|
- color: "#e6d273",
|
|
|
- }).addTo(map2DViewer.groups["浦东新区_polygon"]);
|
|
|
+ if (this.town.indexOf(feature.properties.NAME.replace("镇", "")) > -1) {
|
|
|
+ let wmarker = L.circleMarker(center, {
|
|
|
+ radius: 10,
|
|
|
+ weight: 1,
|
|
|
+ fillOpacity: 0,
|
|
|
+ color: "#e6d273",
|
|
|
+ });
|
|
|
+ wmarker.bindLabel(feature.properties.NAME, {
|
|
|
+ noHide: true,
|
|
|
+ clickable: true,
|
|
|
+ offset: [-25, 10],
|
|
|
+ });
|
|
|
+ wmarker.addTo(map2DViewer.groups["浦东新区_label"]);
|
|
|
+ let circle1 = L.circleMarker(center, {
|
|
|
+ radius: 8,
|
|
|
+ weight: 1,
|
|
|
+ fillOpacity: 0,
|
|
|
+ color: "#e6d273",
|
|
|
+ }).addTo(map2DViewer.groups["浦东新区_polygon"]);
|
|
|
+ let circle2 = L.circleMarker(center, {
|
|
|
+ radius: 5,
|
|
|
+ weight: 1,
|
|
|
+ fillOpacity: 1,
|
|
|
+ color: "#e6d273",
|
|
|
+ }).addTo(map2DViewer.groups["浦东新区_polygon"]);
|
|
|
+ }
|
|
|
},
|
|
|
latLngsToReverse: function (latlngsAry) {
|
|
|
var tempLatlngsAry = JSON.parse(JSON.stringify(latlngsAry));
|