316 lines
16 KiB
PHP
316 lines
16 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="id">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>WebGIS Pemetaan Kemiskinan</title>
|
|
|
|
<!-- Google Fonts -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
<link href="https://fonts.googleapis.com/css2?family=Google+Sans+Flex:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
|
|
<!-- FontAwesome (Icons) -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
|
|
<!-- Leaflet CSS -->
|
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
|
|
|
<!-- Leaflet Draw CSS -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.css"/>
|
|
|
|
<!-- Custom CSS -->
|
|
<link rel="stylesheet" href="assets/css/style.css">
|
|
</head>
|
|
<body>
|
|
|
|
<!-- UI Container over map -->
|
|
<div class="ui-container">
|
|
<!-- Search Bar -->
|
|
<div class="search-bar">
|
|
<div class="search-icon">
|
|
<i class="fas fa-search"></i>
|
|
</div>
|
|
<input type="text" class="search-input" id="searchInput" placeholder="Cari SPBU, jalan, parsil, rumah ibadah...">
|
|
<button class="search-clear" id="searchClear">
|
|
<i class="fas fa-times"></i>
|
|
</button>
|
|
</div>
|
|
<!-- Search Results -->
|
|
<div id="searchResults" style="display: none; background: white; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); max-height: 200px; overflow-y: auto;">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Custom Zoom Control -->
|
|
<div class="custom-zoom-control" style="position: absolute; top: 20px; left: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 5px;">
|
|
<button class="custom-layer-btn" id="zoomInBtn" style="position: relative; top: 0; left: 0; right: auto;" title="Zoom In"><i class="fas fa-plus"></i></button>
|
|
<button class="custom-layer-btn" id="zoomOutBtn" style="position: relative; top: 0; left: 0; right: auto;" title="Zoom Out"><i class="fas fa-minus"></i></button>
|
|
</div>
|
|
|
|
<!-- Sidebar Toggle Button -->
|
|
<button class="sidebar-toggle-btn" id="sidebarToggleBtn" title="Menu">
|
|
<i class="fas fa-chevron-right" id="sidebarToggleIcon"></i>
|
|
</button>
|
|
|
|
<!-- Left Sidebar Menu -->
|
|
<nav class="left-sidebar" id="leftSidebar" style="display:none;">
|
|
<button class="sidebar-btn" id="menuSpbu" data-panel="spbu" title="SPBU">
|
|
<span class="sidebar-emoji">⛽</span>
|
|
<span class="sidebar-label">SPBU</span>
|
|
</button>
|
|
<button class="sidebar-btn" id="menuJalan" data-panel="jalan" title="Jalan">
|
|
<span class="sidebar-emoji">🛣️</span>
|
|
<span class="sidebar-label">Jalan</span>
|
|
</button>
|
|
<button class="sidebar-btn" id="menuParsil" data-panel="parsil" title="Parsil Tanah">
|
|
<span class="sidebar-emoji">🗺️</span>
|
|
<span class="sidebar-label">Parsil</span>
|
|
</button>
|
|
<button class="sidebar-btn" id="menuIbadah" data-panel="ibadah" title="Rumah Ibadah">
|
|
<span class="sidebar-emoji">🕌</span>
|
|
<span class="sidebar-label">Ibadah</span>
|
|
</button>
|
|
<button class="sidebar-btn" id="menuMiskin" data-panel="miskin" title="Penduduk Miskin">
|
|
<span class="sidebar-emoji">🏠</span>
|
|
<span class="sidebar-label">Miskin</span>
|
|
</button>
|
|
</nav>
|
|
|
|
|
|
|
|
<!-- Custom Layer Control Button -->
|
|
<button class="custom-layer-btn" id="layerBtn" title="Atur Layer">
|
|
<i class="fas fa-layer-group fa-lg"></i>
|
|
</button>
|
|
|
|
<div>
|
|
<!-- Custom Layer Control Panel -->
|
|
<div class="custom-layer-panel" id="layerPanel">
|
|
<h3>Daftar Layer</h3>
|
|
|
|
<!-- SPBU -->
|
|
<div class="layer-group-item">
|
|
<div class="layer-group-header">
|
|
<label class="layer-option" style="margin:0; flex:1;">
|
|
<input type="checkbox" id="layerSpbu" checked> SPBU
|
|
</label>
|
|
<span class="layer-toggle-icon collapsed" onclick="toggleSubLayer('subSpbu', this)"><i class="fas fa-chevron-down"></i></span>
|
|
</div>
|
|
<div id="subSpbu" class="sub-layer-list" style="display:none;">
|
|
<label class="layer-option sub-option">
|
|
<input type="checkbox" class="sub-spbu" value="1" checked onchange="applySubFilter('spbu')"> 24 Jam
|
|
</label>
|
|
<label class="layer-option sub-option">
|
|
<input type="checkbox" class="sub-spbu" value="0" checked onchange="applySubFilter('spbu')"> Tidak 24 Jam
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Jalan -->
|
|
<div class="layer-group-item">
|
|
<div class="layer-group-header">
|
|
<label class="layer-option" style="margin:0; flex:1;">
|
|
<input type="checkbox" id="layerJalan" checked> Jalan
|
|
</label>
|
|
<span class="layer-toggle-icon collapsed" onclick="toggleSubLayer('subJalan', this)"><i class="fas fa-chevron-down"></i></span>
|
|
</div>
|
|
<div id="subJalan" class="sub-layer-list" style="display:none;">
|
|
<label class="layer-option sub-option">
|
|
<input type="checkbox" class="sub-jalan" value="Nasional" checked onchange="applySubFilter('jalan')"> Nasional
|
|
</label>
|
|
<label class="layer-option sub-option">
|
|
<input type="checkbox" class="sub-jalan" value="Provinsi" checked onchange="applySubFilter('jalan')"> Provinsi
|
|
</label>
|
|
<label class="layer-option sub-option">
|
|
<input type="checkbox" class="sub-jalan" value="Kabupaten" checked onchange="applySubFilter('jalan')"> Kabupaten
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Parsil -->
|
|
<div class="layer-group-item">
|
|
<div class="layer-group-header">
|
|
<label class="layer-option" style="margin:0; flex:1;">
|
|
<input type="checkbox" id="layerParsil" checked> Parsil Tanah
|
|
</label>
|
|
<span class="layer-toggle-icon collapsed" onclick="toggleSubLayer('subParsil', this)"><i class="fas fa-chevron-down"></i></span>
|
|
</div>
|
|
<div id="subParsil" class="sub-layer-list" style="display:none;">
|
|
<label class="layer-option sub-option">
|
|
<input type="checkbox" class="sub-parsil" value="SHM" checked onchange="applySubFilter('parsil')"> SHM
|
|
</label>
|
|
<label class="layer-option sub-option">
|
|
<input type="checkbox" class="sub-parsil" value="HGB" checked onchange="applySubFilter('parsil')"> HGB
|
|
</label>
|
|
<label class="layer-option sub-option">
|
|
<input type="checkbox" class="sub-parsil" value="HGU" checked onchange="applySubFilter('parsil')"> HGU
|
|
</label>
|
|
<label class="layer-option sub-option">
|
|
<input type="checkbox" class="sub-parsil" value="HP" checked onchange="applySubFilter('parsil')"> HP
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Rumah Ibadah -->
|
|
<label class="layer-option">
|
|
<input type="checkbox" id="layerRumahIbadah" checked> Rumah Ibadah
|
|
</label>
|
|
|
|
<!-- Penduduk Miskin -->
|
|
<div class="layer-group-item">
|
|
<div class="layer-group-header">
|
|
<label class="layer-option" style="margin:0; flex:1;">
|
|
<input type="checkbox" id="layerMiskin" checked> Penduduk Miskin
|
|
</label>
|
|
<span class="layer-toggle-icon collapsed" onclick="toggleSubLayer('subMiskin', this)"><i class="fas fa-chevron-down"></i></span>
|
|
</div>
|
|
<div id="subMiskin" class="sub-layer-list" style="display:none;">
|
|
<label class="layer-option sub-option">
|
|
<input type="checkbox" class="sub-miskin" value="Makan" checked onchange="applySubFilter('miskin')"> Bantuan Makan
|
|
</label>
|
|
<label class="layer-option sub-option">
|
|
<input type="checkbox" class="sub-miskin" value="Pemberdayaan" checked onchange="applySubFilter('miskin')"> Pemberdayaan
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- GeoJSON Eksternal -->
|
|
<div class="layer-group" style="margin-top: 10px; border-top: 1px solid #eee; padding-top: 10px;">
|
|
<div class="layer-group-header" onclick="window.toggleGeoJsonMenu()" style="cursor:pointer; display:flex; justify-content:space-between; align-items:center; font-size:14px; margin-bottom:8px; font-weight: 500;">
|
|
<span><i class="fas fa-folder"></i> GeoJSON Eksternal</span>
|
|
<i id="geoJsonToggleIcon" class="fas fa-plus"></i>
|
|
</div>
|
|
<div id="geoJsonFileList" style="display:none; padding-left:15px; margin-bottom:10px;">
|
|
<div id="geoJsonLayersContainer"></div>
|
|
<div style="margin-top: 10px; padding-top: 10px; border-top: 1px dashed #ddd;">
|
|
<label style="font-size: 12px; display:block; margin-bottom: 5px;">Import GeoJSON Baru:</label>
|
|
<input type="file" id="fileGeoJson" accept=".geojson,.json" style="font-size: 12px; max-width: 100%;">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div><!-- /custom-layer-panel -->
|
|
|
|
<!-- Right Data Panel -->
|
|
<div class="right-panel" id="rightPanel">
|
|
<div class="right-panel-header">
|
|
<h3 id="rightPanelTitle">Data</h3>
|
|
<button class="right-panel-close" id="rightPanelClose"><i class="fas fa-times"></i></button>
|
|
</div>
|
|
<div class="right-panel-actions" id="rightPanelActions"></div>
|
|
<div class="right-panel-body" id="rightPanelBody">
|
|
<div class="panel-empty">Pilih menu di kiri untuk menampilkan data</div>
|
|
</div>
|
|
</div><!-- /right-panel -->
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Map Container -->
|
|
<div id="map"></div>
|
|
|
|
<!-- Unified Modal -->
|
|
<div id="unifiedModal" class="unified-modal">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h3 id="modalTitle">Judul Form</h3>
|
|
<span class="modal-close" onclick="closeModal()">×</span>
|
|
</div>
|
|
<div class="modal-body" id="modalBody">
|
|
<!-- Konten dinamis -->
|
|
</div>
|
|
<div class="modal-footer" id="modalFooter">
|
|
<button id="modalSaveBtn" class="btn-save">Simpan</button>
|
|
<button class="btn-cancel" onclick="closeModal()">Batal</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Confirm Modal -->
|
|
<div id="confirmModal" class="unified-modal">
|
|
<div class="modal-content" style="width: 300px;">
|
|
<div class="modal-header">
|
|
<h3>Konfirmasi</h3>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p id="confirmMessage"></p>
|
|
</div>
|
|
<div class="modal-footer" style="display: flex; gap: 10px; justify-content: flex-end;">
|
|
<button id="confirmYesBtn" class="btn-save" style="background-color: #dc3545;">Ya, Hapus</button>
|
|
<button class="btn-cancel" onclick="closeConfirmModal()">Batal</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Log Bantuan Modal -->
|
|
<div id="logBantuanModal" class="unified-modal">
|
|
<div class="modal-content" style="width:500px; max-height:85vh; overflow:hidden; display:flex; flex-direction:column;">
|
|
<div class="modal-header">
|
|
<h3 id="logBantuanTitle">Log Bantuan</h3>
|
|
<span class="modal-close" onclick="closeLogBantuanModal()">×</span>
|
|
</div>
|
|
<div class="modal-body" style="flex:1; overflow-y:auto; gap:0; padding:0;">
|
|
<!-- Riwayat -->
|
|
<div style="padding:15px; border-bottom:1px solid #eee;">
|
|
<h4 style="font-size:13px; font-weight:600; color:#555; margin-bottom:10px;">Riwayat Bantuan</h4>
|
|
<div id="logBantuanList" style="max-height:220px; overflow-y:auto; display:flex; flex-direction:column; gap:8px;">
|
|
<div class="panel-empty" style="padding:20px;">Belum ada riwayat</div>
|
|
</div>
|
|
</div>
|
|
<!-- Form Tambah -->
|
|
<div style="padding:15px;">
|
|
<h4 style="font-size:13px; font-weight:600; color:#555; margin-bottom:10px;">Tambah Log Bantuan</h4>
|
|
<div class="form-group">
|
|
<label>Rumah Ibadah</label>
|
|
<select id="logIbadahId"></select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Tipe Bantuan</label>
|
|
<select id="logTipeBantuan">
|
|
<option value="Sembako">Sembako</option>
|
|
<option value="Uang Tunai">Uang Tunai</option>
|
|
<option value="Pakaian">Pakaian</option>
|
|
<option value="Pendidikan">Pendidikan</option>
|
|
<option value="Kesehatan">Kesehatan</option>
|
|
<option value="Lainnya">Lainnya</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Tanggal</label>
|
|
<input type="date" id="logTanggal">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Keterangan (opsional)</label>
|
|
<textarea id="logKeterangan" rows="2" placeholder="Catatan tambahan..."></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn-save" id="logSaveBtn">Simpan Log</button>
|
|
<button class="btn-cancel" onclick="closeLogBantuanModal()">Tutup</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Leaflet JS -->
|
|
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
|
|
|
<!-- Leaflet Draw JS -->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.js"></script>
|
|
|
|
<!-- Leaflet TextPath JS (untuk teks diagonal) -->
|
|
<script src="https://cdn.jsdelivr.net/npm/leaflet-textpath@1.2.3/leaflet.textpath.min.js"></script>
|
|
|
|
<!-- Main Map Initialization -->
|
|
<script src="assets/js/map.js?v=<?= time() ?>"></script>
|
|
<!-- Fitur & Komponen -->
|
|
<script src="assets/js/features/spbu.js?v=<?= time() ?>"></script>
|
|
<script src="assets/js/features/jalan.js?v=<?= time() ?>"></script>
|
|
<script src="assets/js/features/parsil.js?v=<?= time() ?>"></script>
|
|
<script src="assets/js/features/draw_control.js?v=<?= time() ?>"></script>
|
|
<script src="assets/js/features/geolocation.js?v=<?= time() ?>"></script>
|
|
<script src="assets/js/features/kemiskinan.js?v=<?= time() ?>"></script>
|
|
<script src="assets/js/features/geojson.js?v=<?= time() ?>"></script>
|
|
<script src="assets/js/panel.js?v=<?= time() ?>"></script>
|
|
|
|
</body>
|
|
</html>
|