Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perbaiki peta tidak tampil #419

Merged
merged 1 commit into from
May 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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