Commit 4a9869d6 authored by Manggar Mahardhika's avatar Manggar Mahardhika

masuk lg

parent dde957c3
......@@ -2860,7 +2860,38 @@ def createpoint(request):
filename_p = fss_p.save(ngambar, gambar)
url_p = fss_p.url(filename_p)
except:
ngambar = 'None'
if tipe_point == 'kantor_administrasi':
if info_create_point == 'Kantor Polisi':
ngambar = 'police.svg'
elif info_create_point == 'Instalasi TNI (AD/AL/AU)':
ngambar = 'tni.svg'
else:
ngambar = 'lurah.svg'
if tipe_point == 'layanan_kesehatan':
ngambar = 'rs.svg'
if tipe_point == 'puskesmas':
ngambar = 'rs.svg'
if tipe_point == 'rumah_sakit':
ngambar = 'rs.svg'
if tipe_point == 'sarana_ibadah':
if info_create_point == 'Masjid':
ngambar = 'masjid.svg'
if info_create_point == 'Gereja':
ngambar = 'gereja.svg'
if info_create_point == 'Pura':
ngambar = 'pura.svg'
if info_create_point == 'Peribadatan/Sosial Lainnya':
ngambar = 'pesantren.svg'
if tipe_point == 'sarana_pendidikan':
ngambar = 'sekolah.svg'
if tipe_point == 'cagar_budaya':
ngambar = 'loc.svg'
if tipe_point == 'stasiun':
ngambar = 'kereta.svg'
if tipe_point == 'terminal_bus':
ngambar = 'bus.svg'
if tipe_point == 'gardu_listrik':
ngambar = 'listrik.svg'
# 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
try:
......
......@@ -124,7 +124,7 @@ class Dashboard(generic.TemplateView):
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
""")
WHERE a.is_deleted = 0""")
layanan_kesehatan_res = layanan_kesehatan.fetchall()
layanan_kesehatan_result = []
......@@ -163,7 +163,7 @@ class Dashboard(generic.TemplateView):
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
""")
WHERE a.is_deleted = 0""")
puskesmas_res = puskesmas.fetchall()
puskesmas_result = []
......@@ -201,7 +201,7 @@ class Dashboard(generic.TemplateView):
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
""")
WHERE a.is_deleted = 0""")
rumah_sakit_res = rumah_sakit.fetchall()
rumah_sakit_result = []
......@@ -239,7 +239,7 @@ class Dashboard(generic.TemplateView):
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
""")
WHERE a.is_deleted = 0""")
sarana_ibadah_res = sarana_ibadah.fetchall()
sarana_ibadah_result = []
......@@ -279,7 +279,7 @@ class Dashboard(generic.TemplateView):
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
""")
WHERE a.is_deleted = 0""")
sarana_pendidikan_res = sarana_pendidikan.fetchall()
sarana_pendidikan_result = []
......@@ -319,7 +319,7 @@ class Dashboard(generic.TemplateView):
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
""")
WHERE a.is_deleted = 0""")
spbu_res = spbu.fetchall()
spbu_result = []
......@@ -357,7 +357,7 @@ class Dashboard(generic.TemplateView):
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
""")
WHERE a.is_deleted = 0""")
stasiun_res = stasiun.fetchall()
stasiun_result = []
......@@ -396,7 +396,7 @@ class Dashboard(generic.TemplateView):
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
""")
WHERE a.is_deleted = 0""")
terminal_res = terminal.fetchall()
terminal_result = []
......@@ -430,7 +430,7 @@ class Dashboard(generic.TemplateView):
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
""")
WHERE a.is_deleted = 0""")
cagar_budaya_res = cagar_budaya.fetchall()
cagar_budaya_result = []
......@@ -468,7 +468,7 @@ class Dashboard(generic.TemplateView):
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
""")
WHERE a.is_deleted = 0""")
gardu_listrik_res = gardu_listrik.fetchall()
gardu_listrik_result = []
......
......@@ -66,7 +66,6 @@
<option value="rumah_sakit">Rumah Sakit</option>
<option value="sarana_ibadah">Sarana Ibadah</option>
<option value="sarana_pendidikan">Sarana Pendidikan</option>
<option value="spbu">SPBU</option>
<option value="stasiun">Stasiun</option>
<option value="terminal_bus">Terminal Bus</option>
<option value="cagar_budaya">Cagar Budaya dan Tempat Wisata</option>
......@@ -674,7 +673,8 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_point").css('display', 'none');
// $("#modal_point").css('display', 'none');
location.reload();
})
} else {
swal({
......
......@@ -7878,7 +7878,7 @@
$(document).on("click", "#btn_upload_tampak", function() {
var map_tampak = new L.map('map-tampak', {
editable: true,
editable: false,
zoomControl: false,
drawControl: true
}).setView([-2, 118], 5);
......
......@@ -3574,7 +3574,6 @@
<option value="rumah_sakit">Rumah Sakit</option>
<option value="sarana_ibadah">Sarana Ibadah</option>
<option value="sarana_pendidikan">Sarana Pendidikan</option>
<option value="spbu">SPBU</option>
<option value="stasiun">Stasiun</option>
<option value="terminal_bus">Terminal Bus</option>
<option value="cagar_budaya">Cagar Budaya dan Tempat Wisata</option>
......@@ -4020,7 +4019,6 @@
<option value="rumah_sakit">Rumah Sakit</option>
<option value="sarana_ibadah">Sarana Ibadah</option>
<option value="sarana_pendidikan">Sarana Pendidikan</option>
<option value="spbu">SPBU</option>
<option value="stasiun">Stasiun</option>
<option value="terminal_bus">Terminal Bus</option>
<option value="cagar_budaya">Cagar Budaya dan Tempat Wisata</option>
......@@ -4739,7 +4737,8 @@
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_point").css('display', 'none');
// $("#modal_point").css('display', 'none');
location.reload();
})
} else {
swal({
......
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