Publish a layer
Every map in Loka Server goes the same way: Workspace → Data Store → Layer → Style → Publish. You do all of it in the web console at http://127.0.0.1:8080.
The sidebar of the console has these groups:
| Group | Pages |
|---|---|
| Main | Dashboard, Workspaces, Data Stores, Layers, Layer Groups, ENC Charts, Elevation, 3D Tiles, Styles, Publishing |
| Analysis | Workbench, Guides |
| Services | OGC Services, Tile Cache |
| Monitoring | System, Monitoring, Logs |
| Settings | Security, API Tokens |
Press Ctrl+K to jump to a page by name.
1. Create a workspace
Section titled “1. Create a workspace”A workspace groups layers, like a project. Its name is what readers see; Loka makes the service name for you.
- Open Workspaces and press + Add Workspace.
- Enter a Name (up to 160 characters), for example
Peta Indonesia 1:10M. - Press Save Workspace.
Loka builds the service name from the name: lower-case letters, digits and _, at most 40 characters. Renaming a workspace later changes only its display name; addresses that clients use stay the same.
A workspace can be deleted only when it is empty, and only by an administrator.
2. Add a data store
Section titled “2. Add a data store”A data store is where the data comes from: a file, a database or a remote service.
-
Open Data Stores and press Add new Store.
-
Pick a type in New Data Source:
Group Types Vector GeoPackage, PostGIS, WFS service, Shapefile, Aeronautical (AIXM) Raster GeoTIFF, Weather (GRIB) Military Military map product (CADRG/CIB, ADRG, ASRP/USRP, NITF; a VPF database becomes a GeoPackage store) -
Choose the Workspace and the file (or the connection), then press Save.
PostGIS and WFS service stores are for administrators only. For PostGIS, press Test connection before you save. A PostGIS store can be Global — usable from any workspace; a store in a workspace publishes only into that workspace.
ENC charts and elevation are not data stores: import S-57 cells on ENC Charts (Import cells) and DTED on Elevation. See Formats.
3. Publish a layer
Section titled “3. Publish a layer”After a file upload, the console opens the new layer. For a store with several tables, open the store and use Publish layers:
- File stores: press Publish next to a table or raster. A global store asks which workspace to publish into.
- PostGIS stores: press Publish live to read the table on every request, or Snapshot to copy it once (Refresh snapshot copies it again).
The layer page has five tabs:
| Tab | What it is for |
|---|---|
| Data | The name, the WMS name and where the data comes from |
| Publishing | Publish the draft, preview the service, copy the addresses |
| Style Editor | The layer’s SLD style |
| Layer Preview | The map |
| Metadata | Abstract and keywords, shown to clients such as QGIS in the capabilities |
The WMS name is made once from the layer name, for example roads_2024. You can change it on the Data tab, but QGIS and web clients that use the old name in LAYERS= stop working. WMTS and TMS addresses and cached tiles are not affected.
4. Style it
Section titled “4. Style it”Each layer has its own SLD 1.0 style. On the layer’s Style Editor tab:
- Edit the SLD, or start from Load template… (Point, Line, Polygon, raster RGB, grayscale or colour ramp).
- Press Validate.
- Press Apply / Save Draft. The Draft Preview shows the draft; Published WMS shows what clients see now.
- Press Publish Style.
A style can be at most 24 KiB. Validation checks the syntax and the structure; how a rule is drawn depends on MapServer.
Styles in the sidebar is the style library: styles you can reuse. Press + Add a new style, start from a template or copy a layer’s style, then Apply & Save it to a layer. That puts it on the layer as a draft, which you publish from the layer’s Style Editor.
Some layers have their own style modes:
| Layer | Style |
|---|---|
| Points with a symbol code | MIL-STD-2525 symbols: unit and equipment symbols or tactical graphics, from a code attribute |
| Aeronautical (AIXM) | Use the chart style: ICAO Annex 4 symbols |
| ENC charts | The S-52 display, with day, dusk and night palettes, on the chart’s Style tab |
5. Publish
Section titled “5. Publish”On the Publishing tab, press Publish draft (revision N). The layer badge changes from Published · draft pending to Published.
The Service endpoints card lists every address for the layer: WMS, WMTS, XYZ, TMS, WCS for rasters, WFS for vectors and vector tiles. See Services and clients for how to use them.
Layer groups
Section titled “Layer groups”A layer group draws several layers as one map.
- Open Layer Groups and press + Create Layer Group.
- Choose the workspace, a display name and up to 20 member layers. The order you select them in is the drawing order.
- Press Create Group.
A group is published as soon as it is saved. Its members always use their published style.
Tile cache
Section titled “Tile cache”MapCache keeps the tiles of every layer and group. Publishing a new style starts a fresh cache by itself.
To fill the cache ahead, or clear it, open Tile Cache and press Seed / Purge (administrators only):
| Operation | Effect |
|---|---|
| Seed | Adds missing tiles |
| Reseed | Replaces tiles |
| Purge | Deletes cached tiles |
Choose the zoom levels (0 to 18) and, if you want, an extent in EPSG:3857. One job can make at most 75,000 tiles. Recent Jobs lists them, with Run again.