Repository navigation
Feat: Peta Gabungan Geospasial & DataSpasial - #1311
Open
pandigresik wants to merge 32 commits into
Open
pandigresik wants to merge 32 commits into
pandigresik wants to merge 32 commits into
Conversation
…-dashboard)\n\n- spec.md with US1–US5, FR-001–FR-017, SC-001–SC-007 (no reload, tanpa data!=nol, clustering, popup flags)\n- plan.md + research.md + data-model.md + quickstart.md + contracts/view-contract.md\n- requirements checklist all pass
…oard) with US1–US5 phases
…asial sectors); no sektor picker; kecamatan-only filter
… filter, hover/click popup
…matan filter, hover/click popup
…/click popup, kecamatan-only filter, no sektor picker
Contributor
|
🔄 AI PR Review sedang antri di server...
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Menambahkan menu Peta Gabungan yang menyatukan data geospasial lama (sekolah, fasilitas kesehatan, tempat ibadah, dll.) dan data DataSpasial ke dalam satu peta Leaflet. Halaman memakai tata letak dua blok — blok filter (kiri) dan blok peta (kanan) — dengan panel Lapisan yang menyalakan/mematikan tiap kategori/peta sehingga konteks DataSpasial ditentukan oleh lapisan yang dipilih (tanpa pemilih sektor terpisah). Seluruh data dibaca lewat proxy
DataSpasialApiServiceke API Satu Data (GET /api/v1/dataspasial/geojson), sehingga perubahan filter memuat ulang peta tanpa reload halaman dan kegagalan API tidak pernah menampilkan halaman error.Changes made:
PetaGabunganControllerdirombak dari kerangka menjadi halaman penuh —index()menyajikan tata letak dua blok,data()menjadi endpoint proxy JSON (selalu HTTP 200) yang meneruskan filtersektor,kode_kabupaten,kode_kecamatan,kode_desa,periode, lalu menurunkanmeta.layers,meta.periods,meta.filters, danmeta.popup_isiandari skema sektor aktif.filter[kode]=nilai) disaring di sisi server viaapplyIsianFilters(), mencocokkan nilai numerik/teks padadataspasial.nilai_map/nilai(fitur tanpa nilai dibuang).resources/views/dataspasial/peta/index.blade.php+filter.blade.php— kartu filter/panel lapisan di kiri (col-md-3) dan peta lebar penuh di kanan (col-md-9), pemuat kecamatan dan filter dinamis (select/angka/teks) berbasisfetchdengan penjaga request basi (lastRequestId).public/js/dataspasial/peta-gabungan.js(vanilla, tanpa jQuery) — basemap OSM, batas wilayah,L.markerClusterGroup(chunkedLoading,removeOutsideVisibleBounds) per lapisan (legacy:/data:), popup pada hover + klik, ikon marker lokal, serta auto-fit bounds ke wilayah yang berisi data (dan reset ke tampilan Indonesia jika kosong).geojsonGabungan()dikoreksi darigeojson-gabunganmenjadigeojsonagar sesuai kontrak API-04.CustomCspPreset) diperluas untuk Leaflet.markercluster (CSS/JS) danhttps://unpkg.com/padaimg-srcsehingga ikon marker tampil.tests/Feature/DataSpasial/PetaGabunganControllerTest.php(12 kasus: tata letak, tanpa pemilih sektor, layers/filters/popup, unavailable/empty, filter isian, filter kecamatan diteruskan) +tests/Browser/SmokePetaGabunganTest.php(kerangka halaman, pesan unavailable, tidak overflow di ponsel).specs/2507-peta-gabungan-dashboard/dan fixturetests/Feature/DataSpasial/Fixtures.phpdiperbarui (fixture GeoJSON gabungan & skema isian bertanda filter/popup).Reason for change:
meta.unavailabledan UI menampilkan pesan generik ("Data sementara tidak tersedia") tanpa stack trace.geojsonmenyelaraskan OpenKab dengan API-04.Impact of change:
✅ Analisis: Data geospasial lama dan DataSpasial tampil bersama dengan popup identitas + isian bertanda popup beserta satuan, sumber, dan tanggal pembaruan.
✅ Performa: Klaster dengan
chunkedLoading+removeOutsideVisibleBoundsmenjaga interaksi tetap lancar pada dataset besar, dan peta fokus otomatis ke wilayah berisi data.✅ Ketahanan: Gagal API tidak memecah halaman; otorisasi memakai izin
dataspasial-peta-readyang sudah ada.Related Issue
#1299
Steps to Reproduce
Before (kerangka):
After (fitur):
dataspasial-peta-read(mis. Analis OPD).Testing on related features:
Checklist
Technical Details
Technical Explanation
Alur permintaan:
DataSpasialApiService::listSkema(['sektor' => kode])dipakai membaca isian skema terbit untuk menentukantampil_filterdantampil_popup. Proxy selalu membalas HTTP 200 dengan penandameta.unavailable/meta.emptysupaya UI menampilkan pesan yang bersahabat alih-alih error.Struktur lapisan (JS): kunci
legacy:<kategori>untuk geospasial lama dandata:<sektor_kode>untuk DataSpasial; tiap kunci punyamarkerClusterGroupsendiri. Bounds tiap lapisan dikumpulkan agarfitToVisible()memfokuskan peta ke wilayah berisi data.Rute & izin:
Configuration changes
app/Policies/CustomCspPreset.php:img-srcmenambahhttps://unpkg.com/; style/script Leaflet.markercluster 1.5.3 ditambahkan.Dependencies added
Testing
Manual Testing
Automated Testing
tests/Feature/DataSpasial/PetaGabunganControllerTest.php(12 passed)tests/Browser/SmokePetaGabunganTest.php(kerangka, unavailable, mobile no-overflow)Screenshots / Video
Before:
Kartu "kerangka menu" tanpa peta.
After:
Peta gabungan dua blok dengan panel lapisan di kiri (di bawah filter), popup titik, dan filter kecamatan/dinamis. Screenshot disertakan sebagai lampiran PR.
Breaking Changes
None
Migration Guide
Not required (tanpa tabel/migrasi baru; seluruh data
ds_*tetap di API Satu Data).References
docs/spasial/openapi-fondasi.yaml