Layer Management
The Layers Page (/layers) is one of the most complex admin pages. It manages GIS layers that are served by the Geo Tile Server and displayed on the frontend map.
Layer Types
| Type | Description | Served As |
|---|---|---|
| Raster | Image tile layers (satellite, DEM, zoning maps) | PNG tiles via /raster/{layer}/{z}/{x}/{y}.png |
| Vector | Vector data layers (boundaries, roads, buildings) | PMTiles via /tiles/{layer}.pmtiles |
| Base Layer | Special raster layers used as base map options | Same as raster, but with isBaseLayer flag |
Layer Properties
Each layer has the following configurable properties:
| Property | Type | Description |
|---|---|---|
name | String | Display name |
category | String | Grouping category |
type | Enum | raster or vector |
tileUrl | String | Tile endpoint path |
enabled | Boolean | Whether the layer is active/visible |
isBaseLayer | Boolean | Used as a base map option |
sortOrder | Number | Display order in the layer list |
bounds | JSON | Geographic bounding box for auto-zoom |
minZoom / maxZoom | Number | Zoom range for visibility |
Admin UI Features
Layer List
- Layers grouped by category with item counts
- Toggle switches for enabling/disabling layers
- Sort order management with drag-and-drop or manual input
- Search and filter by name, category, type
Layer CRUD
- Create — Upload tile files and configure layer properties
- Edit — Modify properties, update bounds, change category
- Delete — Remove layer and associated tile files
- Preview — Inline map preview of the layer tiles
Base Layer Management
- Base layers are displayed separately at the top
- Radio-button selection on the frontend (only one active at a time)
- Sorted by
sortOrderwithin the base layer section
API Integration
The admin panel communicates with two services for layer management:
| Operation | Service | Endpoint |
|---|---|---|
| List/search layers | Geo Server | GET /api/layers |
| Create layer | Geo Server | POST /admin/layers |
| Update layer | Geo Server | PUT /admin/layers/:id |
| Delete layer | Geo Server | DELETE /admin/layers/:id |
| Upload tiles | Geo Server | POST /admin/upload |
| Public layer list | Geo Server | GET /layers |
note
The Geo Server has separate /admin/* routes (authenticated) and public /layers endpoints.