开发区围栏优化-坐标经度问题
This commit is contained in:
+4
@@ -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<String, Object> bdShape = new HashMap<String, Object>();
|
||||
@@ -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<String, Object> bdShape = new HashMap<String, Object>();
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<#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" />
|
||||
</#if>
|
||||
|
||||
@@ -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>, </#if>
|
||||
new BMap.Point(${latlng[0]?string("#.######")}, ${latlng[1]?string("#.######")})<#if latlng_index lt developmentZone.bdShape.coordinates?size>, </#if>
|
||||
</#list>
|
||||
], {strokeColor: "blue", strokeWeight: 2, strokeOpacity: 0.5});
|
||||
</#if>
|
||||
|
||||
Reference in New Issue
Block a user