What Layer Types Are Supported in GeoLibre (GeoJSON, XYZ, WMS, COG, PMTiles, 3D Tiles) and How Are They Rendered?
GeoLibre supports 12 layer types including GeoJSON, XYZ raster tiles, WMS, COG, PMTiles, and 3D Tiles, each mapped to dedicated rendering engines—MapLibre for 2D vector and raster data, Cesium for 3D datasets, and Deck.gl for advanced visualizations.
The open-source GeoLibre geospatial platform provides a unified interface for ingesting diverse spatial data formats. According to the source code in [packages/core/src/types.ts](https://github.com/opengeos/GeoLibre/blob/main/packages/core/src/types.ts) (lines 62-86), all supported layer types are enumerated in the core constant LAYER_TYPES, with each type wired to a specific rendering pipeline in the desktop application.
Complete List of Supported Layer Types in GeoLibre
The LAYER_TYPES constant defines every valid layer type. Below are all 12 supported formats with their rendering engines:
geojson— Inline or remote GeoJSON FeatureCollections, rendered via MapLibre vector sourcevector-tiles— TileJSON endpoints serving.pbfvector tiles, rendered via MapLibre vector sourcepmtiles— PMTiles archives (vector or raster), rendered via MapLibre vector or raster source with dedicated PMTiles protocolxyz— Classic{z}/{x}/{y}.pngraster tiles, rendered via MapLibre raster sourcecog— Cloud-Optimized GeoTIFF files, rendered via MapLibre raster sourcewms— OGC WMS GetMap endpoints, rendered via MapLibre raster source with tiled image requestswfs— OGC WFS returning GeoJSON, rendered via MapLibre vector sourcearcgis-feature— ArcGIS Feature Service, converted to GeoJSON and rendered via MapLibre vector sourcearcgis-i3s— ArcGIS I3S 3D scene tiles, rendered via Cesium I3SLayer integration ([packages/plugins/src/plugins/arcgis-i3s-tiles.ts](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/arcgis-i3s-tiles.ts), lines 418-440)3d-tiles— OGC 3D Tilesets (.b3dm,.i3dm), rendered via Cesium renderer ([packages/map/src/cesium-layer-sync.ts](https://github.com/opengeos/GeoLibre/blob/main/packages/map/src/cesium-layer-sync.ts))deckgl-viz— Deck.gl JSON specifications, rendered via Deck.gl overlay ([packages/plugins/src/plugins/deckgl-viz/registry.ts](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/deckgl-viz/registry.ts))weather— Weather raster tiles, rendered via MapLibre raster source ([packages/plugins/src/plugins/weather-layer.ts](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/weather-layer.ts))
How Layer Rendering Works in GeoLibre
The rendering pipeline follows a four-stage architecture that separates data storage from visual output.
1. Layer Registration and State Management
When a layer is added—through the UI, Python console, or assistant API—its definition is stored in the global Zustand store (@geolibre/core). Each store entry contains:
type: The layer type fromLAYER_TYPES- Source URL or inline data
- Optional style metadata for visualization
2. Source Creation via Sync Modules
The [packages/map/src/layer-sync.ts](https://github.com/opengeos/GeoLibre/blob/main/packages/map/src/layer-sync.ts) module translates stored layers into MapLibre sources:
- Vector layers (
geojson,vector-tiles,pmtilesvector): Create MapLibre vector sources - Raster layers (
xyz,cog,wms,pmtilesraster,weather): Create MapLibre raster sources - 3D layers (
arcgis-i3s,3d-tiles): Handled by [packages/map/src/cesium-layer-sync.ts](https://github.com/opengeos/GeoLibre/blob/main/packages/map/src/cesium-layer-sync.ts) - Deck.gl visualizations: Passed to [
packages/plugins/src/plugins/deckgl-viz/overlay.ts](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/deckgl-viz/overlay.ts)
3. Style Layer Mapping
After source creation, [packages/map/src/style-mapper.ts](https://github.com/opengeos/GeoLibre/blob/main/packages/map/src/style-mapper.ts) adds matching MapLibre style layers:
- Vector data:
fill,line,circle,symbollayers - Raster data:
rasterlayers
Style properties are driven by the layer's style object and the UI Style panel ([docs/user-guide/styling.md](https://github.com/opengeos/GeoLibre/blob/main/docs/user-guide/styling.md)).
4. Live Synchronization
The MapController.syncLayers loop monitors the Zustand store for changes and invokes MapLibre APIs (addSource, addLayer, removeSource, removeLayer) to keep the visual map synchronized with application state.
Code Examples: Adding Layers in GeoLibre
Python Console
# GeoJSON (inline or remote)
layer_id = geolibre.add_geojson(
{"type": "FeatureCollection", "features": [...]},
name="My polygons"
)
# XYZ raster tiles
geolibre.add_tile_layer(
"https://tiles.opentopomap.org/{z}/{x}/{y}.png",
name="OpenTopoMap"
)
# Cloud-Optimized GeoTIFF
geolibre.add_cog(
"https://storage.googleapis.com/example/cog.tif",
name="Elevation COG"
)
# PMTiles (vector)
geolibre.add_pmtiles(
"https://example.com/tiles.pmtiles",
name="Vector PMTiles",
tile_type="vector"
)
# WMS raster layer
geolibre.add_wms(
endpoint="https://basemap.nationalmap.gov/arcgis/services/USGSImageryOnly/MapServer/WMSServer",
layers="0",
name="USGS Imagery",
image_format="image/png"
)
# 3D Tiles (Cesium)
geolibre.add_3d_tiles(
"https://example.com/tileset/tileset.json",
name="3D Buildings"
)
Assistant API (TypeScript)
await geolibre.addLayer({
type: "geojson",
name: "Road network",
source: { url: "https://example.com/roads.geojson" },
style: { lineColor: "#ff6600", lineWidth: 2 }
});
Key Source Files for Layer Rendering
Vector vs. Raster vs. 3D: Rendering Engine Selection
GeoLibre's architecture delegates to three specialized engines based on data type:
- MapLibre handles all 2D vector and raster data through unified source abstractions
- Cesium manages 3D Tiles and ArcGIS I3S scenes with full 3D globe integration
- Deck.gl powers advanced visualization overlays for complex rendering pipelines
This separation allows optimal performance for each data category while presenting a consistent API to users.
Summary
- GeoLibre supports 12 layer types defined in
LAYER_TYPESat [packages/core/src/types.ts](https://github.com/opengeos/GeoLibre/blob/main/packages/core/src/types.ts) - GeoJSON, XYZ, WMS, COG, and PMTiles use MapLibre's native vector or raster sources
- 3D Tiles and ArcGIS I3S render through Cesium integration
- Deck.gl specifications render via dedicated overlay
- Layer state lives in Zustand; sync modules translate to MapLibre/Cesium/Deck.gl APIs
- Python console and assistant API provide equivalent programmatic access to all layer types
Frequently Asked Questions
How do I add a PMTiles layer with both vector and raster data in GeoLibre?
Use geolibre.add_pmtiles() with the tile_type parameter set to "vector" or "raster" accordingly. The PMTiles protocol handler in the desktop app automatically selects the correct MapLibre source type based on this parameter.
Can GeoLibre render WMS layers with custom parameters?
Yes. The geolibre.add_wms() method accepts layers, image_format, and additional query parameters. The client constructs tiled image requests from the WMS endpoint and renders them through MapLibre's raster source pipeline.
What is the difference between 3D Tiles and ArcGIS I3S rendering in GeoLibre?
3D Tiles use the standard OGC format and render directly through Cesium's native 3D Tiles engine. ArcGIS I3S requires additional validation and conversion in [packages/plugins/src/plugins/arcgis-i3s-tiles.ts](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/arcgis-i3s-tiles.ts) before Cesium rendering, handling Esri-specific scene layer properties.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →