Commit c476b382 authored by Manggar Mahardhika's avatar Manggar Mahardhika

masuk

parent e0f3e701
...@@ -22,9 +22,9 @@ class Dashboard(generic.TemplateView): ...@@ -22,9 +22,9 @@ class Dashboard(generic.TemplateView):
kec.execute("SELECT kecamatan, json_build_object('type', 'Feature', 'administrasi', (id, kecamatan),'geometry', ST_AsGeoJSON(geom :: geometry) :: json) from geo_data_kecamatan") kec.execute("SELECT kecamatan, json_build_object('type', 'Feature', 'administrasi', (id, kecamatan),'geometry', ST_AsGeoJSON(geom :: geometry) :: json) from geo_data_kecamatan")
kec_res_ = kec.fetchall() kec_res_ = kec.fetchall()
with conn.cursor() as knt: # with conn.cursor() as knt:
knt.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark),'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_kantor_administrasi a join geo_prov_kab b on st_intersects(a.geom,b.geom)") # knt.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark),'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_kantor_administrasi a join geo_prov_kab b on st_intersects(a.geom,b.geom)")
knt_res = knt.fetchall() # knt_res = knt.fetchall()
kec_res = [] kec_res = []
for i in kec_res_: for i in kec_res_:
...@@ -34,12 +34,40 @@ class Dashboard(generic.TemplateView): ...@@ -34,12 +34,40 @@ class Dashboard(generic.TemplateView):
for i in kel_res_: for i in kel_res_:
kel_res.append(i[0]) kel_res.append(i[0])
kntl = [] # kntl = []
for i in knt_res: # for i in knt_res:
kntl.append(i[0]) # kntl.append(i[0])
with conn.cursor() as kantor_administrasi: with conn.cursor() as kantor_administrasi:
kantor_administrasi.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark),'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_kantor_administrasi a join geo_prov_kab b on st_intersects(a.geom,b.geom)") kantor_administrasi.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_kantor_administrasi A
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)""")
kantor_administrasi_res = kantor_administrasi.fetchall() kantor_administrasi_res = kantor_administrasi.fetchall()
kantor_administrasi_result = [] kantor_administrasi_result = []
...@@ -47,15 +75,74 @@ class Dashboard(generic.TemplateView): ...@@ -47,15 +75,74 @@ class Dashboard(generic.TemplateView):
kantor_administrasi_result.append(i[0]) kantor_administrasi_result.append(i[0])
with conn.cursor() as layanan_kesehatan: with conn.cursor() as layanan_kesehatan:
layanan_kesehatan.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark), 'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_layanan_kesehatan a join geo_prov_kab b on st_intersects(a.geom,b.geom)") layanan_kesehatan.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_layanan_kesehatan A
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)
""")
layanan_kesehatan_res = layanan_kesehatan.fetchall() layanan_kesehatan_res = layanan_kesehatan.fetchall()
layanan_kesehatan_result = [] layanan_kesehatan_result = []
for i in layanan_kesehatan_res: for i in layanan_kesehatan_res:
layanan_kesehatan_result.append(i[0]) layanan_kesehatan_result.append(i[0])
with conn.cursor() as puskesmas: with conn.cursor() as puskesmas:
puskesmas.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark), 'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_puskesmas a join geo_prov_kab b on st_intersects(a.geom,b.geom)") puskesmas.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_puskesmas A
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)
""")
puskesmas_res = puskesmas.fetchall() puskesmas_res = puskesmas.fetchall()
puskesmas_result = [] puskesmas_result = []
...@@ -63,7 +150,36 @@ class Dashboard(generic.TemplateView): ...@@ -63,7 +150,36 @@ class Dashboard(generic.TemplateView):
puskesmas_result.append(i[0]) puskesmas_result.append(i[0])
with conn.cursor() as rumah_sakit: with conn.cursor() as rumah_sakit:
rumah_sakit.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.alamat, a.remark), 'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_rumah_sakit a join geo_prov_kab b on st_intersects(a.geom,b.geom)") rumah_sakit.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_rumah_sakit A
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)
""")
rumah_sakit_res = rumah_sakit.fetchall() rumah_sakit_res = rumah_sakit.fetchall()
rumah_sakit_result = [] rumah_sakit_result = []
...@@ -71,7 +187,36 @@ class Dashboard(generic.TemplateView): ...@@ -71,7 +187,36 @@ class Dashboard(generic.TemplateView):
rumah_sakit_result.append(i[0]) rumah_sakit_result.append(i[0])
with conn.cursor() as sarana_ibadah: with conn.cursor() as sarana_ibadah:
sarana_ibadah.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark), 'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_sarana_ibadah a join geo_prov_kab b on st_intersects(a.geom,b.geom)") sarana_ibadah.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_sarana_ibadah A
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)
""")
sarana_ibadah_res = sarana_ibadah.fetchall() sarana_ibadah_res = sarana_ibadah.fetchall()
sarana_ibadah_result = [] sarana_ibadah_result = []
...@@ -81,7 +226,36 @@ class Dashboard(generic.TemplateView): ...@@ -81,7 +226,36 @@ class Dashboard(generic.TemplateView):
sarana_ibadah_result.append(i[0]) sarana_ibadah_result.append(i[0])
with conn.cursor() as sarana_pendidikan: with conn.cursor() as sarana_pendidikan:
sarana_pendidikan.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark), 'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_sarana_pendidikan a join geo_prov_kab b on st_intersects(a.geom,b.geom)") sarana_pendidikan.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_sarana_pendidikan A
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)
""")
sarana_pendidikan_res = sarana_pendidikan.fetchall() sarana_pendidikan_res = sarana_pendidikan.fetchall()
sarana_pendidikan_result = [] sarana_pendidikan_result = []
...@@ -91,7 +265,36 @@ class Dashboard(generic.TemplateView): ...@@ -91,7 +265,36 @@ class Dashboard(generic.TemplateView):
sarana_pendidikan_result.append(i[0]) sarana_pendidikan_result.append(i[0])
with conn.cursor() as spbu: with conn.cursor() as spbu:
spbu.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark), 'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_spbu a join geo_prov_kab b on st_intersects(a.geom,b.geom)") spbu.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_spbu A
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)
""")
spbu_res = spbu.fetchall() spbu_res = spbu.fetchall()
spbu_result = [] spbu_result = []
...@@ -99,7 +302,36 @@ class Dashboard(generic.TemplateView): ...@@ -99,7 +302,36 @@ class Dashboard(generic.TemplateView):
spbu_result.append(i[0]) spbu_result.append(i[0])
with conn.cursor() as stasiun: with conn.cursor() as stasiun:
stasiun.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark), 'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_stasiun a join geo_prov_kab b on st_intersects(a.geom,b.geom)") stasiun.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_stasiun A
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)
""")
stasiun_res = stasiun.fetchall() stasiun_res = stasiun.fetchall()
stasiun_result = [] stasiun_result = []
...@@ -107,7 +339,37 @@ class Dashboard(generic.TemplateView): ...@@ -107,7 +339,37 @@ class Dashboard(generic.TemplateView):
stasiun_result.append(i[0]) stasiun_result.append(i[0])
with conn.cursor() as terminal: with conn.cursor() as terminal:
terminal.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark), 'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_terminal_bus a join geo_prov_kab b on st_intersects(a.geom,b.geom)") terminal.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.luas
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_terminal_bus A
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)
""")
terminal_res = terminal.fetchall() terminal_res = terminal.fetchall()
terminal_result = [] terminal_result = []
...@@ -115,7 +377,32 @@ class Dashboard(generic.TemplateView): ...@@ -115,7 +377,32 @@ class Dashboard(generic.TemplateView):
terminal_result.append(i[0]) terminal_result.append(i[0])
with conn.cursor() as cagar_budaya: with conn.cursor() as cagar_budaya:
cagar_budaya.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark), 'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_cagar_budaya a join geo_prov_kab b on st_intersects(a.geom,b.geom)") cagar_budaya.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.gambar,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.luas
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_cagar_budaya A
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)
""")
cagar_budaya_res = cagar_budaya.fetchall() cagar_budaya_res = cagar_budaya.fetchall()
cagar_budaya_result = [] cagar_budaya_result = []
...@@ -123,7 +410,36 @@ class Dashboard(generic.TemplateView): ...@@ -123,7 +410,36 @@ class Dashboard(generic.TemplateView):
cagar_budaya_result.append(i[0]) cagar_budaya_result.append(i[0])
with conn.cursor() as gardu_listrik: with conn.cursor() as gardu_listrik:
gardu_listrik.execute("SELECT json_build_object('type', 'Feature', 'administrasi', (a.namobj, a.remark), 'geometry', ST_AsGeoJSON(a.geom :: geometry) :: json) from geo_gardu_listrik a join geo_prov_kab b on st_intersects(a.geom,b.geom)") gardu_listrik.execute("""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_gardu_listrik A
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)
""")
gardu_listrik_res = gardu_listrik.fetchall() gardu_listrik_res = gardu_listrik.fetchall()
gardu_listrik_result = [] gardu_listrik_result = []
...@@ -146,8 +462,8 @@ class Dashboard(generic.TemplateView): ...@@ -146,8 +462,8 @@ class Dashboard(generic.TemplateView):
'terminal':terminal_result, 'terminal':terminal_result,
'cagar_budaya':cagar_budaya_result, 'cagar_budaya':cagar_budaya_result,
'gardu_listrik':gardu_listrik_result, 'gardu_listrik':gardu_listrik_result,
'global':all[0], 'global':all[0]
'kntl':kntl # 'kntl':kntl
} }
return render (request, self.template_name, context) return render (request, self.template_name, context)
......
<svg height='300px' width='300px' fill="#4D4D4D" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" viewBox="0 0 100 100"><g transform="translate(0,-952.36218)"><path style="text-indent:0;text-transform:none;direction:ltr;block-progression:tb;baseline-shift:baseline;color:#000000;enable-background:accumulate;" d="m 45.0375,961.36217 9.9249,0 0,21.81672 c 0,0.26185 0.1078,0.52209 0.2929,0.70724 0.1852,0.18515 0.4454,0.29294 0.7072,0.29293 l 22.8502,0 0,9.92576 -22.8502,0 c -0.2618,0 -0.522,0.10778 -0.7072,0.29293 -0.1851,0.18515 -0.2929,0.44539 -0.2929,0.70724 l 0,48.25721 -9.9249,0 0,-48.25721 c 0,-0.26185 -0.1078,-0.52209 -0.2929,-0.70724 -0.1851,-0.18515 -0.4453,-0.29294 -0.7072,-0.29293 l -22.8501,0 0,-9.92576 22.8501,0 c 0.2619,0 0.5221,-0.10778 0.7072,-0.29293 0.1851,-0.18515 0.2929,-0.44539 0.2929,-0.70724 z" fill="#4D4D4D" fill-opacity="1" fill-rule="evenodd" stroke="none" marker="none" visibility="visible" display="inline" overflow="visible"></path></g></svg>
\ No newline at end of file
<svg height='300px' width='300px' fill="#4D4D4D" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><rect x="11" y="93" width="79" height="6"></rect><rect x="18" y="49" width="9" height="38"></rect><rect x="10" y="42" width="79" height="6"></rect><rect x="31" y="49" width="8" height="38"></rect><rect x="45" y="49" width="9" height="38"></rect><rect x="59" y="49" width="9" height="38"></rect><rect x="73" y="49" width="8" height="38"></rect><polygon points="49.508,30.584 9,41 90.018,41 "></polygon><rect x="13" y="88" width="74" height="3"></rect><path d="M39.912,23.395c0.197-3.475,1.044-6.7,2.246-9.117c0.427-0.857,1.166-1.709,1.057-2.246c-0.17,0.076-0.506-0.101-0.66,0 c-3.254,2.124-5.756,6.442-6.21,11.23C37.283,23.557,38.758,23.316,39.912,23.395z"></path><path d="M40.572,23c1.277,0,2.555,0,3.832,0c0.205-4,0.533-8,1.718-11c-0.616,0-1.233,0-1.85,0C42.026,15,40.688,19,40.572,23z"></path><path d="M49.293,12c-0.793,0-1.586,0-2.379,0c-1.471,3-1.781,7-1.85,11c1.366,0,2.73,0,4.096,0C49.467,20,49.205,16,49.293,12z"></path><path d="M49.953,23.379c1.33-0.08,2.984,0.158,4.096-0.141C53.961,19.01,53.51,15,52.332,12c-0.838,0-1.674,0-2.512,0 C49.908,16,49.646,19.854,49.953,23.379z"></path><path d="M58.541,23c-0.197-4-1.582-8-3.566-11c-0.662,0-1.322,0-1.982,0c1.131,3,1.473,7,1.719,11C55.986,23,57.264,23,58.541,23z"></path><path d="M62.637,23c-0.076-2-0.998-4.827-2.113-6.673c-1.078-1.784-2.6-3.672-4.625-4.394c-0.102,0.03-0.26-0.144-0.264-0.016 C57.721,14.763,58.813,19,59.201,23C60.348,23,61.492,23,62.637,23z"></path><path d="M63.693,24.179C61.951,23.586,58.777,24,56.561,24c-7.123,0-15.018,0-21.404,0c-0.494,1-1.239,1-1.453,3 c10.569,0,21.139,0,31.709,0C64.963,26,64.588,24.482,63.693,24.179z"></path><path d="M33,34c4.249-0.859,15.332-4.399,16.557-4.396C50.775,29.608,61.813,33.166,66,34c0.43-1.416-0.395-3.034-0.588-4.046 c-0.16-0.839,0.113-1.954,0-2.954c-10.525,0-21.052,0-31.578,0c-0.153,0-0.143,0.256-0.131,0.443C34.172,30.026,32.699,31.585,33,34 z"></path><path d="M49,6c-0.055,0-0.106,0.012-0.16,0.015c-0.029,0.029-0.07,0.048-0.115,0.048c-0.028,0-0.05-0.018-0.073-0.031 C45.501,6.362,43,11,43,11h12C55,11,52.313,6,49,6z"></path><path d="M48.896,6.015C48.926,5.985,49,5.945,49,5.9V2.163C49,2.073,49.09,2,49,2s0,0.073,0,0.163V5.9 c0,0.061-0.18,0.104-0.13,0.132c0.023,0.013-0.036,0.031-0.007,0.031C48.908,6.063,48.867,6.044,48.896,6.015z"></path><path d="M50.315,3.33C50.515,3.408,50.703,3.48,51,3.361V2.136c-0.285,0.124-0.449,0.061-0.655-0.019 C50.203,2.063,50.042,2,49.821,2c-0.371,0-0.648,0.18-0.771,0.277v1.244c0.059-0.054,0.355-0.302,0.771-0.302 C50.027,3.219,50.174,3.275,50.315,3.33z"></path></svg>
\ No newline at end of file
<svg height='300px' width='300px' fill="#3BB300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><g><path fill="#3BB300" d="M64.96,67.608h0.692c6.481,0,11.739-5.256,11.739-11.738V16.739C77.391,10.257,72.133,5,65.652,5H34.348 c-6.482,0-11.739,5.257-11.739,11.739V55.87c0,6.482,5.256,11.738,11.739,11.738h0.692L18.925,95h9.082l6.903-11.739H65.09 L71.994,95h9.082L64.96,67.608z M38.261,10.87c0-1.08,0.875-1.957,1.957-1.957h19.564c1.082,0,1.957,0.877,1.957,1.957v3.913 c0,1.081-0.875,1.956-1.957,1.956H40.218c-1.082,0-1.957-0.875-1.957-1.956V10.87z M30.435,26.521c0-3.24,2.629-5.869,5.87-5.869 h27.391c3.241,0,5.87,2.629,5.87,5.869v13.696c0,2.16-1.754,3.912-3.913,3.912H34.348c-2.161,0-3.913-1.752-3.913-3.912V26.521z M34.336,61.722c-3.235,0-5.858-2.625-5.858-5.861c0-3.235,2.624-5.86,5.858-5.86c3.237,0,5.862,2.625,5.862,5.86 C40.198,59.097,37.573,61.722,34.336,61.722 M39.514,75.435l4.603-7.826h11.766l4.601,7.826H39.514z M59.782,55.86 c0-3.235,2.629-5.86,5.87-5.86c3.24,0,5.869,2.625,5.869,5.86c0,3.236-2.629,5.861-5.869,5.861 C62.412,61.722,59.782,59.097,59.782,55.86"></path></g></svg>
\ No newline at end of file
<svg height='300px' width='300px' fill="#FF8400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 332.66 502" x="0px" y="0px"><title>Asset 2</title><g data-name="Layer 2"><g data-name="Layer 1"><path d="M332.66,164.28C332.66,73.55,258.19,0,166.33,0S0,73.55,0,164.28a162,162,0,0,0,20.77,79.51h0L166.33,502,311.9,243.79h0A162,162,0,0,0,332.66,164.28ZM166.33,251c-54.21,0-98.16-43.41-98.16-96.95s44-97,98.16-97,98.16,43.41,98.16,97S220.54,251,166.33,251Z"></path></g></g></svg>
\ No newline at end of file
<svg height='300px' width='300px' fill="#4D4D4D" xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 64 64" x="0px" y="0px"><title>bank museum building goverment</title><g><path d="M32,10a5,5,0,1,0,5,5A5.0059,5.0059,0,0,0,32,10Zm0,8a3,3,0,1,1,3-3A3.0033,3.0033,0,0,1,32,18Z"></path><path d="M54,31a1,1,0,0,0,1-1V27h3a1,1,0,0,0,1-1V22c0-.0079-.0043-.0143-.0045-.0222a.9961.9961,0,0,0-.0714-.3541c-.0108-.0263-.0294-.0467-.0423-.0719a.7681.7681,0,0,0-.25-.31.97.97,0,0,0-.1076-.0934l-26-16a1.0018,1.0018,0,0,0-1.0478,0l-26,16a.9673.9673,0,0,0-.1074.0932.97.97,0,0,0-.1.0866.9832.9832,0,0,0-.1507.2234c-.0129.0252-.0316.0457-.0424.0721a.995.995,0,0,0-.0714.3539C5.0043,21.9855,5,21.9921,5,22v4a1,1,0,0,0,1,1H9v3a1,1,0,0,0,1,1h1V49H10a1,1,0,0,0-1,1v3H6a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1H58a1,1,0,0,0,1-1V54a1,1,0,0,0-1-1H55V50a1,1,0,0,0-1-1H53V31Zm-1-2H45V27h8ZM44,49a1,1,0,0,0-1,1v3H38V50a1,1,0,0,0-1-1H36V31h1a1,1,0,0,0,1-1V27h5v3a1,1,0,0,0,1,1h1V49ZM21,53V50a1,1,0,0,0-1-1H19V31h1a1,1,0,0,0,1-1V27h5v3a1,1,0,0,0,1,1h1V49H27a1,1,0,0,0-1,1v3Zm13-4H30V31h4Zm1-20H28V27h8v2ZM28,51h8v2H28ZM32,7.1738,54.4668,21H9.5332ZM7,23H57v2H7Zm12,4v2H11V27Zm-6,4h4V49H13ZM11,51h8v2H11Zm46,6H7V55H57ZM45,53V51h8v2Zm6-4H47V31h4Z"></path></g></svg>
\ No newline at end of file
<svg height='300px' width='300px' fill="#4D4D4D" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" version="1.1" x="0px" y="0px"><title>mosque</title><desc>Created with Sketch.</desc><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(16.000000, 16.000000)"><circle cx="35" cy="35" r="35"></circle><path d="M43.6956522,56.1267606 C32.2173913,56.1267606 22.826087,46.6197183 22.826087,35 C22.826087,23.3802817 32.2173913,13.8732394 43.6956522,13.8732394 C46.4782609,13.8732394 48.9130435,14.5774648 51,15.2816901 C46.826087,12.1126761 41.6086957,10 35.6956522,10 C22.1304348,10 11,21.2676056 11,35 C11,48.7323944 22.1304348,60 35.6956522,60 C41.2608696,60 46.826087,57.8873239 51,54.7183099 C48.5652174,55.7746479 46.1304348,56.1267606 43.6956522,56.1267606 Z" fill="#4D4D4D" fill-rule="nonzero"></path><polygon fill="#4D4D4D" fill-rule="nonzero" points="49 24 51.75 31.9180328 60 31.9180328 53.125 36.7377049 55.875 45 49 39.8360656 42.125 45 44.875 36.7377049 38 31.9180328 46.59375 31.9180328"></polygon></g></g></svg>
\ No newline at end of file
<svg height='300px' width='300px' fill="#4D4D4D" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><g><g><path fill-rule="evenodd" clip-rule="evenodd" d="M92.818,23.216V72.1c0,0-13.907-3.91-24.24-1.923 c-9.255,1.779-16.066,6.8-17.215,7.687v0.148c0,0-0.034-0.027-0.096-0.075c-0.061,0.048-0.095,0.075-0.095,0.075v-0.148 c-1.148-0.887-7.959-5.907-17.211-7.687C23.626,68.189,8.357,72.1,8.357,72.1V23.071c-0.893,0.134-1.84,0.277-2.858,0.429v52.662 c0,0,16.64-4.282,27.959-2.104c11.131,2.141,17.856,8.581,17.856,8.581s6.725-6.44,17.855-8.581 c11.321-2.179,27.278,2.104,27.278,2.104V23.727C96.448,23.727,95.059,23.492,92.818,23.216z M33.121,65.229 c9.051,1.739,16.046,6.978,16.046,6.978V24.113c0,0-7.032-5.245-16.104-6.989c-9.183-1.766-21.179,1.723-21.179,1.723v48.094 C11.884,66.941,23.918,63.459,33.121,65.229z M89.284,67.117V19.023c0,0-10.996-3.49-20.175-1.723 c-9.072,1.743-16.335,6.987-16.335,6.987v48.095c0,0,7.223-5.237,16.276-6.979C78.252,63.636,89.284,67.117,89.284,67.117z"></path></g></g></svg>
\ No newline at end of file
<svg height='300px' width='300px' fill="#4D4D4D" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve"><g><g><path d="M64.9,50.1C60,55,52,55,47.1,50.1c-4.9-4.9-4.9-12.9,0-17.8c0.3-0.3,0.6-0.5,0.9-0.8 c-3.4,0.4-6.7,1.9-9.3,4.5c-6.2,6.2-6.2,16.3,0,22.5s16.3,6.2,22.5,0c2.6-2.6,4.1-5.9,4.5-9.3C65.5,49.5,65.2,49.8,64.9,50.1z"></path></g><g><polygon points="54.4,39.7 51.7,43.4 56.3,43.4 58.9,47.1 60.3,42.7 64.7,41.4 60.9,38.7 61,34.1 57.3,36.8 53,35.4 "></polygon></g><g><path d="M50,0C31.3,23,11,22,13.8,46.2c0.1,0.9,0.3,1.9,0.5,2.9c2.3,11,3.4,22.2,3.4,33.5v9.9 c0,4.2,3.4,7.6,7.6,7.6h49.4c4.2,0,7.6-3.4,7.6-7.6v-9.9c0-11.2,1.1-22.5,3.4-33.5c0.2-1,0.4-2,0.5-2.9C89,22,68.7,23,50,0z M78.1,45.2c-0.1,0.6-0.2,1.3-0.4,2.1c-2.4,11.2-3.5,23-3.5,35.2v9.3H25.9v-9.3c0-12.2-1.2-24-3.5-35.2c-0.2-0.8-0.3-1.6-0.4-2.1 c-1.2-10.3,2.5-13,12.5-20.3c4.6-3.3,10-7.3,15.6-12.8c5.6,5.5,11,9.4,15.6,12.8C75.5,32.2,79.3,34.9,78.1,45.2z"></path></g></g></svg>
\ No newline at end of file
<svg height='300px' width='300px' fill="#0080FF" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"><g><path d="M256,0C139.167,0,44.467,94.708,44.467,211.533C44.467,372.184,256,512,256,512s211.533-139.816,211.533-300.467 C467.533,94.708,372.833,0,256,0z M256,375.941c-90.8,0-164.4-73.6-164.4-164.408c0-90.8,73.601-164.408,164.4-164.408 s164.417,73.608,164.417,164.408C420.417,302.342,346.8,375.941,256,375.941z"></path><path d="M359.517,162.2c-2.475-5.85-6.008-11.1-10.508-15.6s-9.742-8.034-15.584-10.5c-6.066-2.567-12.5-3.867-19.108-3.867V112.6 H186.741v176.65h-9.816v19.617h147.2V289.25h-9.809V271.2c4.458,2.134,9.458,3.316,14.717,3.316 c18.941,0,34.351-15.399,34.351-34.333V181.25h-0.009C363.375,174.65,362.075,168.25,359.517,162.2z M294.691,220.55h-88.325 v-88.316h88.325V220.55z M343.759,240.184c0,8.116-6.592,14.717-14.726,14.717c-8.125,0-14.717-6.601-14.717-14.717V151.85 c16.233,0,29.392,13.15,29.442,29.367V240.184z"></path></g></svg>
\ No newline at end of file
<svg height='300px' width='300px' fill="#4D4D4D" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 49 49" enable-background="new 0 0 49 49" xml:space="preserve"><g><path d="M45.4998,34.3087c-0.7227,6.3247-3.7887,9.2299-7.84,10.03c-6.5782,1.2866-10.6371-5.5383-8.65-11.61 c0.07-0.22,0.29-0.36,0.52-0.34c1.0548,0.088-0.3443,2.3956,2.41,4c2.61,1.53,6.03,0.97,7.94-1.3 c5.9587-7.0789-0.3517-17.8708-5.51-8.18c-0.86,1.66-1.9,2.98-3.1999,4.04c-1.6032,1.336-3.0812,1.2021-5.25,1.06 c6.4516,13.2986-9.1818,21.6217-18.45,10.93c-3.5095-4.0287-4.7596-10.0714-3.82-15.25c0.0809-0.3847,0.4448-0.6509,0.79-0.5 c0.7829,0.3425,0.4746,10.0458,7.38,13.1c8.8207,3.9541,14.9628-6.2166,7.76-8.2c-1.13-0.32-2.31-0.19-3.7,0.38 c-0.1892,0.0631-0.4203,0.2829-0.73,0.14c-0.3838-0.1771-0.1439-0.1013-2.55-7.28c-0.1085-0.369,0.1897-0.7117,0.56-0.65 c2.4531,0.4266,6.4298,1.1019,7.93-1.22c0.9524-1.4851,0.0166-3.3369-2.6-3.54c-1.03-0.09-2.1,0.13-3.4399,0.71 c-3.5918,1.523-4.3974,3.242-4.91,2.29l-2.84-5.38c-0.2823-0.5173,0.4292-0.7938,0.55-0.92c0.29-0.21,0.58-0.41,0.88-0.6 c2.34-1.48,4.67-2.34,7.12-2.63c10.2364-1.2456,12.2827,9.5352,5.51,14.78c2.2194,0.8996,2.7921,1.1529,3.39,0.69 c1.9334-1.5263,3.4906-5.7921,5.74-8.02C36.3797,14.9284,47.049,20.2649,45.4998,34.3087z"></path><path d="M41.8899,12.3286l-0.07,0.09c-0.05,0.07-0.1,0.14-0.16,0.2c-6.5036,7.783-20.6963,4.6705-20.38-6.6 c0.01-0.24,0.18-0.44,0.42-0.48c0.24-0.03,0.47,0.1,0.55,0.32l0.09,0.24c0.05,0.16,0.11,0.32,0.17,0.47 c1.7207,4.0195,7.2129,6.9269,12.65,3.02c0.6-0.43,1.16-0.91,1.76-1.42c0.27-0.23,0.54-0.46,0.8199-0.69 c0.22-0.17,0.53-0.14,0.7,0.07l3.44,4.15C42.0299,11.8786,42.0299,12.1386,41.8899,12.3286z"></path><path d="M26.5999,5.1086c-0.2-0.19-0.2-0.51,0-0.7l3.07-3.08c0.2-0.2,0.52-0.2,0.71,0l3.08,3.08c0.19,0.19,0.19,0.51,0,0.7 l-3.08,3.08c-0.1,0.1-0.22,0.15-0.35,0.15s-0.26-0.05-0.36-0.15L26.5999,5.1086z"></path></g></svg>
\ No newline at end of file
<svg height='300px' width='300px' fill="#FF3434" xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 105 105" x="0px" y="0px"><title>map-pins</title><g data-name="Group"><g data-name="Group"><path d="M82.06,42.07a29.56,29.56,0,1,0-54.7,15.49h0l.25.35a31.6,31.6,0,0,0,2.16,3L52.47,92.5,75.24,60.95a27.6,27.6,0,0,0,2.16-3l.25-.34h0A29.3,29.3,0,0,0,82.06,42.07Zm-29.57,25a25,25,0,1,1,25.06-25A25.06,25.06,0,0,1,52.49,67.11Z"></path></g></g><polygon points="59.05 35.32 59.05 25.37 46.17 25.37 46.17 35.32 36.23 35.32 36.23 48.2 46.17 48.2 46.17 58.15 59.05 58.15 59.05 48.2 69 48.2 69 35.32 59.05 35.32"></polygon></svg>
\ No newline at end of file
<svg height='300px' width='300px' fill="#4D4D4D" xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24" x="0px" y="0px"><title>Artboard 77</title><path d="M23.44,7.56l-11-5.46a1,1,0,0,0-.88,0L.56,7.56A1,1,0,0,0,.49,9.31L1,9.62V16H3V10.81l1,.59v5.43a1,1,0,0,0,.49.86l7,4.17a1,1,0,0,0,1,0l7-4.17a1,1,0,0,0,.49-.86V11.4l3.51-2.09a1,1,0,0,0-.07-1.75ZM18,16.26l-6,3.58L6,16.26V12.59l5.49,3.27a1,1,0,0,0,1,0L18,12.59Zm-6-2.42L3.09,8.53,12,4.12l8.91,4.41Z"></path></svg>
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
width: 40px; width: 40px;
font-size: 10pt; font-size: 10pt;
font-family: tahoma; font-family: tahoma;
right: 60px; right: 110px;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
z-index: 99999999; z-index: 99999999;
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
geo_po_adm = L.geoJson(null, { geo_po_adm = L.geoJson(null, {
pointToLayer: function(feature, latlng) { pointToLayer: function(feature, latlng) {
// console.log(feature.administrasi.f1) // console.log(feature.administrasi.f1)
if (feature.administrasi.f2 == 'Kantor Polisi') { if (feature.administrasi.f2 == 'Kantor Polisi') {
var smallIcon = new L.Icon({ var smallIcon = new L.Icon({
iconSize: [25, 25], iconSize: [25, 25],
...@@ -199,6 +198,124 @@ ...@@ -199,6 +198,124 @@
}); });
return marker return marker
} }
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
var tay;
var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result){
tay = result.address.Address;
// aladije(result.address.Address)
if (feature.administrasi.f3 == 'alamat'){
if (tay != ''){
var alamak = tay;
alamak += ', ';
}else{
alamak = ""
}
}else{
var alamak = feature.administrasi.f3;
alamak += ', ';
}
if (feature.administrasi.f10 == 'Bpk'){
var raja = "";
}else{
var raja = feature.administrasi.f10;
}
content =`
<form action="" class="form-group" method="POST">
{% csrf_token %}
<fieldset id="data-poly">
<input class="hidden" type="text" name='kode_dagri' id="kode_desa" value="` + feature.administrasi.f1 + `">
<input id='btn_edit_adm' class="btn btn-default" type="submit" value="Edit" style="position: absolute;
top: 6px;right: 5px;width: 60px;">
</div>
</fieldset>
</form>
<table class="table table-hover tasks-list">
<thead style="text-align: center;">
<tr>
<th style="padding: 0 0 0 0px;">
<img src="static/img/image/`+ feature.administrasi.f8 +`.`+ feature.administrasi.f11 +`" alt="Image" style="width: 100%;max-height: 237px;height:237">
</th>
</tr>
</thead>
<tbody>
<div class= "container">
<tr style="height: 100px;">
<th>
<div>
<h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0;
font-weight: 400;">
<span style="font-size: x-large;">
` + feature.administrasi.f1 + `
</span>
</h1>
</div>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 30px;">
<th>
<span>
` + feature.administrasi.f2 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<span>
`
+ alamak +` `+ feature.administrasi.f14 + `, ` + feature.administrasi.f13 + `, ` + feature.administrasi.f12 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Luas Bangunan : `+ feature.administrasi.f4 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Luas Tanah : `+ feature.administrasi.f5 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Tinggi Bangunan : `+ feature.administrasi.f9 +` m</span>
</p>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Pimpinan : </span>
</p>
<p>
<span>`+ raja +`</span>
</p>
</th>
</tr>
</div>
</tbody>
</table>`;
showpanel(content);
})
hidelegend();
}
})
} }
}); });
...@@ -227,13 +344,10 @@ ...@@ -227,13 +344,10 @@
var checkBox = document.getElementById("knt_adm"); var checkBox = document.getElementById("knt_adm");
if (checkBox.checked == true) { if (checkBox.checked == true) {
newe(markeradm, geo_po_adm, checkBox) newe(markeradm, geo_po_adm, checkBox)
$("#thisFooter").css('display', 'none');
$("#legendapo").css('display', 'block');
} else { } else {
markeradm.remove() markeradm.remove()
geo_po_adm.remove() geo_po_adm.remove()
$("#button_unhide").css('display', 'block'); valket()
$("#legendapo").css('display', 'none');
} }
} }
...@@ -260,6 +374,124 @@ ...@@ -260,6 +374,124 @@
offset: [0, 0] offset: [0, 0]
}); });
return marker return marker
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
var tay;
var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result){
tay = result.address.Address;
// aladije(result.address.Address)
if (feature.administrasi.f3 == 'alamat'){
if (tay != ''){
var alamak = tay;
alamak += ', ';
}else{
alamak = ""
}
}else{
var alamak = feature.administrasi.f3;
alamak += ', ';
}
if (feature.administrasi.f10 == 'bpk'){
var raja = "";
}else{
var raja = feature.administrasi.f10;
}
content =`
<form action="" class="form-group" method="POST">
{% csrf_token %}
<fieldset id="data-poly">
<input class="hidden" type="text" name='kode_dagri' id="kode_desa" value="` + feature.administrasi.f1 + `">
<input id='btn_edit_adm' class="btn btn-default" type="submit" value="Edit" style="position: absolute;
top: 6px;right: 5px;width: 60px;">
</div>
</fieldset>
</form>
<table class="table table-hover tasks-list">
<thead style="text-align: center;">
<tr>
<th style="padding: 0 0 0 0px;">
<img src="static/img/image/`+ feature.administrasi.f8 +`.`+ feature.administrasi.f11 +`" alt="Image" style="width: 100%;max-height: 237px;height:237">
</th>
</tr>
</thead>
<tbody>
<div class= "container">
<tr style="height: 100px;">
<th>
<div>
<h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0;
font-weight: 400;">
<span style="font-size: x-large;">
` + feature.administrasi.f1 + `
</span>
</h1>
</div>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 30px;">
<th>
<span>
` + feature.administrasi.f2 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<span>
`
+ alamak +` `+ feature.administrasi.f14 + `, ` + feature.administrasi.f13 + `, ` + feature.administrasi.f12 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Luas Bangunan : `+ feature.administrasi.f4 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Luas Tanah : `+ feature.administrasi.f5 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Tinggi Bangunan : `+ feature.administrasi.f9 +` m</span>
</p>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Pimpinan : </span>
</p>
<p>
<span>`+ raja +`</span>
</p>
</th>
</tr>
</div>
</tbody>
</table>`;
showpanel(content);
})
hidelegend();
}
})
} }
}); });
...@@ -288,13 +520,10 @@ ...@@ -288,13 +520,10 @@
var checkBox = document.getElementById("lyn_kes"); var checkBox = document.getElementById("lyn_kes");
if (checkBox.checked == true) { if (checkBox.checked == true) {
newe(markerkes, geo_po_kes, checkBox) newe(markerkes, geo_po_kes, checkBox)
$("#thisFooter").css('display', 'none');
$("#legendapo").css('display', 'block');
} else { } else {
markerkes.remove() markerkes.remove()
geo_po_kes.remove() geo_po_kes.remove()
$("#button_unhide").css('display', 'block'); valket()
$("#legendapo").css('display', 'none');
} }
} }
...@@ -321,76 +550,52 @@ ...@@ -321,76 +550,52 @@
offset: [0, 0] offset: [0, 0]
}); });
return marker return marker
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
var tay;
var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result){
tay = result.address.Address;
// aladije(result.address.Address)
if (feature.administrasi.f3 == 'alamat'){
if (tay != ''){
var alamak = tay;
alamak += ', ';
}else{
alamak = ""
} }
});
var markerpuskes = L.markerClusterGroup({
iconCreateFunction: function(cluster) {
var childCount = cluster.getChildCount();
return new L.DivIcon({
html: '<div><span>' + childCount + '</span></div>',
className: 'marker-cluster-sakit',
iconSize: new L.Point(40, 40)
});
},
//Disable all of the defaults:
spiderfyOnMaxZoom: false,
showCoverageOnHover: false
});
function geo_json_po_puskes(data) { }else{
geo_po_puskes.addData(data) var alamak = feature.administrasi.f3;
alamak += ', ';
} }
if (feature.administrasi.f10 == 'bpk'){
var raja = "";
}else{
var raja = feature.administrasi.f10;
}
content =`
<form action="" class="form-group" method="POST">
geo_json_po_puskes(result_puskes); {% csrf_token %}
<fieldset id="data-poly">
<input class="hidden" type="text" name='kode_dagri' id="kode_desa" value="` + feature.administrasi.f1 + `">
function pks() {
var checkBox = document.getElementById("pus");
if (checkBox.checked == true) {
newe(markerpuskes, geo_po_puskes, checkBox)
$("#thisFooter").css('display', 'none');
$("#legendapo").css('display', 'block');
} else {
markerpuskes.remove()
geo_po_puskes.remove()
$("#button_unhide").css('display', 'block');
$("#legendapo").css('display', 'none');
}
}
var rumah_sakit = "{{ rumah_sakit }}".replace(/&#x27;/g, '"'); <input id='btn_edit_adm' class="btn btn-default" type="submit" value="Edit" style="position: absolute;
var result_rumah_sakit = JSON.parse("" + rumah_sakit + "") top: 6px;right: 5px;width: 60px;">
</div>
</fieldset>
</form>
var geo_po_rumah_sakit = L.geoJson(null, {
pointToLayer: function(feature, latlng) {
var smallIcon = new L.Icon({
iconSize: [25, 25],
iconAnchor: [13, 27],
popupAnchor: [1, -24],
iconUrl: 'static/img/icon/rs.svg',
shadowUrl: 'static/img/icon/shadow.svg',
shadowSize: [35, 35],
shadowAnchor: [19, 31]
});
var marker = L.marker(latlng, {
icon: smallIcon
});
marker.bindTooltip(feature.administrasi.f1, {
permanent: false,
className: "my-label",
offset: [0, 0]
});
return marker
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
content =`
<table class="table table-hover tasks-list"> <table class="table table-hover tasks-list">
<thead style="text-align: center;"> <thead style="text-align: center;">
<tr> <tr>
<th style="padding: 0 0 0 0px;"> <th style="padding: 0 0 0 0px;">
<img src="static/img/icon/rs.svg" alt="Image" style="width: 100%;max-height: 237px;height:237"> <img src="static/img/image/`+ feature.administrasi.f8 +`.`+ feature.administrasi.f11 +`" alt="Image" style="width: 100%;max-height: 237px;height:237">
</th> </th>
</tr> </tr>
</thead> </thead>
...@@ -414,7 +619,7 @@ ...@@ -414,7 +619,7 @@
<tr style="height: 30px;"> <tr style="height: 30px;">
<th> <th>
<span> <span>
` + feature.administrasi.f3 + ` ` + feature.administrasi.f2 + `
</span> </span>
</th> </th>
</tr> </tr>
...@@ -423,7 +628,8 @@ ...@@ -423,7 +628,8 @@
<tr style="height: 40px;"> <tr style="height: 40px;">
<th> <th>
<span> <span>
` + feature.administrasi.f2 + ` `
+ alamak +` `+ feature.administrasi.f14 + `, ` + feature.administrasi.f13 + `, ` + feature.administrasi.f12 + `
</span> </span>
</th> </th>
</tr> </tr>
...@@ -432,13 +638,13 @@ ...@@ -432,13 +638,13 @@
<tr style="height: 40px;"> <tr style="height: 40px;">
<th> <th>
<p> <p>
<span>Luas Bangunan : None</span> <span>Luas Bangunan : `+ feature.administrasi.f4 +` </span><span style="font-weight: 700;">&#13217;</span>
</p> </p>
<p> <p>
<span>Luas Tanah : None</span> <span>Luas Tanah : `+ feature.administrasi.f5 +` </span><span style="font-weight: 700;">&#13217;</span>
</p> </p>
<p> <p>
<span>Tinggi Bangunan : None</span> <span>Tinggi Bangunan : `+ feature.administrasi.f9 +` m</span>
</p> </p>
</th> </th>
</tr> </tr>
...@@ -447,42 +653,213 @@ ...@@ -447,42 +653,213 @@
<tr style="height: 40px;"> <tr style="height: 40px;">
<th> <th>
<p> <p>
<span> </span> <span>Pimpinan : </span>
</p>
<p>
<span>`+ raja +`</span>
</p> </p>
</th> </th>
</tr> </tr>
</div> </div>
</tbody> </tbody>
</table>`; </table>`;
$("#panel-samping").css("display", "block"); showpanel(content);
$("#button_hide_panel").css("display", "block") })
$("#thisFooter").css('left', '380px'); hidelegend();
$("#thisFooter").css('width', '930px');
$("#thisFooter").css('display', 'none');
$("#button_unhide").css('display', 'block')
$("#isi_panel").html(content)
$()
} }
}) })
} }
}); });
function geo_json_po_rumah_sakit(data) { var markerpuskes = L.markerClusterGroup({
geo_po_rumah_sakit.addData(data) iconCreateFunction: function(cluster) {
} var childCount = cluster.getChildCount();
geo_json_po_rumah_sakit(result_rumah_sakit);
function rs() { return new L.DivIcon({
var checkBox = document.getElementById("rusak"); html: '<div><span>' + childCount + '</span></div>',
if (checkBox.checked == true) { className: 'marker-cluster-sakit',
geo_po_rumah_sakit.addTo(map) iconSize: new L.Point(40, 40)
$("#thisFooter").css('display', 'none'); });
$("#legendapo").css('display', 'block'); },
//Disable all of the defaults:
spiderfyOnMaxZoom: false,
showCoverageOnHover: false
});
function geo_json_po_puskes(data) {
geo_po_puskes.addData(data)
}
geo_json_po_puskes(result_puskes);
function pks() {
var checkBox = document.getElementById("pus");
if (checkBox.checked == true) {
newe(markerpuskes, geo_po_puskes, checkBox)
} else {
markerpuskes.remove()
geo_po_puskes.remove()
valket()
}
}
var rumah_sakit = "{{ rumah_sakit }}".replace(/&#x27;/g, '"');
var result_rumah_sakit = JSON.parse("" + rumah_sakit + "")
var geo_po_rumah_sakit = L.geoJson(null, {
pointToLayer: function(feature, latlng) {
var smallIcon = new L.Icon({
iconSize: [25, 25],
iconAnchor: [13, 27],
popupAnchor: [1, -24],
iconUrl: 'static/img/icon/rs.svg',
shadowUrl: 'static/img/icon/shadow.svg',
shadowSize: [35, 35],
shadowAnchor: [19, 31]
});
var marker = L.marker(latlng, {
icon: smallIcon
});
marker.bindTooltip(feature.administrasi.f1, {
permanent: false,
className: "my-label",
offset: [0, 0]
});
return marker
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
var tay;
var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result){
tay = result.address.Address;
// aladije(result.address.Address)
if (feature.administrasi.f3 == 'alamat'){
if (tay != ''){
var alamak = tay;
alamak += ', ';
}else{
alamak = ""
}
}else{
var alamak = feature.administrasi.f3;
alamak += ', ';
}
if (feature.administrasi.f10 == 'bpk'){
var raja = "";
}else{
var raja = feature.administrasi.f10;
}
content =`
<form action="" class="form-group" method="POST">
{% csrf_token %}
<fieldset id="data-poly">
<input class="hidden" type="text" name='kode_dagri' id="kode_desa" value="` + feature.administrasi.f1 + `">
<input id='btn_edit_adm' class="btn btn-default" type="submit" value="Edit" style="position: absolute;
top: 6px;right: 5px;width: 60px;">
</div>
</fieldset>
</form>
<table class="table table-hover tasks-list">
<thead style="text-align: center;">
<tr>
<th style="padding: 0 0 0 0px;">
<img src="static/img/image/`+ feature.administrasi.f8 +`.`+ feature.administrasi.f11 +`" alt="Image" style="width: 100%;max-height: 237px;height:237">
</th>
</tr>
</thead>
<tbody>
<div class= "container">
<tr style="height: 100px;">
<th>
<div>
<h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0;
font-weight: 400;">
<span style="font-size: x-large;">
` + feature.administrasi.f1 + `
</span>
</h1>
</div>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 30px;">
<th>
<span>
` + feature.administrasi.f2 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<span>
`
+ alamak +` `+ feature.administrasi.f14 + `, ` + feature.administrasi.f13 + `, ` + feature.administrasi.f12 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Luas Bangunan : `+ feature.administrasi.f4 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Luas Tanah : `+ feature.administrasi.f5 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Tinggi Bangunan : `+ feature.administrasi.f9 +` m</span>
</p>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Pimpinan : </span>
</p>
<p>
<span>`+ raja +`</span>
</p>
</th>
</tr>
</div>
</tbody>
</table>`;
showpanel(content);
})
hidelegend();
}
})
}
});
function geo_json_po_rumah_sakit(data) {
geo_po_rumah_sakit.addData(data)
}
geo_json_po_rumah_sakit(result_rumah_sakit);
function rs() {
var checkBox = document.getElementById("rusak");
if (checkBox.checked == true) {
geo_po_rumah_sakit.addTo(map)
} else { } else {
geo_po_rumah_sakit.remove() geo_po_rumah_sakit.remove()
$("#button_unhide").css('display', 'block'); valket()
$("#legendapo").css('display', 'none');
} }
} }
...@@ -569,6 +946,113 @@ ...@@ -569,6 +946,113 @@
}); });
return marker return marker
} }
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
var tay;
var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result){
tay = result.address.Address;
// aladije(result.address.Address)
if (feature.administrasi.f3 == 'alamat'){
if (tay != ''){
var alamak = tay;
alamak += ', ';
}else{
alamak = ""
}
}else{
var alamak = feature.administrasi.f3;
alamak += ', ';
}
if (feature.administrasi.f10 == 'bpk'){
var raja = "";
}else{
var raja = feature.administrasi.f10;
}
content =`
<form action="" class="form-group" method="POST">
{% csrf_token %}
<fieldset id="data-poly">
<input class="hidden" type="text" name='kode_dagri' id="kode_desa" value="` + feature.administrasi.f1 + `">
<input id='btn_edit_adm' class="btn btn-default" type="submit" value="Edit" style="position: absolute;
top: 6px;right: 5px;width: 60px;">
</div>
</fieldset>
</form>
<table class="table table-hover tasks-list">
<thead style="text-align: center;">
<tr>
<th style="padding: 0 0 0 0px;">
<img src="static/img/image/`+ feature.administrasi.f8 +`.`+ feature.administrasi.f11 +`" alt="Image" style="width: 100%;max-height: 237px;height:237">
</th>
</tr>
</thead>
<tbody>
<div class= "container">
<tr style="height: 100px;">
<th>
<div>
<h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0;
font-weight: 400;">
<span style="font-size: x-large;">
` + feature.administrasi.f1 + `
</span>
</h1>
</div>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 30px;">
<th>
<span>
` + feature.administrasi.f2 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<span>
`
+ alamak +` `+ feature.administrasi.f14 + `, ` + feature.administrasi.f13 + `, ` + feature.administrasi.f12 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Luas Bangunan : `+ feature.administrasi.f4 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Luas Tanah : `+ feature.administrasi.f5 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Tinggi Bangunan : `+ feature.administrasi.f9 +` m</span>
</p>
</th>
</tr>
</div>
</tbody>
</table>`;
showpanel(content);
})
hidelegend();
}
})
} }
}); });
...@@ -597,13 +1081,10 @@ ...@@ -597,13 +1081,10 @@
var checkBox = document.getElementById("ibdh"); var checkBox = document.getElementById("ibdh");
if (checkBox.checked == true) { if (checkBox.checked == true) {
newe(markeribdh, geo_po_sarana_ibadah, checkBox) newe(markeribdh, geo_po_sarana_ibadah, checkBox)
$("#thisFooter").css('display', 'none');
$("#legendapo").css('display', 'block');
} else { } else {
markeribdh.remove() markeribdh.remove()
geo_po_sarana_ibadah.remove() geo_po_sarana_ibadah.remove()
$("#button_unhide").css('display', 'block'); valket()
$("#legendapo").css('display', 'none');
} }
} }
...@@ -671,41 +1152,156 @@ ...@@ -671,41 +1152,156 @@
}); });
return marker return marker
} }
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
var tay;
var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result){
tay = result.address.Address;
// aladije(result.address.Address)
if (feature.administrasi.f3 == 'alamat'){
if (tay != ''){
var alamak = tay;
alamak += ', ';
}else{
alamak = ""
} }
});
var markerpend = L.markerClusterGroup({ }else{
iconCreateFunction: function(cluster) { var alamak = feature.administrasi.f3;
var childCount = cluster.getChildCount(); alamak += ', ';
}
if (feature.administrasi.f10 == 'bpk'){
var raja = "";
}else{
var raja = feature.administrasi.f10;
}
content =`
<form action="" class="form-group" method="POST">
return new L.DivIcon({ {% csrf_token %}
html: '<div><span>' + childCount + '</span></div>', <fieldset id="data-poly">
className: 'marker-cluster-pend', <input class="hidden" type="text" name='kode_dagri' id="kode_desa" value="` + feature.administrasi.f1 + `">
iconSize: new L.Point(40, 40)
});
},
//Disable all of the defaults:
spiderfyOnMaxZoom: false,
showCoverageOnHover: false
});
function geo_json_po_sarana_pendidikan(data) {
geo_po_sarana_pendidikan.addData(data)
}
geo_json_po_sarana_pendidikan(result_sarana_pendidikan); <input id='btn_edit_adm' class="btn btn-default" type="submit" value="Edit" style="position: absolute;
top: 6px;right: 5px;width: 60px;">
function didik() { </div>
var checkBox = document.getElementById("dididik"); </fieldset>
if (checkBox.checked == true) { </form>
newe(markerpend, geo_po_sarana_pendidikan, checkBox)
$("#thisFooter").css('display', 'none'); <table class="table table-hover tasks-list">
$("#legendapo").css('display', 'block'); <thead style="text-align: center;">
} else { <tr>
markerpend.remove() <th style="padding: 0 0 0 0px;">
<img src="static/img/image/`+ feature.administrasi.f8 +`.`+ feature.administrasi.f11 +`" alt="Image" style="width: 100%;max-height: 237px;height:237">
</th>
</tr>
</thead>
<tbody>
<div class= "container">
<tr style="height: 100px;">
<th>
<div>
<h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0;
font-weight: 400;">
<span style="font-size: x-large;">
` + feature.administrasi.f1 + `
</span>
</h1>
</div>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 30px;">
<th>
<span>
` + feature.administrasi.f2 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<span>
`
+ alamak +` `+ feature.administrasi.f14 + `, ` + feature.administrasi.f13 + `, ` + feature.administrasi.f12 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Luas Bangunan : `+ feature.administrasi.f4 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Luas Tanah : `+ feature.administrasi.f5 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Tinggi Bangunan : `+ feature.administrasi.f9 +` m</span>
</p>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Pimpinan : </span>
</p>
<p>
<span>`+ raja +`</span>
</p>
</th>
</tr>
</div>
</tbody>
</table>`;
showpanel(content);
})
hidelegend();
}
})
}
});
var markerpend = L.markerClusterGroup({
iconCreateFunction: function(cluster) {
var childCount = cluster.getChildCount();
return new L.DivIcon({
html: '<div><span>' + childCount + '</span></div>',
className: 'marker-cluster-pend',
iconSize: new L.Point(40, 40)
});
},
//Disable all of the defaults:
spiderfyOnMaxZoom: false,
showCoverageOnHover: false
});
function geo_json_po_sarana_pendidikan(data) {
geo_po_sarana_pendidikan.addData(data)
}
geo_json_po_sarana_pendidikan(result_sarana_pendidikan);
function didik() {
var checkBox = document.getElementById("dididik");
if (checkBox.checked == true) {
newe(markerpend, geo_po_sarana_pendidikan, checkBox)
} else {
markerpend.remove()
geo_po_sarana_pendidikan.remove() geo_po_sarana_pendidikan.remove()
$("#button_unhide").css('display', 'block'); valket()
$("#legendapo").css('display', 'none');
} }
} }
...@@ -732,6 +1328,124 @@ ...@@ -732,6 +1328,124 @@
offset: [0, 0] offset: [0, 0]
}); });
return marker return marker
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
var tay;
var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result){
tay = result.address.Address;
// aladije(result.address.Address)
if (feature.administrasi.f3 == 'alamat'){
if (tay != ''){
var alamak = tay;
alamak += ', ';
}else{
alamak = ""
}
}else{
var alamak = feature.administrasi.f3;
alamak += ', ';
}
if (feature.administrasi.f10 == 'bpk'){
var raja = "";
}else{
var raja = feature.administrasi.f10;
}
content =`
<form action="" class="form-group" method="POST">
{% csrf_token %}
<fieldset id="data-poly">
<input class="hidden" type="text" name='kode_dagri' id="kode_desa" value="` + feature.administrasi.f1 + `">
<input id='btn_edit_adm' class="btn btn-default" type="submit" value="Edit" style="position: absolute;
top: 6px;right: 5px;width: 60px;">
</div>
</fieldset>
</form>
<table class="table table-hover tasks-list">
<thead style="text-align: center;">
<tr>
<th style="padding: 0 0 0 0px;">
<img src="static/img/image/`+ feature.administrasi.f8 +`.`+ feature.administrasi.f11 +`" alt="Image" style="width: 100%;max-height: 237px;height:237">
</th>
</tr>
</thead>
<tbody>
<div class= "container">
<tr style="height: 100px;">
<th>
<div>
<h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0;
font-weight: 400;">
<span style="font-size: x-large;">
` + feature.administrasi.f1 + `
</span>
</h1>
</div>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 30px;">
<th>
<span>
` + feature.administrasi.f2 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<span>
`
+ alamak +` `+ feature.administrasi.f14 + `, ` + feature.administrasi.f13 + `, ` + feature.administrasi.f12 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Luas Bangunan : `+ feature.administrasi.f4 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Luas Tanah : `+ feature.administrasi.f5 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Tinggi Bangunan : `+ feature.administrasi.f9 +` m</span>
</p>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Pemilik : </span>
</p>
<p>
<span>`+ raja +`</span>
</p>
</th>
</tr>
</div>
</tbody>
</table>`;
showpanel(content);
})
hidelegend();
}
})
} }
}); });
...@@ -745,12 +1459,9 @@ ...@@ -745,12 +1459,9 @@
var checkBox = document.getElementById("pom_bengsin"); var checkBox = document.getElementById("pom_bengsin");
if (checkBox.checked == true) { if (checkBox.checked == true) {
geo_po_spbu.addTo(map) geo_po_spbu.addTo(map)
$("#thisFooter").css('display', 'none');
$("#legendapo").css('display', 'block');
} else { } else {
geo_po_spbu.remove() geo_po_spbu.remove()
$("#button_unhide").css('display', 'block'); valket()
$("#legendapo").css('display', 'none');
} }
} }
...@@ -777,6 +1488,124 @@ ...@@ -777,6 +1488,124 @@
offset: [0, 0] offset: [0, 0]
}); });
return marker return marker
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
var tay;
var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result){
tay = result.address.Address;
// aladije(result.address.Address)
if (feature.administrasi.f3 == 'alamat'){
if (tay != ''){
var alamak = tay;
alamak += ', ';
}else{
alamak = ""
}
}else{
var alamak = feature.administrasi.f3;
alamak += ', ';
}
if (feature.administrasi.f10 == 'bpk'){
var raja = "";
}else{
var raja = feature.administrasi.f10;
}
content =`
<form action="" class="form-group" method="POST">
{% csrf_token %}
<fieldset id="data-poly">
<input class="hidden" type="text" name='kode_dagri' id="kode_desa" value="` + feature.administrasi.f1 + `">
<input id='btn_edit_adm' class="btn btn-default" type="submit" value="Edit" style="position: absolute;
top: 6px;right: 5px;width: 60px;">
</div>
</fieldset>
</form>
<table class="table table-hover tasks-list">
<thead style="text-align: center;">
<tr>
<th style="padding: 0 0 0 0px;">
<img src="static/img/image/`+ feature.administrasi.f8 +`.`+ feature.administrasi.f11 +`" alt="Image" style="width: 100%;max-height: 237px;height:237">
</th>
</tr>
</thead>
<tbody>
<div class= "container">
<tr style="height: 100px;">
<th>
<div>
<h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0;
font-weight: 400;">
<span style="font-size: x-large;">
` + feature.administrasi.f1 + `
</span>
</h1>
</div>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 30px;">
<th>
<span>
` + feature.administrasi.f2 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<span>
`
+ alamak +` `+ feature.administrasi.f14 + `, ` + feature.administrasi.f13 + `, ` + feature.administrasi.f12 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Luas Bangunan : `+ feature.administrasi.f4 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Luas Tanah : `+ feature.administrasi.f5 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Tinggi Bangunan : `+ feature.administrasi.f9 +` m</span>
</p>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Pemimpin : </span>
</p>
<p>
<span>`+ raja +`</span>
</p>
</th>
</tr>
</div>
</tbody>
</table>`;
showpanel(content);
})
hidelegend();
}
})
} }
}); });
...@@ -790,38 +1619,135 @@ ...@@ -790,38 +1619,135 @@
var checkBox = document.getElementById("tasiun"); var checkBox = document.getElementById("tasiun");
if (checkBox.checked == true) { if (checkBox.checked == true) {
geo_po_stasiun.addTo(map) geo_po_stasiun.addTo(map)
$("#thisFooter").css('display', 'none');
$("#legendapo").css('display', 'block');
} else { } else {
geo_po_stasiun.remove() geo_po_stasiun.remove()
$("#button_unhide").css('display', 'block'); valket()
$("#legendapo").css('display', 'none'); }
}
var terminal = "{{ terminal }}".replace(/&#x27;/g, '"');
var result_terminal = JSON.parse("" + terminal + "")
var geo_po_terminal = L.geoJson(null, {
pointToLayer: function(feature, latlng) {
var smallIcon = new L.Icon({
iconSize: [18, 18],
iconAnchor: [13, 27],
popupAnchor: [1, -24],
iconUrl: 'static/img/icon/bus.svg',
shadowUrl: 'static/img/icon/shadow.svg',
shadowSize: [35, 35],
shadowAnchor: [22, 31]
});
var marker = L.marker(latlng, {
icon: smallIcon
});
marker.bindTooltip(feature.administrasi.f1, {
permanent: false,
className: "my-label",
offset: [0, 0]
});
return marker
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
var tay;
var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result){
tay = result.address.Address;
// aladije(result.address.Address)
if (feature.administrasi.f3 == 'alamat'){
if (tay != ''){
var alamak = tay;
alamak += ', ';
}else{
alamak = ""
} }
}else{
var alamak = feature.administrasi.f3;
alamak += ', ';
}
if (feature.administrasi.f10 == 'bpk'){
var raja = "";
}else{
var raja = feature.administrasi.f10;
}
content =`
<form action="" class="form-group" method="POST">
{% csrf_token %}
<fieldset id="data-poly">
<input class="hidden" type="text" name='kode_dagri' id="kode_desa" value="` + feature.administrasi.f1 + `">
<input id='btn_edit_adm' class="btn btn-default" type="submit" value="Edit" style="position: absolute;
top: 6px;right: 5px;width: 60px;">
</div>
</fieldset>
</form>
<table class="table table-hover tasks-list">
<thead style="text-align: center;">
<tr>
<th style="padding: 0 0 0 0px;">
<img src="static/img/image/`+ feature.administrasi.f8 +`.`+ feature.administrasi.f11 +`" alt="Image" style="width: 100%;max-height: 237px;height:237">
</th>
</tr>
</thead>
<tbody>
<div class= "container">
<tr style="height: 100px;">
<th>
<div>
<h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0;
font-weight: 400;">
<span style="font-size: x-large;">
` + feature.administrasi.f1 + `
</span>
</h1>
</div>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 30px;">
<th>
<span>
` + feature.administrasi.f2 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<span>
`
+ alamak +` `+ feature.administrasi.f14 + `, ` + feature.administrasi.f13 + `, ` + feature.administrasi.f12 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Luas : `+ feature.administrasi.f15 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
</th>
</tr>
</div>
</tbody>
</table>`;
showpanel(content);
})
hidelegend();
} }
})
var terminal = "{{ terminal }}".replace(/&#x27;/g, '"');
var result_terminal = JSON.parse("" + terminal + "")
var geo_po_terminal = L.geoJson(null, {
pointToLayer: function(feature, latlng) {
var smallIcon = new L.Icon({
iconSize: [18, 18],
iconAnchor: [13, 27],
popupAnchor: [1, -24],
iconUrl: 'static/img/icon/bus.svg',
shadowUrl: 'static/img/icon/shadow.svg',
shadowSize: [35, 35],
shadowAnchor: [22, 31]
});
var marker = L.marker(latlng, {
icon: smallIcon
});
marker.bindTooltip(feature.administrasi.f1, {
permanent: false,
className: "my-label",
offset: [0, 0]
});
return marker
} }
}); });
...@@ -835,12 +1761,9 @@ ...@@ -835,12 +1761,9 @@
var checkBox = document.getElementById("caheum"); var checkBox = document.getElementById("caheum");
if (checkBox.checked == true) { if (checkBox.checked == true) {
geo_po_terminal.addTo(map) geo_po_terminal.addTo(map)
$("#thisFooter").css('display', 'none');
$("#legendapo").css('display', 'block');
} else { } else {
geo_po_terminal.remove() geo_po_terminal.remove()
$("#button_unhide").css('display', 'block'); valket()
$("#legendapo").css('display', 'none');
} }
} }
...@@ -867,6 +1790,118 @@ ...@@ -867,6 +1790,118 @@
offset: [0, 0] offset: [0, 0]
}); });
return marker return marker
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
var tay;
var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result){
tay = result.address.Address;
// aladije(result.address.Address)
if (feature.administrasi.f3 == 'alamat'){
if (tay != ''){
var alamak = tay;
alamak += ', ';
}else{
alamak = ""
}
}else{
var alamak = feature.administrasi.f3;
alamak += ', ';
}
if (feature.administrasi.f5 == 'bpk'){
var raja = "";
}else{
var raja = feature.administrasi.f5;
}
content =`
<form action="" class="form-group" method="POST">
{% csrf_token %}
<fieldset id="data-poly">
<input class="hidden" type="text" name='kode_dagri' id="kode_desa" value="` + feature.administrasi.f1 + `">
<input id='btn_edit_adm' class="btn btn-default" type="submit" value="Edit" style="position: absolute;
top: 6px;right: 5px;width: 60px;">
</div>
</fieldset>
</form>
<table class="table table-hover tasks-list">
<thead style="text-align: center;">
<tr>
<th style="padding: 0 0 0 0px;">
<img src="static/img/image/`+ feature.administrasi.f4 +`.`+ feature.administrasi.f6 +`" alt="Image" style="width: 100%;max-height: 237px;height:237">
</th>
</tr>
</thead>
<tbody>
<div class= "container">
<tr style="height: 100px;">
<th>
<div>
<h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0;
font-weight: 400;">
<span style="font-size: x-large;">
` + feature.administrasi.f1 + `
</span>
</h1>
</div>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 30px;">
<th>
<span>
` + feature.administrasi.f2 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<span>
`
+ alamak +` `+ feature.administrasi.f9 + `, ` + feature.administrasi.f8 + `, ` + feature.administrasi.f7 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Luas : `+ feature.administrasi.f10 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Pemimpin : </span>
</p>
<p>
<span>`+ raja +`</span>
</p>
</th>
</tr>
</div>
</tbody>
</table>`;
showpanel(content);
})
hidelegend();
}
})
} }
}); });
...@@ -880,12 +1915,9 @@ ...@@ -880,12 +1915,9 @@
var checkBox = document.getElementById("cabud"); var checkBox = document.getElementById("cabud");
if (checkBox.checked == true) { if (checkBox.checked == true) {
geo_po_cagar_budaya.addTo(map) geo_po_cagar_budaya.addTo(map)
$("#thisFooter").css('display', 'none');
$("#legendapo").css('display', 'block');
} else { } else {
valket()
geo_po_cagar_budaya.remove() geo_po_cagar_budaya.remove()
$("#button_unhide").css('display', 'block');
$("#legendapo").css('display', 'none');
} }
} }
...@@ -912,6 +1944,124 @@ ...@@ -912,6 +1944,124 @@
offset: [0, 0] offset: [0, 0]
}); });
return marker return marker
},onEachFeature: function(feature, layer) {
layer.on({
click: function(e) {
var tay;
var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result){
tay = result.address.Address;
// aladije(result.address.Address)
if (feature.administrasi.f3 == 'alamat'){
if (tay != ''){
var alamak = tay;
alamak += ', ';
}else{
alamak = ""
}
}else{
var alamak = feature.administrasi.f3;
alamak += ', ';
}
if (feature.administrasi.f10 == 'bpk'){
var raja = "";
}else{
var raja = feature.administrasi.f10;
}
content =`
<form action="" class="form-group" method="POST">
{% csrf_token %}
<fieldset id="data-poly">
<input class="hidden" type="text" name='kode_dagri' id="kode_desa" value="` + feature.administrasi.f1 + `">
<input id='btn_edit_adm' class="btn btn-default" type="submit" value="Edit" style="position: absolute;
top: 6px;right: 5px;width: 60px;">
</div>
</fieldset>
</form>
<table class="table table-hover tasks-list">
<thead style="text-align: center;">
<tr>
<th style="padding: 0 0 0 0px;">
<img src="static/img/image/`+ feature.administrasi.f8 +`.`+ feature.administrasi.f11 +`" alt="Image" style="width: 100%;max-height: 237px;height:237">
</th>
</tr>
</thead>
<tbody>
<div class= "container">
<tr style="height: 100px;">
<th>
<div>
<h1 style="font-family: Google Sans,Roboto,Arial,sans-serif;
letter-spacing: 0;
font-weight: 400;">
<span style="font-size: x-large;">
` + feature.administrasi.f1 + `
</span>
</h1>
</div>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 30px;">
<th>
<span>
` + feature.administrasi.f2 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<span>
`
+ alamak +` `+ feature.administrasi.f14 + `, ` + feature.administrasi.f13 + `, ` + feature.administrasi.f12 + `
</span>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Luas Bangunan : `+ feature.administrasi.f4 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Luas Tanah : `+ feature.administrasi.f5 +` </span><span style="font-weight: 700;">&#13217;</span>
</p>
<p>
<span>Tinggi Bangunan : `+ feature.administrasi.f9 +` m</span>
</p>
</th>
</tr>
</div>
<div class= "container">
<tr style="height: 40px;">
<th>
<p>
<span>Pemimpin : </span>
</p>
<p>
<span>`+ raja +`</span>
</p>
</th>
</tr>
</div>
</tbody>
</table>`;
showpanel(content);
})
hidelegend();
}
})
} }
}); });
...@@ -924,13 +2074,11 @@ ...@@ -924,13 +2074,11 @@
function gl100() { function gl100() {
var checkBox = document.getElementById("gardu"); var checkBox = document.getElementById("gardu");
if (checkBox.checked == true) { if (checkBox.checked == true) {
valket()
geo_po_gardu_listrik.addTo(map) geo_po_gardu_listrik.addTo(map)
$("#thisFooter").css('display', 'none');
$("#legendapo").css('display', 'block');
} else { } else {
valket()
geo_po_gardu_listrik.remove() geo_po_gardu_listrik.remove()
$("#button_unhide").css('display', 'block');
$("#legendapo").css('display', 'none');
} }
} }
...@@ -959,10 +2107,9 @@ ...@@ -959,10 +2107,9 @@
temanggung() temanggung()
cb100() cb100()
gl100() gl100()
$("#thisFooter").css('display', 'none'); valket()
$("#legendapo").css('display', 'block');
} else { } else if (checkBox.checked == false){
document.getElementById("knt_adm").checked = false; document.getElementById("knt_adm").checked = false;
document.getElementById("lyn_kes").checked = false; document.getElementById("lyn_kes").checked = false;
document.getElementById("pus").checked = false; document.getElementById("pus").checked = false;
...@@ -985,8 +2132,67 @@ ...@@ -985,8 +2132,67 @@
temanggung() temanggung()
cb100() cb100()
gl100() gl100()
valket()
$("#thisFooter").css('display', 'block');
$("#button_unhide").css('display', 'none');
$("#panel-samping").css("display", "none");
$("#button_hide_panel").css("display", "none")
}
}
function showpanel(content){
$("#panel-samping").css("display", "block");
$("#button_hide_panel").css("display", "block")
// $("#thisFooter").css('left', '380px');
// $("#thisFooter").css('width', '930px');
// $("#thisFooter").css('display', 'none');
$("#button_unhide").css('display', 'block'); $("#button_unhide").css('display', 'block');
$("#isi_panel").html(content);
}
function hidepanel(){
$("#panel-samping").css("display", "none");
$("#button_hide_panel").css("display", "none")
// $("#thisFooter").css('left', '380px');
// $("#thisFooter").css('width', '930px');
// $("#thisFooter").css('display', 'none');
$("#button_unhide_panel").css('display', 'none');
$("#button_unhide").css('display', 'none');
// $("#isi_panel").html(content);
}
function showlegend() {
$("#legendapo").css('display', 'block');
$("#button_unhide_point").css('display', 'none');
}
function hidelegend() {
$("#legendapo").css('display', 'none'); $("#legendapo").css('display', 'none');
$("#button_unhide_point").css('display', 'block');
}
function valket(){
let checkBox1 = document.getElementById("po_all");
let checkBox2 = document.getElementById("knt_adm");
let checkBox3 = document.getElementById("lyn_kes");
let checkBox4 = document.getElementById("pus");
let checkBox5 = document.getElementById("rusak");
let checkBox6 = document.getElementById("ibdh");
let checkBox7 = document.getElementById("dididik");
let checkBox8 = document.getElementById("pom_bengsin");
let checkBox9 = document.getElementById("tasiun");
let checkBox10 = document.getElementById("caheum");
let checkBox11 = document.getElementById("cabud");
let checkBox12 = document.getElementById("gardu");
if ((checkBox1.checked == true) || (checkBox2.checked == true) || (checkBox3.checked == true) || (checkBox4.checked == true) || (checkBox5.checked == true) || (checkBox6.checked == true) || (checkBox7.checked == true) || (checkBox8.checked == true) || (checkBox9.checked == true) || (checkBox10.checked == true) || (checkBox11.checked == true) || (checkBox12.checked == true)){
showlegend()
$("#thisFooter").css('display', 'none');
$("#button_unhide").css('display', 'none');
} else if ((checkBox1.checked == false) && (checkBox2.checked == false) && (checkBox3.checked == false) && (checkBox4.checked == false) && (checkBox5.checked == false) && (checkBox6.checked == false) && (checkBox7.checked == false) && (checkBox8.checked == false) && (checkBox9.checked == false) && (checkBox10.checked == false) && (checkBox11.checked == false) && (checkBox12.checked == false)){
$("#thisFooter").css('display', 'block');
$("#button_unhide").css('display', 'none');
hidelegend()
$("#button_unhide_point").css('display', 'none');
hidepanel()
} }
} }
...@@ -1001,11 +2207,11 @@ ...@@ -1001,11 +2207,11 @@
console.log(zoom) console.log(zoom)
if (zoom < 14 && (!lastZoom || lastZoom >= 14)) { if (zoom < 14 && (!lastZoom || lastZoom >= 14)) {
if (xxx.checked == true) { if (xxx.checked == true) {
$("#thisFooter").css('display', 'none');
$("#legendapo").css('display', 'block');
map.removeLayer(marques); map.removeLayer(marques);
map.addLayer(marques); map.addLayer(marques);
map.removeLayer(xnxx); map.removeLayer(xnxx);
$("#thisFooter").css('display', 'none');
$("#legendapo").css('display', 'block');
} else { } else {
$("#button_unhide").css('display', 'block'); $("#button_unhide").css('display', 'block');
$("#legendapo").css('display', 'none'); $("#legendapo").css('display', 'none');
......
{% load static %} {% load static %}
<div class="legendapo" id="legendapo" style="bottom: 0px;display:none"> <div class="legendapo" id="legendapo" style="bottom: 0px;display:none">
<input type="hidden" id="infoLongitude">
<input type="hidden" id="infoLatitude">
<input type="hidden" id="infoLimitx">
<div> <div>
<a href="#" class="btn btn-default" id="button_hide_point"><span class="caret" style="margin-left: -5px;"></span></a> <a href="#" onclick="hidelegend()" class="btn btn-default" id="button_hide_point"><span class="caret" style="margin-left: -5px;"></span></a>
</div> </div>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
...@@ -303,7 +300,7 @@ ...@@ -303,7 +300,7 @@
</div> </div>
</div> </div>
<div> </div>
<a href="#" class="btn btn-default" id="button_unhide_point" style="display: none;"><span class="caret" style="margin-left: -5px;transform: rotate(180deg)"></span></a> <div>
</div> <a href="#" onclick="showlegend()" class="btn btn-default" id="button_unhide_point" style="display: none;"><span class="caret" style="margin-left: -5px;transform: rotate(180deg)"></span></a>
</div> </div>
\ No newline at end of file
...@@ -136,13 +136,13 @@ ...@@ -136,13 +136,13 @@
Sungai Sungai
</label> </label>
</div> </div>
<div class="ceret"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="batas_all" onclick="batasall()" style="margin-top:2px;" > <input type="checkbox" id="batas_all" onclick="batasall()" style="margin-top:2px;" >
Batas Teritori Batas Teritori
</label> </label>
</div> </div>
<ul class="nasted"> <ul class="nasted active">
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="batas_kota" onclick="bataskota()" style="margin-top:2px;"> <input type="checkbox" id="batas_kota" onclick="bataskota()" style="margin-top:2px;">
...@@ -166,14 +166,14 @@ ...@@ -166,14 +166,14 @@
</ul> </ul>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="ceret"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="po_all" onclick="gas_all()" value="BLACK" class="checkboxOccInfo" name="checkOccInfo" style="margin-top:2px;"> <input type="checkbox" id="po_all" onclick="gas_all()" value="BLACK" class="checkboxOccInfo" name="checkOccInfo" style="margin-top:2px;">
Point Point
</label> </label>
</div> </div>
<ul class="nasted"> <ul class="nasted active">
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" id="knt_adm" onclick="k_adm()" value="BLACK" class="checkboxOccInfo" name="checkOccInfo" style="margin-top:2px;"> <input type="checkbox" id="knt_adm" onclick="k_adm()" value="BLACK" class="checkboxOccInfo" name="checkOccInfo" style="margin-top:2px;">
......
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