Commit 4bc3a43e authored by Muhamad's avatar Muhamad

Merge branch 'master' of http://git.khansia.co.id/Nahrowi/oku-gis

parents 74ad4e71 f37f9554
...@@ -683,7 +683,7 @@ def validatedit(request): ...@@ -683,7 +683,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' WHERE id = %s"""% (co_edit,name_b, info_b, desa_b, kec_b, kab_b, pro_b, namafile, 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 WHERE id = %s"""% (co_edit,name_b, info_b, desa_b, kec_b, kab_b, pro_b, namafile, int(id_poly)))
conn.commit() conn.commit()
data = 'SUCCESS' data = 'SUCCESS'
...@@ -809,9 +809,7 @@ def editrumahsakit(request): ...@@ -809,9 +809,7 @@ def editrumahsakit(request):
idrs = request.POST.get('idrs') idrs = request.POST.get('idrs')
namars = request.POST.get('namobj') namars = request.POST.get('namobj')
remark = request.POST.get('remark') remark = request.POST.get('remark')
luasbangunan = request.POST.get('luasbangunan')
luastanah = request.POST.get('luastanah') luastanah = request.POST.get('luastanah')
tinggibangunan = request.POST.get('tinggibangunan')
gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
...@@ -846,15 +844,19 @@ def editrumahsakit(request): ...@@ -846,15 +844,19 @@ def editrumahsakit(request):
namafile = gambar namafile = gambar
with conn.cursor() as editrs: with conn.cursor() as editrs:
editrs.execute("""update geo_rumah_sakit set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', alamat = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', gambar = '%s' where id = %s"""%(co_edit, namars, alamat, remark, luasbangunan, luastanah, tinggibangunan, perangkat, namafile, idrs)) editrs.execute("""update geo_rumah_sakit set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', alamat = '%s', remark = '%s', luas_tanah = '%s', perangkat = '%s', gambar = '%s' where id = %s"""%(co_edit, namars, alamat, remark, luastanah, perangkat, namafile, idrs))
conn.commit() conn.commit()
with conn.cursor() as hasledit: with conn.cursor() as hasledit:
hasledit.execute("SELECT id, namobj, alamat, remark, luas_bangunan, luas_tanah, tinggi_bangunan, perangkat, gambar, json_build_object('type', 'Feature', 'geometry', ST_AsGeoJSON(geom :: geometry) :: json) from geo_rumah_sakit where id = %s"% idrs) hasledit.execute("SELECT id, namobj, alamat, remark, luas_bangunan, luas_tanah, tinggi_bangunan, perangkat, gambar, json_build_object('type', 'Feature', 'geometry', ST_AsGeoJSON(geom :: geometry) :: json) from geo_rumah_sakit where id = %s"% idrs)
hasil_editrs = hasledit.fetchall() hasil_editrs = hasledit.fetchall()
data = hasil_editrs[0] data = {'status':'Success'}
return Response(data) data = 'SUCCESS'
info = 'data telah diperbaharui'
status = 0
respon={'data':data, 'info': info, 'status':status}
return Response(respon)
@api_view(('POST',)) @api_view(('POST',))
def editcagarbudaya(request): def editcagarbudaya(request):
...@@ -911,9 +913,7 @@ def editkantoradmin(request): ...@@ -911,9 +913,7 @@ def editkantoradmin(request):
idkantor = request.POST.get('id') idkantor = request.POST.get('id')
namobj = request.POST.get('namobj') namobj = request.POST.get('namobj')
remark = request.POST.get('remark') remark = request.POST.get('remark')
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
...@@ -948,7 +948,7 @@ def editkantoradmin(request): ...@@ -948,7 +948,7 @@ def editkantoradmin(request):
namafile = gambar namafile = gambar
with conn.cursor() as editka: with conn.cursor() as editka:
editka.execute("""update geo_kantor_administrasi set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = %s, luas_tanah = %s, tinggi_bangunan = %s, perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idkantor)) editka.execute("""update geo_kantor_administrasi set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_tanah = %s, perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luat_tanah, perangkat, alamat, namafile, idkantor))
conn.commit() conn.commit()
data = {'status':'Success'} data = {'status':'Success'}
...@@ -984,9 +984,7 @@ def editlayanankesehatan(request): ...@@ -984,9 +984,7 @@ def editlayanankesehatan(request):
idlakes = request.POST.get('id') idlakes = request.POST.get('id')
namobj = request.POST.get('namobj') namobj = request.POST.get('namobj')
remark = request.POST.get('remark') remark = request.POST.get('remark')
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
...@@ -1021,24 +1019,26 @@ def editlayanankesehatan(request): ...@@ -1021,24 +1019,26 @@ def editlayanankesehatan(request):
namafile = gambar namafile = gambar
with conn.cursor() as editka: with conn.cursor() as editka:
editka.execute("""update geo_layanan_kesehatan set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = %s, luas_tanah = %s, tinggi_bangunan = %s, perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idlakes)) editka.execute("""update geo_layanan_kesehatan set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_tanah = %s, perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luat_tanah, perangkat, alamat, namafile, idlakes))
conn.commit() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
hasiledit.execute("""select namobj, remark, luas_bangunan, luas_tanah, tinggi_bangunan, perangkat, gambar, alamat from geo_layanan_kesehatan where id = %s"""% idlakes) hasiledit.execute("""select namobj, remark, luas_bangunan, luas_tanah, tinggi_bangunan, perangkat, gambar, alamat from geo_layanan_kesehatan where id = %s"""% idlakes)
hasileditkantor = hasiledit.fetchall() hasileditkantor = hasiledit.fetchall()
data = hasileditkantor[0] data = {'status':'Success'}
return Response(data) data = 'SUCCESS'
info = 'data telah diperbaharui'
status = 0
respon={'data':data, 'info': info, 'status':status}
return Response(respon)
@api_view(('POST',)) @api_view(('POST',))
def editpuskesmas(request): def editpuskesmas(request):
idpus = request.POST.get('idpus') idpus = request.POST.get('idpus')
namobj = request.POST.get('namobj') namobj = request.POST.get('namobj')
remark = request.POST.get('remark') remark = request.POST.get('remark')
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
...@@ -1073,25 +1073,26 @@ def editpuskesmas(request): ...@@ -1073,25 +1073,26 @@ def editpuskesmas(request):
namafile = gambar namafile = gambar
with conn.cursor() as editrs: with conn.cursor() as editrs:
editrs.execute("""update geo_puskesmas set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idpus)) editrs.execute("""update geo_puskesmas set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_tanah = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luat_tanah, perangkat, alamat, namafile, idpus))
conn.commit() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
hasiledit.execute("""select namobj, remark, luas_bangunan, luas_tanah, tinggi_bangunan, perangkat, gambar, alamat from geo_puskesmas where id = %s"""% idpus) hasiledit.execute("""select namobj, remark, luas_bangunan, luas_tanah, tinggi_bangunan, perangkat, gambar, alamat from geo_puskesmas where id = %s"""% idpus)
hasileditkantor = hasiledit.fetchall() hasileditkantor = hasiledit.fetchall()
data = hasileditkantor[0] data = {'status':'Success'}
data = 'SUCCESS'
return Response(data) info = 'data telah diperbaharui'
status = 0
respon={'data':data, 'info': info, 'status':status}
return Response(respon)
@api_view(('POST',)) @api_view(('POST',))
def editibadah(request): def editibadah(request):
idsarib = request.POST.get('idsi') idsarib = request.POST.get('idsi')
namobj = request.POST.get('namobj') namobj = request.POST.get('namobj')
remark = request.POST.get('remark') remark = request.POST.get('remark')
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
perangkat = request.POST.get('perangkat') perangkat = request.POST.get('perangkat')
...@@ -1128,26 +1129,26 @@ def editibadah(request): ...@@ -1128,26 +1129,26 @@ def editibadah(request):
namafile = gambar namafile = gambar
with conn.cursor() as editrs: with conn.cursor() as editrs:
editrs.execute("""update geo_sarana_ibadah set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idsarib)) editrs.execute("""update geo_sarana_ibadah set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_tanah = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luat_tanah, perangkat, alamat, namafile, idsarib))
conn.commit() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
hasiledit.execute("""select namobj, remark, luas_bangunan, luas_tanah, tinggi_bangunan, perangkat, gambar, alamat from geo_sarana_ibadah where id = %s"""% idsarib) hasiledit.execute("""select namobj, remark, luas_bangunan, luas_tanah, tinggi_bangunan, perangkat, gambar, alamat from geo_sarana_ibadah where id = %s"""% idsarib)
hasileditkantor = hasiledit.fetchall() hasileditkantor = hasiledit.fetchall()
data = hasileditkantor[0] data = {'status':'Success'}
data = 'SUCCESS'
data = {'sukses':'sukses'} info = 'data telah diperbaharui'
return Response(data) status = 0
respon={'data':data, 'info': info, 'status':status}
return Response(respon)
@api_view(('POST',)) @api_view(('POST',))
def editsekolah(request): def editsekolah(request):
idsekolah = request.POST.get('idsp') idsekolah = request.POST.get('idsp')
namobj = request.POST.get('namobj') namobj = request.POST.get('namobj')
remark = request.POST.get('remark') remark = request.POST.get('remark')
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
...@@ -1182,7 +1183,7 @@ def editsekolah(request): ...@@ -1182,7 +1183,7 @@ def editsekolah(request):
namafile = gambar namafile = gambar
with conn.cursor() as editrs: with conn.cursor() as editrs:
editrs.execute("""update geo_sarana_pendidikan set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idsekolah)) editrs.execute("""update geo_sarana_pendidikan set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_tanah = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luat_tanah, perangkat, alamat, namafile, idsekolah))
conn.commit() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
...@@ -1191,8 +1192,12 @@ def editsekolah(request): ...@@ -1191,8 +1192,12 @@ def editsekolah(request):
data = hasileditkantor[0] data = hasileditkantor[0]
data = {'sukses':'sukses'} data = {'status':'Success'}
return Response(data) data = 'SUCCESS'
info = 'data telah diperbaharui'
status = 0
respon={'data':data, 'info': info, 'status':status}
return Response(respon)
@api_view(('POST',)) @api_view(('POST',))
def editspbu(request): def editspbu(request):
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1467,8 +1467,143 @@ ...@@ -1467,8 +1467,143 @@
} else { } else {
var path_img = `"static/image/bangunan/` + feature.administrasi.f9 + `"` var path_img = `"static/image/bangunan/` + feature.administrasi.f9 + `"`
} }
content_edit = `
<div class="modal-dialog" style="width: max-content;height: max-content;">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color:#40777c;">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title">Edit Polygon Bangunan dan Informasinya</h6>
</div>
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div class="row">
<div class="col-md-5">
<div id="map-edit" style="width:400px;height: 350px;">
</div>
</div>
<div class="col-md-4">
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunan" value="`+feature.geometry+`">
<table>
<tr>
<th>
Image
</th>
<td>
<input type="file" id="imgbangunan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="`+feature.administrasi.f9+`"required>
</td>
</tr>
<tr>
<td>
<input type="text" name="idbangunan" id="idbangunan" class="form-control hidden" value="`+feature.properties.f1+`" disable>
<input style="display:none;" id="coordinateZoneeditbang" type="text" class="form-control" value=""required>
</td>
</tr>
<tr>
<th>Nama Bangunan</th>
<td>
<input type="text" name="namebangunan" id="namebangunan" class="form-control" value="`+feature.properties.f2+`">
</td>
</tr>
<tr>
<th>Informasi Bangunan</th>
<td>
<input type="text" name="infobangunan" id="infobangunan" class="form-control" value="`+feature.properties.f3+`">
</td>
</tr>
<tr>
<th>Kelurahan</th>
<td>
<input type=" text " name="nmkelurahan " id="nmkelurahan" class="form-control " value="`+feature.administrasi.f1+`">
</td>
</tr>
<tr>
<th>Kecamatan</th>
<td>
<input type="text " name="nmkecamatan " id="nmkecamatan" class="form-control " value="`+feature.administrasi.f2+`">
</td>
</tr>
<tr>
<th>Kab/Kota</th>
<td>
<input type="text " name="nmkabkota " id="nmkabkota" class="form-control " value="`+feature.administrasi.f3+`">
</td>
</tr>
<tr>
<th>Provinsi</th>
<td>
<input type="text " name="nmprovinsi " id="nmprovinsi" class="form-control " value="`+feature.administrasi.f4+`">
</td>
</tr>
</table>
</div>
<div class="col-md-3 ">
<table>
<tr>
<th>Luas Bangunan</th>
<td>
<input type="text " name="luasbangunan " id="luasbangunan" class="form-control " value="`+feature.administrasi.f6+`">
</td>
</tr>
<tr>
<th>Luas Tanah</th>
<td>
<input type="text " name="luastanah " id="luastanah" class="form-control " value="`+feature.administrasi.f7+`">
</td>
</tr>
<tr>
<th>Tinggi Bangunan</th>
<td>
<input type="text " name="tinggibangunan " id="tinggibangunan" class="form-control " value="`+feature.administrasi.f8+`">
</td>
</tr>
<tr>
<th>Pemilik</th>
<td>
<input type="text " name="pemilik " id="pemilik" class="form-control " value="`+feature.administrasi.f10+`">
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="modal-footer ">
<button type="button " class="btn btn-link " data-dismiss="modal ">Close</button>
<button type="button " id="btnsavebangunan" class="btn btn-info ">Save changes</button>
</div>
</div>
</div>`;
content_delete=`
<div class="modal-dialog" style="width: max-content;height: max-content;">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color:#40777c;">
<table>
<tr>
<th><h6 class="modal-title">Delete Bangunan dan Informasinya</h6></th>
<td><button type="button" class="close" data-dismiss="modal">&times;</button></td>
</tr>
</table>
</div>
<div class="form-group" style="margin-bottom:10px;">
<div id="map-delete" style="width: 300px;height: 250px;position: relative;margin-left: 10px;margin-right: 10px;margin-top: 10px;"></div>
<div class="form-group">
<div class="col-lg-12" style="margin-top:10px;margin-bottom:10px;">
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunanhps" value="">
<input type="text" name="idbangunan" id="idbangunanhps" class="form-control hidden" value="`+feature.properties.f1+`" disable>
<input type="text" name="namebangunan" id="namebangunanhps" class="form-control" value="`+feature.properties.f2+`">
<input type="text" name="infobangunan" id="infobangunanhps" class="form-control" value="`+feature.properties.f3+`">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" id="btnsavedeletebangunan" class="btn btn-info">Hapus</button>
</div>
</div>
</div>`;
content = ` content = `
<table class="table tasks-list"> <table class="table tasks-list">
<thead style="text-align: center;"> <thead style="text-align: center;">
...@@ -1537,30 +1672,32 @@ ...@@ -1537,30 +1672,32 @@
</div> </div>
</tbody> </tbody>
</table>`; </table>`;
$("#isi_panel").html(content) $("#isi_panel").html(content);
$("#modal_bangunan_edit").html(content_edit);
$("#modal_bangunan_delete").html(content_delete);
}); });
$('#idbangunan').val(feature.properties.f1); // $('#idbangunan').val(feature.properties.f1);
$('#namebangunan').val(feature.properties.f2); // $('#namebangunan').val(feature.properties.f2);
$('#infobangunan').val(feature.properties.f3); // $('#infobangunan').val(feature.properties.f3);
$('#nmkelurahan').val(feature.administrasi.f1); // $('#nmkelurahan').val(feature.administrasi.f1);
$('#nmkecamatan').val(feature.administrasi.f2); // $('#nmkecamatan').val(feature.administrasi.f2);
$('#nmkabkota').val(feature.administrasi.f3); // $('#nmkabkota').val(feature.administrasi.f3);
$('#nmprovinsi').val(feature.administrasi.f4); // $('#nmprovinsi').val(feature.administrasi.f4);
$('#luasbangunan').val(feature.administrasi.f6); // $('#luasbangunan').val(feature.administrasi.f6);
$('#luastanah').val(feature.administrasi.f7); // $('#luastanah').val(feature.administrasi.f7);
$('#tinggibangunan').val(feature.administrasi.f8); // $('#tinggibangunan').val(feature.administrasi.f8);
$('#pemilik').val(feature.administrasi.f10); // $('#pemilik').val(feature.administrasi.f10);
$('#gambar').val(feature.administrasi.f9); // $('#gambar').val(feature.administrasi.f9);
$("#coordinatebangunan").val(feature.geometry); // $("#coordinatebangunan").val(feature.geometry);
$("#panel-samping").css("display", "block"); $("#panel-samping").css("display", "block");
$("#button_hide_panel").css("display", "block"); $("#button_hide_panel").css("display", "block");
$('#idbangunanhps').val(feature.properties.f1); // $('#idbangunanhps').val(feature.properties.f1);
$('#namebangunanhps').val(feature.properties.f2); // $('#namebangunanhps').val(feature.properties.f2);
$('#infobangunanhps').val(feature.properties.f3); // $('#infobangunanhps').val(feature.properties.f3);
panel_samp() panel_samp()
} }
...@@ -1668,7 +1805,6 @@ ...@@ -1668,7 +1805,6 @@
]).addTo(map_edit) ]).addTo(map_edit)
$(document).on("click", "#btn_edit_bangunan", function() { $(document).on("click", "#btn_edit_bangunan", function() {
if (map_edit.hasLayer(polylyly)) { if (map_edit.hasLayer(polylyly)) {
polylyly.remove() polylyly.remove()
} }
...@@ -1702,6 +1838,7 @@ ...@@ -1702,6 +1838,7 @@
polylyly = L.polygon(list_poly_edit).addTo(map_edit) polylyly = L.polygon(list_poly_edit).addTo(map_edit)
polylyly.enableEdit(); polylyly.enableEdit();
var hasil = (JSON.stringify(polyly.toGeoJSON()))
$('#btnsavebangunan').click(function() { $('#btnsavebangunan').click(function() {
var hasil = (JSON.stringify(polylyly.toGeoJSON())) var hasil = (JSON.stringify(polylyly.toGeoJSON()))
$("#coordinatebangunan").val(hasil); $("#coordinatebangunan").val(hasil);
......
...@@ -440,6 +440,17 @@ ...@@ -440,6 +440,17 @@
/*margin-right: 7px;*/ /*margin-right: 7px;*/
/*position: relative;*/ /*position: relative;*/
} }
/* li.fixed-plugin:hover .dropdown-menu {
transform: scale(0.769230);
float: right;
position: absolute;
right: -550px;
width: 550px;
margin-left: -490px !important;
margin-top: -40px !important;
top: 0;
margin-right: -550px;
} */
li.fixed-plugin .dropdown-menu { li.fixed-plugin .dropdown-menu {
transform: scale(0.769230); transform: scale(0.769230);
...@@ -524,13 +535,6 @@ ...@@ -524,13 +535,6 @@
<script src="https://cesium.com/downloads/cesiumjs/releases/1.78/Build/Cesium/Cesium.js"></script> <script src="https://cesium.com/downloads/cesiumjs/releases/1.78/Build/Cesium/Cesium.js"></script>
<link href="{% static 'css/widgets.css' %}" rel="stylesheet"> <link href="{% static 'css/widgets.css' %}" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.css"> <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.Default.css"> <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.Default.css">
<script src="https://unpkg.com/leaflet.markercluster@1.4.1/dist/leaflet.markercluster.js"></script> <script src="https://unpkg.com/leaflet.markercluster@1.4.1/dist/leaflet.markercluster.js"></script>
......
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