Commit c8c11979 authored by Manggar Mahardhika's avatar Manggar Mahardhika

pbb edit bangunan

parent 8ed17adf
...@@ -729,7 +729,11 @@ def building(request): ...@@ -729,7 +729,11 @@ def building(request):
gb.db_tipe, gb.db_tipe,
gb.remark, gb.remark,
gb.point_id, gb.point_id,
gb.point_name gb.point_name,
gb.njop,
gb.njoptkp,
gb.njkp,
gb.pbb
), ),
'geometry', 'geometry',
ST_AsGeoJSON ( gb.geom :: geometry ) :: json ST_AsGeoJSON ( gb.geom :: geometry ) :: json
...@@ -1394,6 +1398,11 @@ def validatedit(request): ...@@ -1394,6 +1398,11 @@ def validatedit(request):
remark = request.POST.get('remarkbe') remark = request.POST.get('remarkbe')
namapoin = request.POST.get('napo') namapoin = request.POST.get('napo')
njoptkp = request.POST.get('njoptkp')
njop = request.POST.get('njoppbb')
njkp = request.POST.get('njkp')
pbb = request.POST.get('pbb')
co_edit = cood_edit['geometry']['coordinates'] co_edit = cood_edit['geometry']['coordinates']
# print(co_edit) # print(co_edit)
...@@ -1429,7 +1438,7 @@ def validatedit(request): ...@@ -1429,7 +1438,7 @@ def validatedit(request):
# print(co_edit,name_b, info_b, desa_b, kec_b, kab_b, pro_b, namafile, int(id_poly)) # print(co_edit,name_b, info_b, desa_b, kec_b, kab_b, pro_b, namafile, int(id_poly))
with conn.cursor() as buldings: with conn.cursor() as buldings:
buldings.execute("""UPDATE geo_bangunan set geom = st_geomfromgeojson('{"type":"MultiPolygon", "coordinates":[%s]}'),name='%s',information='%s',address_1='%s', address_2 = '%s', address_3 = '%s', provinsi='%s', gambar = '%s', is_deleted = 0, luas_bangunan=%s, luas_tanah=%s, tinggi_bangunan=%s, pemilik='%s', type_id = 1, point_id=%s, remark='%s', db_tipe='%s', point_name='%s' WHERE id = %s"""% (co_edit,name_b, info_b, desa_b, kec_b, kab_b, pro_b, namafile, luasb_b, luast_b, tinggi_b, pemilik_b, pointopeto, rem, tdb, namapoin, int(id_poly))) buldings.execute("""UPDATE geo_bangunan set geom = st_geomfromgeojson('{"type":"MultiPolygon", "coordinates":[%s]}'),name='%s',information='%s',address_1='%s', address_2 = '%s', address_3 = '%s', provinsi='%s', gambar = '%s', is_deleted = 0, luas_bangunan=%s, luas_tanah=%s, tinggi_bangunan=%s, pemilik='%s', type_id = 1, point_id=%s, remark='%s', db_tipe='%s', point_name='%s', njoptkp=%s, njop=%s, njkp=%s, pbb=%s WHERE id = %s"""% (co_edit,name_b, info_b, desa_b, kec_b, kab_b, pro_b, namafile, luasb_b, luast_b, tinggi_b, pemilik_b, pointopeto, rem, tdb, namapoin, int(njoptkp), int(njop), int(njkp), int(pbb), int(id_poly)))
conn.commit() conn.commit()
data = 'SUCCESS' data = 'SUCCESS'
......
This diff is collapsed.
...@@ -1498,50 +1498,50 @@ function x() { ...@@ -1498,50 +1498,50 @@ function x() {
} }
function georumah() { function georumah() {
loaderPage(true) // loaderPage(true)
var checkBox = document.getElementById("geo_building"); var checkBox = document.getElementById("geo_building");
if (checkBox.checked == true) { if (checkBox.checked == true) {
console.log(markerList.length) console.log(markerList.length)
if (markerList.length == 0) { // if (markerList.length == 0) {
$.ajax({ // $.ajax({
url: "api/pointBangunan", // url: "api/pointBangunan",
dataType: 'json', // dataType: 'json',
success: function(response) { // success: function(response) {
$("#bangpoints").html(`<script src="static/bangunan.js"></script>`) // $("#bangpoints").html(`<script src="static/bangunan.js"></script>`)
for (var i = 0; i < bangunanPoints.length; i++) { // for (var i = 0; i < bangunanPoints.length; i++) {
var a = bangunanPoints[i]; // var a = bangunanPoints[i];
var marker = L.marker(L.latLng(a[0], a[1]), { // var marker = L.marker(L.latLng(a[0], a[1]), {
icon: L.divIcon({ // icon: L.divIcon({
className: 'invisible-marker' // className: 'invisible-marker'
}) // })
}); // });
markerList.push(marker); // markerList.push(marker);
} // }
//console.log('start clustering: ' + window.performance.now()); // //console.log('start clustering: ' + window.performance.now());
markers.addLayers(markerList); // markers.addLayers(markerList);
map.addLayer(markers); // map.addLayer(markers);
if (map.hasLayer(markers)) { // if (map.hasLayer(markers)) {
loaderPage(false); // loaderPage(false);
} // }
} // }
}); // });
} else { // } else {
markers.addLayers(markerList); // markers.addLayers(markerList);
map.addLayer(markers); // map.addLayer(markers);
if (map.hasLayer(markers)) { // if (map.hasLayer(markers)) {
loaderPage(false); // loaderPage(false);
} // }
} // }
$(".help_bangunan").html('Polygon Bangunan dan Line Jalan terlihat pada zoom > 16') $(".help_bangunan").html('Polygon Bangunan dan Line Jalan terlihat pada zoom > 16')
} else { } else {
......
...@@ -376,12 +376,12 @@ ...@@ -376,12 +376,12 @@
<ul class="nav nav-tabs nav-tabs-bottom nav-justified"> <ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<button type="button" class="close" onclick="destroyWraper()">&times;</button> <button type="button" class="close" onclick="destroyWraper()">&times;</button>
<button class="close modalMinimize" style="right: 50px;"> <i class='fa fa-minus'></i> </button> <button class="close modalMinimize" style="right: 50px;"> <i class='fa fa-minus'></i> </button>
<li class="active"><a href="#left-tab-input-coordinat" data-toggle="tab">Koordinat</a></li> <li class="active"><a href="#left-tab-input-coordinat-jalan" data-toggle="tab">Koordinat</a></li>
<li><a href="#right-tab-input-informasi" data-toggle="tab">Insert Informasi</a></li> <li><a href="#right-tab-input-informasi-jalan" data-toggle="tab">Insert Informasi</a></li>
</ul> </ul>
</div> </div>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="left-tab-input-coordinat"> <div class="tab-pane active" id="left-tab-input-coordinat-jalan">
<div class="modal-body" style="max-height: 450px;overflow-y: auto;"> <div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<input type="text" class="hidden" id="poly_create"> <input type="text" class="hidden" id="poly_create">
<input type="text" class="hidden" id="id_jalan_perbaikan"> <input type="text" class="hidden" id="id_jalan_perbaikan">
...@@ -391,7 +391,7 @@ ...@@ -391,7 +391,7 @@
</div> </div>
</div> </div>
<div class="tab-pane" id="right-tab-input-informasi"> <div class="tab-pane" id="right-tab-input-informasi-jalan">
<div class="modal-body" style="max-height: 450px;overflow-y: auto;"> <div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment