Initial WebGIS portal project
This commit is contained in:
@@ -0,0 +1,372 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="id">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>WebGIS SPBU</title>
|
||||
<link rel="stylesheet" href="assets/vendor/leaflet/leaflet.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css">
|
||||
<style>
|
||||
:root {
|
||||
--bg-top: #f0f9ff;
|
||||
--bg-bottom: #e2e8f0;
|
||||
--panel: rgba(255, 255, 255, 0.92);
|
||||
--line: #cbd5e1;
|
||||
--text: #0f172a;
|
||||
--muted: #334155;
|
||||
--accent: #16a34a;
|
||||
--accent-dark: #166534;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||
background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
|
||||
color: var(--text);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.app {
|
||||
height: 100dvh;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 14px 18px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
background: var(--panel);
|
||||
backdrop-filter: blur(4px);
|
||||
z-index: 500;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
margin: 0 0 6px;
|
||||
font-size: 20px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.header p {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.legend {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 8px;
|
||||
font-size: 12px;
|
||||
color: #223055;
|
||||
}
|
||||
|
||||
.legend span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: #ffffff;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 999px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.map-wrap {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#map {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #dbeafe;
|
||||
}
|
||||
|
||||
.leaflet-popup-content-wrapper,
|
||||
.leaflet-popup-tip {
|
||||
background: #ffffff;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.leaflet-popup-content {
|
||||
margin: 12px 14px;
|
||||
}
|
||||
|
||||
.form-popup {
|
||||
min-width: 260px;
|
||||
}
|
||||
|
||||
.form-popup h3 {
|
||||
margin: 0 0 12px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.field {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.field label {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
margin-bottom: 5px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.field input,
|
||||
.field select {
|
||||
width: 100%;
|
||||
padding: 9px 10px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.field input:focus,
|
||||
.field select:focus {
|
||||
outline: 2px solid rgba(22, 163, 74, 0.25);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.actions button {
|
||||
flex: 1;
|
||||
padding: 10px 12px;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.btn-save {
|
||||
background: var(--accent);
|
||||
color: #f0fdf4;
|
||||
}
|
||||
|
||||
.btn-save:hover {
|
||||
background: var(--accent-dark);
|
||||
}
|
||||
|
||||
.btn-cancel {
|
||||
background: #e2e8f0;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
.btn-delete {
|
||||
background: #dc2626;
|
||||
color: #ffffff;
|
||||
margin-top: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.btn-delete:hover {
|
||||
background: #b91c1c;
|
||||
}
|
||||
|
||||
.point-popup .meta {
|
||||
font-size: 12px;
|
||||
color: #475569;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.status {
|
||||
font-size: 12px;
|
||||
margin-top: 10px;
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
.status.error {
|
||||
color: #b91c1c;
|
||||
}
|
||||
|
||||
.status.success {
|
||||
color: #166534;
|
||||
}
|
||||
|
||||
/* Perkecil vertex saat menggambar line/polygon */
|
||||
.leaflet-div-icon.leaflet-editing-icon {
|
||||
width: 8px !important;
|
||||
height: 8px !important;
|
||||
margin-left: -4px !important;
|
||||
margin-top: -4px !important;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.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: #ffffff;
|
||||
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 input[readonly] {
|
||||
background: #eef2ff;
|
||||
}
|
||||
|
||||
.popup-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.popup-actions button {
|
||||
flex: 1;
|
||||
font-size: 12px;
|
||||
padding: 8px;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-popup-edit {
|
||||
background: #16a34a;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-popup-refine {
|
||||
background: #f59e0b;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.btn-popup-save {
|
||||
background: #0f766e;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-popup-cancel {
|
||||
background: #64748b;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-popup-delete {
|
||||
background: #dc2626;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.header h1 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.header p {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="app">
|
||||
<header class="header">
|
||||
<h1>WebGIS SPBU</h1>
|
||||
<p>Klik peta untuk titik SPBU. Gunakan toolbar kiri peta untuk menggambar jalan dan parsil.</p>
|
||||
<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-save">Simpan</button>
|
||||
<button type="button" id="btn-cancel" class="btn-cancel">Batal</button>
|
||||
</div>
|
||||
<div id="form-status" class="status"></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
|
||||
<script src="https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js"></script>
|
||||
<script src="assets/js/kecamatan-layer.js"></script>
|
||||
<script src="assets/js/map.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user