diff --git a/pages/index-map.vue b/pages/index-map.vue index e8ab4ae..5470ba4 100644 --- a/pages/index-map.vue +++ b/pages/index-map.vue @@ -908,8 +908,10 @@ boundary = JSON.parse(boundary) if (boundary.length) { let points = [] - boundary.forEach((item) => { - points.push([item[1], item[0]]) + boundary.forEach((items) => { + items.forEach(item => { + points.push([item[1], item[0]]) + }); }) //创建面对象 var polygon = L.polygon(points, {