How yamiriko/gis_nextjs works
This Next.js GIS app presents Pekanbaru’s district boundaries in an interactive Leaflet map. The user opens the home page; the client map obtains the KMZ through the API, unpacks and parses its KML, then renders styled boundaries, district popups, a satellite basemap, and a clickable city-center marker. The graph separates page delivery, KMZ access, and map behavior. Some fetch and rendering details are documented in the README but omitted from the source excerpts, so those links cite the README; unsampled internals are not inferred.
Main entry points: pekanbaru-map.js Interactive map · page.js Home page · route.js KMZ endpoint · BatasKecamatanKotaPekanbaru.kmz District KMZ
Components 13
Page delivery
- Home page
app/page.js
Boundary data
- KMZ endpoint
app/api/kmz/route.js - District KMZ
app/BatasKecamatanKotaPekanbaru.kmz
Map experience
- Interactive map
app/pekanbaru-map.js - KMZ extraction
app/pekanbaru-map.js - KML conversion
app/pekanbaru-map.js - KML style handling
app/pekanbaru-map.js - District boundaries
app/pekanbaru-map.js - District details
app/pekanbaru-map.js - Map navigation
app/pekanbaru-map.js - City-center marker
app/pekanbaru-map.js
Other components
- Map visitor
- Satellite tiles
Connections 14
- Map visitor → Home page: opens
README.md - Home page → Interactive map: loads
app/page.js - Interactive map → KMZ endpoint: fetches KMZ
README.md - KMZ endpoint → District KMZ: reads
app/api/kmz/route.js - Interactive map → KMZ extraction: unpacks
app/pekanbaru-map.js - KMZ extraction → KML conversion: passes KML
app/pekanbaru-map.js - KML conversion → District boundaries: converts to GeoJSON
app/pekanbaru-map.js - KML conversion → KML style handling: extracts styles
app/pekanbaru-map.js - District boundaries → KML style handling: resolves feature style
app/pekanbaru-map.js - District boundaries → District details: binds details
README.md - Interactive map → District boundaries: renders
app/pekanbaru-map.js - Interactive map → Map navigation: fits bounds
app/pekanbaru-map.js - Interactive map → City-center marker: renders
app/pekanbaru-map.js - Interactive map → Satellite tiles: loads tiles
app/pekanbaru-map.js