Commit 7a1c1270 authored by Muhamad's avatar Muhamad

error

parent 60eaca51
...@@ -8,7 +8,7 @@ app_name = 'apps' ...@@ -8,7 +8,7 @@ app_name = 'apps'
urlpatterns = [ urlpatterns = [
path('', views.Dashboard.as_view(), name='dashboard'), path('', views.Dashboard.as_view(), name='dashboard'),
path('editkelurahan', views.editkelurahan, name='editkelurahan'), path('editkelurahan', edit.editkelurahan, name='editkelurahan'),
path('perbaikan', views.perbaikanrenovasi, name='perbaikan'), path('perbaikan', views.perbaikanrenovasi, name='perbaikan'),
path('loadDetail', views.loadDetail, name='loadDetail'), path('loadDetail', views.loadDetail, name='loadDetail'),
......
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
<tr> <tr>
<td> <td>
<input class="hidden" id="kode_desa_dagri" value="` + feature.administrasi.f1 + `"></input> <input class="hidden" id="kode_desa_dagri" value="` + feature.administrasi.f1 + `"></input>
<a id='btn_edit_kelurahan' class='btn <a href="/editkelurahan?kode_dagri=` + encodeURIComponent(feature.administrasi.f1) + `" class='btn
btn-default btn_edit_kelurahan' style="left: 130px;">Edit</a> btn-default btn_edit_kelurahan' style="left: 130px;">Edit</a>
</td> </td>
</tr> </tr>
...@@ -657,21 +657,22 @@ ...@@ -657,21 +657,22 @@
var map_kel = L.map('map-kelurahan', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([-4.125826277307029, 104.1881561279297], 10);
mapxxx = L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}&s=Gal&apistyle=s.t:0|s.e:l|p.v:off', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_kel);
var polygon_kel = L.polygon(null).addTo(map_kel)
$(document).on("click", "#btn_edit_kelurahan", function() { $(document).on("click", "#btn_edit_kelurahan", function() {
polygon_kel.clearLayers()
var map_kel = L.map('map-kelurahan', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([-4.125826277307029, 104.1881561279297], 10);
mapxxx = L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}&s=Gal&apistyle=s.t:0|s.e:l|p.v:off', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_kel);
$("#edit_kelurahan").css("display", "block") $("#edit_kelurahan").css("display", "block")
var id = $("#kode_desa_dagri").val() var id = $("#kode_desa_dagri").val()
...@@ -720,7 +721,9 @@ ...@@ -720,7 +721,9 @@
list_poly_edit.push(polygigi); list_poly_edit.push(polygigi);
}; };
polygon_kel.addData(list_poly_edit)
var polygon_kel = L.polygon(list_poly_edit).addTo(map_kel)
polygon_kel.enableEdit(); polygon_kel.enableEdit();
...@@ -1910,7 +1913,10 @@ ...@@ -1910,7 +1913,10 @@
var checkBox = document.getElementById("geo_jalan"); var checkBox = document.getElementById("geo_jalan");
if (checkBox.checked == true) { if (checkBox.checked == true) {
map.on("movestart", function() { map.on("movestart", function() {
geo_jalan.clearLayers(); if (map.hasLayer(geo_jalan)) {
geo_jalan.clearLayers()
geo_jalan.remove()
}
}); });
map.on("moveend", function(e) { map.on("moveend", function(e) {
...@@ -2435,8 +2441,6 @@ ...@@ -2435,8 +2441,6 @@
tempLatLng = latlng; tempLatLng = latlng;
return; return;
} }
alert(latlng)
totalDistance += tempLatLng.distanceTo(latlng); totalDistance += tempLatLng.distanceTo(latlng);
tempLatLng = latlng; tempLatLng = latlng;
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</div> </div>
</div> </div>
<div id="modal_detail" class="modal fade mymodal" style="padding-top: 0px;padding-bottom: 0px;right: -11px;"> <div id="modal_detail" class="modal fade mymodal" style="padding-top: 0px;padding-bottom: 0px;right: -11px;width: 100%!important;">
<div class="modal-dialog modal-lg" style="width: 100%;height: 100%;margin: 0;bottom: 0;"> <div class="modal-dialog modal-lg" style="width: 100%;height: 100%;margin: 0;bottom: 0;">
<div class="modal-content" style="height: 100%;"> <div class="modal-content" style="height: 100%;">
<div class="modal-header bg-info" style="background-color:#28343a"> <div class="modal-header bg-info" style="background-color:#28343a">
......
...@@ -453,6 +453,31 @@ ...@@ -453,6 +453,31 @@
#map-insert>div.leaflet-control-container { #map-insert>div.leaflet-control-container {
display: block; display: block;
} }
#map-insert>div.leaflet-control-container>div.leaflet-top.leaflet-left>div:nth-child(2) {
display: none;
}
.leaflet-draw-draw-polygon,
.leaflet-draw-draw-rectangle,
.leaflet-draw-draw-circle,
.leaflet-draw-draw-marker,
.leaflet-draw-draw-circlemarker {
display: none!important;
}
.leaflet-draw-toolbar {
position: absolute;
}
.leaflet-draw-actions {
padding: 0px 0px 0px 40px;
list-style-type: none;
}
.leaflet-container ul li a {
color: white;
}
</style> </style>
{% include 'includes/css-o.html' %} {% include 'includes/css-m.html' %} {% include 'includes/css-o.html' %} {% include 'includes/css-m.html' %}
......
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