Commit d375e19f authored by Manggar Mahardhika's avatar Manggar Mahardhika

push jalan input fix

parent 0c7bf91e
......@@ -3048,6 +3048,8 @@ $(document).on("click", "#btn_perbaikan_jalan", function() {
var drawControl = new L.Control.Draw(options);
map_input.addControl(drawControl);
var partmbd = 0
map_input.on('draw:created', function(e) {
var type = e.layerType,
layer = e.layer;
......@@ -3066,12 +3068,13 @@ $(document).on("click", "#btn_perbaikan_jalan", function() {
}
totalDistance += tempLatLng.distanceTo(latlng);
partmbd = totalDistance + partmbd
tempLatLng = latlng;
});
e.layer.bindPopup((totalDistance).toFixed(2));
e.layer.openPopup();
$("#panjangjalanperbaikan").val((totalDistance).toFixed(2));
$("#panjangjalanperbaikan").val((partmbd).toFixed(2));
}
editableLayers.addLayer(layer);
});
......
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