南京银行、光大涉农,我们城市不空,与齐梁不一致用我们的

This commit is contained in:
mjt
2024-05-08 14:29:45 +08:00
parent 1bccae0168
commit 0120dca859
4 changed files with 243 additions and 5 deletions
@@ -52,6 +52,7 @@
<div id="allmap" style="width:1024px;height:600px;"></div>
</td>
</tr>
<input id="saveOrUpdate" type="button" value="提交"/>
</table>
</form>
</div>
@@ -83,6 +84,48 @@
map.centerAndZoom(polygon.getBounds().getCenter(), 13);
map.addOverlay(polygon); //增加多边形
// 添加可编辑功能
polygon.enableEditing();
$("#saveOrUpdate").click(function(){
// 更新表单中的点位置数据
updatePolygonPoints();
jQuery.ajax({
type: 'POST',
url: '../developmentZone/saveOrUpdate',
data: $("#form1").serialize(),
dataType: 'json',
timeout: 100000,
success: function(data) {
alert(data.msg);
location.href="list";
},
error : function() {
}
});
});
// 更新表单中的多边形点位置数据
function updatePolygonPoints() {
var polygons = map.getOverlays(BMap.Polygon);
for (var i = 0; i < polygons.length; i++) {
// 确保当前对象是一个多边形对象
if (polygons[i] instanceof BMap.Polygon) {
var points = polygons[i].getPath();
var bdShape = [];
for (var j = 0; j < points.length; j++) {
var location = [];
location.push(points[j].lng);
location.push(points[j].lat);
bdShape.push(location);
}
// 将更新后的点位置数据更新到表单中
$("#bdShape").val(bdShape.join(";"));
}
}
}
</script>
@@ -49,6 +49,7 @@
<@menuitem uri='/agentMaster/listMaster' text="中介公司" />
<@menuitem uri='/mortgageInfo/list' text="抵押品" />
<@menuitem uri='/developmentZone/list' text="开发区" />
<@menuitem uri='/township/list' text="乡镇街道" />
</ul>
</li>
<li class="menu">