maplibreum Logo

Contents:

  • README
  • MapLibreum
  • Releasing Maplibreum
  • CDN Fallbacks and Error Handling
  • GitHub Pages Examples Deployment
  • API Reference
  • MapLibre Examples Gallery
    • About This Gallery
      • How to Use This Gallery
      • Coverage Statistics
    • Example Categories
      • 3D and Terrain
      • Markers and Symbols
      • Data Sources
      • Layers and Styling
      • Animation
      • Interactive Features
      • Real-time Data
      • Video and Media
      • Custom Layers
    • Viewing Examples Locally
    • Full Example List
    • Implementation Notes
      • Feature Parity
      • Testing Approach
      • Contributing New Examples
    • Additional Resources
  • Protocol helpers
  • Changelog
  • Changelog
  • TODO
maplibreum
  • MapLibre Examples Gallery
  • View page source

MapLibre Examples Gallery

This section showcases all the official MapLibre GL JS examples recreated using maplibreum. Each example demonstrates feature parity between the original JavaScript implementation and our Python API.

About This Gallery

We have successfully recreated all 123 official MapLibre GL JS examples using maplibreum. This demonstrates complete feature coverage and validates that maplibreum can handle real-world mapping scenarios.

How to Use This Gallery

For each example:

  • Original Example: The reference implementation from maplibre.org

  • Reproduced Example: Our Python/maplibreum implementation

  • Test Code: Link to the Python test that generates the reproduced example

Coverage Statistics

  • Total Examples: 123/123 (100%)

  • Implementation Status: Complete ✓

  • Test Coverage: All examples have automated pytest tests

Example Categories

The examples are organized by functionality:

3D and Terrain

  • 3D Terrain - Test

  • Add a 3D Model to Globe Using Three.js - Test

  • Add a 3D Model Using Three.js - Test

  • Add a 3D Model with Babylon.js - Test

  • Add a 3D Model with Shadow Using Three.js - Test

  • Adding 3D Models Using Three.js on Terrain - Test

  • Display Buildings in 3D - Test

  • Extrude Polygons for 3D Indoor Mapping - Test

Markers and Symbols

  • Add a Default Marker - Test

  • Add a Generated Icon to the Map - Test

  • Add an Icon to the Map - Test

  • Add an Animated Icon to the Map - Test

  • Add Custom Icons with Markers - Test

  • Animate a Marker - Test

  • Attach a Popup to a Marker Instance - Test

Data Sources

  • Add a Canvas Source - Test

  • Add a COG Raster Source - Test

  • Add a Raster Tile Source - Test

  • Add a Vector Tile Source - Test

  • Add a WMS Source - Test

Layers and Styling

  • Add a GeoJSON Line - Test

  • Add a GeoJSON Polygon - Test

  • Add a Color Relief Layer - Test

  • Add a Hillshade Layer - Test

  • Add a Multidirectional Hillshade Layer - Test

  • Add a New Layer Below Labels - Test

  • Add a Pattern to a Polygon - Test

  • Add a Stretchable Image to the Map - Test

  • Add Contour Lines - Test

  • Add Multiple Geometries from One GeoJSON Source - Test

Animation

  • Animate a Line - Test

  • Animate a Point - Test

  • Animate a Point Along a Route - Test

  • Animate a Series of Images - Test

  • Animate Map Camera Around a Point - Test

  • Animate Symbol to Follow the Mouse - Test

Interactive Features

  • Center the Map on a Clicked Symbol - Test

  • Change a Layer’s Color with Buttons - Test

  • Create a Draggable Marker - Test

  • Create a Draggable Point - Test

Real-time Data

  • Add Live Realtime Data - Test

  • Update a Feature in Realtime - Test

Video and Media

  • Add a Video - Test

Custom Layers

  • Add a Custom Layer with Tiles to a Globe - Test

Viewing Examples Locally

To view the original MapLibre examples:

# Navigate to the pages directory
cd development/maplibre_examples/pages/
# Open any example in your browser

To regenerate the reproduced examples:

# Run the example tests
pytest tests/test_examples/ -v
# The generated HTML files are in development/maplibre_examples/reproduced_pages/

Full Example List

All 123 examples are fully implemented and tested. For a complete list with implementation status, see the status.json file.

Implementation Notes

Feature Parity

Each example demonstrates that maplibreum provides complete feature parity with MapLibre GL JS, including:

  • All layer types (raster, vector, 3D, etc.)

  • Interactive controls and events

  • Animation and transitions

  • Custom styling and expressions

  • Terrain, sky, and fog effects

  • Video and canvas sources

  • Real-time data updates

  • And more!

Testing Approach

Every example has:

  1. An automated pytest test that generates the HTML

  2. The test validates the generated configuration

  3. Optional browser-based validation using Playwright

Contributing New Examples

To add new MapLibre examples:

  1. Run python development/maplibre_examples/scrapping.py to fetch the latest examples

  2. Check status.json for unimplemented examples

  3. Create a corresponding test in tests/test_examples/

  4. Update status.json when complete

Additional Resources

  • MapLibre GL JS Documentation

  • maplibreum GitHub Repository

  • MapLibre Examples Testing Suite README

Previous Next

© Copyright 2025–2026, Kauê de Moraes Vestena.

Built with Sphinx using a theme provided by Read the Docs.