Skip to content

Commit

Permalink
perbaiki peta tidak tampil (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
apidong authored May 30, 2022
1 parent b9b8a7b commit 0c96bea
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions resources/views/data/data_desa/peta.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="row">
<div class="col-md-12">
<div id="tampil-map" style="height: calc(100VH - 110px);">
<div class="text-center" style="margin-top: 35vh"><h1>Peta Tidak Tersedia</h1></div>
<div class="text-center" style="margin-top: 35vh"><h1>Memuat Peta</h1></div>
</div>
<input type="hidden" id="path">
</div>
Expand All @@ -42,6 +42,9 @@ function tampil_peta () {
});
var path_desa = {{ empty($desa->path)? 'new Array()': $desa->path }};
if (path_desa.length == 0) {
$('#tampil-map div.text-center').html(`<h1>Peta Tidak Tersedia</h1>`)
}
// Geolocation IP Route/GPS
geoLocation(peta_wilayah);
showPolygon(path_desa, peta_wilayah)
Expand All @@ -54,7 +57,6 @@ function tampil_peta () {
};
$(function () {
$('#list_desa').change(function () {
$("#desa_id").val($('#list_desa').val());
$("#nama").val($('#list_desa option:selected').text());
Expand All @@ -76,11 +78,11 @@ function path_kec () {
}
$.when(path_kec()).done(function(res_kec){
if (res_kec) {
if (res_kec && res_kec.data != null) {
var mark_kec = set_marker(res_kec.data, 'Peta Wilayah Kecamatan', 'Wilayah Kecamatan ' + res_kec.data.profil.nama_kecamatan, {'line' : '#de2d26', 'fill' : '#fff'});
overlayLayers['Peta Wilayah Kecamatan'] = wilayah_property(mark_kec, false);
tampil_peta();
}
tampil_peta();
});
});
</script>
Expand Down

0 comments on commit 0c96bea

Please sign in to comment.