diff --git a/resources/views/data/data_desa/peta.blade.php b/resources/views/data/data_desa/peta.blade.php index e261d2c6a..74d93f7e1 100644 --- a/resources/views/data/data_desa/peta.blade.php +++ b/resources/views/data/data_desa/peta.blade.php @@ -19,7 +19,7 @@
-

Peta Tidak Tersedia

+

Memuat Peta

@@ -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(`

Peta Tidak Tersedia

`) + } // Geolocation IP Route/GPS geoLocation(peta_wilayah); showPolygon(path_desa, peta_wilayah) @@ -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()); @@ -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(); }); });