|
@@ -310,12 +310,13 @@ export function useAMap(options) {
|
|
|
const polygonPath = feature.geometry.coordinates[0].map((coord) => {
|
|
|
return [coord[0], coord[1]];
|
|
|
});
|
|
|
- const polygon = new AMap.Polygon({
|
|
|
+ const polygon = new AMap.Polyline({
|
|
|
path: polygonPath,
|
|
|
strokeColor: option.strokeColor ? option.strokeColor : '#268ab9',
|
|
|
strokeOpacity: option.strokeOpacity ? option.strokeOpacity : 1,
|
|
|
strokeWeight: option.strokeWeight ? option.strokeWeight : 1,
|
|
|
- fillOpacity: 0
|
|
|
+ fillOpacity: 0,
|
|
|
+ clickable: false
|
|
|
});
|
|
|
maskPolygon2.push(polygon);
|
|
|
map.add(polygon);
|
|
@@ -328,13 +329,14 @@ export function useAMap(options) {
|
|
|
});
|
|
|
const outerPath = polygonPath[0];
|
|
|
const innerPaths = polygonPath.slice(1);
|
|
|
- const polygon = new AMap.Polygon({
|
|
|
+ const polygon = new AMap.Polyline({
|
|
|
path: outerPath,
|
|
|
holes: innerPaths,
|
|
|
strokeColor: option.strokeColor ? option.strokeColor : '#268ab9',
|
|
|
strokeOpacity: option.strokeOpacity ? option.strokeOpacity : 1,
|
|
|
strokeWeight: option.strokeWeight ? option.strokeWeight : 1,
|
|
|
- fillOpacity: 0
|
|
|
+ fillOpacity: 0,
|
|
|
+ clickable: false
|
|
|
});
|
|
|
maskPolygon2.push(polygon);
|
|
|
map.add(polygon);
|