Skip to main content

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

TypeDescriptionServed As
RasterImage tile layers (satellite, DEM, zoning maps)PNG tiles via /raster/{layer}/{z}/{x}/{y}.png
VectorVector data layers (boundaries, roads, buildings)PMTiles via /tiles/{layer}.pmtiles
Base LayerSpecial raster layers used as base map optionsSame as raster, but with isBaseLayer flag

Layer Properties

Each layer has the following configurable properties:

PropertyTypeDescription
nameStringDisplay name
categoryStringGrouping category
typeEnumraster or vector
tileUrlStringTile endpoint path
enabledBooleanWhether the layer is active/visible
isBaseLayerBooleanUsed as a base map option
sortOrderNumberDisplay order in the layer list
boundsJSONGeographic bounding box for auto-zoom
minZoom / maxZoomNumberZoom 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 sortOrder within the base layer section

API Integration

The admin panel communicates with two services for layer management:

OperationServiceEndpoint
List/search layersGeo ServerGET /api/layers
Create layerGeo ServerPOST /admin/layers
Update layerGeo ServerPUT /admin/layers/:id
Delete layerGeo ServerDELETE /admin/layers/:id
Upload tilesGeo ServerPOST /admin/upload
Public layer listGeo ServerGET /layers
note

The Geo Server has separate /admin/* routes (authenticated) and public /layers endpoints.