Commit bd1ad456 authored by Muhamad's avatar Muhamad

pisah code

parent 4092eb5a
...@@ -132,7 +132,7 @@ class Dashboard(generic.TemplateView): ...@@ -132,7 +132,7 @@ class Dashboard(generic.TemplateView):
print(all) print(all)
context = { context = {
'title':'NA - Dashboard', 'title':'Dashboard',
'kelurahan':kel_res, 'kelurahan':kel_res,
'kecamatan':kec_res, 'kecamatan':kec_res,
'kantor_administrasi':kantor_administrasi_result, 'kantor_administrasi':kantor_administrasi_result,
......
...@@ -763,60 +763,6 @@ function geo_json_build_gen(data) { ...@@ -763,60 +763,6 @@ function geo_json_build_gen(data) {
geo_build_gen.addData(data) geo_build_gen.addData(data)
} }
// map.on("movestart", function() {
// geo_build_gen.clearLayers();
// geo_jln.clearLayers();
// geo_build_osm.clearLayers();
// });
// map.on("moveend", function() {
// var wetan = map.getBounds().getEast();
// var kulon = map.getBounds().getWest();
// var lor = map.getBounds().getNorth()
// var kidul = map.getBounds().getSouth();
// var center = map.getBounds().getCenter();
// var zoom = map.getZoom()
// if (zoom > 18) {
// $.ajax({
// url: 'api/khansia/v1/',
// data: {
// 'wetan': wetan,
// 'kulon': kulon,
// 'lor': lor,
// 'kidul': kidul,
// 'lat': center.lat,
// 'lng': center.lng
// },
// dataType: 'json',
// success: function(data) {
// $("#jumlah").html(`<span class="font-weight-bold">&nbsp;&nbsp;Jumlah Bangunan:&nbsp;` + data['jumlah_bangunan'] + `, ` + data['adm'][0][0] + `, ` + data['adm'][0][2] + `</span>`);
// let list_poly = [];
// for (var i = 0; i < data['gen'].length; i++) {
// geoj = data['gen'][i][0];
// list_poly.push(geoj);
// };
// geo_json_build_gen(list_poly);
// let list_osm = [];
// for (var i = 0; i < data['osm'].length; i++) {
// geoj = data['osm'][i][0];
// list_osm.push(geoj);
// };
// geo_json_build_osm(list_osm);
// let list_jln = [];
// for (var i = 0; i < data['jalan'].length; i++) {
// geoj = data['jalan'][i];
// list_jln.push(geoj);
// };
// geo_json_jln(list_jln);
// }
// });
// }
// });
$("#id_kec").change(function() { $("#id_kec").change(function() {
var kec_val = $(this).val(); var kec_val = $(this).val();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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