From 71a882c4c1462e283d7c7cb6b8edb10ea59d7bc2 Mon Sep 17 00:00:00 2001 From: mjt <13607600062@163.com> Date: Tue, 9 Apr 2024 17:07:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=8C=BA=E5=9B=B4=E6=A0=8F?= =?UTF-8?q?=E4=BC=98=E5=8C=96-=E5=9D=90=E6=A0=87=E7=BB=8F=E5=BA=A6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fangjia/bkoff/controllers/DevelopmentZoneController.java | 4 ++++ .../fangjia-bkoff/src/main/webapp/developmentZone/edit.ftl | 4 ++-- .../fangjia-bkoff/src/main/webapp/developmentZone/show.ftl | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/projects/fangjia-bkoff/src/main/java/com/fangjia/bkoff/controllers/DevelopmentZoneController.java b/projects/fangjia-bkoff/src/main/java/com/fangjia/bkoff/controllers/DevelopmentZoneController.java index 278f45d4a..85a14c7e6 100644 --- a/projects/fangjia-bkoff/src/main/java/com/fangjia/bkoff/controllers/DevelopmentZoneController.java +++ b/projects/fangjia-bkoff/src/main/java/com/fangjia/bkoff/controllers/DevelopmentZoneController.java @@ -94,6 +94,8 @@ public class DevelopmentZoneController { location.add(Double.parseDouble(splitStr2[1])); bdLocationList.add(location); } + //加上第一个,形成首尾闭合 + bdLocationList.add(bdLocationList.get(0)); model.setBdShape(bdLocationList); // 百度经纬度 Map bdShape = new HashMap(); @@ -145,6 +147,8 @@ public class DevelopmentZoneController { location.add(Double.parseDouble(splitStr2[1])); bdLocationList.add(location); } + //加上第一个,形成首尾闭合 + bdLocationList.add(bdLocationList.get(0)); model.setBdShape(bdLocationList); // 百度经纬度 Map bdShape = new HashMap(); diff --git a/projects/fangjia-bkoff/src/main/webapp/developmentZone/edit.ftl b/projects/fangjia-bkoff/src/main/webapp/developmentZone/edit.ftl index da467044c..bf9ae01de 100644 --- a/projects/fangjia-bkoff/src/main/webapp/developmentZone/edit.ftl +++ b/projects/fangjia-bkoff/src/main/webapp/developmentZone/edit.ftl @@ -25,8 +25,8 @@
- <#if latlngPolygon??> - <@d_city defaultValue="${latlngPolygon.city!}" callback="changeCity" callbackField="display" name="cityDisplay" /> + <#if developmentZone??> + <@d_city defaultValue="${developmentZone.cityName!}" callback="changeCity" callbackField="display" name="cityDisplay" /> <#else> <@d_city defaultValue="涓婃捣" callback="changeCity" callbackField="display" name="cityDisplay" /> diff --git a/projects/fangjia-bkoff/src/main/webapp/developmentZone/show.ftl b/projects/fangjia-bkoff/src/main/webapp/developmentZone/show.ftl index 9df3b87bc..0e0ffa361 100644 --- a/projects/fangjia-bkoff/src/main/webapp/developmentZone/show.ftl +++ b/projects/fangjia-bkoff/src/main/webapp/developmentZone/show.ftl @@ -71,7 +71,7 @@ <#if developmentZone.bdShape??> var polygon = new BMap.Polygon([ <#list developmentZone.bdShape.coordinates as latlng> - new BMap.Point(${latlng[0]}, ${latlng[1]})<#if latlng_index lt developmentZone.bdShape.coordinates?size>, + new BMap.Point(${latlng[0]?string("#.######")}, ${latlng[1]?string("#.######")})<#if latlng_index lt developmentZone.bdShape.coordinates?size>, ], {strokeColor: "blue", strokeWeight: 2, strokeOpacity: 0.5});