297 lines
8.4 KiB
HTML
297 lines
8.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="id">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>WebGIS Spasial Jalan dan Parsil</title>
|
|
|
|
<link rel="stylesheet" href="assets/vendor/leaflet/leaflet.css">
|
|
<link rel="stylesheet" href="assets/vendor/leaflet-draw/leaflet.draw.css">
|
|
|
|
<style>
|
|
:root {
|
|
--ink: #0b132b;
|
|
--sky: #f5f7ff;
|
|
--line: #d3d9eb;
|
|
--panel: #ffffff;
|
|
--accent: #0f766e;
|
|
--accent-dark: #115e59;
|
|
--danger: #b91c1c;
|
|
--muted: #3f4d73;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
height: 100%;
|
|
font-family: "Trebuchet MS", "Segoe UI", sans-serif;
|
|
color: var(--ink);
|
|
background: radial-gradient(circle at top left, #e0f2fe 0%, #f8fafc 45%, #f1f5f9 100%);
|
|
}
|
|
|
|
.app {
|
|
height: 100dvh;
|
|
display: grid;
|
|
grid-template-rows: auto 1fr;
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
gap: 16px;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 12px 18px;
|
|
border-bottom: 1px solid var(--line);
|
|
background: rgba(255, 255, 255, 0.94);
|
|
backdrop-filter: blur(6px);
|
|
}
|
|
|
|
.header h1 {
|
|
margin: 0;
|
|
font-size: 20px;
|
|
}
|
|
|
|
.header p {
|
|
margin: 4px 0 0;
|
|
color: var(--muted);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.legend {
|
|
display: flex;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
font-size: 12px;
|
|
color: #223055;
|
|
}
|
|
|
|
.legend span {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: 999px;
|
|
padding: 6px 10px;
|
|
}
|
|
|
|
.dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 999px;
|
|
display: inline-block;
|
|
}
|
|
|
|
.map-wrap {
|
|
position: relative;
|
|
min-height: 0;
|
|
}
|
|
|
|
#map {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.modal-backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(11, 19, 43, 0.38);
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 16px;
|
|
z-index: 2000;
|
|
}
|
|
|
|
.modal-backdrop.open {
|
|
display: flex;
|
|
}
|
|
|
|
.modal {
|
|
width: min(460px, 100%);
|
|
background: var(--panel);
|
|
border-radius: 14px;
|
|
border: 1px solid var(--line);
|
|
box-shadow: 0 20px 55px rgba(17, 24, 39, 0.28);
|
|
padding: 16px;
|
|
}
|
|
|
|
.modal h3 {
|
|
margin: 0 0 12px;
|
|
}
|
|
|
|
.field {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.field label {
|
|
display: block;
|
|
font-size: 12px;
|
|
margin-bottom: 4px;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.field input,
|
|
.field select {
|
|
width: 100%;
|
|
padding: 9px 10px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--line);
|
|
font-size: 14px;
|
|
color: var(--ink);
|
|
}
|
|
|
|
.field input[readonly] {
|
|
background: #eef2ff;
|
|
}
|
|
|
|
.actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-top: 12px;
|
|
}
|
|
|
|
button {
|
|
border: 0;
|
|
border-radius: 8px;
|
|
padding: 10px 12px;
|
|
cursor: pointer;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.btn-primary {
|
|
flex: 1;
|
|
background: var(--accent);
|
|
color: #f0fdfa;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--accent-dark);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: #e2e8f0;
|
|
color: #1e293b;
|
|
}
|
|
|
|
.btn-danger {
|
|
background: var(--danger);
|
|
color: #fff;
|
|
}
|
|
|
|
.status {
|
|
font-size: 12px;
|
|
margin-top: 8px;
|
|
color: #334155;
|
|
min-height: 16px;
|
|
}
|
|
|
|
.status.error {
|
|
color: #b91c1c;
|
|
}
|
|
|
|
.status.success {
|
|
color: #166534;
|
|
}
|
|
|
|
.popup-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.popup-actions button {
|
|
flex: 1;
|
|
font-size: 12px;
|
|
padding: 8px;
|
|
}
|
|
|
|
@media (max-width: 700px) {
|
|
.header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="app">
|
|
<header class="header">
|
|
<div>
|
|
<h1>WebGIS Manajemen Jalan & Parsil</h1>
|
|
<p>Gunakan toolbar kiri peta untuk gambar polyline/polygon, edit, atau hapus geometri.</p>
|
|
</div>
|
|
<div class="legend">
|
|
<span><i class="dot" style="background:#dc2626"></i>Jalan Nasional</span>
|
|
<span><i class="dot" style="background:#2563eb"></i>Jalan Provinsi</span>
|
|
<span><i class="dot" style="background:#16a34a"></i>Jalan Kabupaten</span>
|
|
</div>
|
|
</header>
|
|
<div class="map-wrap">
|
|
<div id="map"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="modal-backdrop" class="modal-backdrop" aria-hidden="true">
|
|
<div class="modal">
|
|
<h3 id="modal-title">Form Data</h3>
|
|
<form id="feature-form">
|
|
<div id="road-fields" hidden>
|
|
<div class="field">
|
|
<label for="nama_jalan">Nama Jalan</label>
|
|
<input id="nama_jalan" name="nama_jalan" type="text" required>
|
|
</div>
|
|
<div class="field">
|
|
<label for="status_jalan">Status Jalan</label>
|
|
<select id="status_jalan" name="status_jalan" required>
|
|
<option value="nasional">Jalan Nasional</option>
|
|
<option value="provinsi">Jalan Provinsi</option>
|
|
<option value="kabupaten">Jalan Kabupaten</option>
|
|
</select>
|
|
</div>
|
|
<div class="field">
|
|
<label for="panjang_meter">Panjang Jalan (meter)</label>
|
|
<input id="panjang_meter" name="panjang_meter" type="text" readonly>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="parcel-fields" hidden>
|
|
<div class="field">
|
|
<label for="nama_pemilik">Nama Pemilik</label>
|
|
<input id="nama_pemilik" name="nama_pemilik" type="text" required>
|
|
</div>
|
|
<div class="field">
|
|
<label for="status_kepemilikan">Status Kepemilikan</label>
|
|
<select id="status_kepemilikan" name="status_kepemilikan" required>
|
|
<option value="SHM">Sertifikat Hak Milik (SHM)</option>
|
|
<option value="HGB">Sertifikat Hak Guna Bangunan (HGB)</option>
|
|
<option value="HGU">Sertifikat Hak Guna Usaha (HGU)</option>
|
|
<option value="HP">Sertifikat Hak Pakai (HP)</option>
|
|
</select>
|
|
</div>
|
|
<div class="field">
|
|
<label for="luas_m2">Luas Tanah (meter persegi)</label>
|
|
<input id="luas_m2" name="luas_m2" type="text" readonly>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="actions">
|
|
<button type="submit" class="btn-primary">Simpan</button>
|
|
<button type="button" id="btn-cancel" class="btn-secondary">Batal</button>
|
|
</div>
|
|
<div id="form-status" class="status"></div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="assets/vendor/leaflet/leaflet.js"></script>
|
|
<script src="assets/vendor/leaflet-draw/leaflet.draw.js"></script>
|
|
<script src="assets/js/kecamatan-layer.js"></script>
|
|
<script src="assets/js/spatial.js"></script>
|
|
</body>
|
|
</html>
|