Files
2026-06-13 13:38:52 +07:00

2.5 KiB

✓ WebGIS Fixed - Access Instructions

Issue Fixed

  • ✓ Database schema updated and verified
  • ✓ API error handling improved
  • ✓ Trigger issues resolved
  • ✓ All PHP files syntax checked

IMPORTANT: How to Access the Application

The application requires an HTTP server. Do NOT open the file directly from Windows Explorer!

Start XAMPP/Apache Server

  1. Open XAMPP Control Panel
  2. Click "Start" for Apache and MySQL
  3. Wait until both show as "Running" (green)

Access the Application

  • Open in Browser: http://localhost/webgis/
  • NOT: file:///C:/xampp_new/htdocs/webgis/index.html (This blocks fetch requests!)

What Was Fixed

1. Database Issues

  • Created webgis_unified database
  • Created data_unified table with all required columns:
    • Rumah Ibadah (worship): nama, jenis, alamat, kontak, kegiatan, kapasitas, radius_meter
    • Rumah Miskin (poor_house): nama_kepala_keluarga, alamat, jumlah_anggota, kondisi_rumah, sumber_penghasilan, kebutuhan_prioritas, status_bantuan
    • Data Umum (point): nama, no_wa, buka_24jam

2. API Error Handling

  • Improved error messages in save_point.php
  • Added proper Content-Type headers
  • Added response status codes
  • Added database connection checks
  • Updated: save_point.php, update_point.php, delete_point.php, get_point.php

3. Database Triggers

  • Fixed trigger references to use IFNULL for NULL fields
  • Resolved "Unknown column" error in triggers

Testing the Application

  1. Access via http://localhost/webgis/
  2. Click "Draw Marker" tool on the map
  3. Click a location on the map
  4. Select marker type (Rumah Ibadah, Rumah Miskin, or Data Umum)
  5. Fill in the form fields
  6. Click "Simpan" to save

Troubleshooting

If you still see "Failed to fetch" errors:

  1. Check Apache is running - XAMPP Control Panel should show "Running"
  2. Check MySQL is running - XAMPP Control Panel should show "Running"
  3. Open Developer Console - F12 in browser
  4. Check Network tab - Verify requests are going to http://localhost/webgis/save_point.php
  5. Check Console tab - Look for specific error messages

Database Structure

All data is stored in webgis_unified.data_unified table with columns:

  • id, tipe, nama, jenis, alamat, kontak, no_wa, status
  • kegiatan, kapasitas, radius_meter
  • nama_kepala_keluarga, jumlah_anggota, kondisi_rumah
  • sumber_penghasilan, kebutuhan_prioritas, status_bantuan
  • latitude, longitude, geom (for geometries)
  • created_at, updated_at (timestamps)