Commit 588f190e authored by Muhamad's avatar Muhamad

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

parents 1184c705 bde81e96
...@@ -8,7 +8,21 @@ from django.contrib.auth.decorators import login_required ...@@ -8,7 +8,21 @@ from django.contrib.auth.decorators import login_required
app_name = 'api' app_name = 'api'
urlpatterns = [ urlpatterns = [
path('search_auto', views.search_auto, name='search'), path('search_auto', views.search_auto, name='search'),
path('kantor_administrasi', views.kantor_administrasi, name='kantor_administrasi'),
path('layanan_kesehatan', views.layanan_kesehatan, name='layanan_kesehatan'),
path('apiviewpuskesmas', views.apiviewpuskesmas, name='apiviewpuskesmas'),
path('rumah_sakit', views.rumah_sakit, name='rumah_sakit'),
path('sarana_ibadah', views.sarana_ibadah, name='sarana_ibadah'),
path('sarana_pendidikan', views.sarana_pendidikan, name='sarana_pendidikan'),
path('apiviewstasiun', views.apiviewstasiun, name='apiviewstasiun'),
path('apiviewterminal', views.apiviewterminal, name='apiviewterminal'),
path('apiviewcagarbudaya', views.apiviewcagarbudaya, name='apiviewcagarbudaya'),
path('apiviewgardulistrik', views.apiviewgardulistrik, name='apiviewgardulistrik'),
path('tuplah', views.tuplah, name='tuplah'), path('tuplah', views.tuplah, name='tuplah'),
path('kecamatan', views.kecamatan, name='kecamatan'),
path('desangab', views.desangab, name='desangab'),
path('building', views.building, name='building'), path('building', views.building, name='building'),
path('jalan', views.jalan, name='jalan'), path('jalan', views.jalan, name='jalan'),
......
This diff is collapsed.
This diff is collapsed.
...@@ -85,11 +85,11 @@ DATABASES = { ...@@ -85,11 +85,11 @@ DATABASES = {
'NAME': 'oku_gis_new', 'NAME': 'oku_gis_new',
'USER': 'postgres', 'USER': 'postgres',
'PASSWORD' : 'khansia215758', 'PASSWORD' : 'khansia215758',
'HOST': '30.10.20.102', # 'HOST': '30.10.20.102',
'PORT': '5432', # 'PORT': '5432',
'HOST': '103.126.28.66',
'PORT': '8082',
# 'HOST': '103.126.28.66', # 'HOST': '103.126.28.66',
# 'PORT': '8082',
# 'HOST': '125.164.19.183',
# 'PORT': '5432', # 'PORT': '5432',
} }
} }
......
This diff is collapsed.
...@@ -62,13 +62,13 @@ ...@@ -62,13 +62,13 @@
} }
var kecamatan = "{{ kecamatan }}".replace(/'/g, '"'); // var kecamatan = "{{ kecamatan }}".replace(/'/g, '"');
var result_kec = JSON.parse("" + kecamatan + ""); // var result_kec = JSON.parse("" + kecamatan + "");
var kelurahan = "{{ kelurahan }}".replace(/'/g, '"'); // var kelurahan = "{{ kelurahan }}".replace(/'/g, '"');
var result_kel = JSON.parse("" + kelurahan + "") // var result_kel = JSON.parse("" + kelurahan + "")
var geo_batas_kel = batas_desa_desa(); var geo_batas_kel = batas_desa_desa();
function batas_desa_desa() { function batas_desa_desa() {
...@@ -757,9 +757,6 @@ ...@@ -757,9 +757,6 @@
}); });
var geo_batas_kec = L.geoJson(null, { var geo_batas_kec = L.geoJson(null, {
style: function(feature) { style: function(feature) {
return { return {
...@@ -790,9 +787,9 @@ ...@@ -790,9 +787,9 @@
}, },
click: function(e) { click: function(e) {
$("modal_kecamatan").modal('show'); $("modal_kecamatan").modal('show');
var geocodeService = L.esri.Geocoding.geocodeService(); // var geocodeService = L.esri.Geocoding.geocodeService();
var geocoderNominatim = new L.Control.Geocoder.Nominatim(); // var geocoderNominatim = new L.Control.Geocoder.Nominatim();
var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result) { // var geogeo = geocodeService.reverse().latlng(e.latlng).run(function(error, result) {
console.log(feature.administrasi.f1) console.log(feature.administrasi.f1)
content_edit_kec = ` content_edit_kec = `
<div class="modal-dialog modal-md"> <div class="modal-dialog modal-md">
...@@ -825,7 +822,7 @@ ...@@ -825,7 +822,7 @@
</div> </div>
</div>`; </div>`;
$("#modal_kecamatan").html(content_edit_kec) $("#modal_kecamatan").html(content_edit_kec)
}); // });
} }
}); });
...@@ -840,9 +837,9 @@ ...@@ -840,9 +837,9 @@
geo_batas_kec.addData(data) geo_batas_kec.addData(data)
} }
geo_json_kel(result_kel); // geo_json_kel(result_kel);
//geo_json_jalan(result_jln) //geo_json_jalan(result_jln)
geo_json_kec(result_kec); // geo_json_kec(result_kec);
function onEachFeature(feature, layer) { function onEachFeature(feature, layer) {
if (feature.properties && feature.properties.popupContent) { if (feature.properties && feature.properties.popupContent) {
...@@ -852,10 +849,42 @@ ...@@ -852,10 +849,42 @@
function batasdesa() { function batasdesa() {
// var checkBox = document.getElementById("batas_desa");
// if (checkBox.checked == true) {
// geo_batas_kel.addTo(map)
// } else {
// geo_batas_kel.remove()
// }
// cek_overlay()
var checkBox = document.getElementById("batas_desa"); var checkBox = document.getElementById("batas_desa");
if (checkBox.checked == true) { if (checkBox.checked == true) {
// loaderPage(true);
if (map.hasLayer(geo_batas_kel)) {
geo_batas_kel.clearLayers()
geo_batas_kel.remove()
// geo_batas_kel.addTo(map)
}
$.ajax({
url: "{% url 'api:desangab'%}",
dataType: 'json',
type: 'GET',
success: function(response) {
// loaderPage(false);
// map.setView([-4.125826277307029, 104.1881561279297], 13);
// var len = response['kecamatan'].length;
// console.log(response)
var data_de = []
for (var i = 0; i < response['kembangdesa'].length; i++) {
geoj = response['kembangdesa'][i];
data_de.push(geoj);
}
// console.log(data_de)
geo_json_kel(data_de);
}
});
geo_batas_kel.addTo(map) geo_batas_kel.addTo(map)
} else { } else {
geo_batas_kel.clearLayers()
geo_batas_kel.remove() geo_batas_kel.remove()
} }
cek_overlay() cek_overlay()
...@@ -872,10 +901,41 @@ ...@@ -872,10 +901,41 @@
} }
function bataskec() { function bataskec() {
// var checkBox = document.getElementById("batas_kec");
// if (checkBox.checked == true) {
// geo_batas_kec.addTo(map)
// } else {
// geo_batas_kec.remove()
// }
// cek_overlay()
var checkBox = document.getElementById("batas_kec"); var checkBox = document.getElementById("batas_kec");
if (checkBox.checked == true) { if (checkBox.checked == true) {
// loaderPage(true);
if (map.hasLayer(geo_batas_kec)) {
geo_batas_kec.clearLayers()
geo_batas_kec.remove()
}
$.ajax({
url: "{% url 'api:kecamatan'%}",
dataType: 'json',
type: 'GET',
success: function(response) {
// loaderPage(false);
// map.setView([-4.125826277307029, 104.1881561279297], 13);
// var len = response['kecamatan'].length;
// console.log(response)
var data_de = []
for (var i = 0; i < response['kecamatan'].length; i++) {
geoj = response['kecamatan'][i];
data_de.push(geoj);
}
// console.log(data_de)
geo_json_kec(data_de);
}
});
geo_batas_kec.addTo(map) geo_batas_kec.addTo(map)
} else { } else {
geo_batas_kec.clearLayers()
geo_batas_kec.remove() geo_batas_kec.remove()
} }
cek_overlay() cek_overlay()
...@@ -898,9 +958,11 @@ ...@@ -898,9 +958,11 @@
document.getElementById("batas_kec").checked = true; document.getElementById("batas_kec").checked = true;
document.getElementById("batas_kota").checked = true; document.getElementById("batas_kota").checked = true;
document.getElementById("batas_desa").checked = true; document.getElementById("batas_desa").checked = true;
geo_batas_kec.addTo(map)
geo_batas.addTo(map) geo_batas.addTo(map)
geo_batas_kel.addTo(map) // geo_batas_kel.addTo(map)
// geo_batas_kec.addTo(map)
bataskec()
batasdesa()
} else { } else {
document.getElementById("batas_kec").checked = false; document.getElementById("batas_kec").checked = false;
document.getElementById("batas_kota").checked = false; document.getElementById("batas_kota").checked = false;
......
...@@ -379,7 +379,7 @@ ...@@ -379,7 +379,7 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="gambar_kelurahan"> <div class="gambar_kelurahan">
<img src="/static/img/imm.png" alt="" style="width:360px;height:290px;border-top-left-radius: 10px;"> <img src="/static/img/image_null.png" alt="" style="width:360px;height:290px;border-top-left-radius: 10px;">
</div> </div>
<div style="margin: 10px;"> <div style="margin: 10px;">
......
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